hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
12ef886478e147538f746f1c395ad1bd6b5f15d7
2,499
js
JavaScript
pages/detail/detail.js
XinchaoGou/SecondHand
204c740475347ca1fe92617c6d268831f2e6e9e6
[ "MIT" ]
1
2018-08-03T06:44:14.000Z
2018-08-03T06:44:14.000Z
pages/detail/detail.js
XinchaoGou/SecondHand
204c740475347ca1fe92617c6d268831f2e6e9e6
[ "MIT" ]
null
null
null
pages/detail/detail.js
XinchaoGou/SecondHand
204c740475347ca1fe92617c6d268831f2e6e9e6
[ "MIT" ]
null
null
null
// pages/detail/detail.js Page({ /** * 页面的初始数据 */ data: { //物品内容 content: "", noteNowLen: 0,//备注当前字数 noteMaxLen: 600,//备注最多字数 is_disabled: true,//判断是否禁用accept和delete按钮 }, /** * 物品内容,字数改变触发事件 * TODO: 根据重构的代码修改 * by xinchao * 从offer.js页面直接摘抄by yining */ bindTextAreaChange: function (e) { var that = this; var value = e.detail.value, len = parseInt(value.length); if (len > that.data.noteMaxLen) return; that.setData({ content: value, noteNowLen: len }) if (len > 0) { that.setData({ is_disabled: false }) } else { that.setData({ is_disabled: true }) } }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { console.log('监听detail页面onLoad函数') var that = this; var content = options.content; console.log(content); that.setData({ content: content, noteNowLen: parseInt(content.length) }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { console.log('监听detail页面onShow函数') var that = this; console.log(that.data.content.length) if (that.data.content.length > 0) { that.setData({ is_disabled: false }) } else{ that.setData({ is_disabled: true }) } }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { console.log('执行了卸载函数') var that = this; var pages = getCurrentPages(); var prevPage = pages[pages.length - 2]; //上一个页面 //直接调用上一个页面的setData()方法,把数据存到上一个页面中去 var value = that.data.content, len = parseInt(value.length); var str = 'offerItem.content'; if (len > 0) { prevPage.setData({ [str]: value, isContent: true }) } else{ prevPage.setData({ [str]: value, isContent: false }) } }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { }, //by yining /** * modified by xinchao */ delete_tap: function (e) { var that = this; that.setData({ content: '', is_disabled:true }) }, //by yining accept_tap: function (e) { wx.navigateBack({ delta: 1 }) } })
16.66
89
0.529412
12ef8b8df977a61f11121e579b8f1a8c67223b36
1,904
js
JavaScript
app/remoteConfig.js
eosdacvietnam/eostoolkit
fadec10fe809e97c8db70c072b2a13b2fcf947c2
[ "MIT" ]
null
null
null
app/remoteConfig.js
eosdacvietnam/eostoolkit
fadec10fe809e97c8db70c072b2a13b2fcf947c2
[ "MIT" ]
null
null
null
app/remoteConfig.js
eosdacvietnam/eostoolkit
fadec10fe809e97c8db70c072b2a13b2fcf947c2
[ "MIT" ]
null
null
null
// // Provide a list of EOS tokens that are available // const airgrabs = [ { symbol: 'ATD', account: 'eosatidiumio', method: 'signup', description: 'Payments & Budget Management Decentralized App Leveraging the Blockchain, Cryptocurrency and AI Technologies. Drops happen every 24 hours, Airgrab Today!', url: 'https://www.atidium.io/', }, { symbol: 'BRM', account: 'openbrmeos11', method: 'open', description: 'Very First Open source Billing and Revenue Management on Blockchain. OpenBRM is a carrier-grade billing platform aimed at telecommunications, Subscription, Utilities and logistics organizations.', url: 'https://openbrm.io', }, { symbol: 'NEB', account: 'nebulatokenn', method: 'open', description: 'Nebula is a decentralized, curated list of professionals and job opportunities.', url: 'https://nebulaprotocol.com', }, { symbol: 'POOR', account: 'poormantoken', method: 'signup', description: 'A reward for people who STAKE and VOTE for EOS Block Producers with MONTHLY drops.', url: 'https://eostoolkit.io/airgrab', }, { symbol: 'WIZZ', account: 'wizznetwork1', method: 'signup', description: 'Modern Decentralized Ecosystem, Built on EOSIO. Tools, Rewards, Chat, and more. AIGRAB NOW!', url: 'https://wizz.network', }, ]; const claimsUrl = 'https://raw.githubusercontent.com/eostoolkit/eos-claims/master/claims.json'; const airgrabsUrl = 'https://raw.githubusercontent.com/eoscafe/eos-airgrabs/master/airgrabs.json'; const tokensUrl = 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/tokens.json'; const networksUrl = 'https://raw.githubusercontent.com/eostoolkit/eos-networks/master/networks.json'; const refUrl = 'https://s3.amazonaws.com/api.eosvotes.io/eosvotes/tallies/latest.json'; export { refUrl, tokensUrl, networksUrl, claimsUrl, airgrabs };
38.08
214
0.707458
12efbe7845f9da577a7aa3c4fa8cb6d055f218db
5,752
js
JavaScript
saleor/static/backend/js/addSubCategoryModal.js
glosoftgroup/KahawaHardware
893e94246583addf41c3bb0d58d2ce6bcd233c4f
[ "BSD-3-Clause" ]
2
2017-07-11T12:40:59.000Z
2017-10-18T18:02:46.000Z
saleor/static/backend/js/addSubCategoryModal.js
glosoftgroup/KahawaHardware
893e94246583addf41c3bb0d58d2ce6bcd233c4f
[ "BSD-3-Clause" ]
12
2017-06-19T07:20:41.000Z
2022-03-15T19:03:33.000Z
saleor/static/backend/js/addSubCategoryModal.js
glosoftgroup/classic-pck
3613b37f2d568f5b0ccf62a4a47bcd0a68aa99a8
[ "BSD-3-Clause" ]
null
null
null
$(function() { var pageUrls = $('.pageUrls'); var modalBtn = $('#add-new-class'); var addClassBtn = $('#addClassBtn'); var modalId = $('#addProductClass'); var withVariants = $('#withVariants'); var url = pageUrls.data('attributes'); var addClassUrl = pageUrls.data('addclassurl'); var addAttrUrl = pageUrls.data('addattrurl'); // select selectors var getAttributes = $('.getAttributes'); var getAttributesTwo = $('.getAttributesTwo'); // open modal modalBtn.on('click',function(){ modalId.modal(); }); // alertUser function alertUser(msg,status='bg-success',header='Well done!') { $.jGrowl(msg, {header: header,theme: status}); } // add New Class // ajax function addNewClass(name,attributes,variants,has_variants=1) { var dynamicData = {}; dynamicData["attributes"] = JSON.stringify(attributes); dynamicData["name"] = name; dynamicData['has_variants'] = has_variants; dynamicData["csrfmiddlewaretoken"] = jQuery("[name=csrfmiddlewaretoken]").val(); dynamicData['variants']= JSON.stringify(variants); return $.ajax({ url: addClassUrl, type: "post", data: dynamicData }); } // ./add new class ajax function function addItem(newitemnum, newitemdesc) { var selector = $('#id_product_class'); selector.append('<option value="'+newitemnum+'">'+newitemdesc+'</option>'); selector.selectpicker('refresh'); selector.selectpicker('val', newitemnum); } addClassBtn.on('click',function(){ var cname = $('#newClassName').val(); var attributes = getAttributes.val(); var variants = getAttributesTwo.val(); var has_variants = 1; if(withVariants.is(":checked")) { has_variants = 1; }else{ has_variants = 0;} //console.log(has_variants); if(!cname){ alertUser('Sub category name required!','bg-danger','Error!'); return false; } addNewClass(cname,attributes,variants,has_variants).done(function(data){ alertUser('Sub category name required!'); addItem(parseInt(data['value']),data['text']); $('#newClassName').val(''); $('#addProductClass').modal('hide'); refreshAttributes(); }).fail(function(){ alertUser('Sub-category already added. Please enter a unique name','bg-danger','Error!'); }); }); getAttributes.on('tokenize:select', function(container){ $(this).tokenize2().trigger('tokenize:search', [$(this).tokenize2().input.val()]); }); // get getAttributes getAttributes.tokenize2({ placeholder: 'Select Attributes(s) (eg. Brand)', displayNoResultsMessage:true, //searchMinLength:3, sortable: true, dataSource: function(search, object){ $.ajax(url, { data: { search: search, start: 1, group:'users' }, dataType: 'json', success: function(data){ var $items = []; $.each(data, function(k, v){ $items.push(v); }); object.trigger('tokenize:dropdown:fill', [$items]); } }); } }); getAttributesTwo.on('tokenize:select', function(container){ $(this).tokenize2().trigger('tokenize:search', [$(this).tokenize2().input.val()]); }); getAttributesTwo.tokenize2({ placeholder: 'Select Attributes(s) (eg. Box Size, Bottle size, Book cover, weight)', displayNoResultsMessage:true, //searchMinLength:3, sortable: true, dataSource: function(search, object){ $.ajax(url, { data: { search: search, start: 1, group:'users' }, dataType: 'json', success: function(data){ var $items = []; $.each(data, function(k, v){ $items.push(v); }); object.trigger('tokenize:dropdown:fill', [$items]); } }); } }); // sdfj // add attributes var attrNameBtn = $('#attr-name'); var newValueBtn = $('#newvalue'); var Aurl = addAttrUrl; function alertUser(msg,status='bg-success',header='Well done!') { $.jGrowl(msg, {header: header,theme: status}); } // ajax function addAttribute(myUrl,attName) { var dynamicData = {}; dynamicData["csrfmiddlewaretoken"] = jQuery("[name=csrfmiddlewaretoken]").val(); dynamicData['name'] = attName; return $.ajax({ url: myUrl, type: "post", data: dynamicData }); } // ajax function addNValue(myUrl,attName) { var dynamicData = {}; dynamicData["csrfmiddlewaretoken"] = jQuery("[name=csrfmiddlewaretoken]").val(); dynamicData['value'] = attName; return $.ajax({ url: myUrl, type: "post", data: dynamicData }); } newValueBtn.on('click',function(){ var value = $('#value32b').val(); //alert(Aurl); if(!value){ alertUser('Attribute Value required!','bg-danger','Error'); return false; } addNValue(Aurl,value).done(function(data){ alertUser('Attribute added successful'); $('#add_value32b').empty().html(data); $('#value32b').val(''); }).fail(function(){ alertUser('Value already added. Please enter a unique name','bg-danger','Error!'); }); }); attrNameBtn.on('click',function(){ var atname = $('#attribute_name32b').val(); if(!atname){ alertUser('Attribute Name required!','bg-danger','Error'); return false; } addAttribute(Aurl,atname).done(function(data){ alertUser('Attribute added successful'); Aurl = addAttrUrl+data+'/'; $('#attribute_name32b').attr('disabled','disabled'); attrNameBtn.remove(); $('#value-input').removeClass('hidden'); $('#newvalue').removeClass('hidden'); }); }); // ./add attributes });
29.958333
95
0.597531
12f0396c8a0c0fadd7ca6b87c6d98431b096ecc6
4,659
js
JavaScript
src/GMap.js
tiagoengel/neighborhood-map
7acb490bb55b7632f4823a2e874d62563a212e44
[ "MIT" ]
2
2017-06-24T20:54:11.000Z
2017-08-24T12:47:25.000Z
src/GMap.js
tiagoengel/neighborhood-map
7acb490bb55b7632f4823a2e874d62563a212e44
[ "MIT" ]
null
null
null
src/GMap.js
tiagoengel/neighborhood-map
7acb490bb55b7632f4823a2e874d62563a212e44
[ "MIT" ]
null
null
null
import ko from 'knockout'; import { toast } from 'components/Toast'; import LocationProvider from './models/LocationProvider'; import namedCurrying from './utils/namedCurrying'; const isReady = ko.observable(false); let map = null; let infoWindow = null; const GMap = { instance() { if (!isReady()) { throw new Error('Map is not ready. Use GMap.onReady'); } return map; }, /** * Registers cb to be called once map isReady. * * @param {Function} cb a function called when maps is ready */ onReady(cb) { isReady.subscribe((ready) => { if (ready) { setTimeout(cb, 0); } }); }, /** * Create a marker for a place. * * @param {object} place place object. */ createPlaceMarker(place) { const position = place.geometry.location; const marker = GMap.createMarker({ position }); google.maps.event.addListener(marker, 'click', function onClick() { GMap.showPlaceInfo(this, place); GMap.bounceIt(this); }); return marker; }, /** * Create a marker. * * @param {object} options marker options. */ createMarker(options) { return new google.maps.Marker(Object.assign({ map }, options)); }, /** * Hide a marker. * * @param {object} marker the marker to hide. */ hideMarker(marker) { return marker.setMap(null); }, /** * Show a marker. * * @param {object} marker the marker to show. */ showMarker(marker) { return marker.setMap(map); }, /** * Bounce a marker. * * @param {object} marker the marker to be bounced. * @param {Number} duration the animation duration in ms. Default to 700. */ bounceIt(marker, duration = 700) { marker.setAnimation(google.maps.Animation.BOUNCE); setTimeout(() => marker.setAnimation(null), duration); }, /** * Displays place information on a infoWindow * * @param {Object} marker a map marker. * @param {String} place the place to be shown. */ showPlaceInfo(marker, place) { const content = document.createElement('div'); content.innerHTML = ` <div class="map__place-info"> <h1>${place.name}</h1> <place-tips params="place: place, visible: visible"></place-tips> </div> `; infoWindow.setContent(content); infoWindow.open(map, marker); ko.applyBindings({ place, visible: ko.observable(true) }, content); }, /** * Displays `msg` using a infoWindow. * * @param {Object} marker a map marker. * @param {String} msg the message to be shown. */ showInfo(marker, msg) { infoWindow.setContent(msg); infoWindow.open(map, marker); }, /** * Centers the map on this place. * * @param {Object} place the place in which the map will be centered */ centerOnPlace(place) { map.panTo(place.geometry.location); }, /** * Search places nearby the current location. * @param {object} options search options */ searchNearByPlaces(options) { return new Promise((resolve, reject) => { const service = new google.maps.places.PlacesService(map); service.nearbySearch(Object.assign( { location: LocationProvider.currentLocation() }, options ), function onSearchResults(results, status) { // eslint-disable-line if (status === google.maps.places.PlacesServiceStatus.OK) { resolve(results); } else { reject(status); } }); }); } }; function markMe(position) { const icon = { path: google.maps.SymbolPath.CIRCLE, fillColor: '#2C3E50', fillOpacity: 1, scale: 18, strokeColor: 'white', strokeWeight: 0 }; const label = { text: 'YOU', color: 'white' }; GMap.createMarker({ icon, label, position }); } /** * Function used to control map initialization, only executed when both gmap * suite and currentLocation are ready */ const maybeInitMap = namedCurrying(['currentLocation', 'mapIsReady'], ({ currentLocation }) => { map = new google.maps.Map(document.querySelector('.app__map-container'), { center: currentLocation, zoom: 15 }); infoWindow = new google.maps.InfoWindow(); markMe(currentLocation); isReady(true); } ); /** * Function called after gmap suite is loaded and ready */ window.initMap = function globalInitMap() { maybeInitMap({ mapIsReady: true }); }; window.mapFailed = function globalMapFailed() { toast('Oh Snap! We had a problem loading the map, please try again later', 'error'); }; LocationProvider.currentLocation.subscribe((currentLocation) => { maybeInitMap({ currentLocation }); }); export default GMap;
23.649746
86
0.62932
12f0f682ca040c2d14282ae7edc55946b28712cc
6,213
js
JavaScript
public/dashboard/custom/Basic-function.js
contactodohgerald/centadesk_project
2f62b75a16f6988a557f196d980883c2e30355ff
[ "MIT" ]
null
null
null
public/dashboard/custom/Basic-function.js
contactodohgerald/centadesk_project
2f62b75a16f6988a557f196d980883c2e30355ff
[ "MIT" ]
null
null
null
public/dashboard/custom/Basic-function.js
contactodohgerald/centadesk_project
2f62b75a16f6988a557f196d980883c2e30355ff
[ "MIT" ]
null
null
null
// num_suffix // setLoader // remv_loader // postRequest // throwSweetalert // getKeyByValue // return_element_key_in_array // ajaxRequest // throw_snackbar // append_id // display_img_thumbnail // let snack_options = { // message: "Error! Bitcoin Wallet Address already exist.", // width: "600px", // fixed: true, // status: "warning", // success | warning | danger | info // timeout: 5000, // ms // dismissible: true, // can be configured to hide its close button // position: "br", // "tl","tc","tr","bl", "bc", "br" // }; function throw_snackbar(message, status) { SnackBar({ message: message, width: "400px", fixed: true, status: status, // success | warning | danger | info timeout: 5000, // ms dismissible: true, // can be configured to hide its close button position: "tr", // "tl","tc","tr","bl", "bc", "br" }); } function loader_set() { // $("#the_load_screen").animate({ opacity: '0.2' }); $('#the_load_screen').removeAttr('style'); } function loader_rmv() { $('#the_load_screen').attr('style', 'display:none'); } function num_suffix(i) { var j = i % 10, k = i % 100; if (j == 1 && k != 11) { return i + "st"; } if (j == 2 && k != 12) { return i + "nd"; } if (j == 3 && k != 13) { return i + "rd"; } return i + "th"; } function set_form_data(object) { let form_data = new FormData(); object.forEach(e => { form_data.append(e.name, e.value); }); return form_data; } function setLoader() { // $('.loader').attr('style', 'display:block'); // setTimeout(() => { $('.loader').show(); $(".loader").animate({ opacity: '1' }); // }, 1000); } function remvLoader() { $(".loader").animate({ opacity: '0.2' }); setTimeout(() => { $('.loader').removeAttr('style'); }, 500); } // former postRequest funtion was having a problem with formData function ajaxRequest(url, data) { loader_set(); return new Promise(function (resolve, reject) { $.ajax({ type: "post", url: url, data: data, processData: false, contentType: false, dataType: "json", success: function (response) { loader_rmv(); resolve(response); } }); }) } /*function postRequest(url, params) { setLoader(); return new Promise(function (resolve, reject) { $.post(url, params, function (data, status) { if (status === 'success') { remvLoader(); resolve(data) } else { remvLoader(); reject(status) } }) }) }*/ function throwSweetalert(returned, page_redirect, allow_redirect) { if (returned.error == 1) { // swal('Sorry',returned.msg,'error'); swal({ title: 'Sorry', text: returned.msg, type: 'error', padding: '2em' }) } else if (returned.error == 0) { if (allow_redirect == 1) { // swal('Congratulations',returned.msg,'success'); swal({ title: 'Congratulations', text: returned.msg, type: 'success', padding: '2em' }) setTimeout(() => { window.location.href = page_redirect; }, 2000); } } } function throwToastr(returned, page_redirect, allow_redirect) { if (returned.error == 1) { // swal('Sorry',returned.msg,'error'); toastr.error(msg) } else if (returned.error == 0) { if (allow_redirect == 1) { // swal('Congratulations',returned.msg,'success'); toastr.success(returned.msg) setTimeout(() => { window.location.href = page_redirect; }, 2000); } } } function getObjKeyByValue(object, value) { for (var prop in object) { if (object.hasOwnProperty(prop)) { if (object[prop] === value) return prop; } } } function return_element_key_in_array(array, val_exist) { for (let i = 0; i < array.length; i++) { if (array[i] == val_exist) { return i; } else { return 0; } } } function validator(returned, page_redirect) { loader_set(); if (returned.status == true) { loader_rmv(); throw_snackbar(returned.message, 'success'); window.scrollTo({ top: 0, behavior: 'smooth' }); setTimeout(() => { window.location.href = page_redirect; }, 2000); } else { loader_rmv(); for (var key in returned.errors) { let error = returned.errors[key]; if (error.length == 1) { throw_snackbar(returned.errors[key], 'error'); } else if (error.length > 1) { error.forEach(e => { throw_snackbar(e, 'error'); }) } } // window.scrollTo({ top: 0, behavior: 'smooth' }); } } function youtube_regex(url) { var regExp = /^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/; var match = url.match(regExp); if (match && match[2].length == 11) { return match[2]; } else { return false; } } function display_img_thumbnail(input, element_id) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#' + element_id).attr('src', e.target.result); } // convert to base64 string reader.readAsDataURL(input.files[0]); } } function append_id(name, append_to, modal, this_) { /* name=>form_field name append_to => name of input_field modal => selector of modal */ let input_id = $(this_).attr('id'); let input_field = `<input type="hidden" value="${input_id}" name="${name}">`; $(input_field).appendTo(append_to); console.log(input_id); // $(modal).modal('toggle'); }
26.438298
215
0.511669
12f138a01ebc4096295841ac3e48cd335ec7da38
1,033
js
JavaScript
__tests__/unit/specs/components/header/ToggleLanguage.spec.js
Pedro-Souza/explorer
740b6c54c8619ef4e849aeaa3c822eba0f8f36a9
[ "MIT" ]
1
2019-10-14T23:34:02.000Z
2019-10-14T23:34:02.000Z
__tests__/unit/specs/components/header/ToggleLanguage.spec.js
dated/explorer-3.0
740b6c54c8619ef4e849aeaa3c822eba0f8f36a9
[ "MIT" ]
9
2020-04-06T12:44:59.000Z
2022-02-26T17:07:40.000Z
__tests__/unit/specs/components/header/ToggleLanguage.spec.js
dated/ark-explorer
740b6c54c8619ef4e849aeaa3c822eba0f8f36a9
[ "MIT" ]
null
null
null
import { mount, createLocalVue } from '@vue/test-utils' import mixins from '@/mixins' import ToggleLanguage from '@/components/header/toggles/ToggleLanguage' import { useI18n } from '../../../__utils__/i18n' import Vuex from 'vuex' describe('Components > Header > ToggleLanguage', () => { const localVue = createLocalVue() localVue.use(Vuex) const i18n = useI18n(localVue) const uiAction = { setHeaderType: jest.fn() } const store = new Vuex.Store({ modules: { ui: { namespaced: true, state: { language: 'en-GB', headerType: null }, actions: uiAction, getters: { language: () => 'en-GB', headerType: () => null } } }, strict: true }) it('should be possible to show language list', () => { const wrapper = mount(ToggleLanguage, { i18n, localVue, mixins, store }) wrapper.find('button').trigger('click') expect(uiAction.setHeaderType).toHaveBeenCalled() }) })
22.456522
71
0.584705
12f176dd8da7340b35d0eb391c531cb295a7c5c9
3,349
js
JavaScript
script/gulpfile.js
xxliange/loso-ui
b2e3eb1191019c3ff85ba7b8dd414cc5edb6aebb
[ "MIT" ]
null
null
null
script/gulpfile.js
xxliange/loso-ui
b2e3eb1191019c3ff85ba7b8dd414cc5edb6aebb
[ "MIT" ]
null
null
null
script/gulpfile.js
xxliange/loso-ui
b2e3eb1191019c3ff85ba7b8dd414cc5edb6aebb
[ "MIT" ]
null
null
null
/** * @name gulpfile.js */ const path = require("path"); const { src, dest, parallel } = require("gulp"); const concat = require("gulp-concat"); const less = require("gulp-less"); const autoprefixer = require("gulp-autoprefixer"); const cssnano = require("gulp-cssnano"); const size = require("gulp-filesize"); const sourcemaps = require("gulp-sourcemaps"); const babel = require("gulp-babel"); const through2 = require("through2"); const rename = require("gulp-rename"); const { name } = require("../package.json"); const browserList = [ "last 2 versions", "Android >= 4.0", "Firefox ESR", "not ie < 9" ]; const DIR = { less: path.resolve(__dirname, "../components/**/*.less"), buildSrc: [ path.resolve(__dirname, "../components/**/styles.less"), path.resolve(__dirname, "../components/**/index.less") ], lib: path.resolve(__dirname, "../lib"), es: path.resolve(__dirname, "../es"), dist: path.resolve(__dirname, "../dist"), scripts: path.resolve(__dirname, '../components/**/style/*.{ts,tsx}') }; function cssInjection(content) { return content .replace(/\/style\/?'/g, "/style/css'") .replace(/\/style\/?"/g, '/style/css"') .replace(/\.less/g, '.css'); } function compileScripts(babelEnv, destDir) { process.env.BABEL_ENV = babelEnv; return src(DIR.scripts) .pipe(babel()) // 使用gulp-babel处理 .pipe( through2.obj(function z(file, encoding, next) { this.push(file.clone()); // 找到目标 if (file.path.match(/(\/|\\)style(\/|\\)index\.js/)) { const content = file.contents.toString(encoding); file.contents = Buffer.from(cssInjection(content)); // 处理文件内容 file.path = file.path.replace(/index\.js/, 'css.js'); // 文件重命名 this.push(file); // 新增该文件 next(); } else { next(); } }), ) .pipe(dest(destDir)); } function compileESM() { return compileScripts('es', DIR.es); } function compileLIB() { return compileScripts('lib', DIR.lib); } function copyLess() { return src(DIR.less) .pipe(dest(DIR.lib)) .pipe(dest(DIR.es)) }; function copyCss() { return src(DIR.buildSrc) .pipe(sourcemaps.init()) .pipe(less({ outputStyle: "compressed" })) .pipe(autoprefixer({ browsers: browserList })) .pipe(size()) .pipe(cssnano()) .pipe(dest(DIR.lib)) .pipe(dest(DIR.es)) }; function dist() { return src(DIR.buildSrc) .pipe(sourcemaps.init()) .pipe(less({ outputStyle: "compressed" })) .pipe(autoprefixer({ browsers: browserList })) .pipe(concat(`${name}.css`)) .pipe(size()) .pipe(dest(DIR.dist)) .pipe(sourcemaps.write()) .pipe(rename(`${name}.css.map`)) .pipe(dest(DIR.dist)) .pipe(cssnano()) .pipe(concat(`${name}.min.css`)) .pipe(size()) .pipe(dest(DIR.dist)) .pipe(sourcemaps.write()) .pipe(rename(`${name}.min.css.map`)) .pipe(size()) .pipe(dest(DIR.dist)); }; exports.default = parallel(compileESM, compileLIB, copyCss, copyLess, dist);
28.623932
82
0.547925
12f1bf9f70f2351d86c1bc7d76a439db86c36a1c
3,296
js
JavaScript
index.js
iPolyomino/EVA-TIMER
6233ae250e06aa0e4f58c3dc8170d171e5d89a50
[ "MIT" ]
2
2020-05-09T07:10:40.000Z
2020-05-10T05:50:31.000Z
index.js
iPolyomino/EVA-TIMER
6233ae250e06aa0e4f58c3dc8170d171e5d89a50
[ "MIT" ]
null
null
null
index.js
iPolyomino/EVA-TIMER
6233ae250e06aa0e4f58c3dc8170d171e5d89a50
[ "MIT" ]
null
null
null
let time = 5 * 60 * 1000; let remainingTime = null; let startTime = null; let timerId = null; let isCountdownTimer = true; const maxMinutes = 100; const internalButton = document.getElementById("internal-button"); const externalButton = document.getElementById("external-button"); const startButton = document.getElementById("start-button"); const stopButton = document.getElementById("stop-button"); const resetButton = document.getElementById("reset-button"); const setupButton = document.getElementById("setup-button"); const updateTimeText = (time) => { let m = Math.floor(time / (1000 * 60)) % 100; let s = Math.floor((time % (1000 * 60)) / 1000); let ms = time % 1000; m = `0${m}`.slice(-2); s = `0${s}`.slice(-2); ms = `00${ms}`.slice(-3).slice(0, 2); setTimer(m, s, ms); }; const setTimer = (m, s, ms) => { document.getElementById("minute").textContent = m; document.getElementById("second").textContent = s; document.getElementById("millisecond").textContent = ms; }; const update = () => { timerId = setTimeout(() => { const now = Date.now(); if (isCountdownTimer) { remainingTime -= now - startTime; } else { remainingTime += now - startTime; } startTime = now; if (remainingTime > 0) { update(); } else { remainingTime = 0; } updateTimeText(remainingTime); }, 10); }; const internalAction = () => { isCountdownTimer = true; resetAction(); internalButton.classList.remove("disabled"); externalButton.classList.add("disabled"); setupButton.classList.add("active-control"); }; const externalAction = () => { isCountdownTimer = false; resetAction(); externalButton.classList.remove("disabled"); internalButton.classList.add("disabled"); setupButton.classList.remove("active-control"); }; const startAction = () => { if (timerId !== null) return; startTime = Date.now(); update(); startButton.classList.remove("active-control"); stopButton.classList.add("active-control"); }; const stopAction = () => { if (timerId === null) return; clearTimeout(timerId); timerId = null; stopButton.classList.remove("active-control"); startButton.classList.add("active-control"); }; const resetAction = () => { if (isCountdownTimer) { remainingTime = time; } else { remainingTime = 0; } updateTimeText(remainingTime); }; const setupAction = () => { if (!isCountdownTimer) return; time += 1 * 60 * 1000; time %= maxMinutes * 60 * 1000; resetAction(); }; (() => { internalButton.addEventListener("click", internalAction); externalButton.addEventListener("click", externalAction); startButton.addEventListener("click", startAction); stopButton.addEventListener("click", stopAction); resetButton.addEventListener("click", resetAction); setupButton.addEventListener("click", setupAction); const isNumber = (value) => typeof value === "number" && isFinite(value); const urlParams = new URLSearchParams(window.location.search); const timeParam = parseFloat(urlParams.get("time"), 10); if (isNumber(timeParam) && 0 <= timeParam && timeParam < maxMinutes) { time = timeParam * 60 * 1000; } const isStopwatch = urlParams.get("stopwatch"); if (isStopwatch !== null) { externalAction(); } resetAction(); })();
26.15873
75
0.6696
12f1d991c87b1b37a3ca0127416242d535b23ce9
1,584
js
JavaScript
lib/drivers/carelink/indexDevice.js
pauloved/uploader
973d3a02c7e1851d76373e3dc083727b2a3d2a58
[ "BSD-2-Clause" ]
null
null
null
lib/drivers/carelink/indexDevice.js
pauloved/uploader
973d3a02c7e1851d76373e3dc083727b2a3d2a58
[ "BSD-2-Clause" ]
75
2021-12-07T20:12:00.000Z
2022-03-23T12:47:49.000Z
lib/drivers/carelink/indexDevice.js
line-studio/tidepool-uploader
87b0067d1e27a0fb3ca4b4a0f55ee574403f5402
[ "BSD-2-Clause" ]
1
2020-03-29T16:01:29.000Z
2020-03-29T16:01:29.000Z
/* * == BSD2 LICENSE == * Copyright (c) 2015, Tidepool Project * * This program is free software; you can redistribute it and/or modify it under * the terms of the associated License, which is identical to the BSD 2-Clause * License as published by the Open Source Initiative at opensource.org. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the License for more details. * * You should have received a copy of the License along with this program; if * not, you can obtain one from Tidepool Project at tidepool.org. * == BSD2 LICENSE == */ var _ = require('lodash'); var RAW_TYPE = 'Raw-Type'; var TIME_CHANGE_CGM = 'ChangeTimeGH'; var uploadIdKey = 'Raw-Upload ID', seqNumKey = 'Raw-Seq Num'; module.exports = function(device, isAPump) { function uploadId(d) { if (isAPump && d[RAW_TYPE] === TIME_CHANGE_CGM) { return d['pumpUploadId']; } return d[uploadIdKey]; } function seqNum(d) { if (isAPump && d[RAW_TYPE] === TIME_CHANGE_CGM) { return d['pumpSeqNum']; } return d[seqNumKey]; } device.data.sort(function(lhs, rhs) { if (uploadId(lhs) < uploadId(rhs)) { return -1; } else if (uploadId(lhs) > uploadId(rhs)) { return 1; } else if (seqNum(lhs) < seqNum(rhs)) { return 1; } else if (seqNum(lhs) > seqNum(rhs)) { return -1; } return 0; }); _.each(device.data, function(d, i) { d.index = i; }); return device; };
28.8
80
0.653409
12f1fe3aaab8190c972c5fed64e85b2c45f57690
861
js
JavaScript
app/@esri/calcite-ui-icons/js/map16F.js
lizeidsness/minimalist
57657f7b37d2251b95dafe92e1d3776301a3a1c0
[ "Apache-2.0" ]
3
2020-07-17T21:04:01.000Z
2021-11-30T15:14:45.000Z
app/@esri/calcite-ui-icons/js/map16F.js
lizeidsness/minimalist
57657f7b37d2251b95dafe92e1d3776301a3a1c0
[ "Apache-2.0" ]
4
2020-04-16T19:24:25.000Z
2021-11-29T20:15:32.000Z
app/@esri/calcite-ui-icons/js/map16F.js
lizeidsness/minimalist
57657f7b37d2251b95dafe92e1d3776301a3a1c0
[ "Apache-2.0" ]
5
2020-06-11T20:51:53.000Z
2021-11-30T15:22:13.000Z
export const map16F = "M12.687 1H1v14h14V1zM6.375 14a1.545 1.545 0 0 0 .09-.502c0-.547-1.043-.393-1.207-.72-.407-.813.693-1.022.693-1.673 0-.16-.082-.488-.334-.513-.351-.035-.443.154-.797.154a.406.406 0 0 1-.437-.36c0-.386.308-.566.308-.952 0-.25-.102-.393-.102-.643a.619.619 0 0 1 .59-.643c.323 0 .464.264.618.54a.642.642 0 0 0 .617.308c.49 0 .798-.61.798-.977a.471.471 0 0 1 .437-.488c.347 0 .476.36.824.36.57 0 .55-.756 1.053-1.03.618-.332.438-1.052.36-1.44-.032-.169.29-.5.464-.487.72.05.412-.54.412-.823a.434.434 0 0 1 .022-.142c.111-.332.595-.438.595-.836 0-.281-.233-.41-.233-.693a.653.653 0 0 1 .22-.44H14v9h-.43a1.464 1.464 0 0 1-.906-.433c-.264-.23-.258-.782-.617-.782-.482 0-.52.677-1.003.677-.219 0-.38-.177-.599-.177-.193 0-.445.102-.445.293v.502c0 .424-.506.508-.506.934 0 .171.184.236.184.41 0 .58-.893.502-.893 1.08 0 .191.215.305.215.486V14z";
430.5
860
0.649245
12f25bb2f1eaf3341a5cc849c8d9e2bbd0026dd6
12,663
js
JavaScript
js/Select-1.3.3/js/dataTables.select.min.js
skeltonmod/pnpweb
3277e3aab50c6545953eb9b47daebab3c6e85972
[ "MIT" ]
534
2015-01-02T14:27:55.000Z
2022-03-31T11:30:16.000Z
js/Select-1.3.3/js/dataTables.select.min.js
skeltonmod/pnpweb
3277e3aab50c6545953eb9b47daebab3c6e85972
[ "MIT" ]
877
2015-01-01T23:21:42.000Z
2022-03-31T14:23:01.000Z
js/Select-1.3.3/js/dataTables.select.min.js
skeltonmod/pnpweb
3277e3aab50c6545953eb9b47daebab3c6e85972
[ "MIT" ]
223
2015-01-20T12:15:45.000Z
2022-03-31T08:56:00.000Z
/*! Copyright 2015-2021 SpryMedia Ltd. This source file is free software, available under the following license: MIT license - http://datatables.net/license/mit This source file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. For details please refer to: http://www.datatables.net/extensions/select Select for DataTables 1.3.3 2015-2021 SpryMedia Ltd - datatables.net/license/mit */ (function(h){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(q){return h(q,window,document)}):"object"===typeof exports?module.exports=function(q,t){q||(q=window);t&&t.fn.dataTable||(t=require("datatables.net")(q,t).$);return h(t,q,q.document)}:h(jQuery,window,document)})(function(h,q,t,n){function E(a,b,c){var d=function(g,f){if(g>f){var k=f;f=g;g=k}var l=!1;return a.columns(":visible").indexes().filter(function(p){p===g&&(l=!0);return p===f?(l=!1,!0):l})};var e= function(g,f){var k=a.rows({search:"applied"}).indexes();if(k.indexOf(g)>k.indexOf(f)){var l=f;f=g;g=l}var p=!1;return k.filter(function(u){u===g&&(p=!0);return u===f?(p=!1,!0):p})};a.cells({selected:!0}).any()||c?(d=d(c.column,b.column),c=e(c.row,b.row)):(d=d(0,b.column),c=e(0,b.row));c=a.cells(c,d).flatten();a.cells(b,{selected:!0}).any()?a.cells(c).deselect():a.cells(c).select()}function A(a){var b=a.settings()[0]._select.selector;h(a.table().container()).off("mousedown.dtSelect",b).off("mouseup.dtSelect", b).off("click.dtSelect",b);h("body").off("click.dtSelect"+a.table().node().id.replace(/[^a-zA-Z0-9\-_]/g,"-"))}function F(a){var b=h(a.table().container()),c=a.settings()[0],d=c._select.selector,e;b.on("mousedown.dtSelect",d,function(g){if(g.shiftKey||g.metaKey||g.ctrlKey)b.css("-moz-user-select","none").one("selectstart.dtSelect",d,function(){return!1});q.getSelection&&(e=q.getSelection())}).on("mouseup.dtSelect",d,function(){b.css("-moz-user-select","")}).on("click.dtSelect",d,function(g){var f= a.select.items();if(e){var k=q.getSelection();if((!k.anchorNode||h(k.anchorNode).closest("table")[0]===a.table().node())&&k!==e)return}k=a.settings()[0];var l=a.settings()[0].oClasses.sWrapper.trim().replace(/ +/g,".");if(h(g.target).closest("div."+l)[0]==a.table().container()&&(l=a.cell(h(g.target).closest("td, th")),l.any())){var p=h.Event("user-select.dt");r(a,p,[f,l,g]);p.isDefaultPrevented()||(p=l.index(),"row"===f?(f=p.row,B(g,a,k,"row",f)):"column"===f?(f=l.index().column,B(g,a,k,"column", f)):"cell"===f&&(f=l.index(),B(g,a,k,"cell",f)),k._select_lastCell=p)}});h("body").on("click.dtSelect"+a.table().node().id.replace(/[^a-zA-Z0-9\-_]/g,"-"),function(g){!c._select.blurable||h(g.target).parents().filter(a.table().container()).length||0===h(g.target).parents("html").length||h(g.target).parents("div.DTE").length||x(c,!0)})}function r(a,b,c,d){if(!d||a.flatten().length)"string"===typeof b&&(b+=".dt"),c.unshift(a),h(a.table().node()).trigger(b,c)}function I(a){var b=a.settings()[0];if(b._select.info&& b.aanFeatures.i&&"api"!==a.select.style()){var c=a.rows({selected:!0}).flatten().length,d=a.columns({selected:!0}).flatten().length,e=a.cells({selected:!0}).flatten().length,g=function(f,k,l){f.append(h('<span class="select-item"/>').append(a.i18n("select."+k+"s",{_:"%d "+k+"s selected",0:"",1:"1 "+k+" selected"},l)))};h.each(b.aanFeatures.i,function(f,k){k=h(k);f=h('<span class="select-info"/>');g(f,"row",c);g(f,"column",d);g(f,"cell",e);var l=k.children("span.select-info");l.length&&l.remove(); ""!==f.text()&&k.append(f)})}}function J(a){var b=new m.Api(a);a.aoRowCreatedCallback.push({fn:function(c,d,e){d=a.aoData[e];d._select_selected&&h(c).addClass(a._select.className);c=0;for(e=a.aoColumns.length;c<e;c++)(a.aoColumns[c]._select_selected||d._selected_cells&&d._selected_cells[c])&&h(d.anCells[c]).addClass(a._select.className)},sName:"select-deferRender"});b.on("preXhr.dt.dtSelect",function(c,d){if(d===b.settings()[0]){var e=b.rows({selected:!0}).ids(!0).filter(function(f){return f!==n}), g=b.cells({selected:!0}).eq(0).map(function(f){var k=b.row(f.row).id(!0);return k?{row:k,column:f.column}:n}).filter(function(f){return f!==n});b.one("draw.dt.dtSelect",function(){b.rows(e).select();g.any()&&g.each(function(f){b.cells(f.row,f.column).select()})})}});b.on("draw.dtSelect.dt select.dtSelect.dt deselect.dtSelect.dt info.dt",function(){I(b)});b.on("destroy.dtSelect",function(){b.rows({selected:!0}).deselect();A(b);b.off(".dtSelect")})}function G(a,b,c,d){var e=a[b+"s"]({search:"applied"}).indexes(); d=h.inArray(d,e);var g=h.inArray(c,e);if(a[b+"s"]({selected:!0}).any()||-1!==d){if(d>g){var f=g;g=d;d=f}e.splice(g+1,e.length);e.splice(0,d)}else e.splice(h.inArray(c,e)+1,e.length);a[b](c,{selected:!0}).any()?(e.splice(h.inArray(c,e),1),a[b+"s"](e).deselect()):a[b+"s"](e).select()}function x(a,b){if(b||"single"===a._select.style)a=new m.Api(a),a.rows({selected:!0}).deselect(),a.columns({selected:!0}).deselect(),a.cells({selected:!0}).deselect()}function B(a,b,c,d,e){var g=b.select.style(),f=b.select.toggleable(), k=b[d](e,{selected:!0}).any();if(!k||f)"os"===g?a.ctrlKey||a.metaKey?b[d](e).select(!k):a.shiftKey?"cell"===d?E(b,e,c._select_lastCell||null):G(b,d,e,c._select_lastCell?c._select_lastCell[d]:null):(a=b[d+"s"]({selected:!0}),k&&1===a.flatten().length?b[d](e).deselect():(a.deselect(),b[d](e).select())):"multi+shift"==g?a.shiftKey?"cell"===d?E(b,e,c._select_lastCell||null):G(b,d,e,c._select_lastCell?c._select_lastCell[d]:null):b[d](e).select(!k):b[d](e).select(!k)}function y(a,b){return function(c){return c.i18n("buttons."+ a,b)}}function C(a){a=a._eventNamespace;return"draw.dt.DT"+a+" select.dt.DT"+a+" deselect.dt.DT"+a}function K(a,b){return-1!==h.inArray("rows",b.limitTo)&&a.rows({selected:!0}).any()||-1!==h.inArray("columns",b.limitTo)&&a.columns({selected:!0}).any()||-1!==h.inArray("cells",b.limitTo)&&a.cells({selected:!0}).any()?!0:!1}var m=h.fn.dataTable;m.select={};m.select.version="1.3.3";m.select.init=function(a){var b=a.settings()[0],c=b.oInit.select,d=m.defaults.select;c=c===n?d:c;d="row";var e="api",g=!1, f=!0,k=!0,l="td, th",p="selected",u=!1;b._select={};!0===c?(e="os",u=!0):"string"===typeof c?(e=c,u=!0):h.isPlainObject(c)&&(c.blurable!==n&&(g=c.blurable),c.toggleable!==n&&(f=c.toggleable),c.info!==n&&(k=c.info),c.items!==n&&(d=c.items),e=c.style!==n?c.style:"os",u=!0,c.selector!==n&&(l=c.selector),c.className!==n&&(p=c.className));a.select.selector(l);a.select.items(d);a.select.style(e);a.select.blurable(g);a.select.toggleable(f);a.select.info(k);b._select.className=p;h.fn.dataTable.ext.order["select-checkbox"]= function(z,L){return this.api().column(L,{order:"index"}).nodes().map(function(H){return"row"===z._select.items?h(H).parent().hasClass(z._select.className):"cell"===z._select.items?h(H).hasClass(z._select.className):!1})};!u&&h(a.table().node()).hasClass("selectable")&&a.select.style("os")};h.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(a,b){m.ext.selector[b.type].push(function(c,d,e){d=d.selected;var g=[];if(!0!==d&&!1!==d)return e;for(var f=0,k=e.length;f<k;f++){var l= c[b.prop][e[f]];(!0===d&&!0===l._select_selected||!1===d&&!l._select_selected)&&g.push(e[f])}return g})});m.ext.selector.cell.push(function(a,b,c){b=b.selected;var d=[];if(b===n)return c;for(var e=0,g=c.length;e<g;e++){var f=a.aoData[c[e].row];(!0===b&&f._selected_cells&&!0===f._selected_cells[c[e].column]||!(!1!==b||f._selected_cells&&f._selected_cells[c[e].column]))&&d.push(c[e])}return d});var v=m.Api.register,w=m.Api.registerPlural;v("select()",function(){return this.iterator("table",function(a){m.select.init(new m.Api(a))})}); v("select.blurable()",function(a){return a===n?this.context[0]._select.blurable:this.iterator("table",function(b){b._select.blurable=a})});v("select.toggleable()",function(a){return a===n?this.context[0]._select.toggleable:this.iterator("table",function(b){b._select.toggleable=a})});v("select.info()",function(a){return a===n?this.context[0]._select.info:this.iterator("table",function(b){b._select.info=a})});v("select.items()",function(a){return a===n?this.context[0]._select.items:this.iterator("table", function(b){b._select.items=a;r(new m.Api(b),"selectItems",[a])})});v("select.style()",function(a){return a===n?this.context[0]._select.style:this.iterator("table",function(b){b._select.style=a;b._select_init||J(b);var c=new m.Api(b);A(c);"api"!==a&&F(c);r(new m.Api(b),"selectStyle",[a])})});v("select.selector()",function(a){return a===n?this.context[0]._select.selector:this.iterator("table",function(b){A(new m.Api(b));b._select.selector=a;"api"!==b._select.style&&F(new m.Api(b))})});w("rows().select()", "row().select()",function(a){var b=this;if(!1===a)return this.deselect();this.iterator("row",function(c,d){x(c);c.aoData[d]._select_selected=!0;h(c.aoData[d].nTr).addClass(c._select.className)});this.iterator("table",function(c,d){r(b,"select",["row",b[d]],!0)});return this});w("columns().select()","column().select()",function(a){var b=this;if(!1===a)return this.deselect();this.iterator("column",function(c,d){x(c);c.aoColumns[d]._select_selected=!0;d=(new m.Api(c)).column(d);h(d.header()).addClass(c._select.className); h(d.footer()).addClass(c._select.className);d.nodes().to$().addClass(c._select.className)});this.iterator("table",function(c,d){r(b,"select",["column",b[d]],!0)});return this});w("cells().select()","cell().select()",function(a){var b=this;if(!1===a)return this.deselect();this.iterator("cell",function(c,d,e){x(c);d=c.aoData[d];d._selected_cells===n&&(d._selected_cells=[]);d._selected_cells[e]=!0;d.anCells&&h(d.anCells[e]).addClass(c._select.className)});this.iterator("table",function(c,d){r(b,"select", ["cell",b.cells(b[d]).indexes().toArray()],!0)});return this});w("rows().deselect()","row().deselect()",function(){var a=this;this.iterator("row",function(b,c){b.aoData[c]._select_selected=!1;b._select_lastCell=null;h(b.aoData[c].nTr).removeClass(b._select.className)});this.iterator("table",function(b,c){r(a,"deselect",["row",a[c]],!0)});return this});w("columns().deselect()","column().deselect()",function(){var a=this;this.iterator("column",function(b,c){b.aoColumns[c]._select_selected=!1;var d= new m.Api(b),e=d.column(c);h(e.header()).removeClass(b._select.className);h(e.footer()).removeClass(b._select.className);d.cells(null,c).indexes().each(function(g){var f=b.aoData[g.row],k=f._selected_cells;!f.anCells||k&&k[g.column]||h(f.anCells[g.column]).removeClass(b._select.className)})});this.iterator("table",function(b,c){r(a,"deselect",["column",a[c]],!0)});return this});w("cells().deselect()","cell().deselect()",function(){var a=this;this.iterator("cell",function(b,c,d){c=b.aoData[c];c._selected_cells[d]= !1;c.anCells&&!b.aoColumns[d]._select_selected&&h(c.anCells[d]).removeClass(b._select.className)});this.iterator("table",function(b,c){r(a,"deselect",["cell",a[c]],!0)});return this});var D=0;h.extend(m.ext.buttons,{selected:{text:y("selected","Selected"),className:"buttons-selected",limitTo:["rows","columns","cells"],init:function(a,b,c){var d=this;c._eventNamespace=".select"+D++;a.on(C(c),function(){d.enable(K(a,c))});this.disable()},destroy:function(a,b,c){a.off(c._eventNamespace)}},selectedSingle:{text:y("selectedSingle", "Selected single"),className:"buttons-selected-single",init:function(a,b,c){var d=this;c._eventNamespace=".select"+D++;a.on(C(c),function(){var e=a.rows({selected:!0}).flatten().length+a.columns({selected:!0}).flatten().length+a.cells({selected:!0}).flatten().length;d.enable(1===e)});this.disable()},destroy:function(a,b,c){a.off(c._eventNamespace)}},selectAll:{text:y("selectAll","Select all"),className:"buttons-select-all",action:function(){this[this.select.items()+"s"]().select()}},selectNone:{text:y("selectNone", "Deselect all"),className:"buttons-select-none",action:function(){x(this.settings()[0],!0)},init:function(a,b,c){var d=this;c._eventNamespace=".select"+D++;a.on(C(c),function(){var e=a.rows({selected:!0}).flatten().length+a.columns({selected:!0}).flatten().length+a.cells({selected:!0}).flatten().length;d.enable(0<e)});this.disable()},destroy:function(a,b,c){a.off(c._eventNamespace)}}});h.each(["Row","Column","Cell"],function(a,b){var c=b.toLowerCase();m.ext.buttons["select"+b+"s"]={text:y("select"+ b+"s","Select "+c+"s"),className:"buttons-select-"+c+"s",action:function(){this.select.items(c)},init:function(d){var e=this;d.on("selectItems.dt.DT",function(g,f,k){e.active(k===c)})}}});h(t).on("preInit.dt.dtSelect",function(a,b){"dt"===a.namespace&&m.select.init(new m.Api(b))});return m.select});
324.692308
537
0.673853
12f287e68413a356f9eb2b6757a7bc826d5fcc7f
10,229
js
JavaScript
public/assets/plugin/ascolorpicker/js/jquery-asColor.js
devscratch/devscratch
0133b419995d8d8de2245ce8db9e9ed302a72b31
[ "MIT" ]
null
null
null
public/assets/plugin/ascolorpicker/js/jquery-asColor.js
devscratch/devscratch
0133b419995d8d8de2245ce8db9e9ed302a72b31
[ "MIT" ]
null
null
null
public/assets/plugin/ascolorpicker/js/jquery-asColor.js
devscratch/devscratch
0133b419995d8d8de2245ce8db9e9ed302a72b31
[ "MIT" ]
null
null
null
!function(a,b,c,d){"use strict";function e(a){return a?(3===a.length&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),6===a.length?a:null):null}function f(a){return 6===a.length&&a[0]===a[1]&&a[2]===a[3]&&a[4]===a[5]?a[0]+a[2]+a[4]:a}function g(a){return parseInt(a,16)}function h(a){return"string"==typeof a&&-1!=a.indexOf("%")}function i(a){return parseInt(2.55*a.slice(0,-1),10)}function j(a){return parseFloat(a.slice(0,-1)/100,10)}function k(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[a[c]]=c);return b}var l=function(){var a="[-\\+]?\\d+%?",b="[-\\+]?\\d*\\.\\d+%?",e="(?:"+b+")|(?:"+a+")",g="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)",k="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)";return{RGB:{match:new RegExp("^rgb"+g+"$","i"),parse:function(a){return{r:h(a[1])?i(a[1]):parseInt(a[1],10),g:h(a[2])?i(a[2]):parseInt(a[2],10),b:h(a[3])?i(a[3]):parseInt(a[3],10),a:1}},to:function(a){return"rgb("+a.r+", "+a.g+", "+a.b+")"}},RGBA:{match:new RegExp("^rgba"+k+"$","i"),parse:function(a){return{r:h(a[1])?i(a[1]):parseInt(a[1],10),g:h(a[2])?i(a[2]):parseInt(a[2],10),b:h(a[3])?i(a[3]):parseInt(a[3],10),a:parseFloat(a[4])}},to:function(a){return"rgba("+a.r+", "+a.g+", "+a.b+", "+a.a+")"}},HSL:{match:new RegExp("^hsl"+g+"$","i"),parse:function(a){var b={h:(a[1]%360+360)%360,s:h(a[2])?j(a[2]):parseFloat(a[2],10),l:h(a[3])?j(a[3]):parseFloat(a[3],10),a:1};return m.HSLToRGB(b)},to:function(a){var b=m.RGBToHSL(a);return"hsl("+parseInt(b.h,10)+", "+Math.round(100*b.s)+"%, "+Math.round(100*b.l)+"%)"}},HSLA:{match:new RegExp("^hsla"+k+"$","i"),parse:function(a){var b={h:(a[1]%360+360)%360,s:h(a[2])?j(a[2]):parseFloat(a[2],10),l:h(a[3])?j(a[3]):parseFloat(a[3],10),a:parseFloat(a[4])};return m.HSLToRGB(b)},to:function(a){var b=m.RGBToHSL(a);return"hsla("+parseInt(b.h,10)+", "+Math.round(100*b.s)+"%, "+Math.round(100*b.l)+"%, "+a.a+")"}},HEX:{match:/^#([a-f0-9]{6}|[a-f0-9]{3})$/i,parse:function(a){var b=a[1],c=m.HEXtoRGB(b);return{r:c.r,g:c.g,b:c.b,a:1}},to:function(a,b){var d=[a.r.toString(16),a.g.toString(16),a.b.toString(16)];if(c.each(d,function(a,b){1===b.length&&(d[a]="0"+b)}),d=d.join(""),b){if(b.options.hexUseName){var e=m.hasNAME(a);if(e)return e}b.options.shortenHex&&(d=f(d))}return"#"+d}},TRANSPARENT:{match:/^transparent$/i,parse:function(){return{r:0,g:0,b:0,a:0}},to:function(){return"transparent"}},NAME:{match:/^\w+$/i,parse:function(a){var b=m.NAMEtoRGB(a[0]);return b?{r:b.r,g:b.g,b:b.b,a:1}:void 0},to:function(a,b){return m.RGBtoNAME(a,b?b.options.nameDegradation:d)}}}}(),m=c.asColor=function(a,b){"object"==typeof a&&"undefined"==typeof b&&(b=a,a=d),"string"==typeof b&&(b={format:b}),this.options=c.extend(!0,{},m.defaults,b),this.value={r:0,g:0,b:0,h:0,s:0,v:0,a:1},this._format=!1,this._matchFormat="HEX",this._valid=!0,this.init(a)};m.prototype={constructor:m,init:function(a){this.format(this.options.format),this.fromString(a)},isValid:function(){return this._valid},val:function(a){return"undefined"==typeof a?this.toString():(this.fromString(a),this)},alpha:function(a){return"undefined"==typeof a||isNaN(a)?this.value.a:(a=parseFloat(a),a>1?a=1:0>a&&(a=0),this.value.a=a,void 0)},matchString:function(a){return m.matchString(a)},fromString:function(a,b){if("string"==typeof a){a=c.trim(a);var d,e=null;this._valid=!1;for(var f in l)if(null!=(e=l[f].match.exec(a))&&(d=l[f].parse(e))){this.set(d),this._matchFormat=f,b===!0&&this.format(f);break}}else"object"==typeof a&&this.set(a)},format:function(a){if("string"==typeof a&&(a=a.toUpperCase())&&"undefined"!=typeof l[a])"TRANSPARENT"!==a&&(this._format=a);else{if(a!==!1)return this._format===!1?this._matchFormat:this._format;this._format=!1}},toRGBA:function(){return l.RGBA.to(this.value,this)},toRGB:function(){return l.RGB.to(this.value,this)},toHSLA:function(){return l.HSLA.to(this.value,this)},toHSL:function(){return l.HSL.to(this.value,this)},toHEX:function(){return l.HEX.to(this.value,this)},toNAME:function(){return l.NAME.to(this.value,this)},to:function(a){return"string"==typeof a&&(a=a.toUpperCase())&&"undefined"!=typeof l[a]?l[a].to(this.value,this):this.toString()},toString:function(){var a=this.value;if(!this._valid&&(a=this.options.invalidValue,"string"==typeof a))return a;if(0===a.a&&this.options.zeroAlphaAsTransparent)return l.TRANSPARENT.to(a,this);var b;if(b=this._format===!1?this._matchFormat:this._format,this.options.reduceAlpha&&1===a.a)switch(b){case"RGBA":b="RGB";break;case"HSLA":b="HSL"}return 1!==a.a&&"RGBA"!==b&&"HSLA"!==b&&this.options.alphaConvert&&("string"==typeof this.options.alphaConvert&&(b=this.options.alphaConvert),"undefined"!=typeof this.options.alphaConvert[b]&&(b=this.options.alphaConvert[b])),l[b].to(a,this)},get:function(){return this.value},set:function(a){this._valid=!0;var b,c,d=0,e=0;for(var f in a)-1!=="hsv".indexOf(f)?(e++,this.value[f]=a[f]):-1!=="rgb".indexOf(f)?(d++,this.value[f]=a[f]):"a"===f&&(this.value.a=a.a);d>e?(b=m.RGBtoHSV(this.value),0===this.value.r&&0===this.value.g&&0===this.value.b||(this.value.h=b.h),this.value.s=b.s,this.value.v=b.v):e>d&&(c=m.HSVtoRGB(this.value),this.value.r=c.r,this.value.g=c.g,this.value.b=c.b)}},m.HSLToRGB=function(a){var b,c,d,e=a.h/360,f=a.s,g=a.l;return c=.5>=g?g*(f+1):g+f-g*f,b=2*g-c,d={r:m.hueToRGB(b,c,e+1/3),g:m.hueToRGB(b,c,e),b:m.hueToRGB(b,c,e-1/3)},"undefined"!=typeof a.a&&(d.a=a.a),0===a.l&&(d.h=a.h),d},m.hueToRGB=function(a,b,c){var d;return 0>c?c+=1:c>1&&(c-=1),d=1>6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a,Math.round(255*d)},m.RGBToHSL=function(a){var b,c,d=a.r/255,e=a.g/255,f=a.b/255,g=Math.min(d,e,f),h=Math.max(d,e,f),i=h-g,j=h+g,k=.5*j;return b=g===h?0:d===h?60*(e-f)/i+360:e===h?60*(f-d)/i+120:60*(d-e)/i+240,c=0===i?0:.5>=k?i/j:i/(2-j),{h:Math.round(b)%360,s:c,l:k}},m.RGBToHEX=function(a){return l.HEX.to(a)},m.HSLToHEX=function(a){var b=m.HSLToRGB(a);return l.HEX.to(b)},m.HSVtoHEX=function(a){var b=m.HSVtoRGB(a);return l.HEX.to(b)},m.RGBtoHSV=function(a){var b,c,d=a.r/255,e=a.g/255,f=a.b/255,g=Math.max(d,e,f),h=Math.min(d,e,f),i=g,j=g-h;if(c=0===g?0:j/g,g===h)b=0;else{switch(g){case d:b=(e-f)/j+(f>e?6:0);break;case e:b=(f-d)/j+2;break;case f:b=(d-e)/j+4}b/=6}return{h:Math.round(360*b),s:c,v:i}},m.HSVtoRGB=function(a){var b,c,d,e=a.h%360/60,f=a.s,g=a.v,h=g*f,i=h*(1-Math.abs(e%2-1));return b=c=d=g-h,e=~~e,b+=[h,i,0,0,i,h][e],c+=[i,h,h,i,0,0][e],d+=[0,0,i,h,h,i][e],{r:Math.round(255*b),g:Math.round(255*c),b:Math.round(255*d)}},m.HEXtoRGB=function(a){return 0===a.indexOf("#")&&(a=a.substr(1)),3===a.length&&(a=e(a)),{r:g(a.substr(0,2)),g:g(a.substr(2,2)),b:g(a.substr(4,2))}},m.isNAME=function(a){return m.names.hasOwnProperty(a)?!0:!1},m.NAMEtoHEX=function(a){return m.names.hasOwnProperty(a)?"#"+m.names[a]:void 0},m.NAMEtoRGB=function(a){var b=m.NAMEtoHEX(a);return b?m.HEXtoRGB(b):void 0},m.hasNAME=function(a){var b=m.RGBToHEX(a);return 0===b.indexOf("#")&&(b=b.substr(1)),b=f(b),m.hexNames.hasOwnProperty(b)?m.hexNames[b]:!1},m.RGBtoNAME=function(a,b){var c=m.hasNAME(a);return c?c:("undefined"==typeof b&&(b=m.defaults.nameDegradation),l[b.toUpperCase()].to(a))},m.matchString=function(a){if("string"==typeof a){a=c.trim(a);var b,d=null;for(var e in l)if(null!=(d=l[e].match.exec(a))&&(b=l[e].parse(d)))return!0}return!1},m.defaults={format:!1,shortenHex:!1,hexUseName:!1,reduceAlpha:!1,alphaConvert:{RGB:"RGBA",HSL:"HSLA",HEX:"RGBA",NAME:"RGBA"},nameDegradation:"HEX",invalidValue:"",zeroAlphaAsTransparent:!0},m.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},m.hexNames=k(m.names)}(window,document,jQuery);
10,229
10,229
0.676703
12f3215f8de7ce385affc7f82a46782274986029
1,930
js
JavaScript
hot-deploy/partner/webapp/scmui/app/model/WorkshopStockAdjust/WorkshopStockAdjustModel.js
ZhangUranus/partner-fq
23e12895c6923bfa2a8700aef81d27dec46d6ba7
[ "Apache-2.0" ]
null
null
null
hot-deploy/partner/webapp/scmui/app/model/WorkshopStockAdjust/WorkshopStockAdjustModel.js
ZhangUranus/partner-fq
23e12895c6923bfa2a8700aef81d27dec46d6ba7
[ "Apache-2.0" ]
null
null
null
hot-deploy/partner/webapp/scmui/app/model/WorkshopStockAdjust/WorkshopStockAdjustModel.js
ZhangUranus/partner-fq
23e12895c6923bfa2a8700aef81d27dec46d6ba7
[ "Apache-2.0" ]
null
null
null
// 定义数据模型 Ext.define('SCM.model.WorkshopStockAdjust.WorkshopStockAdjustModel', { extend : 'Ext.data.Model', requires : ['SCM.extend.proxy.JsonAjax'], alias : 'WorkshopStockAdjustModel', // 字段 fields : [{ name : 'id', type : 'string' }, { name : 'emptyId', type : 'string', persist : false }, { name : 'number', type : 'string' }, { name : 'bizDate', type : 'date', dateFormat : 'time' }, { name : 'submitterSystemUserId', type : 'string' }, { name : 'submitterSystemUserName', type : 'string', persist : false }, { name : 'totalsum', type : 'float' }, { name : 'entryId', type : 'string' }, { name : 'billType', type : 'string' }, { name : 'workshopWorkshopId', type : 'string' }, { name : 'workshopWorkshopName', type : 'string', persist : false }, { name : 'materialMaterialId', type : 'string' }, { name : 'materialMaterialName', type : 'string', persist : false }, { name : 'materialMaterialModel', type : 'string' }, { name : 'volume', type : 'float' }, { name : 'unitUnitId', type : 'string' }, { name : 'unitUnitName', type : 'string', persist : false }, { name : 'price', type : 'float' }, { name : 'entrysum', type : 'float' }], // ,idProperty:'emptyId'//设置一个没用的id,这样才能支持显示多分录 proxy : { type : 'jsonajax', api : { read : '../../scm/control/requestJsonData?entity=WorkshopStockAdjustView', destroy : '../../scm/control/deleteWithEntry?headEntity=WorkshopStockAdjust&entryEntity=WorkshopStockAdjustEntry' }, remoteFilter : true } });
24.125
119
0.486528
12f3c147b565f8bca00ac0a77d57cdac46095624
15,404
js
JavaScript
spec/index.spec.js
FauxFaux/express-prom-bundle
2478e617bb2c1bd4d6d3e4dd6b2a50cb9e4d9393
[ "MIT" ]
null
null
null
spec/index.spec.js
FauxFaux/express-prom-bundle
2478e617bb2c1bd4d6d3e4dd6b2a50cb9e4d9393
[ "MIT" ]
null
null
null
spec/index.spec.js
FauxFaux/express-prom-bundle
2478e617bb2c1bd4d6d3e4dd6b2a50cb9e4d9393
[ "MIT" ]
null
null
null
'use strict'; /* eslint-env jasmine */ const express = require('express'); const supertest = require('supertest'); const bundle = require('../'); const Koa = require('koa'); const c2k = require('koa-connect'); const supertestKoa = require('supertest-koa-agent'); const promClient = require('prom-client'); const cluster = require('cluster'); describe('index', () => { beforeEach(() => { promClient.register.clear(); }); it('metrics returns up=1', done => { const app = express(); const bundled = bundle({ excludeRoutes: ['/irrelevant', /at.all/] }); app.use(bundled); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent.get('/test').end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/up\s1/); done(); }); }); }); it('"up"-metric can be excluded', done => { const app = express(); const bundled = bundle({ includeUp: false }); app.use(bundled); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent.get('/test').end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).not.toMatch(/up\s1/); done(); }); }); }); it('metrics path can be defined with a regex', done => { const app = express(); const bundled = bundle({ metricsPath: /^\/prometheus$/ }); app.use(bundled); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent.get('/test').end(() => { agent .get('/prometheus') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/up\s1/); done(); }); }); }); it('metrics path can be defined as regexp', done => { const app = express(); const bundled = bundle(); app.use(bundled); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent.get('/test').end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/up\s1/); done(); }); }); }); it('httpDurationMetricName overrides histogram metric name', done => { const app = express(); const bundled = bundle({ httpDurationMetricName: 'my_http_duration' }); app.use(bundled); const agent = supertest(app); agent.get('/metrics') .end((err, res) => { expect(res.text).toMatch(/my_http_duration/m); done(); }); }); it('metrics should be attached to /metrics by default', done => { const app = express(); const bundled = bundle(); app.use(bundled); const agent = supertest(app); agent.get('/metrics') .end((err, res) => { expect(res.status).toBe(200); done(); }); }); it('metrics can be attached to /metrics programatically', done => { const app = express(); const bundled = bundle({ autoregister: false }); app.use(bundled.metricsMiddleware); app.use(bundled); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent.get('/metrics') .end((err, res) => { expect(res.status).toBe(200); done(); }); }); it('returns error 500 on incorrect middleware usage', done => { const app = express(); app.use(bundle); supertest(app) .get('/metrics') .end((err, res) => { expect(res.status).toBe(500); done(); }); }); it('http latency gets counted', done => { const app = express(); const instance = bundle(); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/test') .end(() => { const metricHashMap = instance.metrics.http_request_duration_seconds.hashMap; expect(metricHashMap['status_code:200']).toBeDefined(); const labeled = metricHashMap['status_code:200']; expect(labeled.count).toBe(1); agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); done(); }); }); }); it('filters out the excludeRoutes', done => { const app = express(); const instance = bundle({ excludeRoutes: ['/test', /bad.word/] }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); app.use('/some/bad-word', (req, res) => res.send('it worked too')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/some/bad-word') .end(() => { const metricHashMap = instance.metrics.http_request_duration_seconds.hashMap; expect(metricHashMap['status_code:200']).not.toBeDefined(); agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); done(); }); }); }); }); it('bypass requests', done => { const app = express(); const instance = bundle({ bypass: (req)=> { // metrics added here to attempt skipping /metrics // this should fail though, because serving /metrics preceeds bypassing return !!req.url.match(/test|bad.word|metrics/) } }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); app.use('/some/bad-word', (req, res) => res.send('it worked too')); app.use('/good-word', (req, res) => res.send('this will be counted')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/some/bad-word') .end(() => { agent .get('/good-word') .end(() => { const metricHashMap = instance.metrics.http_request_duration_seconds.hashMap; expect(metricHashMap['status_code:200']).toBeDefined(); // only /good-word should be counted expect(metricHashMap['status_code:200'].count).toBe(1); agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); done(); }); }); }); }); }); it('complains about deprecated options', () => { expect(() => bundle({prefix: 'hello'})).toThrow(); }); it('tolerates includePath, includeMethod, includeCustomLabels', done => { const app = express(); const instance = bundle({ includePath: true, includeMethod: true, includeCustomLabels: {foo: 'bar'} }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); done(); }); }); }); it('metric type histogram works', done => { const app = express(); const bundled = bundle({ metricType: 'histogram', buckets: [10, 100], }); app.use(bundled); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent.get('/test').end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/le="100"/); done(); }); }); }); it('throws on unknown metricType ', () => { expect(() => { bundle({metricType: 'hello'}); }).toThrow(); }); describe('usage of normalizePath()', () => { it('normalizePath can be replaced gloablly', done => { const app = express(); const original = bundle.normalizePath; bundle.normalizePath = () => 'dummy'; const instance = bundle({ includePath: true, }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/"dummy"/m); bundle.normalizePath = original; done(); }); }); }); it('normalizePath function can be overridden', done => { const app = express(); const instance = bundle({ includePath: true, normalizePath: req => req.originalUrl + '-suffixed' }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/"\/test-suffixed"/m); done(); }); }); }); it('normalizePath can be passed as an array of [regex, replacement]', done => { const app = express(); const instance = bundle({ includePath: true, normalizePath: [ ['^/docs/whatever/.*$', '/docs'], [/^\/docs$/, '/mocks'] ] }); app.use(instance); app.use('/docs/whatever/:andmore', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/docs/whatever/unimportant') .end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/"\/mocks"/m); done(); }); }); }); }); it('formatStatusCode can be overridden', done => { const app = express(); const instance = bundle({ formatStatusCode: () => 555 }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/555/); done(); }); }); }); it('includeStatusCode=false removes status_code label from metrics', done => { const app = express(); const instance = bundle({ includeStatusCode: false }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).not.toMatch(/="200"/); done(); }); }); }); it('customLabels={foo: "bar"} adds foo="bar" label to metrics', done => { const app = express(); const instance = bundle({ customLabels: {foo: 'bar'} }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/foo="bar"/); done(); }); }); }); it('tarnsformLabels can set label values', done => { const app = express(); const instance = bundle({ includePath: true, customLabels: {foo: 'bar'}, transformLabels: labels => { labels.foo = 'baz'; labels.path += '/ok'; } }); app.use(instance); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent .get('/test') .end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/foo="baz"/); expect(res.text).toMatch(/path="\/test\/ok"/); done(); }); }); }); it('Koa: metrics returns up=1', done => { const app = new Koa(); const bundled = bundle(); app.use(c2k(bundled)); app.use(function(ctx, next) { return next().then(() => ctx.body = 'it worked'); }); const agent = supertestKoa(app); agent.get('/test').end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/^up\s1/m); done(); }); }); }); it('calls promClient.collectDefaultMetrics', () => { const spy = spyOn(promClient, 'collectDefaultMetrics'); bundle({ promClient: { collectDefaultMetrics: { } } }); expect(spy).toHaveBeenCalledWith({}); }); describe('usage of clusterMetrics()', () => { it('clusterMetrics returns 200 even without a cluster', (done) => { const app = express(); cluster.workers = []; app.use('/cluster_metrics', bundle.clusterMetrics()); const agent = supertest(app); agent .get('/cluster_metrics') .end((err, res) => { expect(res.status).toBe(200); done(); }); }); it('clusterMetrics returns 500 in case of an error', (done) => { const app = express(); app.use('/cluster_metrics', bundle.clusterMetrics()); const agent = supertest(app); // create a fake worker, which would not respond in time cluster.workers = [{ isConnected: () => true, send: () => {} }]; const errorSpy = spyOn(console, 'error'); // mute console.error agent .get('/cluster_metrics') .end((err, res) => { expect(res.status).toBe(500); expect(errorSpy).toHaveBeenCalled(); done(); }); }, 6000); }); describe('metricType: summary', () => { it('metric type summary works', done => { const app = express(); const bundled = bundle({ metricType: 'summary' }); app.use(bundled); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent.get('/test').end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/quantile="0.98"/); done(); }); }); }); it('custom pecentiles work', done => { const app = express(); const bundled = bundle({ metricType: 'summary', percentiles: [0.5, 0.85, 0.99], }); app.use(bundled); app.use('/test', (req, res) => res.send('it worked')); const agent = supertest(app); agent.get('/test').end(() => { agent .get('/metrics') .end((err, res) => { expect(res.status).toBe(200); expect(res.text).toMatch(/quantile="0.85"/); done(); }); }); }); }); });
26.836237
93
0.496235
12f3d481e78ebd451f8d4dc1325a7c5ddff605ac
440
js
JavaScript
config/config.default.js
qq578023708/egg-dd-corp
50cf47913abc150225207b09156d978560b96030
[ "MIT" ]
1
2021-12-03T06:17:26.000Z
2021-12-03T06:17:26.000Z
config/config.default.js
qq578023708/egg-dd-corp
50cf47913abc150225207b09156d978560b96030
[ "MIT" ]
1
2021-12-03T07:18:15.000Z
2021-12-03T07:18:15.000Z
config/config.default.js
qq578023708/egg-dd-corp
50cf47913abc150225207b09156d978560b96030
[ "MIT" ]
null
null
null
'use strict'; /** * 钉钉 SDK 插件默认配置 * @type {{client: {custom: boolean, encodingAESKey: string, token: string}}} */ exports.dd = { client: { custom: false, encodingAESKey: 'oyBrMEjoGjdoRvjiNWM1cvKZKNOZtsHEKS0BJwl23nd', token: 'fCDKpSJRUaGHr0vi', robotSecret:'SECa429e9bebf96f98718d06f1c8ac0d984c95077c857501d55e24ddbfde7f37f37', robotToken:'68baa1ef80831108b77175bb3c5a9c1ed1dc258e11d3bc6c4b7d53ff4fff6c8b', }, };
27.5
86
0.75
12f497f368d9edf13da99993e9419491f078af9e
347
js
JavaScript
node_modules/@babel/runtime-corejs2/helpers/arrayWithoutHoles.js
griffinperry/tfs-c360-riogrande
6c7d5fe05b3663e636a1a841f8fb0a806651e040
[ "MIT" ]
3
2022-01-29T13:52:56.000Z
2022-03-27T09:02:39.000Z
node_modules/@babel/runtime-corejs2/helpers/arrayWithoutHoles.js
griffinperry/tfs-c360-riogrande
6c7d5fe05b3663e636a1a841f8fb0a806651e040
[ "MIT" ]
null
null
null
node_modules/@babel/runtime-corejs2/helpers/arrayWithoutHoles.js
griffinperry/tfs-c360-riogrande
6c7d5fe05b3663e636a1a841f8fb0a806651e040
[ "MIT" ]
1
2022-03-13T11:56:12.000Z
2022-03-13T11:56:12.000Z
var _Array$isArray = require("@babel/runtime-corejs2/core-js/array/is-array"); var arrayLikeToArray = require("./arrayLikeToArray.js"); function _arrayWithoutHoles(arr) { if (_Array$isArray(arr)) return arrayLikeToArray(arr); } module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
38.555556
114
0.769452
12f5d5fd6b8311ad824a26da87c4e3e05ad15d9c
15,882
js
JavaScript
src/test/resources/libraries/MochiKit/1.4.1/lib/MochiKit/Selector.js
edouardswiac/htmlunit
cc9f8e4b341b980ec0bac9cb8b531f4ff958c534
[ "Apache-2.0" ]
null
null
null
src/test/resources/libraries/MochiKit/1.4.1/lib/MochiKit/Selector.js
edouardswiac/htmlunit
cc9f8e4b341b980ec0bac9cb8b531f4ff958c534
[ "Apache-2.0" ]
null
null
null
src/test/resources/libraries/MochiKit/1.4.1/lib/MochiKit/Selector.js
edouardswiac/htmlunit
cc9f8e4b341b980ec0bac9cb8b531f4ff958c534
[ "Apache-2.0" ]
null
null
null
/*** MochiKit.Selector 1.4.1 See <http://mochikit.com/> for documentation, downloads, license, etc. (c) 2005 Bob Ippolito and others. All rights Reserved. ***/ MochiKit.Base._deps('Selector', ['Base', 'DOM', 'Iter']); MochiKit.Selector.NAME = "MochiKit.Selector"; MochiKit.Selector.VERSION = "1.4.1"; MochiKit.Selector.__repr__ = function () { return "[" + this.NAME + " " + this.VERSION + "]"; }; MochiKit.Selector.toString = function () { return this.__repr__(); }; MochiKit.Selector.EXPORT = [ "Selector", "findChildElements", "findDocElements", "$$" ]; MochiKit.Selector.EXPORT_OK = [ ]; MochiKit.Selector.Selector = function (expression) { this.params = {classNames: [], pseudoClassNames: []}; this.expression = expression.toString().replace(/(^\s+|\s+$)/g, ''); this.parseExpression(); this.compileMatcher(); }; MochiKit.Selector.Selector.prototype = { /*** Selector class: convenient object to make CSS selections. ***/ __class__: MochiKit.Selector.Selector, /** @id MochiKit.Selector.Selector.prototype.parseExpression */ parseExpression: function () { function abort(message) { throw 'Parse error in selector: ' + message; } if (this.expression == '') { abort('empty expression'); } var repr = MochiKit.Base.repr; var params = this.params; var expr = this.expression; var match, modifier, clause, rest; while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!^$*]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) { params.attributes = params.attributes || []; params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''}); expr = match[1]; } if (expr == '*') { return this.params.wildcard = true; } while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+(?:\([^)]*\))?)(.*)/i)) { modifier = match[1]; clause = match[2]; rest = match[3]; switch (modifier) { case '#': params.id = clause; break; case '.': params.classNames.push(clause); break; case ':': params.pseudoClassNames.push(clause); break; case '': case undefined: params.tagName = clause.toUpperCase(); break; default: abort(repr(expr)); } expr = rest; } if (expr.length > 0) { abort(repr(expr)); } }, /** @id MochiKit.Selector.Selector.prototype.buildMatchExpression */ buildMatchExpression: function () { var repr = MochiKit.Base.repr; var params = this.params; var conditions = []; var clause, i; function childElements(element) { return "MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, " + element + ".childNodes)"; } if (params.wildcard) { conditions.push('true'); } if (clause = params.id) { conditions.push('element.id == ' + repr(clause)); } if (clause = params.tagName) { conditions.push('element.tagName.toUpperCase() == ' + repr(clause)); } if ((clause = params.classNames).length > 0) { for (i = 0; i < clause.length; i++) { conditions.push('MochiKit.DOM.hasElementClass(element, ' + repr(clause[i]) + ')'); } } if ((clause = params.pseudoClassNames).length > 0) { for (i = 0; i < clause.length; i++) { var match = clause[i].match(/^([^(]+)(?:\((.*)\))?$/); var pseudoClass = match[1]; var pseudoClassArgument = match[2]; switch (pseudoClass) { case 'root': conditions.push('element.nodeType == 9 || element === element.ownerDocument.documentElement'); break; case 'nth-child': case 'nth-last-child': case 'nth-of-type': case 'nth-last-of-type': match = pseudoClassArgument.match(/^((?:(\d+)n\+)?(\d+)|odd|even)$/); if (!match) { throw "Invalid argument to pseudo element nth-child: " + pseudoClassArgument; } var a, b; if (match[0] == 'odd') { a = 2; b = 1; } else if (match[0] == 'even') { a = 2; b = 0; } else { a = match[2] && parseInt(match) || null; b = parseInt(match[3]); } conditions.push('this.nthChild(element,' + a + ',' + b + ',' + !!pseudoClass.match('^nth-last') // Reverse + ',' + !!pseudoClass.match('of-type$') // Restrict to same tagName + ')'); break; case 'first-child': conditions.push('this.nthChild(element, null, 1)'); break; case 'last-child': conditions.push('this.nthChild(element, null, 1, true)'); break; case 'first-of-type': conditions.push('this.nthChild(element, null, 1, false, true)'); break; case 'last-of-type': conditions.push('this.nthChild(element, null, 1, true, true)'); break; case 'only-child': conditions.push(childElements('element.parentNode') + '.length == 1'); break; case 'only-of-type': conditions.push('MochiKit.Base.filter(function (node) { return node.tagName == element.tagName; }, ' + childElements('element.parentNode') + ').length == 1'); break; case 'empty': conditions.push('element.childNodes.length == 0'); break; case 'enabled': conditions.push('(this.isUIElement(element) && element.disabled === false)'); break; case 'disabled': conditions.push('(this.isUIElement(element) && element.disabled === true)'); break; case 'checked': conditions.push('(this.isUIElement(element) && element.checked === true)'); break; case 'not': var subselector = new MochiKit.Selector.Selector(pseudoClassArgument); conditions.push('!( ' + subselector.buildMatchExpression() + ')') break; } } } if (clause = params.attributes) { MochiKit.Base.map(function (attribute) { var value = 'MochiKit.DOM.getNodeAttribute(element, ' + repr(attribute.name) + ')'; var splitValueBy = function (delimiter) { return value + '.split(' + repr(delimiter) + ')'; } conditions.push(value + ' != null'); switch (attribute.operator) { case '=': conditions.push(value + ' == ' + repr(attribute.value)); break; case '~=': conditions.push('MochiKit.Base.findValue(' + splitValueBy(' ') + ', ' + repr(attribute.value) + ') > -1'); break; case '^=': conditions.push(value + '.substring(0, ' + attribute.value.length + ') == ' + repr(attribute.value)); break; case '$=': conditions.push(value + '.substring(' + value + '.length - ' + attribute.value.length + ') == ' + repr(attribute.value)); break; case '*=': conditions.push(value + '.match(' + repr(attribute.value) + ')'); break; case '|=': conditions.push(splitValueBy('-') + '[0].toUpperCase() == ' + repr(attribute.value.toUpperCase())); break; case '!=': conditions.push(value + ' != ' + repr(attribute.value)); break; case '': case undefined: // Condition already added above break; default: throw 'Unknown operator ' + attribute.operator + ' in selector'; } }, clause); } return conditions.join(' && '); }, /** @id MochiKit.Selector.Selector.prototype.compileMatcher */ compileMatcher: function () { var code = 'return (!element.tagName) ? false : ' + this.buildMatchExpression() + ';'; this.match = new Function('element', code); }, /** @id MochiKit.Selector.Selector.prototype.nthChild */ nthChild: function (element, a, b, reverse, sametag){ var siblings = MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, element.parentNode.childNodes); if (sametag) { siblings = MochiKit.Base.filter(function (node) { return node.tagName == element.tagName; }, siblings); } if (reverse) { siblings = MochiKit.Iter.reversed(siblings); } if (a) { var actualIndex = MochiKit.Base.findIdentical(siblings, element); return ((actualIndex + 1 - b) / a) % 1 == 0; } else { return b == MochiKit.Base.findIdentical(siblings, element) + 1; } }, /** @id MochiKit.Selector.Selector.prototype.isUIElement */ isUIElement: function (element) { return MochiKit.Base.findValue(['input', 'button', 'select', 'option', 'textarea', 'object'], element.tagName.toLowerCase()) > -1; }, /** @id MochiKit.Selector.Selector.prototype.findElements */ findElements: function (scope, axis) { var element; if (axis == undefined) { axis = ""; } function inScope(element, scope) { if (axis == "") { return MochiKit.DOM.isChildNode(element, scope); } else if (axis == ">") { return element.parentNode === scope; } else if (axis == "+") { return element === nextSiblingElement(scope); } else if (axis == "~") { var sibling = scope; while (sibling = nextSiblingElement(sibling)) { if (element === sibling) { return true; } } return false; } else { throw "Invalid axis: " + axis; } } if (element = MochiKit.DOM.getElement(this.params.id)) { if (this.match(element)) { if (!scope || inScope(element, scope)) { return [element]; } } } function nextSiblingElement(node) { node = node.nextSibling; while (node && node.nodeType != 1) { node = node.nextSibling; } return node; } if (axis == "") { scope = (scope || MochiKit.DOM.currentDocument()).getElementsByTagName(this.params.tagName || '*'); } else if (axis == ">") { if (!scope) { throw "> combinator not allowed without preceeding expression"; } scope = MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, scope.childNodes); } else if (axis == "+") { if (!scope) { throw "+ combinator not allowed without preceeding expression"; } scope = nextSiblingElement(scope) && [nextSiblingElement(scope)]; } else if (axis == "~") { if (!scope) { throw "~ combinator not allowed without preceeding expression"; } var newscope = []; while (nextSiblingElement(scope)) { scope = nextSiblingElement(scope); newscope.push(scope); } scope = newscope; } if (!scope) { return []; } var results = MochiKit.Base.filter(MochiKit.Base.bind(function (scopeElt) { return this.match(scopeElt); }, this), scope); return results; }, /** @id MochiKit.Selector.Selector.prototype.repr */ repr: function () { return 'Selector(' + this.expression + ')'; }, toString: MochiKit.Base.forwardCall("repr") }; MochiKit.Base.update(MochiKit.Selector, { /** @id MochiKit.Selector.findChildElements */ findChildElements: function (element, expressions) { var uniq = function(arr) { var res = []; for (var i = 0; i < arr.length; i++) { if (MochiKit.Base.findIdentical(res, arr[i]) < 0) { res.push(arr[i]); } } return res; }; return MochiKit.Base.flattenArray(MochiKit.Base.map(function (expression) { var nextScope = ""; var reducer = function (results, expr) { if (match = expr.match(/^[>+~]$/)) { nextScope = match[0]; return results; } else { var selector = new MochiKit.Selector.Selector(expr); var elements = MochiKit.Iter.reduce(function (elements, result) { return MochiKit.Base.extend(elements, selector.findElements(result || element, nextScope)); }, results, []); nextScope = ""; return elements; } }; var exprs = expression.replace(/(^\s+|\s+$)/g, '').split(/\s+/); return uniq(MochiKit.Iter.reduce(reducer, exprs, [null])); }, expressions)); }, findDocElements: function () { return MochiKit.Selector.findChildElements(MochiKit.DOM.currentDocument(), arguments); }, __new__: function () { var m = MochiKit.Base; this.$$ = this.findDocElements; this.EXPORT_TAGS = { ":common": this.EXPORT, ":all": m.concat(this.EXPORT, this.EXPORT_OK) }; m.nameFunctions(this); } }); MochiKit.Selector.__new__(); MochiKit.Base._exportSymbols(this, MochiKit.Selector);
38.177885
183
0.448936
12f75bdbbc81efec00a4cd41d054f64ac8626a95
601
js
JavaScript
es/evaluate-by-operator/operator/divide.js
vi-iotcustom/formula-parser
7214056deb05a0fb809d03b0f8ff079ac78bd866
[ "MIT" ]
null
null
null
es/evaluate-by-operator/operator/divide.js
vi-iotcustom/formula-parser
7214056deb05a0fb809d03b0f8ff079ac78bd866
[ "MIT" ]
null
null
null
es/evaluate-by-operator/operator/divide.js
vi-iotcustom/formula-parser
7214056deb05a0fb809d03b0f8ff079ac78bd866
[ "MIT" ]
1
2019-05-16T08:45:46.000Z
2019-05-16T08:45:46.000Z
import { toNumber } from './../../helper/number'; import { ERROR_DIV_ZERO, ERROR_VALUE } from './../../error'; export var SYMBOL = '/'; export default function func(first) { for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { rest[_key - 1] = arguments[_key]; } var result = rest.reduce(function (acc, value) { return acc / toNumber(value); }, toNumber(first)); if (result === Infinity) { throw Error(ERROR_DIV_ZERO); } if (isNaN(result)) { throw Error(ERROR_VALUE); } return result; } func.SYMBOL = SYMBOL;
24.04
107
0.617304
12f78cf8755bb10c860c6720c2d8fa2801b29224
2,881
js
JavaScript
Examples/cucumber.js/features/step_definitions/unium.js
tony-hinterland/unium
2ff9e6b70b49697a26e5b5a69483e1c6d2e3af80
[ "MIT" ]
187
2017-08-16T01:16:28.000Z
2022-03-31T09:40:18.000Z
Examples/cucumber.js/features/step_definitions/unium.js
tony-hinterland/unium
2ff9e6b70b49697a26e5b5a69483e1c6d2e3af80
[ "MIT" ]
80
2017-08-25T17:55:48.000Z
2022-02-02T13:22:36.000Z
Examples/cucumber.js/features/step_definitions/unium.js
tony-hinterland/unium
2ff9e6b70b49697a26e5b5a69483e1c6d2e3af80
[ "MIT" ]
44
2017-10-07T13:48:25.000Z
2022-03-31T09:40:29.000Z
// a class to make the websocket interface a little more test friendly // by providing a promise/async version of the websocket interface const chai = require( 'chai' ); const WebSocket = require( 'ws' ); const { expect } = chai; module.exports = class UniumHelper { constructor() { this.ws = null; this.next_id = 1; this._on = {}; this._once = {}; } // async connect connect( uri ) { return new Promise( (resolve, reject) => { this.disconnect(); this.ws = new WebSocket( uri ); this.ws.on( 'open', resolve ); this.ws.on( 'error', reject ); this.ws.on( 'message', (m) => this.onMessage(m) ); }); } disconnect() { if( this.ws ) { this.ws.close(); this.ws = null; } } // when a message is received, invoke any handlers registered for this event onMessage( msg ) { const data = JSON.parse( msg ); const {id} = data; if(!id) { return; } if( id in this._on ) { this._on[ id ].forEach( fn => fn( data ) ); } if( id in this._once ) { this._once[ id ].forEach( fn => fn( data ) ); delete this._once[ id ]; } } // add event handlers on( event, fn ) { if( event in this._on ) { this._on[ event ].push( fn ); } else { this._on[ event ] = [ fn ]; } } once( event, fn ) { if( event in this._once ) { this._once[ event ].push( fn ); } else { this._once[ event ] = [ fn ]; } } // send message, return message id send( uri, id ) { const msg = { id: id || `m${this.next_id++}`, q: uri }; this.ws.send( JSON.stringify( msg ) ) return msg.id; } // wait until we receive a message with a given id wait_for( id, timeout = 2 ) { return new Promise( (resolve,reject) => { const timeoutHandle = setTimeout( () => reject( 'timeout out' ), timeout * 1000 ); this.once( id, (data) => { clearTimeout( timeoutHandle ); resolve( data ); }); }); } // send a query and result the result (like a HTTP get) async get( uri, timeout = 2 ) { const id = await this.send( uri ); const res = await this.wait_for( id, timeout ); expect( res ).to.not.be.null; res.should.have.property( 'id' ); res.id.should.equal( id ); res.should.not.have.property( 'error' ); res.should.have.property( 'data' ); return res.data; } // convenient function to binding to events // use event name as id unless given on async bind( uri, name ) { const id = name || uri.split('.').pop(); await this.send( `/bind${uri}`, id ); const res = await this.wait_for( id ); expect( res ).to.not.be.null; res.should.have.property( 'id' ); res.should.not.have.property( 'error' ); res.should.have.property( 'info' ); return res; } }
21.5
88
0.550503
12f799cdfcb281b0be4eeeacdf79ff09c0c29a1f
1,860
js
JavaScript
node_modules/@kentico/kontent-delivery/_commonjs/query/taxonomy/taxonomy-query.class.js
GroupDigitalHub/il-kentico-kontent-prototype
b4105d83a8f8e2b4ed2f6e5e8088a9db8e3afe81
[ "MIT" ]
null
null
null
node_modules/@kentico/kontent-delivery/_commonjs/query/taxonomy/taxonomy-query.class.js
GroupDigitalHub/il-kentico-kontent-prototype
b4105d83a8f8e2b4ed2f6e5e8088a9db8e3afe81
[ "MIT" ]
null
null
null
node_modules/@kentico/kontent-delivery/_commonjs/query/taxonomy/taxonomy-query.class.js
GroupDigitalHub/il-kentico-kontent-prototype
b4105d83a8f8e2b4ed2f6e5e8088a9db8e3afe81
[ "MIT" ]
null
null
null
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var base_taxonomy_query_class_1 = require("./base-taxonomy-query.class"); var TaxonomyQuery = /** @class */ (function (_super) { __extends(TaxonomyQuery, _super); function TaxonomyQuery(config, queryService, taxonomyCodename) { var _this = _super.call(this, config, queryService) || this; _this.config = config; _this.queryService = queryService; _this.taxonomyCodename = taxonomyCodename; if (!taxonomyCodename) { throw Error("Cannot create taxonomy query without codename of the taxonomy"); } return _this; } /** * Gets the runnable Observable */ TaxonomyQuery.prototype.toObservable = function () { return _super.prototype.runTaxonomyQuery.call(this, this.taxonomyCodename); }; /** * Gets 'Url' representation of query */ TaxonomyQuery.prototype.getUrl = function () { return _super.prototype.getTaxonomyQueryUrl.call(this, this.taxonomyCodename); }; return TaxonomyQuery; }(base_taxonomy_query_class_1.BaseTaxonomyQuery)); exports.TaxonomyQuery = TaxonomyQuery; //# sourceMappingURL=taxonomy-query.class.js.map
42.272727
94
0.626344
12f7ac3b6be7907829a456d705f5da0cf07e2f19
382
js
JavaScript
.vuepress/config.js
taichunmin/dreamforest
c5492980954ec72c007ee90573296f990e004c3e
[ "MIT" ]
null
null
null
.vuepress/config.js
taichunmin/dreamforest
c5492980954ec72c007ee90573296f990e004c3e
[ "MIT" ]
7
2018-04-30T06:00:18.000Z
2019-04-15T13:19:46.000Z
.vuepress/config.js
taichunmin/dreamforest
c5492980954ec72c007ee90573296f990e004c3e
[ "MIT" ]
null
null
null
module.exports = { title: 'Dreamforest 夢森林', description: '知識學習 培養人才 「夥伴 x 信任 x 成長」', themeConfig: { sidebar: false, nav: [ { text: 'Home', link: '/', icon: 'home' }, { text: '場地設備', link: '/venue', icon: 'microphone' }, { text: '交通資訊', link: '/location', icon: 'map-marker' }, { text: '活動日曆', link: '/calendar', icon: 'calendar' }, ] } }
29.384615
62
0.526178
12f825c867da5fed73b88372a41f992cb7abb270
1,066
js
JavaScript
komutlar/bilgi.js
Troflantes/VaxeTurkiye-Discord-Turkce-Bot
c408dcdbb00d2417dd700413980d04ad11dd4612
[ "Unlicense" ]
6
2021-02-27T13:51:41.000Z
2021-10-09T21:02:12.000Z
komutlar/bilgi.js
Troflantes/VaxeTurkiye-Discord-Turkce-Bot
c408dcdbb00d2417dd700413980d04ad11dd4612
[ "Unlicense" ]
1
2021-08-16T16:38:24.000Z
2021-08-16T16:38:24.000Z
komutlar/bilgi.js
Troflantes/VaxeTurkiye-Discord-Turkce-Bot
c408dcdbb00d2417dd700413980d04ad11dd4612
[ "Unlicense" ]
21
2020-08-25T13:19:34.000Z
2021-01-20T06:07:34.000Z
const Discord = require('discord.js'); const client = new Discord.Client(); const ayarlar = require('../ayarlar.json'); exports.run = (client, message) => { if (message.channel.type !== 'dm') { const ozelmesajkontrol = new Discord.RichEmbed() .setColor(0x00AE86) .setTimestamp() .setAuthor(message.author.username, message.author.avatarURL) .setDescription('Özel Mesajlarına Bilgi Mesajımı Attım! :postbox: '); message.channel.sendEmbed(ozelmesajkontrol) } const pingozel = new Discord.RichEmbed() .setColor(0x00AE86) .setAuthor(message.author.username, message.author.avatarURL) .setDescription('**03.01.2018 Tarihinde xChairs#4713 Tarafından Yapılmıştır. Diğer Bütün Bilgiler İçin vt!komutlar**'); return message.author.sendEmbed(pingozel) }; exports.conf = { enabled: true, guildOnly: false, aliases: ['bot bilgi', 'botbilgi', 'bb', 'botb', 'bbot', 'hakkında', 'bot hakkında', 'bothakkında'], permLevel: 0 }; exports.help = { name: 'bilgi', description: 'Bot ile ilgili bilgi verir.', usage: 'bilgi' };
33.3125
123
0.699812
12f82f11f6a602175a9fa2504dd4d33e3343c8e0
323
js
JavaScript
simplemooc/core/static/js/cadastrar.js
DiegoBrian/Eureka
27cf952b27af7fc8cfcc797dffc43a92c9a16d15
[ "MIT" ]
null
null
null
simplemooc/core/static/js/cadastrar.js
DiegoBrian/Eureka
27cf952b27af7fc8cfcc797dffc43a92c9a16d15
[ "MIT" ]
null
null
null
simplemooc/core/static/js/cadastrar.js
DiegoBrian/Eureka
27cf952b27af7fc8cfcc797dffc43a92c9a16d15
[ "MIT" ]
null
null
null
$( document ).ready(function() { if ($('#id_grade').length){ $("#id_user_type").val("ALUNO"); $("#id_grade").attr("min", 6); $("#id_grade").attr("max", 9); $("#id_grade").val(6); } else{ $("#id_user_type").val("PROFESSOR"); } $("#id_birth_date").mask("99/99/9999"); });
23.071429
43
0.47678
12f8d9f789d5fbe759e991da22e973607837e3db
3,886
js
JavaScript
ptl/core/PtlVariable.js
BobNobrain/ptl-test
10fd85f4517ee8d245dff46048170e4c6883c20c
[ "MIT" ]
null
null
null
ptl/core/PtlVariable.js
BobNobrain/ptl-test
10fd85f4517ee8d245dff46048170e4c6883c20c
[ "MIT" ]
null
null
null
ptl/core/PtlVariable.js
BobNobrain/ptl-test
10fd85f4517ee8d245dff46048170e4c6883c20c
[ "MIT" ]
null
null
null
const PtlProperty = require('./PtlProperty'); const primitiveTypes = { string: String, number: Number, boolean: Boolean }; /** * @class Represents layer variable property * @property {Function} T Variable type constructor * @property {Boolean} _nullable Whether value can be null * @property {Boolean} _volatile Whether value can be changed from outside */ class PtlVariable extends PtlProperty { constructor(value, type) { super(value); this.T = type; this._nullable = value === null; this._allow.w = true; this._volatile = false; } /** * Defines this variable as property on target object dest * @param {Object} dest Target object */ plain(dest) { Object.defineProperty(dest, this.name, { enumerable: true, get: () => this._value, set: value => { this._value = value; this._changed = true; } }); } /** * Serializes property for Projectile sync operation * @return {Object} Serialized method data */ sync() { return Object.assign({}, this, { T: this.T.name, _type: 'variable' }); } /** * Marks this variable as nullable * @return {PtlVariable} this * @chainable */ nullable() { this._nullable = true; return this; } /** * Marks this variable as volatile * @return {PtlVariable} this * @chainable * @throws {TypeError} If this variable is already marked as internal */ volatile() { if (this._internal) throw new TypeError(`Internal variable ${this} should not be marked as volatile`); this._volatile = true; return this; } /** * Marks this variable as internal so it is not synced * @return {PtlVariable} this * @chainable * @throws {TypeError} If this variable is already marked as volatile */ internal() { if (this._volatile) throw new TypeError(`Volatile variable ${this} should not be marked as internal`); return super.internal(); } /** * Checks whether property value was changed since watch was started * @return {Boolean} Was property value changed */ checkChanges() { const changed = super.checkChanges(); // Hide changes if PtlProperty decides that they are private. // They are hidden if _changed is true, but PtlProperty still // returns false: if (this._changed && !changed) return false; // Else, mark this variable changed either if it's volatile // or really was changed. return this._volatile || changed; } /** * Gets this variable type name string * @return {String} Variable constructor function name */ typename() { return this.T.name; } /** * Checks types compatibility * @param {any} newValue Value to be checked * @return {Boolean} Whether newValue can be assigned to this variable */ typecheck(value) { if (value === void 0) return false; if (value === null) return this._nullable; if (this.T === primitiveTypes[typeof value]) return true; return value instanceof this.T; } } // PtlVariable.fromSyncData = function (layerName, syncData, client) { // const T = PtlVariable.typesRegistry[syncData.T]; // if (!T) { // throw new ReferenceError( // `Unknown variable type: ${syncData.T}. Did you register it with PtlVariable.registerType?` // ); // } // const result = new PtlVariable(syncData._value, T); // result._nullable = syncData._nullable; // result._allow = syncData._allow; // result.name = syncData.name; // return result; // }; module.exports = PtlVariable;
28.364964
110
0.593155
12f8e2a578bcca562fa612352f4278a19ccd561f
718
js
JavaScript
waste-front/pages/_app.js
konantian/Waste-Management-System
2f91db7d85679ccf77db8e5829b866e47bbb045d
[ "MIT" ]
null
null
null
waste-front/pages/_app.js
konantian/Waste-Management-System
2f91db7d85679ccf77db8e5829b866e47bbb045d
[ "MIT" ]
null
null
null
waste-front/pages/_app.js
konantian/Waste-Management-System
2f91db7d85679ccf77db8e5829b866e47bbb045d
[ "MIT" ]
null
null
null
import React from 'react'; import '../styles/globals.css'; import 'antd/dist/antd.css'; import { wrapper } from '../redux/store'; import { useStore } from 'react-redux'; import { Spin } from 'antd'; import { PersistGate } from 'redux-persist/integration/react'; const MyApp = ({ Component, pageProps }) => { const store = useStore((state) => state); return ( <PersistGate persistor={store.__persistor} loading={ <div className="loader"> <Spin size="large" tip="Loading ... " /> </div> } > <Component {...pageProps} /> </PersistGate> ); }; export default wrapper.withRedux(MyApp);
27.615385
62
0.552925
12f8e775ac2462c68b0e06ca130c58a75b68bf2f
2,705
js
JavaScript
node_modules/ix/targets/es2015/cls/add/iterable-operators/flatten.js
iteaky/random
7de7795493b147743cea5657bdc48f7f63d1c50e
[ "Unlicense" ]
null
null
null
node_modules/ix/targets/es2015/cls/add/iterable-operators/flatten.js
iteaky/random
7de7795493b147743cea5657bdc48f7f63d1c50e
[ "Unlicense" ]
7
2021-03-09T22:36:52.000Z
2022-02-18T14:28:36.000Z
node_modules/ix/targets/es2015/cls/add/iterable-operators/flatten.js
iteaky/random
7de7795493b147743cea5657bdc48f7f63d1c50e
[ "Unlicense" ]
null
null
null
goog.module('targets.es2015.cls.add.iterable_operators.flatten'); exports = {}; var module = {id: 'targets/es2015/cls/add/iterable-operators/flatten.js'};/** * @fileoverview added by tsickle * @suppress {checkTypes} checked by tsc */ var iterable_1 = goog.require('targets.es2015.cls.iterable'); const tsickle_forward_declare_1 = goog.forwardDeclare("_Users.ptaylor.dev.ixjs.src.iterable"); var flatten_1 = goog.require('targets.es2015.cls.iterable.flatten'); const tsickle_forward_declare_2 = goog.forwardDeclare("_Users.ptaylor.dev.ixjs.src.iterable.flatten"); /** * @ignore * @template T * @this {!tsickle_forward_declare_1.IterableX<T>} * @param {number=} depth * @return {!tsickle_forward_declare_1.IterableX<T>} */ function flattenProto(depth) { return flatten_1.flatten(this, depth); } exports.flattenProto = flattenProto; iterable_1.IterableX.prototype.flatten = flattenProto; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9hZGQvaXRlcmFibGUtb3BlcmF0b3JzL2ZsYXR0ZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHOztBQUVILDZDQUxrQjtBQU1sQixNQUFNLHlCQUF5QixHQUFHLElBQUksQ0FBQyxjQUFjLENBQUMsc0NBQXNDLENBQUMsQ0FObEQ7QUFPM0Msb0RBTmdCO0FBT2hCLE1BQU0seUJBQXlCLEdBQUcsSUFBSSxDQUFDLGNBQWMsQ0FBQyw4Q0FBOEMsQ0FBQyxDQUFDO0FBQ3RHOzs7Ozs7R0FNRztBQVRILHNCQVlJLEtBVmM7SUFXaEIsTUFWTSxDQUFBLGlCQUFRLENBQUMsSUFBSSxFQUFDLEtBQU0sQ0FBQyxDQUFDO0FBVzlCLENBVkM7QUFKRCxvQ0FJQztBQVlELG9CQVZTLENBQUMsU0FBUyxDQUFDLE9BQU8sR0FBRSxZQUFhLENBQUMiLCJmaWxlIjoiZmxhdHRlbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBmaWxlb3ZlcnZpZXcgYWRkZWQgYnkgdHNpY2tsZVxuICogQHN1cHByZXNzIHtjaGVja1R5cGVzfSBjaGVja2VkIGJ5IHRzY1xuICovXG5cbmltcG9ydCB7IEl0ZXJhYmxlWCB9IGZyb20gJy4uLy4uL2l0ZXJhYmxlJztcbmNvbnN0IHRzaWNrbGVfZm9yd2FyZF9kZWNsYXJlXzEgPSBnb29nLmZvcndhcmREZWNsYXJlKFwiX1VzZXJzLnB0YXlsb3IuZGV2Lml4anMuc3JjLml0ZXJhYmxlXCIpO1xuaW1wb3J0IHsgZmxhdHRlbiB9IGZyb20gJy4uLy4uL2l0ZXJhYmxlL2ZsYXR0ZW4nO1xuY29uc3QgdHNpY2tsZV9mb3J3YXJkX2RlY2xhcmVfMiA9IGdvb2cuZm9yd2FyZERlY2xhcmUoXCJfVXNlcnMucHRheWxvci5kZXYuaXhqcy5zcmMuaXRlcmFibGUuZmxhdHRlblwiKTtcbi8qKlxuICogQGlnbm9yZVxuICogQHRlbXBsYXRlIFRcbiAqIEB0aGlzIHshdHNpY2tsZV9mb3J3YXJkX2RlY2xhcmVfMS5JdGVyYWJsZVg8VD59XG4gKiBAcGFyYW0ge251bWJlcj19IGRlcHRoXG4gKiBAcmV0dXJuIHshdHNpY2tsZV9mb3J3YXJkX2RlY2xhcmVfMS5JdGVyYWJsZVg8VD59XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBmbGF0dGVuUHJvdG88VD4oXG4gICAgdGhpczogSXRlcmFibGVYPFQ+LFxuICAgIGRlcHRoPzogbnVtYmVyKTogSXRlcmFibGVYPFQ+IHtcbiAgcmV0dXJuIGZsYXR0ZW4odGhpcywgZGVwdGgpO1xufVxuXG5JdGVyYWJsZVgucHJvdG90eXBlLmZsYXR0ZW4gPSBmbGF0dGVuUHJvdG87XG5cbmRlY2xhcmUgbW9kdWxlICcuLi8uLi9pdGVyYWJsZScge1xuICBpbnRlcmZhY2UgSXRlcmFibGVYPFQ+IHtcbiAgICBmbGF0dGVuOiB0eXBlb2YgZmxhdHRlblByb3RvO1xuICB9XG59Il19
122.954545
1,806
0.916451
12fad15def91552738a431e9b21643d63ac55580
2,172
js
JavaScript
packages/yoshi/test/tasks/petri-specs/petri-specs.spec.js
shilomagen/yoshi
26e12693257abb65a85868821d43fbab43d9afaa
[ "RSA-MD" ]
1
2018-03-27T11:27:24.000Z
2018-03-27T11:27:24.000Z
packages/yoshi/test/tasks/petri-specs/petri-specs.spec.js
shilomagen/yoshi
26e12693257abb65a85868821d43fbab43d9afaa
[ "RSA-MD" ]
3
2018-03-21T10:26:02.000Z
2021-03-03T06:53:37.000Z
packages/yoshi/test/tasks/petri-specs/petri-specs.spec.js
shilomagen/yoshi
26e12693257abb65a85868821d43fbab43d9afaa
[ "RSA-MD" ]
null
null
null
const path = require('path'); const fs = require('fs-extra'); const { expect } = require('chai'); const tempy = require('tempy'); const petriSpecsTask = require('../../../src/tasks/petri-specs'); const destFile = 'petri-experiments.json'; const destDir = path.join('dist', 'statics'); const writeFsObject = (tempDir, fsObj) => { for (const filePath in fsObj) { if (fsObj[filePath]) { fs.outputFileSync(path.join(tempDir, filePath), fsObj[filePath]); } } }; const pomPath = require.resolve('./fixtures/pom.xml'); describe('haste-task-wix-petri-specs', () => { it('should create petri-experiments.json file inside destination directory', async () => { const tempDir = tempy.directory(); const fsObj = { 'package.json': '', 'pom.xml': fs.readFileSync(pomPath), 'petri-specs/specs.infra.Dummy.json': fs.readFileSync( require.resolve('./fixtures/specs.infra.Dummy'), ), }; writeFsObject(tempDir, fsObj); await petriSpecsTask({ base: tempDir, destDir, config: { pom: pomPath, }, }); const staticDirContent = fs.readdirSync(path.join(tempDir, destDir)); expect(staticDirContent).to.contain(destFile); }); it('should create petri-experiments.json from translation keys with config', async () => { const tempDir = tempy.directory(); const fsObj = { 'package.json': '', 'pom.xml': fs.readFileSync(pomPath), 'src/assets/messages_en.json': fs.readFileSync( require.resolve('./fixtures/messages-en'), ), }; writeFsObject(tempDir, fsObj); await petriSpecsTask({ base: tempDir, destDir, config: { scopes: ['alt-scope', 'alt-scope2'], onlyForLoggedInUsers: false, pom: pomPath, }, }); const staticDirContent = fs.readdirSync(path.join(tempDir, destDir)); expect(staticDirContent).to.contain(destFile); const petriExperimentsJson = fs.readJsonSync( path.join(tempDir, destDir, destFile), ); expect(petriExperimentsJson).to.eql( fs.readJsonSync(require.resolve('./fixtures/petri-experiments'), 'utf8'), ); }); });
27.15
92
0.629834
12fb64ed0330b17acffaa805e662def1445c0fc5
128
js
JavaScript
challenge-frontend/src/context/tasksContext/taskContext.js
tavares97/elecctroChallenge
ebece692ab108298c8bcce78a9f5501027e8f54b
[ "MIT" ]
null
null
null
challenge-frontend/src/context/tasksContext/taskContext.js
tavares97/elecctroChallenge
ebece692ab108298c8bcce78a9f5501027e8f54b
[ "MIT" ]
null
null
null
challenge-frontend/src/context/tasksContext/taskContext.js
tavares97/elecctroChallenge
ebece692ab108298c8bcce78a9f5501027e8f54b
[ "MIT" ]
null
null
null
import { createContext } from 'react'; //INITIALIZES CONTEXT const TaskContext = createContext(); export default TaskContext;
18.285714
38
0.773438
12fbc5d9580aaf24356378a40bde1cd89f97548f
5,100
js
JavaScript
src/components/LineChart/LineChart.js
36degrees/coronavirus-dashboard
bc31f6c7999cb4677ee185a3e0ed06bd1b0a8a41
[ "MIT" ]
1
2020-07-02T20:10:05.000Z
2020-07-02T20:10:05.000Z
src/components/LineChart/LineChart.js
36degrees/coronavirus-dashboard
bc31f6c7999cb4677ee185a3e0ed06bd1b0a8a41
[ "MIT" ]
null
null
null
src/components/LineChart/LineChart.js
36degrees/coronavirus-dashboard
bc31f6c7999cb4677ee185a3e0ed06bd1b0a8a41
[ "MIT" ]
null
null
null
// @flow import React from 'react'; import type { ComponentType } from 'react'; import { Line } from 'react-chartjs-2'; import type { Props } from './LineChart.types'; import * as Styles from './LineChart.styles'; const LineChart: ComponentType<Props> = ({ header, tooltipText, data }: Props) => { return ( <Styles.Container> <span className="govuk-heading-s">{header}</span> <Styles.Chart> <Line data={{ labels: data.map(d => d.date), datasets: [{ borderWidth: 2, borderColor: '#367E93', pointBorderColor: '#367E93', pointBackgroundColor: '#fff', pointBorderWidth: 3, pointHoverRadius: 3, pointHoverBackgroundColor: '#367E93', pointHoverBorderColor: '#367E93', pointHoverBorderWidth: 5, pointRadius: 1, pointHitRadius: 5, data: data.map(d => d.value), }] }} legend={{ display: false }} options={{ maintainAspectRatio: false, scales: { xAxes: [{ type: 'time', time: { displayFormats: { quarter: 'MMM YYYY' }, }, gridLines: { display: false, }, ticks: { autoSkip: true, maxTicksLimit: 15 }, }], yAxes: [{ gridLines: { drawBorder: false, }, ticks: { beginAtZero: true, userCallback: function(value, index, values) { return value.toLocaleString(); }, }, }], }, tooltips: { // Disable the on-canvas tooltip enabled: false, custom: function (tooltipModel) { // Tooltip Element let tooltipEl = document.getElementById('chartjs-tooltip'); // Create element on first render if (!tooltipEl) { tooltipEl = document.createElement('div'); tooltipEl.id = 'chartjs-tooltip'; tooltipEl.innerHTML = '<table style="background-color: #000; color: #fff; border-radius: 5px; padding: 2px; opacity: 0.8"></table>'; document.body.appendChild(tooltipEl); } // Hide if no tooltip if (tooltipModel.opacity === 0) { tooltipEl.style.opacity = 0; return; } function getBody(bodyItem) { return bodyItem.lines; } // Set Text if (tooltipModel.body) { const titleLines = tooltipModel.title || []; const bodyLines = tooltipModel.body.map(getBody); let innerHtml = '<thead>'; titleLines.forEach(function (title) { innerHtml += '<tr><th style="text-align: left;">' + new Intl.DateTimeFormat('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).format(new Date(title)) + '</th></tr>'; }); innerHtml += '</thead><tbody>'; bodyLines.forEach(function (body, i) { const val = parseInt(body).toLocaleString(); const colors = tooltipModel.labelColors[i]; let style = 'background:' + colors.backgroundColor; style += '; border-color:' + colors.borderColor; style += '; border-width: 2px'; const span = '<span style="' + style + '"></span>'; innerHtml += '<tr><td>' + span + val + ' ' + [tooltipText] + '</td></tr>'; }); innerHtml += '</tbody>'; let tableRoot = tooltipEl.querySelector('table'); tableRoot.innerHTML = innerHtml; } // `this` will be the overall tooltip const position = this._chart.canvas.getBoundingClientRect(); // Display, position, and styles tooltipEl.style.opacity = 1; tooltipEl.style.position = 'absolute'; tooltipEl.style.left = position.left + window.pageXOffset + tooltipModel.caretX + 'px'; tooltipEl.style.top = position.top + window.pageYOffset + tooltipModel.caretY + 'px'; tooltipEl.style.fontSize = tooltipModel.bodyFontSize + 'px'; tooltipEl.style.padding = tooltipModel.yPadding + 'px ' + tooltipModel.xPadding + 'px'; tooltipEl.style.pointerEvents = 'none'; } } }} /> </Styles.Chart> </Styles.Container> ); }; export default LineChart;
36.428571
150
0.46
12fc045472b0dc8ad0fa4f840405c178635a838f
154
js
JavaScript
examples/shopping-cart/mochaFirst/add.js
Randy-Lv/vuex-dev
f6dfd2a55c776472c672021be6fc158ef3d617be
[ "MIT" ]
null
null
null
examples/shopping-cart/mochaFirst/add.js
Randy-Lv/vuex-dev
f6dfd2a55c776472c672021be6fc158ef3d617be
[ "MIT" ]
null
null
null
examples/shopping-cart/mochaFirst/add.js
Randy-Lv/vuex-dev
f6dfd2a55c776472c672021be6fc158ef3d617be
[ "MIT" ]
null
null
null
function add(x,y) { return x+y; } function getters (filter) { return [1,2,3].filter(value => {return value == filter}) } module.exports = {add,getters};
22
57
0.662338
12fc3da75d084845002f212a8d3623309b89161a
3,902
js
JavaScript
packages/cli/identities.js
HeesungB/semaphore_auth
d48e2f80301b6b4b515d25c14c520ed310a2893e
[ "MIT" ]
19
2020-03-05T01:17:02.000Z
2021-12-18T16:31:07.000Z
packages/cli/identities.js
jeonjonghyeok/semaphore_auth
ed60e9f3c84145e32205eee9cb8792acec259088
[ "MIT" ]
5
2020-03-26T07:38:59.000Z
2021-09-06T09:45:03.000Z
packages/cli/identities.js
HeesungB/semaphore_auth
d48e2f80301b6b4b515d25c14c520ed310a2893e
[ "MIT" ]
5
2020-08-03T22:42:18.000Z
2021-09-07T01:12:07.000Z
const { genIdentity, serialiseIdentity, unSerialiseIdentity, genIdentityCommitment } = require('libsemaphore') const { IDENTITIES_DIR } = require('./constants') const { hostInfo, defaultIdentityName } = require('./config') const fs = require('fs') const path = require('path') const prompts = require('prompts') const { proofOfBurnContract } = require('semaphore-auth-contracts/src/contracts') const { REGISTRATION_FEE } = require('semaphore-auth-contracts/constants') const ethers = require('ethers') const registerByGanache = async identityCommitment => { const provider = new ethers.providers.JsonRpcProvider() const signer = provider.getSigner() const proofOfBurn = proofOfBurnContract( signer, hostInfo.get().registrationAddress ) const tx = await proofOfBurn.register(identityCommitment.toString(), { value: ethers.utils.parseEther(REGISTRATION_FEE.toString()) }) const receipt = await tx.wait() console.info( `Sent identityCommitment to contract: ${proofOfBurn.address} tx: ${receipt.transactionHash}` ) } const registerByMetamask = async identityCommitment => { const network = hostInfo.get().network const semaphoreABI = require('semaphore-auth-contracts/abis/ProofOfBurn.json') require('http') .createServer(function (request, response) { const content = fs .readFileSync(path.join(__dirname, './sendTx.html')) .toString() .replace('{{{NETWORK}}}', network) .replace('{{{ADDRESS}}}', hostInfo.get().registrationAddress) .replace('{{{COMMITMENT}}}', identityCommitment) .replace('{{{ABI}}}', JSON.stringify(semaphoreABI)) response.writeHead(200, { 'Content-Type': 'text/html' }) response.end(content, 'utf-8') }) .listen(8080) console.log('Server running at http://127.0.0.1:8080/') } const printTx = async identityCommitment => { console.info( `Please sent a transaction to ${hostInfo.get().network}: ${ hostInfo.get().registrationAddress }` ) console.info(`with identityCommitment as ${identityCommitment.toString()}`) console.info(`and with value ${REGISTRATION_FEE.toString()} ether`) } const createIdentity = () => { const id = genIdentity() console.info('Generated Identity', id) const filename = id.keypair.pubKey.toString().slice(0, 20) const filePath = path.join(IDENTITIES_DIR, filename) fs.writeFileSync(filePath, serialiseIdentity(id)) console.info('Saved identity to ', filePath) return { id, filename } } const createIdentityHandler = () => { createIdentity() } const listIdentityHandler = () => { const ids = fs.readdirSync(IDENTITIES_DIR) for (id of ids) { const serialized = fs.readFileSync(path.join(IDENTITIES_DIR, id)) console.info(unSerialiseIdentity(serialized)) } } const setIdentityHandler = async () => { const ids = fs.readdirSync(IDENTITIES_DIR) const choices = ids.map(filename => { return { title: filename, value: filename } }) const response = await prompts({ type: 'select', name: 'value', message: 'Select an identity as a default', choices }) selectedId = response.value defaultIdentityName.set(selectedId) console.info(`Set default id to ${selectedId}`) } const registerIdentityHandler = async argv => { const idName = defaultIdentityName.get() idToRegister = unSerialiseIdentity( fs.readFileSync(path.join(IDENTITIES_DIR, idName)) ) const identityCommitment = genIdentityCommitment(idToRegister) console.info('Generated identityCommitment', identityCommitment) if (argv.print) { printTx(identityCommitment) return } if (argv.local) { await registerByGanache(identityCommitment) return } await registerByMetamask(identityCommitment) } module.exports = { createIdentity, createIdentityHandler, listIdentityHandler, setIdentityHandler, registerIdentityHandler }
29.119403
96
0.706561
12fc46a9760243261f48e89fe966aeca734b463e
1,050
js
JavaScript
src/_services/player.service.js
rbtdev/night-owl-client
53d09d48fe6f22f75827ed07f5abe521f28ad852
[ "MIT" ]
null
null
null
src/_services/player.service.js
rbtdev/night-owl-client
53d09d48fe6f22f75827ed07f5abe521f28ad852
[ "MIT" ]
null
null
null
src/_services/player.service.js
rbtdev/night-owl-client
53d09d48fe6f22f75827ed07f5abe521f28ad852
[ "MIT" ]
1
2019-01-26T18:07:36.000Z
2019-01-26T18:07:36.000Z
import config from 'config'; export const playerService = { registerOne }; async function registerOne(player) { const requestOptions = { credentials: 'include', method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(player) }; let resp = await fetch(`${config.apiUrl}/player_account/register`, requestOptions); let user = await handleResponse(resp); console.log(`Player: ${JSON.stringify(player, null, 2)}`) // Register successful console.log(`Player registered: ${JSON.stringify(player, null, 2)}`); return player; } async function handleResponse(response) { let json = await response.text(); const data = json && JSON.parse(json); if (!response.ok) { if (response.status === 401) { // auto logout if 401 response returned from api logout(); location.reload(true); } const error = (data && data.message) || response.statusText; throw error; } return data; }
28.378378
87
0.615238
12fcb9ec48418fba657e28265cabdf763ebf717a
749
js
JavaScript
src/functions/format/formatCoordinates.test.js
krajvy/outdoor
6a20e9cb1997e75592bd80e0c170eb9cecf60534
[ "MIT" ]
null
null
null
src/functions/format/formatCoordinates.test.js
krajvy/outdoor
6a20e9cb1997e75592bd80e0c170eb9cecf60534
[ "MIT" ]
1
2021-11-10T05:59:11.000Z
2021-11-10T05:59:11.000Z
src/functions/format/formatCoordinates.test.js
krajvy/nearest-coordinates
3b465acbb0eeba2ea3a01baf0ff2e13815ac8d10
[ "MIT" ]
null
null
null
import formatCoordinates from './formatCoordinates'; /* globals describe, test, expect */ describe('Test formatCoordinates results', () => { const dataProvider = [ [0, 0, '0,0'], [61.636388833333335, 8.3125, '61.63639,8.3125'], [48.16, 24.50027783333333, '48.16,24.50028'], [-3.0764083, 37.3539986, '-3.07641,37.354'], [-15.9159111, -69.2928119, '-15.91591,-69.29281'], [64.3825969, -16.9356697, '64.3826,-16.93567'], ]; dataProvider.forEach((instance) => { const latitude = instance[0]; const longitude = instance[1]; const expectation = instance[2]; test('Should give all expected results', () => { expect(formatCoordinates(latitude, longitude)).toStrictEqual(expectation); }); }); });
31.208333
80
0.634179
12fdb0bbd9ac42ac1f6d269dd212b7590fef6bf1
3,569
js
JavaScript
examples/pxScene2d/external/libnode-v10.15.3/deps/npm/test/tap/tree-style.js
madanagopaltcomcast/pxCore
c4a3a40a190521c8b6383d126c87612eca5b3c42
[ "Apache-2.0" ]
918
2016-12-22T02:53:08.000Z
2022-03-22T06:21:35.000Z
examples/pxScene2d/external/libnode-v10.15.3/deps/npm/test/tap/tree-style.js
madanagopaltcomcast/pxCore
c4a3a40a190521c8b6383d126c87612eca5b3c42
[ "Apache-2.0" ]
1,432
2017-06-21T04:08:48.000Z
2020-08-25T16:21:15.000Z
examples/pxScene2d/external/libnode-v10.15.3/deps/npm/test/tap/tree-style.js
madanagopaltcomcast/pxCore
c4a3a40a190521c8b6383d126c87612eca5b3c42
[ "Apache-2.0" ]
317
2017-06-20T19:57:17.000Z
2020-09-16T10:28:30.000Z
'use strict' var Bluebird = require('bluebird') var test = require('tap').test var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') var base = path.resolve(__dirname, path.basename(__filename, '.js')) var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') var modC = path.resolve(base, 'modC') var testNormal = path.resolve(base, 'testNormal') var testGlobal = path.resolve(base, 'testGlobal') var testLegacy = path.resolve(base, 'testLegacy') var json = { 'name': 'test-tree-style', 'version': '1.0.0', 'dependencies': { 'modA': modA + '-1.0.0.tgz' } } var modAJson = { 'name': 'modA', 'version': '1.0.0', 'dependencies': { 'modB': modB + '-1.0.0.tgz' } } var modBJson = { 'name': 'modB', 'version': '1.0.0', 'dependencies': { 'modC': modC + '-1.0.0.tgz' } } var modCJson = { 'name': 'modC', 'version': '1.0.0' } function modJoin () { var modules = Array.prototype.slice.call(arguments) return modules.reduce(function (a, b) { return path.resolve(a, 'node_modules', b) }) } function writeJson (mod, data) { fs.writeFileSync(path.resolve(mod, 'package.json'), JSON.stringify(data)) } function setup () { cleanup() ;[modA, modB, modC, testNormal, testGlobal, testLegacy].forEach(function (mod) { mkdirp.sync(mod) }) writeJson(modA, modAJson) writeJson(modB, modBJson) writeJson(modC, modCJson) ;[testNormal, testGlobal, testLegacy].forEach(function (mod) { writeJson(mod, json) }) } function cleanup () { rimraf.sync(base) } test('setup', function (t) { setup() return Bluebird.try(() => { return common.npm(['pack', 'file:modC'], {cwd: base}) }).spread((code) => { t.is(code, 0, 'pack modC') return common.npm(['pack', 'file:modB'], {cwd: base}) }).spread((code) => { t.is(code, 0, 'pack modB') return common.npm(['pack', 'file:modA'], {cwd: base}) }).spread((code) => { t.is(code, 0, 'pack modA') }) }) function exists (t, filepath, msg) { try { fs.statSync(filepath) t.pass(msg) return true } catch (ex) { t.fail(msg, {found: null, wanted: 'exists', compare: 'fs.stat(' + filepath + ')'}) return false } } test('tree-style', function (t) { t.plan(12) common.npm(['install'], {cwd: testNormal}, function (err, code, stdout, stderr) { if (err) throw err t.is(code, 0, 'normal install; result code') t.is(stderr, '', 'normal install; no errors') exists(t, modJoin(testNormal, 'modA'), 'normal install; module A') exists(t, modJoin(testNormal, 'modB'), 'normal install; module B') exists(t, modJoin(testNormal, 'modC'), 'normal install; module C') }) common.npm(['install', '--global-style'], {cwd: testGlobal}, function (err, code, stdout, stderr) { if (err) throw err t.is(code, 0, 'global-style install; result code') t.is(stderr, '', 'global-style install; no errors') exists(t, modJoin(testGlobal, 'modA', 'modB'), 'global-style install; module B') exists(t, modJoin(testGlobal, 'modA', 'modC'), 'global-style install; module C') }) common.npm(['install', '--legacy-bundling'], {cwd: testLegacy}, function (err, code, stdout, stderr) { if (err) throw err t.is(code, 0, 'legacy-bundling install; result code') t.is(stderr, '', 'legacy-bundling install; no errors') exists(t, modJoin(testLegacy, 'modA', 'modB', 'modC'), 'legacy-bundling install; module C') }) }) test('cleanup', function (t) { cleanup() t.end() })
27.882813
104
0.624825
12fdea87a9f8364a8beb885286adbf2af8d0a48e
10,112
js
JavaScript
src/upload/Upload.js
alifarah9/components
f5fd8114c2dd3d5c89bf3eb4f171d047b7ff6d6e
[ "MIT" ]
null
null
null
src/upload/Upload.js
alifarah9/components
f5fd8114c2dd3d5c89bf3eb4f171d047b7ff6d6e
[ "MIT" ]
null
null
null
src/upload/Upload.js
alifarah9/components
f5fd8114c2dd3d5c89bf3eb4f171d047b7ff6d6e
[ "MIT" ]
null
null
null
import React, { PureComponent } from 'react'; import Types from 'prop-types'; import classNames from 'classnames'; import TopUpIcon from '@transferwise/icons/react/top-up'; import { UploadImageStep, ProcessingStep, CompleteStep } from './steps'; import { postData, asyncFileRead, isSizeValid, generateErrorMessage, isTypeValid } from './utils'; import './Upload.less'; import ProcessIndicator from '../processIndicator'; const PROCESS_STATE = ['error', 'success']; const ACCEPTED_FORMAT = ['*', 'image/*', 'application/*']; /* * This delay is required for the isError/isSuccess to be fired after isProcessing so the processIndicator, will be * rendered first and then updated with the right status. */ const ANIMATION_FIX = 10; const MAX_SIZE_DEFAULT = 5000000; class Upload extends PureComponent { constructor(props) { super(props); this.dragCounter = 0; this.errorMessage = { 413: props.csTooLargeMessage || null, 415: props.csWrongTypeMessage || null, unknownError: props.csFailureText || null, }; this.timeouts = null; this.state = { errorMessage: '', fileName: '', isComplete: false, isError: false, isImage: false, isProcessing: false, isSuccess: false, response: null, uploadedImage: null, }; } onDragLeave(e) { e.preventDefault(); this.dragCounter = this.dragCounter - 1; if (this.dragCounter === 0) { this.setState({ isDroppable: false }); } } onDragEnter(e) { e.preventDefault(); this.dragCounter = this.dragCounter + 1; const { usDisabled } = this.props; if (this.dragCounter === 1 && !usDisabled) { this.setState({ isDroppable: true }); } } onDrop(e) { e.preventDefault(); this.reset(); if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files[0]) { this.fileDropped(e.dataTransfer.files[0]); } } onAnimationCompleted = async status => { const { response } = this.state; // Success. const { animationDelay } = this.props; if (status === ProcessIndicator.Status.Succeeded) { const { onSuccess } = this.props; this.timeouts = setTimeout(() => { this.setState( { isProcessing: false, isComplete: true, }, onSuccess && onSuccess(response), ); }, animationDelay); } // Failure. if (status === ProcessIndicator.Status.Failed) { const { onFailure } = this.props; this.timeouts = setTimeout(() => { this.setState( { errorMessage: generateErrorMessage(response.status, this.errorMessage), isProcessing: false, isComplete: true, }, onFailure && onFailure(response), ); }, animationDelay); } }; asyncPost = file => { const formData = new FormData(); formData.append(file.name, file); return postData(this.prepareHttpOptions(this.props.httpOptions), formData); }; asyncResponse = (response, type) => { // Gives time to the animation callback to fire. this.timeouts = setTimeout(() => { this.setState({ response, isError: type === PROCESS_STATE[0], isSuccess: type === PROCESS_STATE[1], }); }, ANIMATION_FIX); }; prepareHttpOptions = httpOptions => { if (!httpOptions.url) { throw new Error('You must supply a URL to post image data asynchronously'); } return httpOptions; }; handleOnClear = e => { e.preventDefault(); const { onCancel } = this.props; if (onCancel) { onCancel(); } this.reset(); }; reset = () => { this.dragCounter = 0; clearTimeout(this.timeouts); this.setState({ isComplete: false, isError: false, isProcessing: false, isSuccess: false, }); }; showDataImage = dataUrl => { const { isImage } = this.state; if (isImage) { this.setState({ uploadedImage: dataUrl, }); } }; fileDropped = file => { const { httpOptions, maxSize, onStart, usDisabled, usAccept } = this.props; if (usDisabled) { return false; } if (!file) { throw new Error('Could not retrieve file'); } if (onStart) { onStart(file); } this.setState({ isImage: file.type && file.type.indexOf('image') > -1, fileName: file.name, isDroppable: false, isProcessing: true, }); if (!isTypeValid(file, usAccept)) { const response = { status: 415, statusText: 'Unsupported Media Type', }; return this.asyncResponse(response, PROCESS_STATE[0]); } if (!isSizeValid(file, maxSize)) { const response = { status: 413, statusText: 'Request Entity Too Large', }; return this.asyncResponse(response, PROCESS_STATE[0]); } if (httpOptions) { // Post the file to provided endpoint return this.asyncPost(file) .then(response => this.asyncResponse(response, 'success')) .then(() => asyncFileRead(file)) .then(response => this.showDataImage(response)) .catch(error => this.asyncResponse(error, PROCESS_STATE[0])); } // Post on form submit. And return the encoded image. return asyncFileRead(file) .then(response => { this.showDataImage(response); this.asyncResponse(response, 'success'); }) .catch(error => this.asyncResponse(error, PROCESS_STATE[0])); }; render() { const { usDropMessage, usAccept, usButtonText, usDisabled, usHelpImage, usLabel, usPlaceholder, psButtonText, psFailureText, psProcessingText, psSuccessText, csButtonText, csSuccessText, size, } = this.props; const { errorMessage, fileName, isComplete, isDroppable, isError, isImage, isProcessing, isSuccess, uploadedImage, } = this.state; return ( <div className={classNames({ droppable: true, 'droppable-sm': size === 'sm', 'droppable-md': size === 'md' || !size, 'droppable-lg': size === 'lg', 'droppable-dropping': isDroppable, 'droppable-processing': isProcessing, 'droppable-complete': isComplete, })} onDragEnter={e => this.onDragEnter(e)} onDragLeave={e => this.onDragLeave(e)} onDrop={e => this.onDrop(e)} onDragOver={e => e.preventDefault()} > {!isProcessing && !isComplete && ( <UploadImageStep fileDropped={file => this.fileDropped(file)} isComplete={isComplete} usAccept={usAccept} usButtonText={usButtonText} usDisabled={usDisabled} usHelpImage={usHelpImage} usLabel={usLabel} usPlaceholder={usPlaceholder} /> )} {isProcessing && ( <ProcessingStep isComplete={isComplete} isError={isError} isProcessing={isProcessing} isSuccess={isSuccess} onAnimationCompleted={status => this.onAnimationCompleted(status)} onClear={e => this.handleOnClear(e)} psButtonText={psButtonText} psFailureText={psFailureText} psProcessingText={psProcessingText} psSuccessText={psSuccessText} /> )} {/* Starts render the step when isSuccess or isError are true so markup is there when css transition kicks in css transition to work properly */} {(isSuccess || isError || isComplete) && ( <CompleteStep fileName={fileName} isComplete={isComplete} isError={isError} isImage={isImage} onClear={e => this.handleOnClear(e)} csButtonText={csButtonText} csFailureText={errorMessage} csSuccessText={csSuccessText} uploadedImage={uploadedImage} /> )} {!isProcessing && ( <div className="droppable-dropping-card droppable-card"> <div className="droppable-card-content"> <div className="circle circle-sm p-t-1 text-info"> <TopUpIcon /> </div> {usDropMessage && <h4 className="m-t-3">{usDropMessage}</h4>} </div> </div> )} </div> ); } } Upload.propTypes = { animationDelay: Types.number, csButtonText: Types.string, csFailureText: Types.string, csSuccessText: Types.string, csTooLargeMessage: Types.string, csWrongTypeMessage: Types.string, httpOptions: Types.shape({ url: Types.string }), maxSize: Types.number, onCancel: Types.func, onFailure: Types.func, onStart: Types.func, onSuccess: Types.func, psButtonText: Types.string, psFailureText: Types.string, psProcessingText: Types.string, psSuccessText: Types.string, size: Types.oneOf(['sm', 'md', 'lg']), usAccept: Types.oneOf(ACCEPTED_FORMAT), usButtonText: Types.string, usDisabled: Types.bool, usDropMessage: Types.string, usHelpImage: Types.string, usLabel: Types.string, usPlaceholder: Types.string, }; Upload.defaultProps = { animationDelay: 700, csButtonText: 'Select other file?', csFailureText: 'Upload failed.Please, try again', csSuccessText: 'Upload complete!', csTooLargeMessage: 'Please provide a file smaller than 5MB', csWrongTypeMessage: 'Please provide a supported format', httpOptions: null, maxSize: MAX_SIZE_DEFAULT, onCancel: null, onFailure: null, onStart: null, onSuccess: null, psButtonText: 'Cancel', psFailureText: 'Upload failed.Please, try again', psProcessingText: 'Uploading...', psSuccessText: 'Upload complete!', size: 'md', usAccept: 'image/*', usButtonText: 'Or Select File', usDisabled: false, usDropMessage: 'Drop file to start upload', usHelpImage: '', usLabel: '', usPlaceholder: 'Drag and drop a file less than 5MB', }; export default Upload;
27.478261
117
0.601958
12fdef290ea64cd050aa907adf4e3df8a191b1f3
3,648
js
JavaScript
lib/proxy.js
JoshCarterWeb/siteglide-cli
d1cec12881a6a9087d2a49968608d9c9cfaacb15
[ "MIT" ]
null
null
null
lib/proxy.js
JoshCarterWeb/siteglide-cli
d1cec12881a6a9087d2a49968608d9c9cfaacb15
[ "MIT" ]
null
null
null
lib/proxy.js
JoshCarterWeb/siteglide-cli
d1cec12881a6a9087d2a49968608d9c9cfaacb15
[ "MIT" ]
null
null
null
const request = require('request-promise'), version = require('../package.json').version, logger = require('./logger'), errors = require('request-promise/errors'), ServerError = require('./ServerError'); class Gateway { constructor({ url, token, email }) { this.url = url; this.api_url = 'https://api.siteglide.co.uk/api'; this.private_api_url = `${url}/api/private`; const headers = { Authorization: `${token}`, 'User-Agent': `siteglide_cli/${version}`, From: email, site: url }; this.authorizedRequest = request.defaults({ headers }); const censored = Object.assign({}, headers, { Authorization: 'Token: <censored>' }); logger.Debug(`Request headers: ${JSON.stringify(censored, null, 2)}`); } apiRequest({ method = 'GET', uri, formData, json = true, forever }) { logger.Debug(`[${method}] ${uri}`); return this.authorizedRequest({ method, uri, formData, json, forever }) .catch(errors.StatusCodeError, request => { if(request.error.code==='ENOTFOUND'){ ServerError.connection(request); } switch(request.statusCode){ case 500: case 503: ServerError.internal(request); break; case 404: ServerError.notFound(request); break; case 401: ServerError.unauthorized(request); break; default: ServerError.unauthorized(request); } }); } export(exportInternalIds, csv) { const formData = { 'export_internal': exportInternalIds, 'csv': csv.toString() }; return this.apiRequest({ uri: `${this.api_url}/cli/export`, method: 'POST', formData }); } exportStatus(exportId, csv) { const formData = { 'csv': csv.toString() }; return this.apiRequest({ uri: `${this.api_url}/cli/exportStatus/${exportId}`, formData}); } ping() { return this.apiRequest({ uri: `${this.api_url}/cli/ping` }); } logs(json) { return this.apiRequest({ uri: `${this.api_url}/cli/logs`, json }); } getInstance() { return this.apiRequest({ uri: `${this.api_url}/cli/instance` }); } getStatus(id) { return this.apiRequest({ uri: `${this.api_url}/cli/status/${id}` }); } graph(json) { return this.apiRequest({ method: 'POST', uri: `${this.api_url}/cli/graph`, json, forever: true }); } sendManifest(manifest) { return this.apiRequest({ method: 'POST', uri: `${this.api_url}/cli/assets_manifest`, json: { manifest } }); } sync(formData) { return this.apiRequest({ method: 'PUT', uri: `${this.api_url}/cli/sync`, formData, forever: true }); } pull() { return this.apiRequest({ uri: `${this.api_url}/cli/pull` }); } pullZip(formData = {}) { return this.apiRequest({ method: 'POST', uri: `${this.api_url}/cli/backup`, formData }); } pullZipStatus(backupId) { return this.apiRequest({ uri: `${this.api_url}/cli/backupStatus/${backupId}` }); } push(formData) { return this.apiRequest({ method: 'POST', uri: `${this.api_url}/cli/deploy`, formData }); } delete(formData) { return this.apiRequest({ method: 'DELETE', uri: `${this.api_url}/cli/sync`, formData, forever: true }); } migrate(json){ return this.apiRequest({method: 'POST', uri: `${this.api_url}/cli/migrate`, json}); } liquid(json) { return this.apiRequest({ method: 'POST', uri: `${this.api_url}/cli/liquid`, json, forever: true }); } presign(json){ return this.apiRequest({ method: 'POST', uri: `${this.api_url}/cli/presign`, json}); } // importStart(formData) { // return this.apiRequest({ uri: `${this.api_url}/cli/import`, method: 'POST', formData }); // } // importStatus(importId) { // return this.apiRequest({ uri: `${this.api_url}/cli/importStatus/${importId}` }); // } } module.exports = Gateway;
26.823529
109
0.644737
12fe08a9a3348173390fc3869d4b0693bf262f36
9,963
js
JavaScript
src/network/communication/broadcast/broadcast.js
nhaouari/foglet-core
3b42e96434adf1a2751446e4036c9efc30a0f3ad
[ "MIT" ]
13
2017-10-05T08:36:11.000Z
2021-12-13T12:13:47.000Z
src/network/communication/broadcast/broadcast.js
nhaouari/foglet-core
3b42e96434adf1a2751446e4036c9efc30a0f3ad
[ "MIT" ]
17
2017-07-13T11:37:19.000Z
2021-12-21T10:06:53.000Z
src/network/communication/broadcast/broadcast.js
folkvir/foglet-core
517973b09b683ad560e52736cf6508dd725417da
[ "MIT" ]
7
2017-07-13T08:57:44.000Z
2020-02-22T16:04:17.000Z
/* This broadcast implementation is clearly inspired from https://github.com/Chat-Wane/CausalBroadcastDefinition This is a broadcast customizable, if you want to specifiy Ensure single delivery and causality between 2 consecutive messages from a single site */ 'use strict' const AbstractBroadcast = require('./../abstract/abstract-broadcast.js') const VVwE = require('version-vector-with-exceptions') // Version-Vector With Exceptions const messages = require('./messages.js') const uuid = require('uuid/v4') const sortedIndexBy = require('lodash.sortedindexby') const debug = (require('debug'))('foglet-core:broadcast') /** * Format the IDs of messages in string format * @param {Obbject} message - The message to format * @return {string} The formatted message's id in string format */ function formatID (message) { return `e=${message.id.e}&c=${message.id.c}` } /** * Broadcast represent the base implementation of a broadcast protocol for the foglet library. * Based on the CausalBrodacastDefinition Package: see: https://github.com/Chat-Wane/CausalBroadcastDefinition * @extends AbstractBroadcast * @author Arnaud Grall (Folkvir) */ class Broadcast extends AbstractBroadcast { /** * Constructor * @param {AbstractNetwork} source - The source RPS/overlay * @param {string} protocol - The name of the broadcast protocol */ constructor (source, protocol) { super(source, protocol) if (source && protocol) { this.options = { id: source.id, delta: 1000 * 30 } // the id is your id, base on the .PEER id in the RPS options this._causality = new VVwE(this.options.id) // buffer of received messages this._buffer = [] // buffer of anti-entropy messages (chunkified because of large size) this._bufferAntiEntropy = messages.MAntiEntropyResponse('init') } else { return new Error('Not enough parameters', 'fbroadcast.js') } } /** * Send a message to all neighbours * @private * @param {Object} message - The message to send * @return {void} */ _sendAll (message) { const n = this._source.getNeighbours(Infinity) if (n.length > 0) { n.forEach(p => { this._unicast.send(p, message).catch(e => { debug(e) }) }) } } /** * Send a message in broadcast * @param {Object} message - The message to send * @param {Object} [id] {e: <stringId>, c: <Integer>} this uniquely represents the id of the operation * @param {Object} [isReady] {e: <stringId>, c: <Integer>} this uniquely represents the id of the operation that we must wait before delivering the message * @return {boolean} */ send (message, id, isReady = undefined, useIsReady = true) { const messageId = id || this._causality.increment() if (messageId.e !== this._causality.local.e) { throw new Error('The id of the identifier need to be equal to: ' + this._causality.local.e) } else if (messageId.c < this._causality.local.v) { throw new Error('Cant send the message because the identifier has a counter lower than our local counter: need to be equal to ' + this._causality.local.v + 1) } else if (messageId.c > this._causality.local.v + 1) { throw new Error('Cant send the message because the identifier has a counter higher than the counter accepted: need to be equal to ' + this._causality.local.v + 1) } let rdy = isReady if (useIsReady && !rdy) { // if the counter is higher than one, it means that we already send messages on the network if (messageId.c > 1) { rdy = { e: messageId.e, c: messageId.c - 1 } } } const broadcastMessage = this._createBroadcastMessage(message, messageId, rdy) // #2 register the message in the structure this._causality.incrementFrom(messageId) // #3 send the message to the neighborhood this._sendAll(broadcastMessage) return messageId } _createBroadcastMessage (message, id, isReady) { return messages.BroadcastMessage(this._protocol, id, isReady, message) } /** * We started Antientropy mechanism in order to retreive old missed files */ startAntiEntropy (delta = this.options.delta) { this._intervalAntiEntropy = setInterval(() => { this._source.getNeighbours().forEach(peer => this._unicast.send(peer, messages.MAntiEntropyRequest(this._causality))) }, delta) this.on('antiEntropy', (id, messageCausality, ourCausality) => this._defaultBehaviorAntiEntropy(id, messageCausality, ourCausality)) } /** * This callback depends on the type of the applications, this is the default behavior when you receive old missed files */ _defaultBehaviorAntiEntropy (id, messageCausality, ourCausality) { debug('(Warning) You should modify this, AntiEntropy default behavior: ', id, messageCausality, ourCausality) } /** * Clear the AntiEntropy mechanism */ clearAntiEntropy () { if (this._intervalAntiEntropy) clearInterval(this._intervalAntiEntropy) } /** * Send entropy response * @deprecated * @param {[type]} origin [description] * @param {[type]} causalityAtReceipt [description] * @param {[type]} elements [description] * @return {[type]} [description] */ sendAntiEntropyResponse (origin, causalityAtReceipt, elements) { let id = uuid() // #1 metadata of the antientropy response let sent = this._unicast.send(origin, messages.MAntiEntropyResponse(id, causalityAtReceipt, elements.length)) let i = 0 while (sent && i < elements.length) { sent = this._unicast.send(origin, messages.MAntiEntropyResponse(id, null, elements.length, elements[i])) ++i } } /** * Handler executed when a message is recevied * @param {string} id - Message issuer's ID * @param {Object} message - The message received * @return {void} */ _receive (id, message) { // if not present, add the issuer of the message in the message if (!('issuer' in message)) { message.issuer = id } switch (message.type) { case 'MAntiEntropyRequest': { debug(id, message) this.emit('antiEntropy', id, message.causality, this._causality.clone()) break } case 'MAntiEntropyResponse': { // #A replace the buffered message if (this._bufferAntiEntropy.id !== message.id) { this._bufferAntiEntropy = message } // #B add the new element to the buffer if (message.element) { this._bufferAntiEntropy.elements.push(message.element) } // #C add causality metadata if (message.causality) { this._bufferAntiEntropy.causality = message.causality } // #D the buffered message is fully arrived, deliver if (this._bufferAntiEntropy.elements.length === this._bufferAntiEntropy.nbElements) { // #1 considere each message in the response independantly for (let i = 0; i < this._bufferAntiEntropy.elements.length; ++i) { let element = this._bufferAntiEntropy.elements[i] // #2 only check if the message has not been received yet if (!this._shouldStopPropagation(element)) { this._causality.incrementFrom(element.id) this.emit('receive', message.issuer, element.payload) } } // #3 merge causality structures this._causality.merge(this._bufferAntiEntropy.causality) } break } default: { if (!this._shouldStopPropagation(message)) { // #1 register the operation // maintain `this._buffer` sorted to search in O(log n) const index = sortedIndexBy(this._buffer, message, formatID) this._buffer.splice(index, 0, message) // #2 deliver this._reviewBuffer() // #3 rebroadcast this._sendAll(message) } break } } } /** * Check if a message should be propagated or not * @private * @param {Object} message - The message to check * @return {boolean} True if the message should not be propagated, False if it should be. */ _shouldStopPropagation (message) { return this._causality.isLower(message.id) || (this._findInBuffer(formatID(message)) >= 0) } /** * Try to find the index of a message in the internal buffer * @private * @param {string} id - Message's ID * @return {int} The index of the message in the buffer, or -1 if not found */ _findInBuffer (id) { // use a binary search algorithm since `this._buffer` is sorted by IDs let minIndex = 0 let maxIndex = this._buffer.length - 1 let currentIndex, currentElement while (minIndex <= maxIndex) { currentIndex = (minIndex + maxIndex) / 2 | 0 currentElement = formatID(this._buffer[currentIndex]) if (currentElement < id) { minIndex = currentIndex + 1 } else if (currentElement > id) { maxIndex = currentIndex - 1 } else { return currentIndex } } return -1 } /** * Scan internal buffer to deliver waiting messages * @private * @return {void} */ _reviewBuffer () { let message let found = false for (let index = this._buffer.length - 1; index >= 0; --index) { message = this._buffer[index] if (this._causality.isLower(message.id)) { this._buffer.splice(index, 1) } else { // console.log(message, this._causality.isReady(message.isReady), this._causality); if (this._causality.isReady(message.isReady)) { found = true this._causality.incrementFrom(message.id) this._buffer.splice(index, 1) this.emit('receive', message.issuer, message.payload) } } } if (found) { this._reviewBuffer() } } } module.exports = Broadcast
35.204947
168
0.646592
12fe0916cc4c38b89600d80f948342ec93486e57
43,628
js
JavaScript
components/lightbox/js/channel_common.js
kookpua/easyjs
b7d9308136bb5b38eeed21f4f14ea0f769f1429b
[ "MIT" ]
92
2015-01-09T14:59:20.000Z
2021-11-15T10:11:57.000Z
components/lightbox/js/channel_common.js
kookpua/easyjs
b7d9308136bb5b38eeed21f4f14ea0f769f1429b
[ "MIT" ]
null
null
null
components/lightbox/js/channel_common.js
kookpua/easyjs
b7d9308136bb5b38eeed21f4f14ea0f769f1429b
[ "MIT" ]
30
2015-01-12T02:16:51.000Z
2019-03-21T03:30:45.000Z
/* 组图频道公用JS */ /*==============================================*/ /*================ carousel 组件 ===============*/ /*==============================================*/ (function( $, window, undefined ){ 'use strict'; $.easing.easeInStrong = function(t){ return t * t * t * t; }; var easyCarousel = { init : function( o ){ var listElem = o.listElem; o.wrapElem.css( 'overflow', 'hidden' ); listElem.css({ width : o.listWidth + 'px', left : '0px' }); if( o.indexSwitch ){ listElem.on( 'click.carousel', 'li', function(){ var elem = $( this ); listElem.stop( true, true ); if( !elem.hasClass('current') && elem.parent().hasClass('carousel_list') ){ easyCarousel.switchHandle( o, elem, true ); listElem.find( 'li.current' ).removeClass( 'current' ); elem.addClass( 'current' ); } }); // 初始化高亮item的位置 if( o.index ){ easyCarousel.switchHandle( o, o.itemElem.eq(+o.index) ); } } if( o.slide ){ o.prevElem.on( 'click.carousel', function( e ){ listElem.stop( true, true ); easyCarousel.slide( o, true ); e.preventDefault(); }); o.nextElem.on( 'click.carousel', function( e ){ listElem.stop( true, true ); easyCarousel.slide( o ); e.preventDefault(); }); } }, slide : function( o, isPrev ){ var target = o.target, listElem = o.listElem, left = Math.abs( parseInt(listElem.css('left')) ), wrapWidth = o.wrapWidth, lastLeft = o.listWidth - wrapWidth, distance, operator, eventType; if( isPrev ){ if( left === 0 ){ return; } if( wrapWidth > left ){ distance = left; eventType = 'liketoStart'; } else{ distance = wrapWidth; } operator = '+='; } else{ if( left === lastLeft ){ return; } if( left + wrapWidth > lastLeft ){ distance = lastLeft - left; eventType = 'liketoEnd'; } else{ distance = wrapWidth; } operator = '-='; } listElem.animate({ left : operator + distance + 'px' }, 400, 'easeInStrong', function(){ if( eventType ){ target.trigger( eventType ); } }); }, switchHandle : function( o, elem, isTrigger ){ var target = o.target, listElem = o.listElem, left, middleLeft, offsetLeft, lastLeft, distance, operator, eventType, wrapWidth; if( o.slide ){ wrapWidth = o.wrapWidth; left = Math.abs( parseInt(listElem.css('left')) ); middleLeft = left + wrapWidth / 2; offsetLeft = Math.floor( elem.offset().left ) - o.wrapOffset + left; lastLeft = o.listWidth - wrapWidth; if( offsetLeft > middleLeft ){ distance = offsetLeft - middleLeft; if( (left + distance) > lastLeft ){ distance = lastLeft - left; eventType = 'liketoEnd'; } operator = '-='; } else if( left !== 0 ){ distance = middleLeft - offsetLeft; if( distance > left ){ distance = left; eventType = 'liketoStart'; } operator = '+='; } if( distance ){ listElem.animate({ left : operator + distance + 'px' }, 400, 'easeInStrong', function(){ if( eventType ){ target.trigger( eventType ); } }); } } if( o.indexSwitch && isTrigger ){ target.trigger( 'likechange', [ elem[0], elem.attr('data-index') ] ); } } }; var Carousel = function( target, options ){ target = $( target ).first(); options = options || {}; var o = $.extend({ index : 0, indexSwitch : true }, options ), itemElem, index; o.target = target; o.wrapElem = target.find( 'div.carousel_wrapper' ); o.listElem = target.find( 'ul.carousel_list' ); o.prevElem = target.find( 'a.carousel_prev' ); o.nextElem = target.find( 'a.carousel_next' ); o.itemElem = itemElem = o.listElem.children( 'li' ); o.itemWidth = itemElem.outerWidth(); o.listWidth = o.itemWidth * itemElem.length; o.wrapWidth = o.wrapElem.outerWidth(); // item数量不够的情况下就没有动画切换效果 if( o.listWidth <= o.wrapWidth ){ o.prevElem.hide(); o.nextElem.hide(); o.slide = false; } else{ o.prevElem.show(); o.nextElem.show(); o.slide = true; } index = (+o.index); if( o.indexSwitch ){ o.wrapOffset = Math.floor( o.wrapElem.offset().left ); itemElem.each(function( i ){ var item = $( this ); item.attr( 'data-index', i ); if( index === i ){ item.addClass( 'current' ); } }); } easyCarousel.init( o ); this.__o__ = o; }; Carousel.prototype = { destroy : function(){ if( !this.__o__ ){ return; } var o = this.__o__; o.target.off( 'likechange liketoStart liketoEnd' ); o.listElem.off( 'click.carousel' ); o.prevElem.off( 'click.carousel' ); o.nextElem.off( 'click.carousel' ); o.itemElem.filter( '.current' ).removeClass( 'current' ); this.__o__ = o = null; delete this.__o__; }, on : function( type, fn ){ if( this.__o__ ){ var self = this; this.__o__.target.on( 'like' + type, function( e, target, index ){ if( target ){ e.target = target; e.index = (+index); } e.type = type; fn.call( self, e ); e.stopPropagation(); }); } return this; }, un : function( type, fn ){ if( this.__o__ ){ this.__o__.target.off( 'like' + type ); } return this; }, change : function( index ){ var o = this.__o__, itemElem = o.itemElem.eq( index ), listElem = o.listElem; if( !itemElem.hasClass('current') ){ listElem.stop( true, true ); easyCarousel.switchHandle( o, itemElem ); listElem.find( 'li.current' ).removeClass( 'current' ); itemElem.addClass( 'current' ); } return this; } }; $.Carousel = Carousel; })( jQuery, window ); /*==============================================*/ /*================ lightBox 组件 ===============*/ /*==============================================*/ (function( $, window ){ 'use strict'; $.fn.wheel = function( type, fn ){ var eventType = $.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel', fixEvent = function( e ){ var originalEvent = e.originalEvent, event = {}; if( 'wheelDelta' in originalEvent ){ event.wheelDelta = Math.round( originalEvent.wheelDelta ); } else if( 'detail' in originalEvent ){ event.wheelDelta = -originalEvent.detail * 40; } return event; }; if( type === 'on' ){ this.on( eventType, function( e ){ var event = $.extend( e, fixEvent(e) ); fn.call( this, e ); }); } else if( type === 'off' ){ this.off( eventType, fn ); } }; var isIE6 = $.browser.msie && $.browser.version === '6.0', document = window.document, docMode = document.documentMode, supportHashChange = 'onhashchange' in window && ( docMode === undefined || docMode > 7 ), docElem = document.documentElement, $doc = $( document ), $docElem = $( docElem ), $win = $( window ), imgLoader = new Image(), isIE = $.browser.msie, body = document.body, rHash = /[#&]lightboxindex=\d+/, index, boxElem, mainImg, imgBoxElem, bodyElem, btnMainPrev, btnMainNext, thumbElem, thumbWrapElem, thumbPrevElem, thumbNextElem, thumbListElem, loadingElem, headHeight, footerHeight, maxHeight, maxWidth, mainArrowWidth, closeElem, sizeCache, thumbSpace, itemWidth, slideElem, pageCurrentElem, pageNumElem, footerElem, btnSlide, slideTextElem, winHeight, placeholderElem, // 获取滚动条的宽度 scrollBarWidth = (function(){ var div = $('<div style="width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px;"/>').appendTo( 'body' ), width = div[0].offsetWidth - div[0].clientWidth; div.remove(); return width; })(); var easyLightBox = { throttle : function( fn ){ var timer; return function(){ var self = this, args = arguments; clearTimeout( timer ); timer = setTimeout(function(){ fn.apply( self, args ); }, 50 ); }; }, parseHash : function( href ){ href = href || window.location.href; if( !~href.indexOf('#') || href.slice(-1) === '#' ){ return; } var hash = href.slice( href.indexOf('#') + 1 ), arr = hash.split( '&' ), len = arr.length, obj = {}, i = 0, item, index; for( ; i < len; i++ ){ item = arr[i]; index = item.indexOf( '=' ); name = item.slice( 0, index ); obj[ name ] = item.slice( index + 1 ); } return obj; }, createThumb : function( o ){ var html = ''; $.each( o.data, function( _, item ){ html += '<li><img src="' + item.thumbSrc + '" width="' + item.thumbWidth + '" height="' + item.thumbHeight + '" />'; }); thumbListElem.html( html ); }, hideScrollBar : function(){ $docElem.css({ width : '100%', height : '100%', overflow : 'hidden' }); }, showScrollBar : function(){ $docElem.css({ width : '', height : '', overflow : '' }); }, layout : function( o, isResize ){ winHeight = $win.height(); var scrollWidth = docElem.scrollWidth, scrollHeight = docElem.scrollHeight, winWidth = $win.width(), boxWidth = winWidth + ( scrollHeight > winHeight && !isResize ? scrollBarWidth : 0 ), boxHeight = winHeight + ( scrollWidth > winWidth && !isResize ? scrollBarWidth : 0 ), thumbWrapWidth = winWidth - 100, itemElem, thumbListWidth; if( !isResize ){ easyLightBox.hideScrollBar(); } if( !itemWidth ){ itemElem = thumbListElem.children( 'li' ); itemWidth = itemElem.outerWidth(); } footerHeight = footerHeight || footerElem.outerHeight(); mainArrowWidth = mainArrowWidth || btnMainPrev.outerWidth(); thumbSpace = thumbSpace || $( '#lbCarouselPrev' ).outerWidth() * 2 + parseInt( thumbWrapElem.css('marginLeft') ) + parseInt( thumbWrapElem.css('marginRight') ); thumbListWidth = itemWidth * o.data.length; boxElem.css({ top : $win.scrollTop() + 'px', left : $win.scrollLeft() + 'px', // 计算宽度和高度时需要加上滚动条的宽度 width : boxWidth + 'px', height : boxHeight + 'px', display : 'block', zIndex : o.zIndex }); if( thumbListWidth + thumbSpace > thumbWrapWidth ){ thumbWrapWidth = thumbWrapWidth - ( (thumbWrapWidth - thumbSpace) % itemWidth ) - thumbSpace; } else{ thumbWrapWidth = thumbListWidth; } if( o.init ){ o.init( index, o.data ); delete o.init; } thumbListElem.css( 'width', thumbListWidth + 'px' ); thumbWrapElem.css( 'width', thumbWrapWidth + 'px' ); easyLightBox.setBodyHeight( winHeight ); maxWidth = boxWidth - mainArrowWidth * 2; }, changeHash : function( o ){ if( o.hash ){ var href = window.location.href, symbol = ~href.indexOf( '#' ) ? '&' : '#'; href = href.replace( rHash, '' ); window.location.href = href + symbol + 'lightboxindex=' + index; } }, slideThumb : function( isUp ){ var bodyHeight = bodyElem.height(), btnHeight = btnMainPrev.height(), distance, oldClassName, newClassName, text; if( isUp ){ distance = bodyHeight - footerHeight; btnHeight -= ( bodyHeight - distance ); oldClassName = 'btn_slide_up'; newClassName = 'btn_slide_down'; text = '隐藏缩略图'; } else{ distance = bodyHeight + footerHeight; btnHeight += ( distance - bodyHeight ); oldClassName = 'btn_slide_down'; newClassName = 'btn_slide_up'; text = '显示缩略图'; } bodyElem.animate({ height : distance + 'px' }, 300, function(){ slideTextElem.text( text ); btnSlide.removeClass( oldClassName ).addClass( newClassName ); maxHeight = distance - 20; easyLightBox.zoom.call( mainImg[0], null, true ); btnMainPrev.css( 'height', btnHeight + 'px' ); btnMainNext.css( 'height', btnHeight + 'px' ); }); }, switchHandle : function( o, isPrev ){ var data = o.data, len = data.length, nextIndex, symbol; if( isPrev ){ index -= 1; nextIndex = index - 1; } else{ index += 1; nextIndex = index + 1; } if( index === len - 1 ){ boxElem.trigger( 'liketoEnd' ); } if( !index ){ boxElem.trigger( 'liketoStart' ); } if( index === len ){ boxElem.trigger( 'likeend' ); index--; } else{ index = !~index ? len - 1 : index; boxElem.trigger( 'likechange', [ index, data ] ); easyLightBox.setBodyHeight(); easyLightBox.loadImg( data[index] ); if( data[nextIndex] ){ imgLoader.src = data[ nextIndex ].src; } easyLightBox.changeHash( o ); o.carousel.change( index ); pageCurrentElem.text( index + 1 ); } }, setBodyHeight : function( height ){ height = height || winHeight; var siblings = bodyElem.siblings(), btnHeight = 0, otherHeight = 0, bodyHeight, btnHeight; siblings.each(function(){ var elem = $( this ), height = elem.outerHeight(); if( !elem.hasClass('lb_header') && !elem.hasClass('lb_footer') ){ btnHeight += height; } if( elem.is(':visible') ){ otherHeight += height; } }); if( btnSlide.hasClass('btn_slide_up') ){ otherHeight -= footerHeight; } bodyHeight = height - otherHeight; btnHeight += bodyHeight; maxHeight = bodyHeight - 20; bodyElem.css( 'height', bodyHeight + 'px' ); btnMainPrev.css( 'height', btnHeight + 'px' ); btnMainNext.css( 'height', btnHeight + 'px' ); }, // 对尺寸超过合适范围的大图进行等比例缩小 zoom : function( e, isResize, isPlaceholder ){ var img = $( this ), width, height, scale; width = sizeCache.originWidth; height = sizeCache.originHeight; // 宽度超出 if( width > maxWidth ){ scale = maxWidth / width; width = maxWidth; height = Math.floor( height * scale ); } // 高度超出 if( height > maxHeight ){ scale = maxHeight / height; height = maxHeight; width = Math.floor( width * scale ); } img.css({ marginTop : 0 - height / 2, marginLeft : 0 - width / 2, width : width, height : height }); if( !isResize ){ img.css( 'visibility', 'visible' ); // 在实际大图加载完后删除掉占位图 if( img.hasClass('lb_main_img') && placeholderElem ){ placeholderElem.remove(); placeholderElem = null; } if( !isPlaceholder ){ img.css( 'display', 'none' ).fadeIn( 200 ); } } if( !isResize ){ boxElem.trigger( 'likeload', [ null, null, sizeCache ] ); } }, loadImg : function( data, isPlaceholder ){ var height = data.height, width = data.width, src = data.src; // 有占位图时不对图片进行隐藏和淡入淡出操作 if( !isPlaceholder ){ mainImg.stop( true, true ) .css( 'visibility', 'hidden' ) .removeAttr( 'data-link' ) .fadeOut( 200 ); } sizeCache = { originWidth : width, originHeight : height }; mainImg[0].src = src; mainImg.attr( 'data-link', data.link ); }, close : function( o ){ boxElem.hide(); easyLightBox.showScrollBar(); mainImg.off( 'load' ); btnMainPrev.off( 'click' ); btnMainNext.off( 'click' ); $doc.off( 'keyup.lightbox keydown.lightbox' ); $win.off( 'resize.lightbox hashchange.lightbox' ); o.carousel.destroy(); boxElem.trigger( 'likeclose' ) .off( 'likeopen likeclose likechange likeend likeload liketoStart liketoEnd' ); if( o.wheel ){ boxElem.wheel( 'off' ); } }, carouselChange : function( o, e ){ var isNumber = typeof e === 'number', data = o.data, len = data.length, nextIndex; if( index === e ){ return; } index = isNumber ? e : e.index; nextIndex = index + 1; if( index === len - 1 ){ boxElem.trigger( 'liketoEnd' ); } if( !index ){ boxElem.trigger( 'liketoStart' ); } if( !isNumber ){ easyLightBox.changeHash( o ); } else{ o.carousel.change( index ); } easyLightBox.loadImg( data[index] ); pageCurrentElem.text( index + 1 ); boxElem.trigger( 'likechange', [ index, data ] ); easyLightBox.setBodyHeight(); if( data[nextIndex] ){ imgLoader.src = data[ nextIndex ].src; } }, resize : function( o ){ easyLightBox.layout( o, true ); easyLightBox.zoom.call( mainImg[0], null, true ); o.carousel.destroy(); delete o.carousel; o.carousel = new $.Carousel( thumbElem, { index : index }); o.carousel.on( 'change', function( e ){ easyLightBox.carouselChange( o, e ); }); }, init : function( o ){ var data = o.data, nextIndex; index = ( +o.index ); nextIndex = index + 1; mainImg = $( '<img class="lb_main_img" />' ); bodyElem = bodyElem || $( '#lbBody' ); imgBoxElem = imgBoxElem || $( '#lbImgBox' ); btnMainPrev = btnMainPrev || $( '#btnMainPrev' ); btnMainNext = btnMainNext || $( '#btnMainNext' ); btnSlide = btnSlide || $( '#btnSlide' ); loadingElem = loadingElem || $( '#lbLoading' ); closeElem = closeElem || $( '#lbBtnClose' ); slideElem = slideElem || $( '#slideElem' ); thumbElem = thumbElem || $( '#lbCarousel' ); footerElem = footerElem || $( '#lbFooter' ); thumbWrapElem = thumbWrapElem || $( '#lbCarouselWrap' ); thumbListElem = thumbListElem || $( '#lbCarouselList' ); thumbPrevElem = thumbPrevElem || $( '#lbCarouselPrev' ); thumbNextElem = thumbNextElem || $( '#lbCarouselNext' ); pageCurrentElem = pageCurrentElem || $( '#lbPageCurrent' ); pageNumElem = pageNumElem || $( '#lbPageNum' ); slideTextElem = slideTextElem || $( '#lbSlideText' ); easyLightBox.createThumb( o ); easyLightBox.layout( o ); mainImg.on( 'load', function(){ easyLightBox.zoom.call( this, null, false, !!o.placeholder ); delete o.placeholder; }); imgBoxElem.empty().append( mainImg ); // 如果有占位图,先加载占位图 if( o.placeholder ){ placeholderElem = $( '<img src="' + o.placeholder + '" />' ) .appendTo( imgBoxElem ) .on( 'load', function(){ easyLightBox.zoom.call( this, null, false, true ); }); } easyLightBox.loadImg( data[index], !!o.placeholder ); // 加载下一张图 if( data[nextIndex] ){ imgLoader.src = data[ nextIndex ].src; } pageCurrentElem.text( index + 1 ); pageNumElem.text( data.length ); if( o.link ){ mainImg.css( 'cursor', 'pointer' ).on( 'click', function(){ var link = mainImg.attr( 'data-link' ); if( link ){ window.open( link ); } }); } o.carousel = new $.Carousel( thumbElem, { index : index }); o.carousel.on( 'change', function( e ){ easyLightBox.carouselChange( o, e ); }); easyLightBox.changeHash( o ); btnMainPrev.on( 'click', function( e ){ easyLightBox.switchHandle( o, true ); e.preventDefault(); }); btnMainNext.on( 'click', function( e ){ easyLightBox.switchHandle( o ); e.preventDefault(); }); if( o.wheel ){ boxElem.wheel( 'on', function( e ){ if( e.wheelDelta > 0 ){ easyLightBox.switchHandle( o, true ); } else{ easyLightBox.switchHandle( o ); } }); } btnSlide.on( 'click', function( e ){ var isUp = $( this ).hasClass( 'btn_slide_up' ); easyLightBox.slideThumb( isUp ); e.preventDefault(); }); $doc.on( 'keyup.lightbox', function( e ){ switch( e.which ){ case 27 : closeElem.trigger( 'click' ); break; case 37 : easyLightBox.switchHandle( o, true ); break; case 39 : easyLightBox.switchHandle( o ); break; }; }) .on( 'keydown.lightbox', function( e ){ var which = e.which; if( which === 34 || which === 33 || which === 38 || which === 40 ){ e.preventDefault(); } }); $win.on( 'resize.lightbox', easyLightBox.throttle(function(){ easyLightBox.resize( o ); })); closeElem.one( 'click', function( e ){ var scrollTop; easyLightBox.close( o ); if( o.hash ){ window.location.hash = '#closelightbox'; } e.preventDefault(); }); if( o.hash && supportHashChange ){ $win.on( 'hashchange.lightbox', function(){ var hash = easyLightBox.parseHash(); if( 'lightboxindex' in hash ){ easyLightBox.carouselChange( o, (+hash.lightboxindex) ); } }); } } }; var LightBox = function( target, options ){ options = options || {}; var o = $.extend({ index : 0, hash : true, data : null, overlay : true, zIndex : 9999, link : true, wheel : true, init : null, placeholder : null }, options ); boxElem = boxElem || $( '#lightBox' ); o.boxElem = boxElem; this.__o__ = o; easyLightBox.init( o ); }; $.LightBox = LightBox; LightBox.prototype = { on : function( type, fn ){ if( this.__o__ ){ var self = this; this.__o__.boxElem.on( 'like' + type, function( e, index, data, size ){ if( index !== undefined ){ e.index = index; } if( data ){ e.extraData = data; } if( size ){ e.size = size; e.target = mainImg[0]; } e.type = type; fn.call( self, e ); e.stopPropagation(); }); } return this; }, un : function( type ){ if( this.__o__ ){ this.__o__.boxElem.off( 'like' + type ); } return this; }, change : function( index ){ var o = this.__o__; easyLightBox.carouselChange( o, index ); easyLightBox.changeHash( o ); return this; } }; })( jQuery, window ); /*==============================================*/ /*================= 其他交互JS =================*/ /*==============================================*/ $(function(){ var isHome = !initData; window.ZT = { lightBoxVisible : false, loadCateId : initData && initData.cid, loadTagId : initData && initData.tid, parseHash : function( href ){ href = href || window.location.href; if( !~href.indexOf('#') || href.slice(-1) === '#' ){ return; } var hash = href.slice( href.indexOf('#') + 1 ), arr = hash.split( '&' ), len = arr.length, obj = {}, i = 0, item, index; for( ; i < len; i++ ){ item = arr[i]; index = item.indexOf( '=' ); name = item.slice( 0, index ); obj[ name ] = item.slice( index + 1 ); } return obj; } }; var ZT = window.ZT, loadCache = {}, isNews = ZT.loadCateId > 7, body = document.body, $win = $( window ); /*==============================================*/ /*================ 大图浏览相关 ================*/ /*==============================================*/ // 构建lightBox的结构 var lightBoxElem = $( '<div id="lightBox" class="lightbox">' + '<div class="lb_wrapper">' + '<div class="lb_header" id="lbHeader">' + '<h3 id="lbTitle" class="lb_title"></h3>' + '<div class="lb_head_left"><a href="#" class="first_link" id="lbSource" target="_blank"></a></div>' + '<div class="lb_head_right"><a href="###" class="lb_btn_close" id="lbBtnClose">关闭</a></div>' + '</div>' + '<div class="lb_body" id="lbBody">' + '<div class="lb_img_box" id="lbImgBox"></div>' + '<a href="#" class="btn_main_toggle btn_main_prev" id="btnMainPrev" title="上一张"><span>上一张</span></a>' + '<a href="#" class="btn_main_toggle btn_main_next" id="btnMainNext" title="下一张"><span>下一张</span></a>' + '<img src="/static/img/lightbox_loading.gif" class="lb_loading" id="lbLoading" />' + '</div>' + '<div class="lb_desc" id="lbDesc"><div class="lb_desc_box"><p id="lbDescCon" class="lb_desc_con"></p></div></div>' + '<div class="lb_footer" id="lbFooter">' + '<div class="carousel" id="lbCarousel">' + '<a href="#" class="carousel_arrow carousel_prev" id="lbCarouselPrev"><span>上一组</span></a>' + '<div class="carousel_wrapper" id="lbCarouselWrap">' + '<ul class="carousel_list" id="lbCarouselList"></ul>' + '</div>' + '<a href="#" class="carousel_arrow carousel_next" id="lbCarouselNext"><span>下一组</span></a>' + '</div>' + '<div class="lb_status">' + '<a href="#" class="btn_slide btn_slide_down" id="btnSlide"><b id="lbPageCurrent"></b>/<span id="lbPageNum" class="lb_page_num"></span><span id="lbSlideText">隐藏缩略图</span></a>' + '</div>' + '</div>' + '</div>' + '</div>' ).appendTo( body ), lbCloseElem = $( '#lbBtnClose' ), lbTitElem = $( '#lbTitle' ), lbDescElem = $( '#lbDesc' ), lbDescConElem = $( '#lbDescCon' ), lbSourceElem = $( '#lbSource' ), rHost = /https?\:\/\/([^\/]+)/; // 加载大图数据 var getData = function( url ){ // 有本地缓存则直接返回本地缓存 if( loadCache[url] ){ return loadCache[ url ]; } return $.ajax({ url : url, dataType : 'json', success : function( data ){ // 对加载过的数据做本地缓存 loadCache[ url ] = data; } }); }; var setBoxInfo = function( e ){ var extraData = e.extraData, index = e.index, otherData = extraData[ index ].otherData, srcUrl = otherData.srcUrl, matches = srcUrl.match( rHost ), srcText = matches ? matches[1] : ''; lbTitElem.text( otherData.title ); lbDescConElem.text( otherData.desc ); lbSourceElem.attr( 'href', srcUrl ) .attr( 'title', srcUrl ) .text( '本图集来自 ' + srcText ); }; var initLightBox = function( data, dataIndex, cateId, placeholder ){ var lightBoxData = [], hash = ZT.parseHash(), index = ( hash && hash.lightboxindex ) || 0, groupTitle = data.group_title, srcUrl = data.group_pageurl, lightBox; var dd = function(){ // pv打点 monitor.setConf( "wpoUrl", "http://s.360.cn/so/srp.gif" ); monitor.log({ group : hash.groupid, pro : 'image', pid : window.__pid__, tp : ZT.loadCateId, tag : ZT.loadTagId }, 'wpo' ); }; $.each( data.list, function( _, item ){ lightBoxData.push({ link : item.pic_pageurl, src : item.qhimg_url, width : item.pic_width, height : item.pic_height, thumbSrc : item.qhimg_thumb_url, thumbWidth : '65', thumbHeight : '65', otherData : { title : ( item.pic_title || groupTitle ), desc : item.pic_desc, srcUrl : srcUrl } }); }); lightBox = new $.LightBox( null, { placeholder : placeholder, data : lightBoxData, index : index, init : function( index, data ){ lbDescElem[ ZT.loadCateId > 7 ? 'show' : 'hide' ](); setBoxInfo({ index : index, extraData : data }); dd(); } }); lightBox.on( 'change', setBoxInfo ) .on( 'change', dd ) .on( 'end', function(){ showEndLayer( dataIndex, cateId ); }) .on( 'close', function(){ closeEndLayer(); ZT.lightBoxVisible = false; }) .on( 'load', function( e ){ e.target.title = '点击查看源网页'; }); ZT.lightBoxVisible = true; ZT.lightBox = lightBox; }; // 显示大图浏览的lightBox var showLightBox = ZT.showLightBox = function( groupId, dataIndex, cateId, placeholder ){ var url = '/zvj?id=' + groupId, loadPromise = getData( url ); if( typeof loadPromise.done === 'function' ){ loadPromise.done(function( data ){ initLightBox( data, dataIndex, cateId, placeholder ); }); } else{ initLightBox( loadPromise, dataIndex, cateId, placeholder ); } }; // 通过url初始化lightBox (function(){ var hash = ZT.parseHash(); if( !hash ){ return; } if( 'groupid' in hash ){ ZT.loadCateId = ZT.loadCateId || hash.cid || 1; setTimeout( function(){ showLightBox( hash.groupid, hash.dataindex ); }, 100 ); } })(); /*==============================================*/ /*================ 大图推荐相关 ================*/ /*==============================================*/ var endLayerElem = $( '<div class="end_layer" id="endLayer">' + '<div class="end_overlay"></div>' + '<div class="end_wrapper clearfix">' + '<div class="next_group" id="nextGroup">' + '<a href="#" id="review" class="review">重新浏览</a>' + '<h3>下一图集</h3>' + '<p class="img_box"><a href="#" id="nextGroupImgLink"></a></p>' + '<p><a href="#" id="nextGroupTit">教皇辞职,15万人送行</a></p>' + '</div>' + '<div class="suggest_group">' + '<h3>相关图集推荐</h3>' + '<ul id="suggestGroupList"></ul>' + '</div>' + '</div>' + '<a href="#" class="btn_group_toggle btn_group_prev" id="btnGroupPrev" title="重新浏览该图集"><span>重新浏览该图集</span></a>' + '<a href="#" class="btn_group_toggle btn_group_next" id="btnGroupNext" title="下一图集"><span>下一图集</span></a>' + '</div>' ).appendTo( body ), suggestGroupList = $( '#suggestGroupList' ), nextGroupImgLink = $( '#nextGroupImgLink' ), nextGroupTit = $( '#nextGroupTit' ), btnGroupPrev = $( '#btnGroupPrev' ), btnGroupNext = $( '#btnGroupNext' ), btnMainPrev = $( '#btnMainPrev' ), btnMainNext = $( '#btnMainNext' ), endLayerVisible = false; var throttle = function( fn ){ var timer; return function(){ var self = this, args = arguments; clearTimeout( timer ); timer = setTimeout(function(){ fn.apply( self, args ); }, 80 ); }; }; var initEndLayer = function( data ){ var nextData = data.next, nextHref = '#groupid=' + nextData.id + '&dataindex=' + nextData.index + '&cid=' + ZT.loadCateId, btnHeight = btnMainPrev.height(), html = ''; nextGroupImgLink.attr( 'href', nextHref ) .html( '<img src="' + nextData.qhimg_thumb_url + '" width="' + nextData.qhimg_width + '" height=315" />' ); nextGroupTit.attr( 'href', nextHref ) .text( nextData.group_title ); $.each( data.rec, function( _, data ){ html += '<li><p class="img_box">' + '<a href="#groupid=' + data.id + '&dataindex=' + data.index + '&cid=' + ZT.loadCateId + '">' + '<img src="' + data.qhimg_thumb_url + '" width="' + data.qhimg_width + '" height="124" /></a></p><p>' + '<a href="#groupid=' + data.id + '&dataindex=' + data.index + '&cid=' + ZT.loadCateId + '">' + data.group_title + '</a></p></li>'; }); suggestGroupList.html( html ); endLayerElem.css({ width : lightBoxElem.outerWidth() + 'px', height : lightBoxElem.outerHeight() - 35 + 'px', top : parseInt( lightBoxElem.css('top') ) + 35 + 'px', left : lightBoxElem.css( 'left' ) + 'px', display : 'block' }); btnGroupPrev.css( 'height', btnHeight + 'px' ); btnGroupNext.css( 'height', btnHeight + 'px' ).attr( 'href', nextHref ); $win.on( 'resize.endlayer', throttle(function(){ var btnHeight = btnMainPrev.height(); endLayerElem.css({ width : lightBoxElem.outerWidth() + 'px', height : lightBoxElem.outerHeight() - 35 + 'px' }); btnGroupPrev.css( 'height', btnHeight + 'px' ); btnGroupNext.css( 'height', btnHeight + 'px' ); })); }; // 显示大图推荐 var showEndLayer = function( index, cateId ){ // 防止鼠标滚轮过快或者点击过快的误触发 if( endLayerVisible ){ return; } endLayerVisible = true; var type = !ZT.loadTagId ? 'cate' : 'tag', id = cateId || ZT.loadTagId || ZT.loadCateId, url = '/zrec?type=' + type + '&id=' + id + '&n=' + index, loadPromise = getData( url ); if( typeof loadPromise.done === 'function' ){ loadPromise.done( initEndLayer ); } else{ initEndLayer( loadPromise ); } }; // 大图推荐绑定关闭事件 $( '#review,#btnGroupPrev' ).on( 'click', function( e ){ closeEndLayer(); ZT.lightBox.change( 0 ); e.preventDefault(); }); // 通过大图推荐来显示大图浏览的lightBox endLayerElem.on( 'click', 'a', function(){ var hash = ZT.parseHash( this.href ), placeholder = $( this ).find( 'img' ).attr( 'src' ); if( hash && 'groupid' in hash ){ lbCloseElem.trigger( 'click' ); showLightBox( hash.groupid, hash.dataindex, null, placeholder ); } }); var closeEndLayer = function(){ endLayerVisible = false; endLayerElem.hide(); $win.off( 'resize.endlayer' ); }; // !!!首页不执行下面的JS if( isHome ){ return; } /*==============================================*/ /*================== 导航滑动 ==================*/ /*==============================================*/ var mainNav = $( '#mainNav' ), navSlider = mainNav.find( 'li.slide_bg' ), navLink = mainNav.children( 'li' ).find( 'a' ), currentElem = mainNav.children( 'li.current' ).find( 'a' ), currentLeft = currentElem.offset().left, sliderLeft = parseInt( navSlider.css('left') ), navLeft = mainNav.offset().left, navTimer, currentLeft; if( isNews ){ navSlider.css({ left : currentLeft - navLeft + 'px', display : 'block' }); } $.easing.backOut = function(t){ return (t -= 1) * t * ((1.70158 + 1) * t + 1.70158) + 1; }; navLink.on( 'mouseover', function(){ var elem = $( this ); navLeft = mainNav.offset().left; navSlider.animate({ left : elem.offset().left - navLeft + 'px' }, 600, 'backOut' ); }) .on( 'mouseout', function(){ navSlider.stop( true, true ); }); mainNav.on( 'mouseleave', function(){ navSlider.animate({ left : currentElem.offset().left - navLeft + 'px' }, 300 ); }); if( !isNews ){ $( window ).on( 'resize', function(){ navLeft = mainNav.offset().left; }); } // 返回顶部 var goTop = $( '#goTop' ); if( !goTop.length ){ goTop = $( '<div title="返回顶部" class="go_top" id="goTop"></div>' ).appendTo( body ); } $win.on( 'scroll', function(){ var scrollTop = $win.scrollTop(); if( scrollTop > 1000 ){ goTop.show(); } else{ goTop.stop( true, true ); goTop.hide(); } }); goTop.on( 'mouseover', function(){ goTop.animate({ opacity : '1' }, 200 ); }) .on( 'mouseout', function(){ goTop.animate({ opacity : '0.5' }, 200 ); }) .on( 'click', function(){ goTop.hide(); $win.scrollTop( 0 ); }); });
31.660377
375
0.43126
12feb1c27ac8e446378bcdf7d28f5f2283765831
2,635
js
JavaScript
src/boot/VisibilityHandler.js
acz13/phaser
9a21b4c7f40894804806f15402834f3055837b42
[ "MIT" ]
1
2019-04-16T19:51:12.000Z
2019-04-16T19:51:12.000Z
src/boot/VisibilityHandler.js
acz13/phaser
9a21b4c7f40894804806f15402834f3055837b42
[ "MIT" ]
null
null
null
src/boot/VisibilityHandler.js
acz13/phaser
9a21b4c7f40894804806f15402834f3055837b42
[ "MIT" ]
null
null
null
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ /** * Visibility Handler hidden event. * * The document in which the Game is embedded has entered a hidden state. * * @event Phaser.Boot.VisibilityHandler#hidden */ /** * Visibility Handler visible event. * * The document in which the Game is embedded has entered a visible state. * * @event Phaser.Boot.VisibilityHandler#visible */ /** * Visibility Handler blur event. * * The window in which the Game is embedded has entered a blurred state. * * @event Phaser.Boot.VisibilityHandler#blur */ /** * Visibility Handler focus event. * * The window in which the Game is embedded has entered a focused state. * * @event Phaser.Boot.VisibilityHandler#focus */ /** * The Visibility Handler is responsible for listening out for document level visibility change events. * This includes `visibilitychange` if the browser supports it, and blur and focus events. It then uses * the provided Event Emitter and fires the related events. * * @function Phaser.Boot.VisibilityHandler * @fires Phaser.Boot.VisibilityHandler#hidden * @fires Phaser.Boot.VisibilityHandler#visible * @fires Phaser.Boot.VisibilityHandler#blur * @fires Phaser.Boot.VisibilityHandler#focus * @since 3.0.0 * * @param {Phaser.EventEmitter} eventEmitter - The EventEmitter that will emit the visibility events. */ var VisibilityHandler = function (eventEmitter) { var hiddenVar; if (document.hidden !== undefined) { hiddenVar = 'visibilitychange'; } else { var vendors = [ 'webkit', 'moz', 'ms' ]; vendors.forEach(function (prefix) { if (document[prefix + 'Hidden'] !== undefined) { document.hidden = function () { return document[prefix + 'Hidden']; }; hiddenVar = prefix + 'visibilitychange'; } }); } var onChange = function (event) { if (document.hidden || event.type === 'pause') { eventEmitter.emit('hidden'); } else { eventEmitter.emit('visible'); } }; if (hiddenVar) { document.addEventListener(hiddenVar, onChange, false); } window.onblur = function () { eventEmitter.emit('blur'); }; window.onfocus = function () { eventEmitter.emit('focus'); }; }; module.exports = VisibilityHandler;
24.174312
103
0.625047
12ff9112be2acf8bcb668b212cc15aff7323703d
746
js
JavaScript
src/components/theme-header2/style.js
Qirui-pig/QR-music
19e5aa935513daacff078df4cba57ec703d9679d
[ "MIT" ]
4
2021-01-25T09:28:26.000Z
2021-02-09T05:55:33.000Z
src/components/theme-header2/style.js
Qirui-pig/qirui-music
19e5aa935513daacff078df4cba57ec703d9679d
[ "MIT" ]
null
null
null
src/components/theme-header2/style.js
Qirui-pig/qirui-music
19e5aa935513daacff078df4cba57ec703d9679d
[ "MIT" ]
null
null
null
import styled from 'styled-components' export const HeaderWrapper = styled.div` display:flex; justify-content:space-between; height:33px; padding: 0 10px 4px 8px; background-position: -225px -156px; border-bottom: 2px solid #87CEFA; .left{ display:flex; align-items:center; .icon{ height: 33px; padding: 0 10px 0 20px; background-position: -225px -156px; } .title{ font-size:20px; font-family:"Microsoft Yahei", Arial, Helvetica, sans-serif; margin-right:20px; } } .right{ display:flex; align-items:center; .icon{ display:inline-block; width:12px; height:12px; margin-left:4px; background-position: 0 -240px; } } `
19.631579
66
0.620643
420075e893ef940d1b191fd868d6b57eaf74c9fb
1,298
js
JavaScript
server/helper/responseHandler.js
santhoshm309/Buzzword
b826bf682f0e8a18341691f4e25e0b5f68a95f2d
[ "CC0-1.0" ]
1
2018-09-05T18:48:45.000Z
2018-09-05T18:48:45.000Z
server/helper/responseHandler.js
santhoshm309/Buzzword
b826bf682f0e8a18341691f4e25e0b5f68a95f2d
[ "CC0-1.0" ]
null
null
null
server/helper/responseHandler.js
santhoshm309/Buzzword
b826bf682f0e8a18341691f4e25e0b5f68a95f2d
[ "CC0-1.0" ]
null
null
null
(function(){ 'use strict'; var responseHandler = { success : function(res, response){ /* A handler for success responses. Arguments--------------- res - Response object success - The data that needs to be returned to the client. */ var statusCode = 200; var data = {statusCode : 200}; data.data = response; data.message="Success"; data.success = true; res.status(statusCode).json(data); }, error : function(res, message, statusCode){ /* A handler for error responses. Arguments--------------- res - Response object message - The error message. statusCode - The return status */ var message = message != undefined && message.length > 0 ? message : "Something went wrong!"; var data = { "message" : message }; data.statusCode = statusCode == undefined ? 500 : statusCode; data.success = false; res.status(data.statusCode).json(data); } }; module.exports = responseHandler; })();
28.217391
105
0.469954
420135093eb9dedc598d444b737d2ee333fdb647
1,160
js
JavaScript
next.config.js
ucsb-cs48-s20/project-idea-reviewer-nextjs
af19ad49e299a018de7bf9707537e0c8ad040ff8
[ "MIT" ]
2
2020-06-04T23:24:39.000Z
2020-12-13T16:53:01.000Z
next.config.js
ucsb-cs48-s20/project-idea-reviewer-nextjs
af19ad49e299a018de7bf9707537e0c8ad040ff8
[ "MIT" ]
43
2020-04-15T04:03:10.000Z
2021-12-16T18:53:24.000Z
next.config.js
ucsb-cs48-s20/project-idea-reviewer-nextjs
af19ad49e299a018de7bf9707537e0c8ad040ff8
[ "MIT" ]
1
2020-06-09T04:20:12.000Z
2020-06-09T04:20:12.000Z
require("dotenv").config(); function mongodb_uri() { if (process.env.NODE_ENV === "production") { return process.env.MONGODB_URI_PRODUCTION; } else if (process.env.NODE_ENV === "staging") { return process.env.MONGODB_URI_STAGING; } else if (process.env.USE_TEST_AUTH) { return process.env.MONGODB_URI_TEST; } return process.env.MONGODB_URI; } module.exports = { env: { USE_TEST_AUTH: process.env.USE_TEST_AUTH, AUTH0_DOMAIN: process.env.AUTH0_DOMAIN, AUTH0_CLIENT_ID: process.env.AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET, AUTH0_SCOPE: "openid profile email", REDIRECT_URI: process.env.REDIRECT_URI || "http://localhost:3000/api/callback", POST_LOGOUT_REDIRECT_URI: process.env.POST_LOGOUT_REDIRECT_URI || "http://localhost:3000/", SESSION_COOKIE_SECRET: // This default is an arbitrary value which doesn't matter for development. Don't worry about it. process.env.SESSION_COOKIE_SECRET || "viloxyf_z2GW6K4CT-KQD_MoLEA2wqv5jWuq4Jd0P7ymgG5GJGMpvMneXZzhK3sL", SESSION_COOKIE_LIFETIME: 7200, // 2 hours MONGODB_URI: mongodb_uri(), }, };
35.151515
103
0.72931
4203ae0b38b757c61e571fd6f8bc827e03d30eac
3,523
js
JavaScript
tests/dcmnet/DCMRecv.test.js
MichaelLeeHobbs/dcmtk.js
a95932b323309fd9e6bd8a123e714e428e4a3261
[ "MIT" ]
1
2021-12-20T13:30:40.000Z
2021-12-20T13:30:40.000Z
tests/dcmnet/DCMRecv.test.js
MichaelLeeHobbs/dcmtk.js
a95932b323309fd9e6bd8a123e714e428e4a3261
[ "MIT" ]
null
null
null
tests/dcmnet/DCMRecv.test.js
MichaelLeeHobbs/dcmtk.js
a95932b323309fd9e6bd8a123e714e428e4a3261
[ "MIT" ]
null
null
null
// process.env.DEBUG = 'DCMTKParser' const fs = require('fs') const path = require('path') const DCMRecv = require('../../src/dcmnet/DCMRecv') const DCMSend = require('../../src/dcmnet/DCMSend') const sleep = require('../../src/libs/sleep') const testOutputPath = path.resolve(path.resolve(process.cwd(), 'output/tests')) fs.mkdirSync(testOutputPath, {recursive: true}) describe('DCMRecv', () => { // test('it should not throw on version', async () => { // const dcmRecv = new DCMRecv({ // aeTitle: 'test', // maxPDU: 131072, // outputDirectory: path.resolve(process.cwd(), 'output'), // subdirectory: true, // filenameExtension: '.dcm', // port: 13104, // }) // const test = async () => { // const version = await dcmRecv.version() // console.log('version?\n', version) // } // await expect(test()).resolves.not.toThrow() // // }) test('it should not throw on listen and stop', async () => { const dcmRecv = new DCMRecv({ aeTitle: 'test', maxPDU: 131072, outputDirectory: path.resolve(process.cwd(), 'output'), subdirectory: true, filenameExtension: '.dcm', port: 13104, }) const main = async () => { await dcmRecv.listen() await dcmRecv.close() } await expect(main()).resolves.not.toThrow() }) jest.setTimeout(10000) test('it should emit events while accepting a store request from DCMSend', async () => { const dcmRecv = new DCMRecv({ configFile: { fileName: path.resolve(process.cwd(), 'src/configs/storescp.cfg'), profile: 'default' }, aeTitle: 'test', maxPDU: 131072, outputDirectory: path.resolve(process.cwd(), 'output'), // subdirectory: true, filenameExtension: '.dcm', port: 13105, storageMode: 'preserving', }) const onExit = jest.fn() const onAssociationTerminated = jest.fn() const onStarting = jest.fn() dcmRecv.on('starting', onStarting) dcmRecv.on('exit', (msg) => { fs.writeFileSync(path.resolve(testOutputPath, 'dcmRecvResult.json'), JSON.stringify(msg, null, 2)) const unhandled = msg.messages.filter(ele => ele.event === 'unhandled') if (unhandled.length > 0) { const testOutputFile = path.resolve(path.resolve(process.cwd(), 'output/tests/dcmRecvUnhandledEvents.json')) fs.writeFileSync(testOutputFile, JSON.stringify(unhandled, null, 2)) throw new Error(`Unhandled Events Detected!\n${JSON.stringify(unhandled, null, 2)}`) } onExit(msg) }) dcmRecv.on('associationTerminated', (msg) => { onAssociationTerminated(msg) dcmRecv.close() }) const main = async () => { await dcmRecv.listen() const dcmSend = new DCMSend({ peer: '127.0.0.1', port: 13105, inputFiles: 'scan', recurse: true, compression: 6, noHalt: true, noIllegalProposal: false, noUidChecks: true, decompress: 'lossy', AETitle: 'dcmSend', calledAETitle: undefined, timeout: 15, reportFile: undefined, }) const result = await dcmSend.send({dcmFileIn: path.resolve(process.cwd(), 'dicomSamples/other/0002.DCM')}) // need to sleep to give dcmRecv.on('exit' time to fire await sleep(500) } await expect(main()).resolves.not.toThrow() expect(onStarting).toBeCalledTimes(1) expect(onStarting).toBeCalledTimes(1) expect(onExit).toBeCalledTimes(1) expect(onAssociationTerminated).toBeCalledTimes(1) }) })
33.235849
116
0.624468
420462d232fcaf94803b606e199658c793cd5357
604
js
JavaScript
node_modules/ember-engines/addon/-private/engine-ext.js
melissaroman/ember-addon-example
146d2016138443654c3225c20729d30ecf60c37e
[ "MIT" ]
1
2019-08-16T21:06:55.000Z
2019-08-16T21:06:55.000Z
node_modules/ember-engines/addon/-private/engine-ext.js
melissaroman/ember-addon-example
146d2016138443654c3225c20729d30ecf60c37e
[ "MIT" ]
null
null
null
node_modules/ember-engines/addon/-private/engine-ext.js
melissaroman/ember-addon-example
146d2016138443654c3225c20729d30ecf60c37e
[ "MIT" ]
null
null
null
import Ember from 'ember'; import EngineScopedLinkComponent from '../components/link-to-component'; import ExternalLinkComponent from '../components/link-to-external-component'; import emberRequire from './ext-require'; const Engine = emberRequire('ember-application/system/engine'); Engine.reopen({ buildRegistry() { let registry = this._super(...arguments); if (!(this instanceof Ember.Application)) { registry.register('component:link-to', EngineScopedLinkComponent); registry.register('component:link-to-external', ExternalLinkComponent); } return registry; } });
30.2
77
0.735099
9de5bc6d8b5a5b01173169a2ae5dd4de667d8e02
925
js
JavaScript
js/spec/AgedBrie_spec.js
jaffamonkey/gilded-rose
76b2c839b0b9740080d8989e696501b8ac271b7b
[ "MIT" ]
null
null
null
js/spec/AgedBrie_spec.js
jaffamonkey/gilded-rose
76b2c839b0b9740080d8989e696501b8ac271b7b
[ "MIT" ]
null
null
null
js/spec/AgedBrie_spec.js
jaffamonkey/gilded-rose
76b2c839b0b9740080d8989e696501b8ac271b7b
[ "MIT" ]
null
null
null
'use strict'; describe('AgedBrie', function () { describe('#itemTomorrow', function () { it('increases quality value by 1', function () { let testBrie = new AgedBrie('brie', 1, 1); expect(testBrie.itemTomorrow().quality).toEqual(2); }); it('quality value maximum of 50', function () { let testBrie = new AgedBrie('brie', 3, 50); expect(testBrie.itemTomorrow().quality).toEqual(50); }); describe('sellIn value is 0 or less', function () { it('increases quality by 2', function () { let testBrie = new AgedBrie('brie', 0, 1); expect(testBrie.itemTomorrow().quality).toEqual(3); }); }); describe('given that the sellIn value is less than 0', function () { it('increases quality by 2', function () { let testBrie = new AgedBrie('brie', -1, 1); expect(testBrie.itemTomorrow().quality).toEqual(3); }); }); }); });
34.259259
72
0.594595
9de5df8b20d284fb325cd6999ba7e4c77dfdcf38
3,673
js
JavaScript
dist/src/config.js
bluesh55/factory-node
a7f8a040d690112664f26c0e902dffcf43389516
[ "MIT" ]
1
2019-10-14T12:55:01.000Z
2019-10-14T12:55:01.000Z
dist/src/config.js
bluesh55/factory-node
a7f8a040d690112664f26c0e902dffcf43389516
[ "MIT" ]
4
2020-02-12T14:41:02.000Z
2021-05-10T18:20:10.000Z
dist/src/config.js
bluesh55/factory-node
a7f8a040d690112664f26c0e902dffcf43389516
[ "MIT" ]
1
2020-03-11T23:39:23.000Z
2020-03-11T23:39:23.000Z
"use strict"; var __spreadArrays = (this && this.__spreadArrays) || function () { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var fs_1 = __importDefault(require("fs")); var path_1 = __importDefault(require("path")); var typescriptLoader = "\nimport fs from 'fs'\nimport path from 'path'\nimport { factory, config, Specification } from '@bluesh55/factory'\n\nconfig.load()\n\nfs.readdirSync(config.modelsDir)\n .filter((file: string) => {\n const extension = file.slice(-3)\n return file.indexOf('.') !== 0 && ['.js', '.ts'].includes(extension)\n })\n .forEach((file: string) => {\n let model: {\n name?: string\n specification?: Specification\n creator?: Function\n } = {}\n\n const modelFilePath = path.join(config.modelsDir, file)\n model = require(modelFilePath)\n factory.addModel(model.name!, model.specification!, model.creator!)\n })\n"; var javascriptLoader = "\nconst fs = require('fs')\nconst path = require('path')\nconst { factory, config } = require('@bluesh55/factory')\n\nconfig.load()\n\nfs.readdirSync(config.modelsDir)\n .filter(file => {\n const extension = file.slice(-3)\n return file.indexOf('.') !== 0 && ['.js'].includes(extension)\n })\n .forEach(file => {\n let model = {}\n const modelFilePath = path.join(config.modelsDir, file)\n model = require(modelFilePath)\n factory.addModel(model.name, model.specification, model.creator)\n })\n"; var Configuration = /** @class */ (function () { function Configuration() { this.configFileName = '.factoryrc.json'; this.configTemplate = "{\n \"modelsDir\": \"./tests/factories/\"\n}"; this.modelsDir = ''; } Configuration.prototype.initializeConfigFile = function () { var filePath = path_1.default.resolve('.', this.configFileName); var absoluteDir = path_1.default.dirname(filePath); fs_1.default.writeFileSync(filePath, this.configTemplate, 'utf8'); return absoluteDir; }; Configuration.prototype.initializeLoader = function (isTypescript) { var absoluteDir = ''; return absoluteDir; }; Configuration.prototype.load = function () { var isModelsDirLoaded = this.loadModelsDir(); if (!isModelsDirLoaded) { throw new Error('Models directory does not exist'); } return true; }; Configuration.prototype.loadModelsDir = function (basePath) { if (basePath === void 0) { basePath = ['.']; } var filePath = path_1.default.resolve.apply(path_1.default, __spreadArrays(basePath, [this.configFileName])); if (fs_1.default.existsSync(filePath)) { var config_1 = JSON.parse(fs_1.default.readFileSync(filePath, 'utf8')); var modelsDir = path_1.default.resolve.apply(path_1.default, __spreadArrays(basePath, [config_1.modelsDir])); this.modelsDir = modelsDir; return true; } else { if (filePath === path_1.default.resolve('/', this.configFileName)) { return false; } else { this.loadModelsDir(__spreadArrays(basePath, ['..'])); } } }; return Configuration; }()); exports.config = new Configuration();
60.213115
668
0.619929
9de68ddfaea35f7d574bebf4e880dcaa4500a3d9
413
js
JavaScript
.lintstagedrc.js
reymon359/excalidraw
3e404d33fdb0e017a7aec6482cb5ae69a6706f6f
[ "MIT" ]
95
2020-05-07T18:48:35.000Z
2022-02-05T08:23:10.000Z
.lintstagedrc.js
reymon359/excalidraw
3e404d33fdb0e017a7aec6482cb5ae69a6706f6f
[ "MIT" ]
35
2020-06-08T07:55:11.000Z
2020-12-12T12:44:35.000Z
.lintstagedrc.js
reymon359/excalidraw
3e404d33fdb0e017a7aec6482cb5ae69a6706f6f
[ "MIT" ]
14
2020-06-18T20:49:18.000Z
2022-03-27T11:07:51.000Z
const { CLIEngine } = require("eslint"); // see https://github.com/okonet/lint-staged#how-can-i-ignore-files-from-eslintignore- // for explanation const cli = new CLIEngine({}); module.exports = { "*.{js,ts,tsx}": files => { return ( "eslint --max-warnings=0 --fix " + files.filter(file => !cli.isPathIgnored(file)).join(" ") ); }, "*.{css,scss,json,md,html,yml}": ["prettier --write"], };
27.533333
97
0.610169
9de70f4eec08d326160634991c6a3c930ab3b514
2,605
js
JavaScript
build/translations/sr-latn.js
gautam-patadiya/ckeditor5-build-classic
ea14bae52548d7b7e2194d9f583dedeb987790e7
[ "MIT" ]
null
null
null
build/translations/sr-latn.js
gautam-patadiya/ckeditor5-build-classic
ea14bae52548d7b7e2194d9f583dedeb987790e7
[ "MIT" ]
null
null
null
build/translations/sr-latn.js
gautam-patadiya/ckeditor5-build-classic
ea14bae52548d7b7e2194d9f583dedeb987790e7
[ "MIT" ]
null
null
null
(function(d){d['sr-latn']=Object.assign(d['sr-latn']||{},{a:"Slika traka sa alatkama",b:"Postavljanje fajla je neuspešno:",c:"Tabela traka sa alatkama",d:"Index dole",e:"Podebljano",f:"Podvučen",g:"Precrtan",h:"Citat",i:"Index gore",j:"Odredi stil",k:"Stilovi",l:"Povećaj uclačenje",m:"Smanji uvlačenje",n:"Slika u punoj veličini",o:"Bočna slika",p:"Leva slika",q:"Slika u sredini",r:"Desna slika",s:"Odredi tekst ispod slike",t:"Dodaj sliku",u:"Dodaj sliku ili fajl",v:"Postavljanje neuspešno",w:"Link",x:"Media widget",y:"Lista sa brojevima",z:"Lista sa tačkama",aa:"Dodaj media",ab:"URL ne sme biti prazan.",ac:"Ovaj media URL tip nije podržan.",ad:"Dodaj tabelu",ae:"Kolona za zaglavlje",af:"Dodaj kolonu levo",ag:"Dodaj kolonu desno",ah:"Briši kolonu",ai:"Kolona",aj:"Red za zaglavlje",ak:"Dodaj red ispod",al:"Dodaj red iznad",am:"Briši red",an:"Red",ao:"Spoj ćelije na gore",ap:"Spoj ćelije na desno",aq:"Spoj ćelije na dole",ar:"Spoj ćelije na levo",as:"Deli ćelije uspravno",at:"Deli ćelije vodoravno",au:"Spoj ćelije",av:"Видгет трака са алаткама",aw:"Postavljanje u toku",ax:"Levo ravnanje",ay:"Desno ravnanje",az:"Centralno ravnanje",ba:"Obostrano ravnanje",bb:"Ravnanje teksta",bc:"Alatke za ravnanje teksta",bd:"modul sa slikom",be:"Horizontalna razdelna linija",bf:"Kurziv",bg:"URL slikа promenjeniih dimenzija nije dostupna.",bh:"Odabir slike promenjenih dimenzija nije uspešnо",bi:"Nemoguće je dodati sliku na ovo mesto.",bj:"Dodavanje slike je neuspešno",bk:"Sačuvaj",bl:"Odustani",bm:" Nalepi medijski URL u polje za unos.",bn:"Savet: Zalepite URL u sadržaj da bi ste ga brže ugradili.",bo:"Media URL",bp:"Padajuća traka sa alatkama",bq:"Prošireni uređivač teksta",br:"Veličina fonta",bs:"Оsnovni",bt:"Sitno",bu:"Malo",bv:"Veliko",bw:"Ogromno",bx:"Boja slova",by:"Font",bz:"Boja pozadine slova",ca:"Izmena alternativnog teksta",cb:"Otkloni boju",cc:"Boje dokumenta",cd:"Crna",ce:"Bledo siva",cf:"Siva",cg:"Svetlo siva",ch:"Bela",ci:"Crvena",cj:"Narandžasta",ck:"Žuta",cl:"Svetlo zelena",cm:"Zelena",cn:"Zelenkastoplava",co:"Tirkizna",cp:"Svetloplava",cq:"Plava",cr:"Ljubičasta",cs:"%0 of %1",ct:"Prethodni",cu:"Sledeći",cv:"Alternativni tekst",cw:"Uređivač traka sa alatkama",cx:"Prikaži još stavki",cy:"Povlačenje",cz:"Ponovo",da:"Otvori u novoj kartici",db:"Moguće preuzimanje",dc:"Оtkloni link",dd:"Ispravi link",de:"Otvori link u novom prozoru",df:"Link ne sadrži URL",dg:"URL link",dh:"Pasus",di:"Naslov 1",dj:"Naslov 2",dk:"Naslov 3",dl:"Naslov 4",dm:"Naslov 5",dn:"Naslov 6",do:"Prošireni uređivač teksta, %0"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
2,605
2,605
0.72975
9de72c4bf38329e51b5b2b2e7db24ea2f62cdfd5
219
js
JavaScript
public/fecar/es/module/tag.js
yang035/ladmin
1ac684523b961b9ff191e4994de47b7f853c4e9c
[ "MIT" ]
null
null
null
public/fecar/es/module/tag.js
yang035/ladmin
1ac684523b961b9ff191e4994de47b7f853c4e9c
[ "MIT" ]
null
null
null
public/fecar/es/module/tag.js
yang035/ladmin
1ac684523b961b9ff191e4994de47b7f853c4e9c
[ "MIT" ]
null
null
null
// 选择关闭元素,移除 .tag/.js-tag 的祖先(关闭按钮在tag内) const selector = ".js-close"; $("body").on("click", selector, function(e){ let $close = $(this); let $parents = $close.parents(".tag, .js-tag"); $parents.remove(); });
14.6
48
0.598174
9de756300243a0958b34aa189927b076293f6394
2,694
js
JavaScript
client/store/items.js
grace-shopper-team-c/grace-shopper
858c2d033cd609a33e6fceb2f8a95901d6f816df
[ "MIT" ]
null
null
null
client/store/items.js
grace-shopper-team-c/grace-shopper
858c2d033cd609a33e6fceb2f8a95901d6f816df
[ "MIT" ]
19
2020-09-24T17:28:31.000Z
2020-09-29T17:15:44.000Z
client/store/items.js
grace-shopper-team-c/grace-shopper
858c2d033cd609a33e6fceb2f8a95901d6f816df
[ "MIT" ]
null
null
null
import axios from 'axios' import {setItem} from './singleItem' import {setFilter} from './filterType' const initialItems = [] const GET_ALL_ITEMS = 'GET_ALL_ITEMS' const DELETE_ITEM = 'DELETE_ITEM' const ADD_ITEM = 'ADD_ITEM' const getAllItems = items => { return { type: GET_ALL_ITEMS, items: items } } const removeItem = item => { return { type: DELETE_ITEM, item } } const addItem = item => { return { type: ADD_ITEM, item } } //Getting all items in the data base or getting just the ones in a specific category //setting the filter for styling export const fetchAllItems = type => { return async dispatch => { try { let response if (type) { response = await axios.get(`/api/items/category/${type}`) dispatch(setFilter(type)) } else { response = await axios.get('/api/items') dispatch(setFilter('')) } const items = response.data dispatch(getAllItems(items)) } catch (error) { console.error(error.message) } } } //Allowing an admin to delete an item export const deleteItem = item => { return async dispatch => { try { if (item.inventory) { throw new Error('Item still has inventory to sell') } else { await axios.delete(`/api/items/${item.id}`) dispatch(removeItem(item)) } } catch (error) { console.error(error.message) } } } //creating or updating items in the inventory export const createOrUpdateItem = (item, history) => { return async dispatch => { try { let newItem if (item.id) { newItem = await axios.put(`/api/items/${item.id}`, item) } else { const response = await axios.post('/api/items', item) newItem = response.data dispatch(addItem(newItem)) } dispatch(setItem(newItem)) history.push('/admin/items') } catch (error) { console.error(error.message) } } } //Fetching only products that are out of stock //items with inventory of 0 export const fetchOutOfStock = () => { return async dispatch => { try { const response = await axios.get('/api/items/outOfStock') const items = response.data dispatch(setFilter('outOfStock')) dispatch(getAllItems(items)) } catch (error) { console.error(error.message) } } } const itemsReducer = (items = initialItems, action) => { switch (action.type) { case GET_ALL_ITEMS: return action.items case DELETE_ITEM: return items.filter(item => item.id !== action.item.id) case ADD_ITEM: return [...items, action.item] default: return items } } export default itemsReducer
23.631579
84
0.621381
9de80572e3cdc78a01db797c194efc66afa58f80
1,519
js
JavaScript
gatsby-node.js
fipo/til
1447bb178a01fc4fac21f83e1496832c7f634c3c
[ "MIT" ]
null
null
null
gatsby-node.js
fipo/til
1447bb178a01fc4fac21f83e1496832c7f634c3c
[ "MIT" ]
12
2021-09-20T23:07:30.000Z
2022-02-02T11:59:53.000Z
gatsby-node.js
fipo/til
1447bb178a01fc4fac21f83e1496832c7f634c3c
[ "MIT" ]
null
null
null
/** * Implement Gatsby's Node APIs in this file. * * See: https://www.gatsbyjs.org/docs/node-apis/ */ const path = require('path') exports.createPages = ({ graphql, actions }) => { const { createPage } = actions return new Promise((resolve, reject) => { const blogPostTemplate = path.resolve(`src/templates/blogPost.js`) // Query for markdown nodes to use in creating pages. resolve( graphql( ` { allMarkdownRemark( sort: { fields: [frontmatter___date], order: DESC } ) { edges { node { id html frontmatter { path title date author } } } } } ` ).then(result => { if (result.errors) { reject(result.errors) } // Create blog post pages. result.data.allMarkdownRemark.edges.forEach(edge => { createPage({ path: `${edge.node.frontmatter.path}`, // required component: blogPostTemplate, context: { // Add optional context data. Data can be used as // arguments to the page GraphQL query. // // The page "path" is always available as a GraphQL // argument. }, }) }) return }) ) }) }
24.901639
70
0.447005
9de833109c9400790c05730240bc1d694461ce1e
318
js
JavaScript
src/app/user/GetUser.js
pthpv95/node-service-ddd
f78cfe777941c9c2b7130654c5fd795179cae28f
[ "MIT" ]
null
null
null
src/app/user/GetUser.js
pthpv95/node-service-ddd
f78cfe777941c9c2b7130654c5fd795179cae28f
[ "MIT" ]
null
null
null
src/app/user/GetUser.js
pthpv95/node-service-ddd
f78cfe777941c9c2b7130654c5fd795179cae28f
[ "MIT" ]
null
null
null
class GetUser { constructor({ userRepository }) { this.userRepository = userRepository } async execute(id) { try { const user = await this.userRepository.getById(id) return user } catch (error) { console.log("error", error) throw error } } } module.exports = GetUser
16.736842
56
0.619497
9de84d548d79764907f449ca70b3a1bb8de5c1f7
26,297
js
JavaScript
public/_nuxt/d8bd7a2.js
AbdullahMuhammed5/mazaadk
c1cbcb7c62497b20d744e73e2c1c7db96dcbde60
[ "MIT" ]
null
null
null
public/_nuxt/d8bd7a2.js
AbdullahMuhammed5/mazaadk
c1cbcb7c62497b20d744e73e2c1c7db96dcbde60
[ "MIT" ]
null
null
null
public/_nuxt/d8bd7a2.js
AbdullahMuhammed5/mazaadk
c1cbcb7c62497b20d744e73e2c1c7db96dcbde60
[ "MIT" ]
null
null
null
(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{490:function(e,t,n){var content=n(491);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(22).default)("197fcea4",content,!0,{sourceMap:!1})},491:function(e,t,n){var l=n(21)((function(i){return i[1]}));l.push([e.i,'.v-chip:not(.v-chip--outlined).accent,.v-chip:not(.v-chip--outlined).error,.v-chip:not(.v-chip--outlined).info,.v-chip:not(.v-chip--outlined).primary,.v-chip:not(.v-chip--outlined).secondary,.v-chip:not(.v-chip--outlined).success,.v-chip:not(.v-chip--outlined).warning{color:#fff}.theme--light.v-chip{border-color:rgba(0,0,0,.12);color:rgba(0,0,0,.87)}.theme--light.v-chip:not(.v-chip--active){background:#e0e0e0}.theme--light.v-chip:hover:before{opacity:.04}.theme--light.v-chip--active:before,.theme--light.v-chip--active:hover:before,.theme--light.v-chip:focus:before{opacity:.12}.theme--light.v-chip--active:focus:before{opacity:.16}.theme--dark.v-chip{border-color:hsla(0,0%,100%,.12);color:#fff}.theme--dark.v-chip:not(.v-chip--active){background:#555}.theme--dark.v-chip:hover:before{opacity:.08}.theme--dark.v-chip--active:before,.theme--dark.v-chip--active:hover:before,.theme--dark.v-chip:focus:before{opacity:.24}.theme--dark.v-chip--active:focus:before{opacity:.32}.v-chip{align-items:center;cursor:default;display:inline-flex;line-height:20px;max-width:100%;outline:none;overflow:hidden;padding:0 12px;position:relative;text-decoration:none;transition-duration:.28s;transition-property:box-shadow,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);vertical-align:middle;white-space:nowrap}.v-chip:before{background-color:currentColor;bottom:0;border-radius:inherit;content:"";left:0;opacity:0;position:absolute;pointer-events:none;right:0;top:0}.v-chip .v-avatar{height:24px!important;min-width:24px!important;width:24px!important}.v-chip .v-icon{font-size:24px}.v-application--is-ltr .v-chip .v-avatar--left,.v-application--is-ltr .v-chip .v-icon--left{margin-left:-6px;margin-right:6px}.v-application--is-ltr .v-chip .v-avatar--right,.v-application--is-ltr .v-chip .v-icon--right,.v-application--is-rtl .v-chip .v-avatar--left,.v-application--is-rtl .v-chip .v-icon--left{margin-left:6px;margin-right:-6px}.v-application--is-rtl .v-chip .v-avatar--right,.v-application--is-rtl .v-chip .v-icon--right{margin-left:-6px;margin-right:6px}.v-chip:not(.v-chip--no-color) .v-icon{color:inherit}.v-chip .v-chip__close.v-icon{font-size:18px;max-height:18px;max-width:18px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.v-application--is-ltr .v-chip .v-chip__close.v-icon.v-icon--right{margin-right:-4px}.v-application--is-rtl .v-chip .v-chip__close.v-icon.v-icon--right{margin-left:-4px}.v-chip .v-chip__close.v-icon:active,.v-chip .v-chip__close.v-icon:focus,.v-chip .v-chip__close.v-icon:hover{opacity:.72}.v-chip .v-chip__content{align-items:center;display:inline-flex;height:100%;max-width:100%}.v-chip--active .v-icon{color:inherit}.v-chip--link:before{transition:opacity .3s cubic-bezier(.25,.8,.5,1)}.v-chip--link:focus:before{opacity:.32}.v-chip--clickable{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.v-chip--clickable:active{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.v-chip--disabled{opacity:.4;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.v-chip__filter{max-width:24px}.v-chip__filter.v-icon{color:inherit}.v-chip__filter.expand-x-transition-enter,.v-chip__filter.expand-x-transition-leave-active{margin:0}.v-chip--pill .v-chip__filter{margin-right:0 16px 0 0}.v-chip--pill .v-avatar{height:32px!important;width:32px!important}.v-application--is-ltr .v-chip--pill .v-avatar--left{margin-left:-12px}.v-application--is-ltr .v-chip--pill .v-avatar--right,.v-application--is-rtl .v-chip--pill .v-avatar--left{margin-right:-12px}.v-application--is-rtl .v-chip--pill .v-avatar--right{margin-left:-12px}.v-chip--label{border-radius:4px!important}.v-chip.v-chip--outlined{border-width:thin;border-style:solid}.v-chip.v-chip--outlined.v-chip--active:before{opacity:.08}.v-chip.v-chip--outlined .v-icon{color:inherit}.v-chip.v-chip--outlined.v-chip.v-chip{background-color:transparent!important}.v-chip.v-chip--selected{background:transparent}.v-chip.v-chip--selected:after{opacity:.28}.v-chip.v-size--x-small{border-radius:8px;font-size:10px;height:16px}.v-chip.v-size--small{border-radius:12px;font-size:12px;height:24px}.v-chip.v-size--default{border-radius:16px;font-size:14px;height:32px}.v-chip.v-size--large{border-radius:27px;font-size:16px;height:54px}.v-chip.v-size--x-large{border-radius:33px;font-size:18px;height:66px}',""]),e.exports=l},496:function(e,t,n){"use strict";n(11),n(7),n(15),n(16);var l=n(13),r=n(4),o=(n(9),n(490),n(10)),v=n(111),m=n(92),c=n(32),d=n(137),h=n(27),f=n(51),_=n(68),x=n(143),y=n(17);function w(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?w(Object(source),!0).forEach((function(t){Object(r.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):w(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}t.a=Object(o.a)(c.a,x.a,_.a,h.a,Object(d.a)("chipGroup"),Object(f.b)("inputValue")).extend({name:"v-chip",props:{active:{type:Boolean,default:!0},activeClass:{type:String,default:function(){return this.chipGroup?this.chipGroup.activeClass:""}},close:Boolean,closeIcon:{type:String,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},disabled:Boolean,draggable:Boolean,filter:Boolean,filterIcon:{type:String,default:"$complete"},label:Boolean,link:Boolean,outlined:Boolean,pill:Boolean,tag:{type:String,default:"span"},textColor:String,value:null},data:function(){return{proxyClass:"v-chip--active"}},computed:{classes:function(){return O(O(O(O({"v-chip":!0},_.a.options.computed.classes.call(this)),{},{"v-chip--clickable":this.isClickable,"v-chip--disabled":this.disabled,"v-chip--draggable":this.draggable,"v-chip--label":this.label,"v-chip--link":this.isLink,"v-chip--no-color":!this.color,"v-chip--outlined":this.outlined,"v-chip--pill":this.pill,"v-chip--removable":this.hasClose},this.themeClasses),this.sizeableClasses),this.groupClasses)},hasClose:function(){return Boolean(this.close)},isClickable:function(){return Boolean(_.a.options.computed.isClickable.call(this)||this.chipGroup)}},created:function(){var e=this;[["outline","outlined"],["selected","input-value"],["value","active"],["@input","@active.sync"]].forEach((function(t){var n=Object(l.a)(t,2),r=n[0],o=n[1];e.$attrs.hasOwnProperty(r)&&Object(y.a)(r,o,e)}))},methods:{click:function(e){this.$emit("click",e),this.chipGroup&&this.toggle()},genFilter:function(){var e=[];return this.isActive&&e.push(this.$createElement(m.a,{staticClass:"v-chip__filter",props:{left:!0}},this.filterIcon)),this.$createElement(v.b,e)},genClose:function(){var e=this;return this.$createElement(m.a,{staticClass:"v-chip__close",props:{right:!0,size:18},attrs:{"aria-label":this.$vuetify.lang.t(this.closeLabel)},on:{click:function(t){t.stopPropagation(),t.preventDefault(),e.$emit("click:close"),e.$emit("update:active",!1)}}},this.closeIcon)},genContent:function(){return this.$createElement("span",{staticClass:"v-chip__content"},[this.filter&&this.genFilter(),this.$slots.default,this.hasClose&&this.genClose()])}},render:function(e){var t=[this.genContent()],n=this.generateRouteLink(),l=n.tag,data=n.data;data.attrs=O(O({},data.attrs),{},{draggable:this.draggable?"true":void 0,tabindex:this.chipGroup&&!this.disabled?0:data.attrs.tabindex}),data.directives.push({name:"show",value:this.active}),data=this.setBackgroundColor(this.color,data);var r=this.textColor||this.outlined&&this.color;return e(l,this.setTextColor(r,data),t)}})},609:function(e,t,n){var content=n(610);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(22).default)("56407fa2",content,!0,{sourceMap:!1})},610:function(e,t,n){var l=n(21)((function(i){return i[1]}));l.push([e.i,'.theme--light.v-timeline:before{background:rgba(0,0,0,.12)}.theme--light.v-timeline .v-timeline-item__dot{background:#fff}.theme--light.v-timeline .v-timeline-item .v-card:before{border-right-color:rgba(0,0,0,.12)}.theme--dark.v-timeline:before{background:hsla(0,0%,100%,.12)}.theme--dark.v-timeline .v-timeline-item__dot{background:#1e1e1e}.theme--dark.v-timeline .v-timeline-item .v-card:before{border-right-color:rgba(0,0,0,.12)}.v-timeline{padding-top:24px;position:relative}.v-timeline:before{bottom:0;content:"";height:100%;position:absolute;top:0;width:2px}.v-timeline-item{display:flex;padding-bottom:24px}.v-timeline-item__body{position:relative;height:100%;flex:1 1 auto}.v-timeline-item__divider{position:relative;min-width:96px;display:flex;align-items:center;justify-content:center}.v-timeline-item__dot{z-index:2;border-radius:50%;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);height:38px;left:calc(50% - 19px);width:38px}.v-timeline-item__dot .v-timeline-item__inner-dot{height:30px;margin:4px;width:30px}.v-timeline-item__dot--small{height:24px;left:calc(50% - 12px);width:24px}.v-timeline-item__dot--small .v-timeline-item__inner-dot{height:18px;margin:3px;width:18px}.v-timeline-item__dot--large{height:52px;left:calc(50% - 26px);width:52px}.v-timeline-item__dot--large .v-timeline-item__inner-dot{height:42px;margin:5px;width:42px}.v-timeline-item__inner-dot{border-radius:50%;display:flex;justify-content:center;align-items:center}.v-timeline-item__opposite{flex:1 1 auto;align-self:center;max-width:calc(50% - 48px)}.v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--after,.v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(odd):not(.v-timeline-item--before){flex-direction:row-reverse}.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--after .v-timeline-item__opposite,.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(odd):not(.v-timeline-item--before) .v-timeline-item__opposite{text-align:right}.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--after .v-timeline-item__opposite,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(odd):not(.v-timeline-item--before) .v-timeline-item__opposite{text-align:left}.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--after .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--after .v-timeline-item__body>.v-card:before,.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(odd):not(.v-timeline-item--before) .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(odd):not(.v-timeline-item--before) .v-timeline-item__body>.v-card:before{transform:rotate(0);left:-10px;right:auto}.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--after .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--after .v-timeline-item__body>.v-card:before,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(odd):not(.v-timeline-item--before) .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(odd):not(.v-timeline-item--before) .v-timeline-item__body>.v-card:before{transform:rotate(180deg);left:auto;right:-10px}.v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--after .v-timeline-item__body,.v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(odd):not(.v-timeline-item--before) .v-timeline-item__body{max-width:calc(50% - 48px)}.v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--before,.v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(2n):not(.v-timeline-item--after){flex-direction:row}.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--before .v-timeline-item__opposite,.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(2n):not(.v-timeline-item--after) .v-timeline-item__opposite{text-align:left}.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--before .v-timeline-item__opposite,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(2n):not(.v-timeline-item--after) .v-timeline-item__opposite{text-align:right}.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--before .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--before .v-timeline-item__body>.v-card:before,.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(2n):not(.v-timeline-item--after) .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(2n):not(.v-timeline-item--after) .v-timeline-item__body>.v-card:before{transform:rotate(180deg);right:-10px;left:auto}.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--before .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--before .v-timeline-item__body>.v-card:before,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(2n):not(.v-timeline-item--after) .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(2n):not(.v-timeline-item--after) .v-timeline-item__body>.v-card:before{transform:rotate(0);right:auto;left:-10px}.v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item--before .v-timeline-item__body,.v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse) .v-timeline-item:nth-child(2n):not(.v-timeline-item--after) .v-timeline-item__body{max-width:calc(50% - 48px)}.v-timeline-item__body>.v-card:not(.v-card--flat):after,.v-timeline-item__body>.v-card:not(.v-card--flat):before{content:"";position:absolute;border-top:10px solid transparent;border-bottom:10px solid transparent;border-right:10px solid #000;top:calc(50% - 10px)}.v-timeline-item__body>.v-card:not(.v-card--flat):after{border-right-color:inherit}.v-timeline-item__body>.v-card:not(.v-card--flat):before{top:calc(50% - 8px)}.v-timeline--align-top .v-timeline-item__dot{align-self:start}.v-timeline--align-top .v-timeline-item__body>.v-card:before{top:12px}.v-timeline--align-top .v-timeline-item__body>.v-card:after{top:10px}.v-application--is-ltr .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse):before{left:calc(50% - 1px);right:auto}.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense):before,.v-application--is-rtl .v-timeline:not(.v-timeline--dense):not(.v-timeline--reverse):before{left:auto;right:calc(50% - 1px)}.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense):before{right:auto;left:calc(50% - 1px)}.v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--before,.v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(odd):not(.v-timeline-item--after){flex-direction:row}.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--before .v-timeline-item__opposite,.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(odd):not(.v-timeline-item--after) .v-timeline-item__opposite{text-align:left}.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--before .v-timeline-item__opposite,.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(odd):not(.v-timeline-item--after) .v-timeline-item__opposite{text-align:right}.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--before .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--before .v-timeline-item__body>.v-card:before,.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(odd):not(.v-timeline-item--after) .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(odd):not(.v-timeline-item--after) .v-timeline-item__body>.v-card:before{transform:rotate(180deg);right:-10px;left:auto}.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--before .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--before .v-timeline-item__body>.v-card:before,.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(odd):not(.v-timeline-item--after) .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(odd):not(.v-timeline-item--after) .v-timeline-item__body>.v-card:before{transform:rotate(0);right:auto;left:-10px}.v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--before .v-timeline-item__body,.v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(odd):not(.v-timeline-item--after) .v-timeline-item__body{max-width:calc(50% - 48px)}.v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--after,.v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(2n):not(.v-timeline-item--before){flex-direction:row-reverse}.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--after .v-timeline-item__opposite,.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(2n):not(.v-timeline-item--before) .v-timeline-item__opposite{text-align:right}.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--after .v-timeline-item__opposite,.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(2n):not(.v-timeline-item--before) .v-timeline-item__opposite{text-align:left}.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--after .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--after .v-timeline-item__body>.v-card:before,.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(2n):not(.v-timeline-item--before) .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(2n):not(.v-timeline-item--before) .v-timeline-item__body>.v-card:before{transform:rotate(0);left:-10px;right:auto}.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--after .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--after .v-timeline-item__body>.v-card:before,.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(2n):not(.v-timeline-item--before) .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(2n):not(.v-timeline-item--before) .v-timeline-item__body>.v-card:before{transform:rotate(180deg);left:auto;right:-10px}.v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item--after .v-timeline-item__body,.v-timeline--reverse:not(.v-timeline--dense) .v-timeline-item:nth-child(2n):not(.v-timeline-item--before) .v-timeline-item__body{max-width:calc(50% - 48px)}.v-application--is-ltr .v-timeline--reverse.v-timeline--dense:before{right:47px;left:auto}.v-application--is-ltr .v-timeline--dense:not(.v-timeline--reverse):before,.v-application--is-rtl .v-timeline--reverse.v-timeline--dense:before{right:auto;left:47px}.v-application--is-rtl .v-timeline--dense:not(.v-timeline--reverse):before{left:auto;right:47px}.v-timeline--dense .v-timeline-item{flex-direction:row-reverse!important}.v-application--is-ltr .v-timeline--dense .v-timeline-item .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline--dense .v-timeline-item .v-timeline-item__body>.v-card:before{transform:rotate(0);left:-10px;right:auto}.v-application--is-rtl .v-timeline--dense .v-timeline-item .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline--dense .v-timeline-item .v-timeline-item__body>.v-card:before{transform:rotate(180deg);left:auto;right:-10px}.v-timeline--dense .v-timeline-item__body{max-width:calc(100% - 96px)}.v-timeline--dense .v-timeline-item__opposite{display:none}.v-timeline--reverse.v-timeline--dense .v-timeline-item{flex-direction:row!important}.v-application--is-ltr .v-timeline--reverse.v-timeline--dense .v-timeline-item .v-timeline-item__body .v-card:after,.v-application--is-ltr .v-timeline--reverse.v-timeline--dense .v-timeline-item .v-timeline-item__body>.v-card:before{transform:rotate(180deg);right:-10px;left:auto}.v-application--is-rtl .v-timeline--reverse.v-timeline--dense .v-timeline-item .v-timeline-item__body .v-card:after,.v-application--is-rtl .v-timeline--reverse.v-timeline--dense .v-timeline-item .v-timeline-item__body>.v-card:before{transform:rotate(0);right:auto;left:-10px}.v-timeline-item--fill-dot .v-timeline-item__inner-dot{height:inherit;margin:0;width:inherit}',""]),e.exports=l},648:function(e,t,n){"use strict";n(11),n(7),n(9),n(15),n(16);var l=n(4),r=(n(609),n(10)),o=n(27);function v(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}t.a=Object(r.a)(o.a).extend({name:"v-timeline",provide:function(){return{timeline:this}},props:{alignTop:Boolean,dense:Boolean,reverse:Boolean},computed:{classes:function(){return function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?v(Object(source),!0).forEach((function(t){Object(l.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):v(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({"v-timeline--align-top":this.alignTop,"v-timeline--dense":this.dense,"v-timeline--reverse":this.reverse},this.themeClasses)}},render:function(e){return e("div",{staticClass:"v-timeline",class:this.classes},this.$slots.default)}})},649:function(e,t,n){"use strict";n(11),n(7),n(9),n(15),n(16);var l=n(4),r=(n(230),n(10)),o=n(92),v=n(27),m=n(32);function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?c(Object(source),!0).forEach((function(t){Object(l.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):c(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var h=Object(r.a)(m.a,v.a);t.a=h.extend().extend({name:"v-timeline-item",inject:["timeline"],props:{color:{type:String,default:"primary"},fillDot:Boolean,hideDot:Boolean,icon:String,iconColor:String,large:Boolean,left:Boolean,right:Boolean,small:Boolean},computed:{hasIcon:function(){return!!this.icon||!!this.$slots.icon}},methods:{genBody:function(){return this.$createElement("div",{staticClass:"v-timeline-item__body"},this.$slots.default)},genIcon:function(){return this.$slots.icon?this.$slots.icon:this.$createElement(o.a,{props:{color:this.iconColor,dark:!this.theme.isDark,small:this.small}},this.icon)},genInnerDot:function(){var data=this.setBackgroundColor(this.color);return this.$createElement("div",d({staticClass:"v-timeline-item__inner-dot"},data),[this.hasIcon&&this.genIcon()])},genDot:function(){return this.$createElement("div",{staticClass:"v-timeline-item__dot",class:{"v-timeline-item__dot--small":this.small,"v-timeline-item__dot--large":this.large}},[this.genInnerDot()])},genDivider:function(){var e=[];return this.hideDot||e.push(this.genDot()),this.$createElement("div",{staticClass:"v-timeline-item__divider"},e)},genOpposite:function(){return this.$createElement("div",{staticClass:"v-timeline-item__opposite"},this.$slots.opposite)}},render:function(e){var t=[this.genBody(),this.genDivider()];return this.$slots.opposite&&t.push(this.genOpposite()),e("div",{staticClass:"v-timeline-item",class:d({"v-timeline-item--fill-dot":this.fillDot,"v-timeline-item--before":this.timeline.reverse?this.right:this.left,"v-timeline-item--after":this.timeline.reverse?this.left:this.right},this.themeClasses)},t)}})}}]);
26,297
26,297
0.753128
9de8ac3bce79a70ef92393f0fd789f8f70f64b54
1,552
js
JavaScript
5Sell/js/ControlEvent.js
HawkinsZhao/memories
6b591188dff54b6f67c1513b3a3d22da1cd8240b
[ "MIT" ]
null
null
null
5Sell/js/ControlEvent.js
HawkinsZhao/memories
6b591188dff54b6f67c1513b3a3d22da1cd8240b
[ "MIT" ]
null
null
null
5Sell/js/ControlEvent.js
HawkinsZhao/memories
6b591188dff54b6f67c1513b3a3d22da1cd8240b
[ "MIT" ]
null
null
null
var OrderButton = document.getElementById("OrderButton"); OrderButton.onmousemove = function() { OrderButton.style.backgroundColor = "#c3a0d9"; } OrderButton.onmouseout = function(){ OrderButton.style.backgroundColor = "#A97CCA"; } function SetCookie(name,value)//两个参数,一个是cookie的名子,一个是值 { var Days = 30; //此 cookie 将被保存 30 天 var exp = new Date(); //new Date("December 31, 9998"); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); } function getCookie(name)//取cookies函数 { var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); if(arr != null) return unescape(arr[2]); return null; } var Oe= getCookie("Order"); var strs= new Array(); OrderButton.onmousedown = function(){ //delCookie("Order"); if (Oe != null) { strs = Oe.split("-"); for (i=0;i<strs.length ;i++ ) { if (strs[i]==Request["index"]){ alert("请到右上角的购物车中结算"); return ; } } SetCookie("Order", getCookie("Order") + "-" +Request["index"]); OrderButton.innerText="已加入购物车"; var ShopperInfo = document.getElementById("ShopperInfo"); ShopperInfo.style.display="block"; } else{ SetCookie("Order","-" +Request["index"]); OrderButton.innerText="已加入购物车"; var ShopperInfo = document.getElementById("ShopperInfo"); ShopperInfo.style.display="block"; } } if (Oe != null) { strs = Oe.split("-"); for (i=0;i<strs.length ;i++ ) { if (strs[i]==Request["index"]){ OrderButton.innerText="已加入购物车"; } } }
25.032258
83
0.632732
9de8e326afbbafcd3cba24ef77acfd246cddfdd1
876,201
js
JavaScript
public/js/admin.js
g905/laravel_modules
e8248db46ea21b05b7ed29b6bd208f6eb134e2a5
[ "MIT" ]
null
null
null
public/js/admin.js
g905/laravel_modules
e8248db46ea21b05b7ed29b6bd208f6eb134e2a5
[ "MIT" ]
null
null
null
public/js/admin.js
g905/laravel_modules
e8248db46ea21b05b7ed29b6bd208f6eb134e2a5
[ "MIT" ]
null
null
null
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 3); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * jQuery JavaScript Library v3.3.1 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2018-01-20T17:24Z */ ( function( global, factory ) { "use strict"; if ( typeof module === "object" && typeof module.exports === "object" ) { // For CommonJS and CommonJS-like environments where a proper `window` // is present, execute the factory and get jQuery. // For environments that do not have a `window` with a `document` // (such as Node.js), expose a factory as module.exports. // This accentuates the need for the creation of a real `window`. // e.g. var jQuery = require("jquery")(window); // See ticket #14549 for more info. module.exports = global.document ? factory( global, true ) : function( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); }; } else { factory( global ); } // Pass this if window is not defined yet } )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common // enough that all such attempts are guarded in a try block. "use strict"; var arr = []; var document = window.document; var getProto = Object.getPrototypeOf; var slice = arr.slice; var concat = arr.concat; var push = arr.push; var indexOf = arr.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var fnToString = hasOwn.toString; var ObjectFunctionString = fnToString.call( Object ); var support = {}; var isFunction = function isFunction( obj ) { // Support: Chrome <=57, Firefox <=52 // In some browsers, typeof returns "function" for HTML <object> elements // (i.e., `typeof document.createElement( "object" ) === "function"`). // We don't want to classify *any* DOM node as a function. return typeof obj === "function" && typeof obj.nodeType !== "number"; }; var isWindow = function isWindow( obj ) { return obj != null && obj === obj.window; }; var preservedScriptAttributes = { type: true, src: true, noModule: true }; function DOMEval( code, doc, node ) { doc = doc || document; var i, script = doc.createElement( "script" ); script.text = code; if ( node ) { for ( i in preservedScriptAttributes ) { if ( node[ i ] ) { script[ i ] = node[ i ]; } } } doc.head.appendChild( script ).parentNode.removeChild( script ); } function toType( obj ) { if ( obj == null ) { return obj + ""; } // Support: Android <=2.3 only (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call( obj ) ] || "object" : typeof obj; } /* global Symbol */ // Defining this global in .eslintrc.json would create a danger of using the global // unguarded in another place, it seems safer to define global only for this module var version = "3.3.1", // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }, // Support: Android <=4.0 only // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { // Return all the elements in a clean array if ( num == null ) { return slice.call( this ); } // Return just the one element from the set return num < 0 ? this[ num + this.length ] : this[ num ]; }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. each: function( callback ) { return jQuery.each( this, callback ); }, map: function( callback ) { return this.pushStack( jQuery.map( this, function( elem, i ) { return callback.call( elem, i, elem ); } ) ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); }, end: function() { return this.prevObject || this.constructor(); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: arr.sort, splice: arr.splice }; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[ 0 ] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; // Skip the boolean and the target target = arguments[ i ] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !isFunction( target ) ) { target = {}; } // Extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( ( options = arguments[ i ] ) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject( copy ) || ( copyIsArray = Array.isArray( copy ) ) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && Array.isArray( src ) ? src : []; } else { clone = src && jQuery.isPlainObject( src ) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend( { // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module isReady: true, error: function( msg ) { throw new Error( msg ); }, noop: function() {}, isPlainObject: function( obj ) { var proto, Ctor; // Detect obvious negatives // Use toString instead of jQuery.type to catch host objects if ( !obj || toString.call( obj ) !== "[object Object]" ) { return false; } proto = getProto( obj ); // Objects with no prototype (e.g., `Object.create( null )`) are plain if ( !proto ) { return true; } // Objects with prototype are plain iff they were constructed by a global Object function Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; }, isEmptyObject: function( obj ) { /* eslint-disable no-unused-vars */ // See https://github.com/eslint/eslint/issues/6125 var name; for ( name in obj ) { return false; } return true; }, // Evaluates a script in a global context globalEval: function( code ) { DOMEval( code ); }, each: function( obj, callback ) { var length, i = 0; if ( isArrayLike( obj ) ) { length = obj.length; for ( ; i < length; i++ ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } else { for ( i in obj ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } return obj; }, // Support: Android <=4.0 only trim: function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { return arr == null ? -1 : indexOf.call( arr, elem, i ); }, // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit merge: function( first, second ) { var len = +second.length, j = 0, i = first.length; for ( ; j < len; j++ ) { first[ i++ ] = second[ j ]; } first.length = i; return first; }, grep: function( elems, callback, invert ) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { callbackInverse = !callback( elems[ i ], i ); if ( callbackInverse !== callbackExpect ) { matches.push( elems[ i ] ); } } return matches; }, // arg is for internal usage only map: function( elems, callback, arg ) { var length, value, i = 0, ret = []; // Go through the array, translating each of the items to their new values if ( isArrayLike( elems ) ) { length = elems.length; for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } } // Flatten any nested arrays return concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support } ); if ( typeof Symbol === "function" ) { jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; } // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), function( i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); function isArrayLike( obj ) { // Support: real iOS 8.2 only (not reproducible in simulator) // `in` check used to prevent JIT error (gh-2145) // hasOwn isn't used here due to false negatives // regarding Nodelist length in IE var length = !!obj && "length" in obj && obj.length, type = toType( obj ); if ( isFunction( obj ) || isWindow( obj ) ) { return false; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v2.3.3 * https://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-08-08 */ (function( window ) { var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; } return 0; }, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf as it's faster than native // https://jsperf.com/thor-indexof-vs-for/5 indexOf = function( list, elem ) { var i = 0, len = list.length; for ( ; i < len; i++ ) { if ( list[i] === elem ) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp( whitespace + "+", "g" ), rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + identifier + ")" ), "CLASS": new RegExp( "^\\.(" + identifier + ")" ), "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, // CSS escapes // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox<24 // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, // CSS string/identifier serialization // https://drafts.csswg.org/cssom/#common-serializing-idioms rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, fcssescape = function( ch, asCodePoint ) { if ( asCodePoint ) { // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER if ( ch === "\0" ) { return "\uFFFD"; } // Control characters and (dependent upon position) numbers get escaped as code points return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; } // Other potentially-special ASCII characters get backslash-escaped return "\\" + ch; }, // Used for iframes // See setDocument() // Removing the function wrapper causes a "Permission Denied" // error in IE unloadHandler = function() { setDocument(); }, disabledAncestor = addCombinator( function( elem ) { return elem.disabled === true && ("form" in elem || "label" in elem); }, { dir: "parentNode", next: "legend" } ); // Optimize for push.apply( _, NodeList ) try { push.apply( (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { push_native.apply( target, slice.call(els) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; } function Sizzle( selector, context, results, seed ) { var m, i, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, // nodeType defaults to 9, since context defaults to document nodeType = context ? context.nodeType : 9; results = results || []; // Return early from calls with invalid selector or context if ( typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { return results; } // Try to shortcut find operations (as opposed to filters) in HTML documents if ( !seed ) { if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; if ( documentIsHTML ) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // ID selector if ( (m = match[1]) ) { // Document context if ( nodeType === 9 ) { if ( (elem = context.getElementById( m )) ) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } // Element context } else { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( newContext && (elem = newContext.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Type selector } else if ( match[2] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Class selector } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // Take advantage of querySelectorAll if ( support.qsa && !compilerCache[ selector + " " ] && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { if ( nodeType !== 1 ) { newContext = context; newSelector = selector; // qSA looks outside Element context, which is not what we want // Thanks to Andrew Dupont for this workaround technique // Support: IE <=8 // Exclude object elements } else if ( context.nodeName.toLowerCase() !== "object" ) { // Capture the context ID, setting it first if necessary if ( (nid = context.getAttribute( "id" )) ) { nid = nid.replace( rcssescape, fcssescape ); } else { context.setAttribute( "id", (nid = expando) ); } // Prefix every selector in the list groups = tokenize( selector ); i = groups.length; while ( i-- ) { groups[i] = "#" + nid + " " + toSelector( groups[i] ); } newSelector = groups.join( "," ); // Expand context for sibling selectors newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; } if ( newSelector ) { try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; } catch ( qsaError ) { } finally { if ( nid === expando ) { context.removeAttribute( "id" ); } } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Create key-value caches of limited size * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key + " " ] = value); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created element and returns a boolean result */ function assert( fn ) { var el = document.createElement("fieldset"); try { return !!fn( el ); } catch (e) { return false; } finally { // Remove from its parent by default if ( el.parentNode ) { el.parentNode.removeChild( el ); } // release memory in IE el = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), i = arr.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } /** * Returns a function to use in pseudos for :enabled/:disabled * @param {Boolean} disabled true for :disabled; false for :enabled */ function createDisabledPseudo( disabled ) { // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable return function( elem ) { // Only certain elements can match :enabled or :disabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled if ( "form" in elem ) { // Check for inherited disabledness on relevant non-disabled elements: // * listed form-associated elements in a disabled fieldset // https://html.spec.whatwg.org/multipage/forms.html#category-listed // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled // * option elements in a disabled optgroup // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled // All such elements have a "form" property. if ( elem.parentNode && elem.disabled === false ) { // Option elements defer to a parent optgroup if present if ( "label" in elem ) { if ( "label" in elem.parentNode ) { return elem.parentNode.disabled === disabled; } else { return elem.disabled === disabled; } } // Support: IE 6 - 11 // Use the isDisabled shortcut property to check for disabled fieldset ancestors return elem.isDisabled === disabled || // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && disabledAncestor( elem ) === disabled; } return elem.disabled === disabled; // Try to winnow out elements that can't be disabled before trusting the disabled property. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't // even exist on them, let alone have a boolean value. } else if ( "label" in elem ) { return elem.disabled === disabled; } // Remaining elements are neither :enabled nor :disabled return false; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var hasCompare, subWindow, doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Update global variables document = doc; docElem = document.documentElement; documentIsHTML = !isXML( document ); // Support: IE 9-11, Edge // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) if ( preferredDoc !== document && (subWindow = document.defaultView) && subWindow.top !== subWindow ) { // Support: IE 11, Edge if ( subWindow.addEventListener ) { subWindow.addEventListener( "unload", unloadHandler, false ); // Support: IE 9 - 10 only } else if ( subWindow.attachEvent ) { subWindow.attachEvent( "onunload", unloadHandler ); } } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) support.attributes = assert(function( el ) { el.className = "i"; return !el.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function( el ) { el.appendChild( document.createComment("") ); return !el.getElementsByTagName("*").length; }); // Support: IE<9 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programmatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function( el ) { docElem.appendChild( el ).id = expando; return !document.getElementsByName || !document.getElementsByName( expando ).length; }); // ID filter and find if ( support.getById ) { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var elem = context.getElementById( id ); return elem ? [ elem ] : []; } }; } else { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; // Support: IE 6 - 7 only // getElementById is not reliable as a find shortcut Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var node, i, elems, elem = context.getElementById( id ); if ( elem ) { // Verify the id attribute node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } // Fall back on getElementsByName elems = context.getElementsByName( id ); i = 0; while ( (elem = elems[i++]) ) { node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } } } return []; } }; } // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); // DocumentFragment nodes don't have gEBTN } else if ( support.qsa ) { return context.querySelectorAll( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( el ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // https://bugs.jquery.com/ticket/12359 docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" + "<select id='" + expando + "-\r\\' msallowcapture=''>" + "<option selected=''></option></select>"; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section if ( el.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !el.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { rbuggyQSA.push("~="); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !el.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibling-combinator selector` fails if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { rbuggyQSA.push(".#.+[+~]"); } }); assert(function( el ) { el.innerHTML = "<a href='' disabled='disabled'></a>" + "<select disabled='disabled'><option/></select>"; // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = document.createElement("input"); input.setAttribute( "type", "hidden" ); el.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( el.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( el.querySelectorAll(":enabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Support: IE9-11+ // IE's :disabled selector does not pick up the children of disabled fieldsets docElem.appendChild( el ).disabled = true; if ( el.querySelectorAll(":disabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos el.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( el ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( el, "*" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( el, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully self-exclusive // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return document; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && !compilerCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.escape = function( sel ) { return (sel + "").replace( rcssescape, fcssescape ); }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[6] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[3] ) { match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index // ...in a gzip-friendly way node = parent; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } } else { // Use previously-cached element index if available if ( useCache ) { // ...in a gzip-friendly way node = elem; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex; } // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if ( diff === false ) { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); uniqueCache[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); // Don't keep the element (issue #299) input[0] = null; return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": createDisabledPseudo( false ), "disabled": createDisabledPseudo( true ), "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( (tokens = []) ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, skip = combinator.next, key = skip || dir, checkNonElements = base && key === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } return false; } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, uniqueCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); if ( skip && skip === elem.nodeName.toLowerCase() ) { elem = elem[ dir ] || elem; } else if ( (oldCache = uniqueCache[ key ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements uniqueCache[ key ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } } } } return false; }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); // Avoid hanging onto element (issue #299) checkContext = null; return ret; } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { outermostContext = context === document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; if ( !context && elem.ownerDocument !== document ) { setDocument( elem ); xml = !documentIsHTML; } while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context || document, xml) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // `i` is now the count of elements visited above, and adding it to `matchedCount` // makes the latter nonnegative. matchedCount += i; // Apply set filters to unmatched elements // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` // equals `i`), unless we didn't visit _any_ elements in the above loop because we have // no element matchers and no seed. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that // case, which will result in a "00" `matchedCount` that differs from `i` but is also // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { cached = matcherFromTokens( match[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize( (selector = compiled.selector || selector) ); results = results || []; // Try to minimize operations if there is only one selector in the list and no seed // (the latter of which guarantees us context) if ( match.length === 1 ) { // Reduce context if the leading compound selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if ( compiled ) { context = context.parentNode; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above ( compiled || compile( selector, match ) )( seed, context, !documentIsHTML, results, !context || rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( el ) { // Should return 1, but returns 4 (following) return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( el ) { el.innerHTML = "<a href='#'></a>"; return el.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( el ) { el.innerHTML = "<input/>"; el.firstChild.setAttribute( "value", "" ); return el.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( el ) { return el.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : (val = elem.getAttributeNode( name )) && val.specified ? val.value : null; } }); } return Sizzle; })( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; // Deprecated jQuery.expr[ ":" ] = jQuery.expr.pseudos; jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; jQuery.escapeSelector = Sizzle.escape; var dir = function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { if ( elem.nodeType === 1 ) { if ( truncate && jQuery( elem ).is( until ) ) { break; } matched.push( elem ); } } return matched; }; var siblings = function( n, elem ) { var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { matched.push( n ); } } return matched; }; var rneedsContext = jQuery.expr.match.needsContext; function nodeName( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }; var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; } ); } // Arraylike of elements (jQuery, arguments, Array) if ( typeof qualifier !== "string" ) { return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not; } ); } // Filtered directly for both simple and complex selectors return jQuery.filter( qualifier, elements, not ); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } if ( elems.length === 1 && elem.nodeType === 1 ) { return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; } return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; } ) ); }; jQuery.fn.extend( { find: function( selector ) { var i, ret, len = this.length, self = this; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter( function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } } ) ); } ret = this.pushStack( [] ); for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } return len > 1 ? jQuery.uniqueSort( ret ) : ret; }, filter: function( selector ) { return this.pushStack( winnow( this, selector || [], false ) ); }, not: function( selector ) { return this.pushStack( winnow( this, selector || [], true ) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } } ); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) // Shortcut simple #id case for speed rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function( selector, context, root ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Method init() accepts an alternate rootjQuery // so migrate can support jQuery.sub (gh-2101) root = root || rootjQuery; // Handle HTML strings if ( typeof selector === "string" ) { if ( selector[ 0 ] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && ( match[ 1 ] || !context ) ) { // HANDLE: $(html) -> $(array) if ( match[ 1 ] ) { context = context instanceof jQuery ? context[ 0 ] : context; // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[ 1 ], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[ 2 ] ); if ( elem ) { // Inject the element directly into the jQuery object this[ 0 ] = elem; this.length = 1; } return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || root ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this[ 0 ] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( isFunction( selector ) ) { return root.ready !== undefined ? root.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend( { has: function( target ) { var targets = jQuery( target, this ), l = targets.length; return this.filter( function() { var i = 0; for ( ; i < l; i++ ) { if ( jQuery.contains( this, targets[ i ] ) ) { return true; } } } ); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery( selectors ); // Positional selectors never match, since there's no _selection_ context if ( !rneedsContext.test( selectors ) ) { for ( ; i < l; i++ ) { for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && ( targets ? targets.index( cur ) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector( cur, selectors ) ) ) { matched.push( cur ); break; } } } } return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); }, // Determine the position of an element within the set index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } // Index in selector if ( typeof elem === "string" ) { return indexOf.call( jQuery( elem ), this[ 0 ] ); } // Locate the position of the desired element return indexOf.call( this, // If it receives a jQuery object, the first element is used elem.jquery ? elem[ 0 ] : elem ); }, add: function( selector, context ) { return this.pushStack( jQuery.uniqueSort( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter( selector ) ); } } ); function sibling( cur, dir ) { while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} return cur; } jQuery.each( { parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return siblings( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return siblings( elem.firstChild ); }, contents: function( elem ) { if ( nodeName( elem, "iframe" ) ) { return elem.contentDocument; } // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only // Treat the template element as a regular one in browsers that // don't support it. if ( nodeName( elem, "template" ) ) { elem = elem.content || elem; } return jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var matched = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { matched = jQuery.filter( selector, matched ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { jQuery.uniqueSort( matched ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { matched.reverse(); } } return this.pushStack( matched ); }; } ); var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); // Convert String-formatted options into Object-formatted ones function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? createOptions( options ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value for non-forgettable lists memory, // Flag to know if list was already fired fired, // Flag to prevent firing locked, // Actual callback list list = [], // Queue of execution data for repeatable lists queue = [], // Index of currently firing callback (modified by add/remove as needed) firingIndex = -1, // Fire callbacks fire = function() { // Enforce single-firing locked = locked || options.once; // Execute callbacks for all pending executions, // respecting firingIndex overrides and runtime changes fired = firing = true; for ( ; queue.length; firingIndex = -1 ) { memory = queue.shift(); while ( ++firingIndex < list.length ) { // Run callback and check for early termination if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && options.stopOnFalse ) { // Jump to end and forget the data so .add doesn't re-fire firingIndex = list.length; memory = false; } } } // Forget the data if we're done with it if ( !options.memory ) { memory = false; } firing = false; // Clean up if we're done firing for good if ( locked ) { // Keep an empty list if we have data for future add calls if ( memory ) { list = []; // Otherwise, this object is spent } else { list = ""; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // If we have memory from a past run, we should fire after adding if ( memory && !firing ) { firingIndex = list.length - 1; queue.push( memory ); } ( function add( args ) { jQuery.each( args, function( _, arg ) { if ( isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && toType( arg ) !== "string" ) { // Inspect recursively add( arg ); } } ); } )( arguments ); if ( memory && !firing ) { fire(); } } return this; }, // Remove a callback from the list remove: function() { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( index <= firingIndex ) { firingIndex--; } } } ); return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : list.length > 0; }, // Remove all callbacks from the list empty: function() { if ( list ) { list = []; } return this; }, // Disable .fire and .add // Abort any current/pending executions // Clear all callbacks and values disable: function() { locked = queue = []; list = memory = ""; return this; }, disabled: function() { return !list; }, // Disable .fire // Also disable .add unless we have memory (since it would have no effect) // Abort any pending executions lock: function() { locked = queue = []; if ( !memory && !firing ) { list = memory = ""; } return this; }, locked: function() { return !!locked; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( !locked ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; queue.push( args ); if ( !firing ) { fire(); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; function Identity( v ) { return v; } function Thrower( ex ) { throw ex; } function adoptValue( value, resolve, reject, noValue ) { var method; try { // Check for promise aspect first to privilege synchronous behavior if ( value && isFunction( ( method = value.promise ) ) ) { method.call( value ).done( resolve ).fail( reject ); // Other thenables } else if ( value && isFunction( ( method = value.then ) ) ) { method.call( value, resolve, reject ); // Other non-thenables } else { // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: // * false: [ value ].slice( 0 ) => resolve( value ) // * true: [ value ].slice( 1 ) => resolve() resolve.apply( undefined, [ value ].slice( noValue ) ); } // For Promises/A+, convert exceptions into rejections // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in // Deferred#then to conditionally suppress rejection. } catch ( value ) { // Support: Android 4.0 only // Strict mode functions invoked without .call/.apply get global-object context reject.apply( undefined, [ value ] ); } } jQuery.extend( { Deferred: function( func ) { var tuples = [ // action, add listener, callbacks, // ... .then handlers, argument index, [final state] [ "notify", "progress", jQuery.Callbacks( "memory" ), jQuery.Callbacks( "memory" ), 2 ], [ "resolve", "done", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 0, "resolved" ], [ "reject", "fail", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 1, "rejected" ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, "catch": function( fn ) { return promise.then( null, fn ); }, // Keep pipe for back-compat pipe: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred( function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { // Map tuples (progress, done, fail) to arguments (done, fail, progress) var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; // deferred.progress(function() { bind to newDefer or newDefer.notify }) // deferred.done(function() { bind to newDefer or newDefer.resolve }) // deferred.fail(function() { bind to newDefer or newDefer.reject }) deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); if ( returned && isFunction( returned.promise ) ) { returned.promise() .progress( newDefer.notify ) .done( newDefer.resolve ) .fail( newDefer.reject ); } else { newDefer[ tuple[ 0 ] + "With" ]( this, fn ? [ returned ] : arguments ); } } ); } ); fns = null; } ).promise(); }, then: function( onFulfilled, onRejected, onProgress ) { var maxDepth = 0; function resolve( depth, deferred, handler, special ) { return function() { var that = this, args = arguments, mightThrow = function() { var returned, then; // Support: Promises/A+ section 2.3.3.3.3 // https://promisesaplus.com/#point-59 // Ignore double-resolution attempts if ( depth < maxDepth ) { return; } returned = handler.apply( that, args ); // Support: Promises/A+ section 2.3.1 // https://promisesaplus.com/#point-48 if ( returned === deferred.promise() ) { throw new TypeError( "Thenable self-resolution" ); } // Support: Promises/A+ sections 2.3.3.1, 3.5 // https://promisesaplus.com/#point-54 // https://promisesaplus.com/#point-75 // Retrieve `then` only once then = returned && // Support: Promises/A+ section 2.3.4 // https://promisesaplus.com/#point-64 // Only check objects and functions for thenability ( typeof returned === "object" || typeof returned === "function" ) && returned.then; // Handle a returned thenable if ( isFunction( then ) ) { // Special processors (notify) just wait for resolution if ( special ) { then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ) ); // Normal processors (resolve) also hook into progress } else { // ...and disregard older resolution values maxDepth++; then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ), resolve( maxDepth, deferred, Identity, deferred.notifyWith ) ); } // Handle all other returned values } else { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Identity ) { that = undefined; args = [ returned ]; } // Process the value(s) // Default process is resolve ( special || deferred.resolveWith )( that, args ); } }, // Only normal processors (resolve) catch and reject exceptions process = special ? mightThrow : function() { try { mightThrow(); } catch ( e ) { if ( jQuery.Deferred.exceptionHook ) { jQuery.Deferred.exceptionHook( e, process.stackTrace ); } // Support: Promises/A+ section 2.3.3.3.4.1 // https://promisesaplus.com/#point-61 // Ignore post-resolution exceptions if ( depth + 1 >= maxDepth ) { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Thrower ) { that = undefined; args = [ e ]; } deferred.rejectWith( that, args ); } } }; // Support: Promises/A+ section 2.3.3.3.1 // https://promisesaplus.com/#point-57 // Re-resolve promises immediately to dodge false rejection from // subsequent errors if ( depth ) { process(); } else { // Call an optional hook to record the stack, in case of exception // since it's otherwise lost when execution goes async if ( jQuery.Deferred.getStackHook ) { process.stackTrace = jQuery.Deferred.getStackHook(); } window.setTimeout( process ); } }; } return jQuery.Deferred( function( newDefer ) { // progress_handlers.add( ... ) tuples[ 0 ][ 3 ].add( resolve( 0, newDefer, isFunction( onProgress ) ? onProgress : Identity, newDefer.notifyWith ) ); // fulfilled_handlers.add( ... ) tuples[ 1 ][ 3 ].add( resolve( 0, newDefer, isFunction( onFulfilled ) ? onFulfilled : Identity ) ); // rejected_handlers.add( ... ) tuples[ 2 ][ 3 ].add( resolve( 0, newDefer, isFunction( onRejected ) ? onRejected : Thrower ) ); } ).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 5 ]; // promise.progress = list.add // promise.done = list.add // promise.fail = list.add promise[ tuple[ 1 ] ] = list.add; // Handle state if ( stateString ) { list.add( function() { // state = "resolved" (i.e., fulfilled) // state = "rejected" state = stateString; }, // rejected_callbacks.disable // fulfilled_callbacks.disable tuples[ 3 - i ][ 2 ].disable, // rejected_handlers.disable // fulfilled_handlers.disable tuples[ 3 - i ][ 3 ].disable, // progress_callbacks.lock tuples[ 0 ][ 2 ].lock, // progress_handlers.lock tuples[ 0 ][ 3 ].lock ); } // progress_handlers.fire // fulfilled_handlers.fire // rejected_handlers.fire list.add( tuple[ 3 ].fire ); // deferred.notify = function() { deferred.notifyWith(...) } // deferred.resolve = function() { deferred.resolveWith(...) } // deferred.reject = function() { deferred.rejectWith(...) } deferred[ tuple[ 0 ] ] = function() { deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); return this; }; // deferred.notifyWith = list.fireWith // deferred.resolveWith = list.fireWith // deferred.rejectWith = list.fireWith deferred[ tuple[ 0 ] + "With" ] = list.fireWith; } ); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( singleValue ) { var // count of uncompleted subordinates remaining = arguments.length, // count of unprocessed arguments i = remaining, // subordinate fulfillment data resolveContexts = Array( i ), resolveValues = slice.call( arguments ), // the master Deferred master = jQuery.Deferred(), // subordinate callback factory updateFunc = function( i ) { return function( value ) { resolveContexts[ i ] = this; resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( !( --remaining ) ) { master.resolveWith( resolveContexts, resolveValues ); } }; }; // Single- and empty arguments are adopted like Promise.resolve if ( remaining <= 1 ) { adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, !remaining ); // Use .then() to unwrap secondary thenables (cf. gh-3000) if ( master.state() === "pending" || isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { return master.then(); } } // Multiple arguments are aggregated like Promise.all array elements while ( i-- ) { adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); } return master.promise(); } } ); // These usually indicate a programmer mistake during development, // warn about them ASAP rather than swallowing them by default. var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; jQuery.Deferred.exceptionHook = function( error, stack ) { // Support: IE 8 - 9 only // Console exists when dev tools are open, which can happen at any time if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); } }; jQuery.readyException = function( error ) { window.setTimeout( function() { throw error; } ); }; // The deferred used on DOM ready var readyList = jQuery.Deferred(); jQuery.fn.ready = function( fn ) { readyList .then( fn ) // Wrap jQuery.readyException in a function so that the lookup // happens at the time of error handling instead of callback // registration. .catch( function( error ) { jQuery.readyException( error ); } ); return this; }; jQuery.extend( { // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); } } ); jQuery.ready.then = readyList.then; // The ready event handler and self cleanup method function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); } // Catch cases where $(document).ready() is called // after the browser event has already occurred. // Support: IE <=9 - 10 only // Older IE sometimes signals "interactive" too soon if ( document.readyState === "complete" || ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { // Handle it asynchronously to allow scripts the opportunity to delay ready window.setTimeout( jQuery.ready ); } else { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed ); } // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, len = elems.length, bulk = key == null; // Sets many values if ( toType( key ) === "object" ) { chainable = true; for ( i in key ) { access( elems, fn, i, key[ i ], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < len; i++ ) { fn( elems[ i ], key, raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) ); } } } if ( chainable ) { return elems; } // Gets if ( bulk ) { return fn.call( elems ); } return len ? fn( elems[ 0 ], key ) : emptyGet; }; // Matches dashed string for camelizing var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g; // Used by camelCase as callback to replace() function fcamelCase( all, letter ) { return letter.toUpperCase(); } // Convert dashed to camelCase; used by the css and data modules // Support: IE <=9 - 11, Edge 12 - 15 // Microsoft forgot to hump their vendor prefix (#9572) function camelCase( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); } var acceptData = function( owner ) { // Accepts only: // - Node // - Node.ELEMENT_NODE // - Node.DOCUMENT_NODE // - Object // - Any return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }; function Data() { this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; Data.prototype = { cache: function( owner ) { // Check if the owner object already has a cache var value = owner[ this.expando ]; // If not, create one if ( !value ) { value = {}; // We can accept data for non-element nodes in modern browsers, // but we should not, see #8335. // Always return an empty object. if ( acceptData( owner ) ) { // If it is a node unlikely to be stringify-ed or looped over // use plain assignment if ( owner.nodeType ) { owner[ this.expando ] = value; // Otherwise secure it in a non-enumerable property // configurable must be true to allow the property to be // deleted when data is removed } else { Object.defineProperty( owner, this.expando, { value: value, configurable: true } ); } } } return value; }, set: function( owner, data, value ) { var prop, cache = this.cache( owner ); // Handle: [ owner, key, value ] args // Always use camelCase key (gh-2257) if ( typeof data === "string" ) { cache[ camelCase( data ) ] = value; // Handle: [ owner, { properties } ] args } else { // Copy the properties one-by-one to the cache object for ( prop in data ) { cache[ camelCase( prop ) ] = data[ prop ]; } } return cache; }, get: function( owner, key ) { return key === undefined ? this.cache( owner ) : // Always use camelCase key (gh-2257) owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; }, access: function( owner, key, value ) { // In cases where either: // // 1. No key was specified // 2. A string key was specified, but no value provided // // Take the "read" path and allow the get method to determine // which value to return, respectively either: // // 1. The entire cache object // 2. The data stored at the key // if ( key === undefined || ( ( key && typeof key === "string" ) && value === undefined ) ) { return this.get( owner, key ); } // When the key is not a string, or both a key and value // are specified, set or extend (existing objects) with either: // // 1. An object of properties // 2. A key and value // this.set( owner, key, value ); // Since the "set" path can have two possible entry points // return the expected data based on which path was taken[*] return value !== undefined ? value : key; }, remove: function( owner, key ) { var i, cache = owner[ this.expando ]; if ( cache === undefined ) { return; } if ( key !== undefined ) { // Support array or space separated string of keys if ( Array.isArray( key ) ) { // If key is an array of keys... // We always set camelCase keys, so remove that. key = key.map( camelCase ); } else { key = camelCase( key ); // If a key with the spaces exists, use it. // Otherwise, create an array by matching non-whitespace key = key in cache ? [ key ] : ( key.match( rnothtmlwhite ) || [] ); } i = key.length; while ( i-- ) { delete cache[ key[ i ] ]; } } // Remove the expando if there's no more data if ( key === undefined || jQuery.isEmptyObject( cache ) ) { // Support: Chrome <=35 - 45 // Webkit & Blink performance suffers when deleting properties // from DOM nodes, so set to undefined instead // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) if ( owner.nodeType ) { owner[ this.expando ] = undefined; } else { delete owner[ this.expando ]; } } }, hasData: function( owner ) { var cache = owner[ this.expando ]; return cache !== undefined && !jQuery.isEmptyObject( cache ); } }; var dataPriv = new Data(); var dataUser = new Data(); // Implementation Summary // // 1. Enforce API surface and semantic compatibility with 1.9.x branch // 2. Improve the module's maintainability by reducing the storage // paths to a single mechanism. // 3. Use the same single mechanism to support "private" and "user" data. // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) // 5. Avoid exposing implementation details on user objects (eg. expando properties) // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g; function getData( data ) { if ( data === "true" ) { return true; } if ( data === "false" ) { return false; } if ( data === "null" ) { return null; } // Only convert to a number if it doesn't change the string if ( data === +data + "" ) { return +data; } if ( rbrace.test( data ) ) { return JSON.parse( data ); } return data; } function dataAttr( elem, key, data ) { var name; // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = getData( data ); } catch ( e ) {} // Make sure we set the data so it isn't changed later dataUser.set( elem, key, data ); } else { data = undefined; } } return data; } jQuery.extend( { hasData: function( elem ) { return dataUser.hasData( elem ) || dataPriv.hasData( elem ); }, data: function( elem, name, data ) { return dataUser.access( elem, name, data ); }, removeData: function( elem, name ) { dataUser.remove( elem, name ); }, // TODO: Now that all calls to _data and _removeData have been replaced // with direct calls to dataPriv methods, these can be deprecated. _data: function( elem, name, data ) { return dataPriv.access( elem, name, data ); }, _removeData: function( elem, name ) { dataPriv.remove( elem, name ); } } ); jQuery.fn.extend( { data: function( key, value ) { var i, name, data, elem = this[ 0 ], attrs = elem && elem.attributes; // Gets all values if ( key === undefined ) { if ( this.length ) { data = dataUser.get( elem ); if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { i = attrs.length; while ( i-- ) { // Support: IE 11 only // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { name = camelCase( name.slice( 5 ) ); dataAttr( elem, name, data[ name ] ); } } } dataPriv.set( elem, "hasDataAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each( function() { dataUser.set( this, key ); } ); } return access( this, function( value ) { var data; // The calling jQuery object (element matches) is not empty // (and therefore has an element appears at this[ 0 ]) and the // `value` parameter was not undefined. An empty jQuery object // will result in `undefined` for elem = this[ 0 ] which will // throw an exception if an attempt to read a data cache is made. if ( elem && value === undefined ) { // Attempt to get data from the cache // The key will always be camelCased in Data data = dataUser.get( elem, key ); if ( data !== undefined ) { return data; } // Attempt to "discover" the data in // HTML5 custom data-* attrs data = dataAttr( elem, key ); if ( data !== undefined ) { return data; } // We tried really hard, but the data doesn't exist. return; } // Set the data... this.each( function() { // We always store the camelCased key dataUser.set( this, key, value ); } ); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each( function() { dataUser.remove( this, key ); } ); } } ); jQuery.extend( { queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = dataPriv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || Array.isArray( data ) ) { queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { empty: jQuery.Callbacks( "once memory" ).add( function() { dataPriv.remove( elem, [ type + "queue", key ] ); } ) } ); } } ); jQuery.fn.extend( { queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[ 0 ], type ); } return data === undefined ? this : this.each( function() { var queue = jQuery.queue( this, type, data ); // Ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { jQuery.dequeue( this, type ); } } ); }, dequeue: function( type ) { return this.each( function() { jQuery.dequeue( this, type ); } ); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } } ); var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var isHiddenWithinTree = function( elem, el ) { // isHiddenWithinTree might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; // Inline style trumps all return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. jQuery.contains( elem.ownerDocument, elem ) && jQuery.css( elem, "display" ) === "none"; }; var swap = function( elem, options, callback, args ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.apply( elem, args || [] ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; }; function adjustCSS( elem, prop, valueParts, tween ) { var adjusted, scale, maxIterations = 20, currentValue = tween ? function() { return tween.cur(); } : function() { return jQuery.css( elem, prop, "" ); }, initial = currentValue(), unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && rcssNum.exec( jQuery.css( elem, prop ) ); if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { // Support: Firefox <=54 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) initial = initial / 2; // Trust units reported by jQuery.css unit = unit || initialInUnit[ 3 ]; // Iteratively approximate from a nonzero starting point initialInUnit = +initial || 1; while ( maxIterations-- ) { // Evaluate and update our best guess (doubling guesses that zero out). // Finish if the scale equals or crosses 1 (making the old*new product non-positive). jQuery.style( elem, prop, initialInUnit + unit ); if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { maxIterations = 0; } initialInUnit = initialInUnit / scale; } initialInUnit = initialInUnit * 2; jQuery.style( elem, prop, initialInUnit + unit ); // Make sure we update the tween properties later on valueParts = valueParts || []; } if ( valueParts ) { initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified adjusted = valueParts[ 1 ] ? initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : +valueParts[ 2 ]; if ( tween ) { tween.unit = unit; tween.start = initialInUnit; tween.end = adjusted; } } return adjusted; } var defaultDisplayMap = {}; function getDefaultDisplay( elem ) { var temp, doc = elem.ownerDocument, nodeName = elem.nodeName, display = defaultDisplayMap[ nodeName ]; if ( display ) { return display; } temp = doc.body.appendChild( doc.createElement( nodeName ) ); display = jQuery.css( temp, "display" ); temp.parentNode.removeChild( temp ); if ( display === "none" ) { display = "block"; } defaultDisplayMap[ nodeName ] = display; return display; } function showHide( elements, show ) { var display, elem, values = [], index = 0, length = elements.length; // Determine new display value for elements that need to change for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } display = elem.style.display; if ( show ) { // Since we force visibility upon cascade-hidden elements, an immediate (and slow) // check is required in this first loop unless we have a nonempty display value (either // inline or about-to-be-restored) if ( display === "none" ) { values[ index ] = dataPriv.get( elem, "display" ) || null; if ( !values[ index ] ) { elem.style.display = ""; } } if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { values[ index ] = getDefaultDisplay( elem ); } } else { if ( display !== "none" ) { values[ index ] = "none"; // Remember what we're overwriting dataPriv.set( elem, "display", display ); } } } // Set the display of the elements in a second loop to avoid constant reflow for ( index = 0; index < length; index++ ) { if ( values[ index ] != null ) { elements[ index ].style.display = values[ index ]; } } return elements; } jQuery.fn.extend( { show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { if ( typeof state === "boolean" ) { return state ? this.show() : this.hide(); } return this.each( function() { if ( isHiddenWithinTree( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } } ); } } ); var rcheckableType = ( /^(?:checkbox|radio)$/i ); var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); // We have to close these tags to support XHTML (#13200) var wrapMap = { // Support: IE <=9 only option: [ 1, "<select multiple='multiple'>", "</select>" ], // XHTML parsers do not magically insert elements in the // same way that tag soup parsers do. So we cannot shorten // this by omitting <tbody> or other required elements. thead: [ 1, "<table>", "</table>" ], col: [ 2, "<table><colgroup>", "</colgroup></table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], _default: [ 0, "", "" ] }; // Support: IE <=9 only wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; function getAll( context, tag ) { // Support: IE <=9 - 11 only // Use typeof to avoid zero-argument method invocation on host objects (#15151) var ret; if ( typeof context.getElementsByTagName !== "undefined" ) { ret = context.getElementsByTagName( tag || "*" ); } else if ( typeof context.querySelectorAll !== "undefined" ) { ret = context.querySelectorAll( tag || "*" ); } else { ret = []; } if ( tag === undefined || tag && nodeName( context, tag ) ) { return jQuery.merge( [ context ], ret ); } return ret; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } } var rhtml = /<|&#?\w+;/; function buildFragment( elems, context, scripts, selection, ignored ) { var elem, tmp, tag, wrap, contains, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( toType( elem ) === "object" ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; // Descend through wrappers to the right content j = wrap[ 0 ]; while ( j-- ) { tmp = tmp.lastChild; } // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); // Remember the top-level container tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392) tmp.textContent = ""; } } } // Remove wrapper from fragment fragment.textContent = ""; i = 0; while ( ( elem = nodes[ i++ ] ) ) { // Skip elements already in the context collection (trac-4087) if ( selection && jQuery.inArray( elem, selection ) > -1 ) { if ( ignored ) { ignored.push( elem ); } continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( ( elem = tmp[ j++ ] ) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } return fragment; } ( function() { var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); // Support: Android 4.0 - 4.3 only // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); input.setAttribute( "name", "t" ); div.appendChild( input ); // Support: Android <=4.1 only // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE <=11 only // Make sure textarea (and checkbox) defaultValue is properly cloned div.innerHTML = "<textarea>x</textarea>"; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; } )(); var documentElement = document.documentElement; var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; } function returnFalse() { return false; } // Support: IE <=9 only // See #13393 for more info function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } function on( elem, types, selector, data, fn, one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { on( elem, type, selector, data, types[ type ], one ); } return elem; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return elem; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return elem.each( function() { jQuery.event.add( this, types, fn, data, selector ); } ); } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Ensure that invalid selectors throw exceptions at attach time // Evaluate against documentElement in case elem is a non-element node (e.g., document) if ( selector ) { jQuery.find.matchesSelector( documentElement, selector ); } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !( events = elemData.events ) ) { events = elemData.events = {}; } if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; } // Handle multiple events separated by a space types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend( { type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join( "." ) }, handleObjIn ); // Init the event handler queue if we're the first if ( !( handlers = events[ type ] ) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); if ( !elemData || !( events = elemData.events ) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[ 2 ] && new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove data and the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { dataPriv.remove( elem, "handle events" ); } }, dispatch: function( nativeEvent ) { // Make a writable jQuery.Event from the native event object var event = jQuery.event.fix( nativeEvent ); var i, j, ret, matched, handleObj, handlerQueue, args = new Array( arguments.length ), handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[ 0 ] = event; for ( i = 1; i < arguments.length; i++ ) { args[ i ] = arguments[ i ]; } event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( ( handleObj = matched.handlers[ j++ ] ) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or 2) have namespace(s) // a subset or equal to those in the bound event (both can have no namespace). if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || handleObj.handler ).apply( matched.elem, args ); if ( ret !== undefined ) { if ( ( event.result = ret ) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers if ( delegateCount && // Support: IE <=9 // Black-hole SVG <use> instance trees (trac-13180) cur.nodeType && // Support: Firefox <=42 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click // Support: IE 11 only // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) !( event.type === "click" && event.button >= 1 ) ) { for ( ; cur !== this; cur = cur.parentNode || this ) { // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { matchedHandlers = []; matchedSelectors = {}; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matchedSelectors[ sel ] === undefined ) { matchedSelectors[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) > -1 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matchedSelectors[ sel ] ) { matchedHandlers.push( handleObj ); } } if ( matchedHandlers.length ) { handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); } } } } // Add the remaining (directly-bound) handlers cur = this; if ( delegateCount < handlers.length ) { handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); } return handlerQueue; }, addProp: function( name, hook ) { Object.defineProperty( jQuery.Event.prototype, name, { enumerable: true, configurable: true, get: isFunction( hook ) ? function() { if ( this.originalEvent ) { return hook( this.originalEvent ); } } : function() { if ( this.originalEvent ) { return this.originalEvent[ name ]; } }, set: function( value ) { Object.defineProperty( this, name, { enumerable: true, configurable: true, writable: true, value: value } ); } } ); }, fix: function( originalEvent ) { return originalEvent[ jQuery.expando ] ? originalEvent : new jQuery.Event( originalEvent ); }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && this.focus ) { this.focus(); return false; } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return nodeName( event.target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } } }; jQuery.removeEvent = function( elem, type, handle ) { // This "if" is needed for plain objects if ( elem.removeEventListener ) { elem.removeEventListener( type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !( this instanceof jQuery.Event ) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only src.returnValue === false ? returnTrue : returnFalse; // Create target properties // Support: Safari <=6 - 7 only // Target should not be a text node (#504, #13143) this.target = ( src.target && src.target.nodeType === 3 ) ? src.target.parentNode : src.target; this.currentTarget = src.currentTarget; this.relatedTarget = src.relatedTarget; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, isSimulated: false, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( e && !this.isSimulated ) { e.preventDefault(); } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopPropagation(); } }, stopImmediatePropagation: function() { var e = this.originalEvent; this.isImmediatePropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Includes all common event props including KeyEvent and MouseEvent specific props jQuery.each( { altKey: true, bubbles: true, cancelable: true, changedTouches: true, ctrlKey: true, detail: true, eventPhase: true, metaKey: true, pageX: true, pageY: true, shiftKey: true, view: true, "char": true, charCode: true, key: true, keyCode: true, button: true, buttons: true, clientX: true, clientY: true, offsetX: true, offsetY: true, pointerId: true, pointerType: true, screenX: true, screenY: true, targetTouches: true, toElement: true, touches: true, which: function( event ) { var button = event.button; // Add which for key events if ( event.which == null && rkeyEvent.test( event.type ) ) { return event.charCode != null ? event.charCode : event.keyCode; } // Add which for click: 1 === left; 2 === middle; 3 === right if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { if ( button & 1 ) { return 1; } if ( button & 2 ) { return 3; } if ( button & 4 ) { return 2; } return 0; } return event.which; } }, jQuery.event.addProp ); // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout // // Support: Safari 7 only // Safari sends mouseenter too often; see: // https://bugs.chromium.org/p/chromium/issues/detail?id=470258 // for the description of the bug (it existed in older Chrome versions as well). jQuery.each( { mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; } ); jQuery.fn.extend( { on: function( types, selector, data, fn ) { return on( this, types, selector, data, fn ); }, one: function( types, selector, data, fn ) { return on( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each( function() { jQuery.event.remove( this, types, fn, selector ); } ); } } ); var /* eslint-disable max-len */ // See https://github.com/eslint/eslint/issues/3229 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, /* eslint-enable */ // Support: IE <=10 - 11, Edge 12 - 13 only // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ rnoInnerhtml = /<script|<style|<link/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; // Prefer a tbody over its parent table for containing new rows function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( elem ).children( "tbody" )[ 0 ] || elem; } return elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; } function restoreScript( elem ) { if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { elem.type = elem.type.slice( 5 ); } else { elem.removeAttribute( "type" ); } return elem; } function cloneCopyEvent( src, dest ) { var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; } // 1. Copy private data: events, handlers, etc. if ( dataPriv.hasData( src ) ) { pdataOld = dataPriv.access( src ); pdataCur = dataPriv.set( dest, pdataOld ); events = pdataOld.events; if ( events ) { delete pdataCur.handle; pdataCur.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } } // 2. Copy user data if ( dataUser.hasData( src ) ) { udataOld = dataUser.access( src ); udataCur = jQuery.extend( {}, udataOld ); dataUser.set( dest, udataCur ); } } // Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays args = concat.apply( [], args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[ 0 ], valueIsFunction = isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( valueIsFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return collection.each( function( index ) { var self = collection.eq( index ); if ( valueIsFunction ) { args[ 0 ] = value.call( this, index, self.html() ); } domManip( self, args, callback, ignored ); } ); } if ( l ) { fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } // Require either new content or an interest in ignored elements to invoke the callback if ( first || ignored ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item // instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( collection[ i ], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !dataPriv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl ) { jQuery._evalUrl( node.src ); } } else { DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node ); } } } } } } return collection; } function remove( elem, selector, keepData ) { var node, nodes = selector ? jQuery.filter( selector, elem ) : elem, i = 0; for ( ; ( node = nodes[ i ] ) != null; i++ ) { if ( !keepData && node.nodeType === 1 ) { jQuery.cleanData( getAll( node ) ); } if ( node.parentNode ) { if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { setGlobalEval( getAll( node, "script" ) ); } node.parentNode.removeChild( node ); } } return elem; } jQuery.extend( { htmlPrefilter: function( html ) { return html.replace( rxhtmlTag, "<$1></$2>" ); }, clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), inPage = jQuery.contains( elem.ownerDocument, elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); for ( i = 0, l = srcElements.length; i < l; i++ ) { fixInput( srcElements[ i ], destElements[ i ] ); } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0, l = srcElements.length; i < l; i++ ) { cloneCopyEvent( srcElements[ i ], destElements[ i ] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } // Return the cloned set return clone; }, cleanData: function( elems ) { var data, elem, type, special = jQuery.event.special, i = 0; for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { if ( acceptData( elem ) ) { if ( ( data = elem[ dataPriv.expando ] ) ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataPriv.expando ] = undefined; } if ( elem[ dataUser.expando ] ) { // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataUser.expando ] = undefined; } } } } } ); jQuery.fn.extend( { detach: function( selector ) { return remove( this, selector, true ); }, remove: function( selector ) { return remove( this, selector ); }, text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().each( function() { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.textContent = value; } } ); }, null, value, arguments.length ); }, append: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } } ); }, prepend: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } } ); }, before: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } } ); }, after: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } } ); }, empty: function() { var elem, i = 0; for ( ; ( elem = this[ i ] ) != null; i++ ) { if ( elem.nodeType === 1 ) { // Prevent memory leaks jQuery.cleanData( getAll( elem, false ) ); // Remove any remaining nodes elem.textContent = ""; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); } ); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined && elem.nodeType === 1 ) { return elem.innerHTML; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { value = jQuery.htmlPrefilter( value ); try { for ( ; i < l; i++ ) { elem = this[ i ] || {}; // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch ( e ) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var ignored = []; // Make the changes, replacing each non-ignored context element with the new content return domManip( this, arguments, function( elem ) { var parent = this.parentNode; if ( jQuery.inArray( this, ignored ) < 0 ) { jQuery.cleanData( getAll( this ) ); if ( parent ) { parent.replaceChild( elem, this ); } } // Force callback invocation }, ignored ); } } ); jQuery.each( { appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, ret = [], insert = jQuery( selector ), last = insert.length - 1, i = 0; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone( true ); jQuery( insert[ i ] )[ original ]( elems ); // Support: Android <=4.0 only, PhantomJS 1 only // .get() because push.apply(_, arraylike) throws on ancient WebKit push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; } ); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles = function( elem ) { // Support: IE <=11 only, Firefox <=30 (#15098, #14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" var view = elem.ownerDocument.defaultView; if ( !view || !view.opener ) { view = window; } return view.getComputedStyle( elem ); }; var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); ( function() { // Executing both pixelPosition & boxSizingReliable tests require only one layout // so they're executed at the same time to save the second computation. function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0"; div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%"; documentElement.appendChild( container ).appendChild( div ); var divStyle = window.getComputedStyle( div ); pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 // Some styles come back with percentage values, even though they shouldn't div.style.right = "60%"; pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; // Support: IE 9 - 11 only // Detect misreporting of content dimensions for box-sizing:border-box elements boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; // Support: IE 9 only // Detect overflow:scroll screwiness (gh-3699) div.style.position = "absolute"; scrollboxSizeVal = div.offsetWidth === 36 || "absolute"; documentElement.removeChild( container ); // Nullify the div so it wouldn't be stored in the memory and // it will also be a sign that checks already performed div = null; } function roundPixelMeasures( measure ) { return Math.round( parseFloat( measure ) ); } var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); // Finish early in limited (non-browser) environments if ( !div.style ) { return; } // Support: IE <=9 - 11 only // Style of cloned element affects source element cloned (#8908) div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; jQuery.extend( support, { boxSizingReliable: function() { computeStyleTests(); return boxSizingReliableVal; }, pixelBoxStyles: function() { computeStyleTests(); return pixelBoxStylesVal; }, pixelPosition: function() { computeStyleTests(); return pixelPositionVal; }, reliableMarginLeft: function() { computeStyleTests(); return reliableMarginLeftVal; }, scrollboxSize: function() { computeStyleTests(); return scrollboxSizeVal; } } ); } )(); function curCSS( elem, name, computed ) { var width, minWidth, maxWidth, ret, // Support: Firefox 51+ // Retrieving style before computed somehow // fixes an issue with getting wrong values // on detached elements style = elem.style; computed = computed || getStyles( elem ); // getPropertyValue is needed for: // .css('filter') (IE 9 only, #12537) // .css('--customProperty) (#3144) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } // A tribute to the "awesome hack by Dean Edwards" // Android Browser returns percentage for some values, // but width seems to be reliably pixels. // This is against the CSSOM draft spec: // https://drafts.csswg.org/cssom/#resolved-values if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; // Put in the new values to get a computed value out style.minWidth = style.maxWidth = style.width = ret; ret = computed.width; // Revert the changed values style.width = width; style.minWidth = minWidth; style.maxWidth = maxWidth; } } return ret !== undefined ? // Support: IE <=9 - 11 only // IE returns zIndex value as an integer. ret + "" : ret; } function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { if ( conditionFn() ) { // Hook not needed (or it's not possible to use it due // to missing dependency), remove it. delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. return ( this.get = hookFn ).apply( this, arguments ); } }; } var // Swappable if display is none or starts with table // except "table", "table-cell", or "table-caption" // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rcustomProp = /^--/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: "0", fontWeight: "400" }, cssPrefixes = [ "Webkit", "Moz", "ms" ], emptyStyle = document.createElement( "div" ).style; // Return a css property mapped to a potentially vendor prefixed property function vendorPropName( name ) { // Shortcut for names that are not vendor prefixed if ( name in emptyStyle ) { return name; } // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } } // Return a property mapped along what jQuery.cssProps suggests or to // a vendor prefixed property. function finalPropName( name ) { var ret = jQuery.cssProps[ name ]; if ( !ret ) { ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; } return ret; } function setPositiveNumber( elem, value, subtract ) { // Any relative (+/-) values have already been // normalized at this point var matches = rcssNum.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : value; } function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0; // Adjustment may not be necessary if ( box === ( isBorderBox ? "border" : "content" ) ) { return 0; } for ( ; i < 4; i += 2 ) { // Both box models exclude margin if ( box === "margin" ) { delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); } // If we get here with a content-box, we're seeking "padding" or "border" or "margin" if ( !isBorderBox ) { // Add padding delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // For "border" or "margin", add border if ( box !== "padding" ) { delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); // But still keep track of it otherwise } else { extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } // If we get here with a border-box (content + padding + border), we're seeking "content" or // "padding" or "margin" } else { // For "content", subtract padding if ( box === "content" ) { delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // For "content" or "padding", subtract border if ( box !== "margin" ) { delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } // Account for positive content-box scroll gutter when requested by providing computedVal if ( !isBorderBox && computedVal >= 0 ) { // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border // Assuming integer scroll gutter, subtract the rest and round down delta += Math.max( 0, Math.ceil( elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - computedVal - delta - extra - 0.5 ) ); } return delta; } function getWidthOrHeight( elem, dimension, extra ) { // Start with computed style var styles = getStyles( elem ), val = curCSS( elem, dimension, styles ), isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", valueIsBorderBox = isBorderBox; // Support: Firefox <=54 // Return a confounding non-pixel value or feign ignorance, as appropriate. if ( rnumnonpx.test( val ) ) { if ( !extra ) { return val; } val = "auto"; } // Check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style valueIsBorderBox = valueIsBorderBox && ( support.boxSizingReliable() || val === elem.style[ dimension ] ); // Fall back to offsetWidth/offsetHeight when value is "auto" // This happens for inline elements with no explicit setting (gh-3571) // Support: Android <=4.1 - 4.3 only // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) if ( val === "auto" || !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) { val = elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ]; // offsetWidth/offsetHeight provide border-box values valueIsBorderBox = true; } // Normalize "" and auto val = parseFloat( val ) || 0; // Adjust for the element's box model return ( val + boxModelAdjustment( elem, dimension, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles, // Provide the current computed size to request scroll gutter calculation (gh-3589) val ) ) + "px"; } jQuery.extend( { // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } } } }, // Don't automatically add "px" to these possibly-unitless properties cssNumber: { "animationIterationCount": true, "columnCount": true, "fillOpacity": true, "flexGrow": true, "flexShrink": true, "fontWeight": true, "lineHeight": true, "opacity": true, "order": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: {}, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, hooks, origName = camelCase( name ), isCustomProp = rcustomProp.test( name ), style = elem.style; // Make sure that we're working with the right name. We don't // want to query the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Gets hook for the prefixed version, then unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // Convert "+=" or "-=" to relative numbers (#7345) if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { value = adjustCSS( elem, name, ret ); // Fixes bug #9237 type = "number"; } // Make sure that null and NaN values aren't set (#7116) if ( value == null || value !== value ) { return; } // If a number was passed in, add the unit (except for certain CSS properties) if ( type === "number" ) { value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } // background-* props affect original clone's values if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !( "set" in hooks ) || ( value = hooks.set( elem, value, extra ) ) !== undefined ) { if ( isCustomProp ) { style.setProperty( name, value ); } else { style[ name ] = value; } } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var val, num, hooks, origName = camelCase( name ), isCustomProp = rcustomProp.test( name ); // Make sure that we're working with the right name. We don't // want to modify the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Try prefixed name followed by the unprefixed name hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } // Convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } // Make numeric if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || isFinite( num ) ? num || 0 : val; } return val; } } ); jQuery.each( [ "height", "width" ], function( i, dimension ) { jQuery.cssHooks[ dimension ] = { get: function( elem, computed, extra ) { if ( computed ) { // Certain elements can have dimension info if we invisibly show them // but it must have a current display style that would benefit return rdisplayswap.test( jQuery.css( elem, "display" ) ) && // Support: Safari 8+ // Table columns in Safari have non-zero offsetWidth & zero // getBoundingClientRect().width unless display is changed. // Support: IE <=11 only // Running getBoundingClientRect on a disconnected node // in IE throws an error. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? swap( elem, cssShow, function() { return getWidthOrHeight( elem, dimension, extra ); } ) : getWidthOrHeight( elem, dimension, extra ); } }, set: function( elem, value, extra ) { var matches, styles = getStyles( elem ), isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", subtract = extra && boxModelAdjustment( elem, dimension, extra, isBorderBox, styles ); // Account for unreliable border-box dimensions by comparing offset* to computed and // faking a content-box to get border and padding (gh-3699) if ( isBorderBox && support.scrollboxSize() === styles.position ) { subtract -= Math.ceil( elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - parseFloat( styles[ dimension ] ) - boxModelAdjustment( elem, dimension, "border", false, styles ) - 0.5 ); } // Convert to pixels if value adjustment is needed if ( subtract && ( matches = rcssNum.exec( value ) ) && ( matches[ 3 ] || "px" ) !== "px" ) { elem.style[ dimension ] = value; value = jQuery.css( elem, dimension ); } return setPositiveNumber( elem, value, subtract ); } }; } ); jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, function( elem, computed ) { if ( computed ) { return ( parseFloat( curCSS( elem, "marginLeft" ) ) || elem.getBoundingClientRect().left - swap( elem, { marginLeft: 0 }, function() { return elem.getBoundingClientRect().left; } ) ) + "px"; } } ); // These hooks are used by animate to expand properties jQuery.each( { margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // Assumes a single number if not a string parts = typeof value === "string" ? value.split( " " ) : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( prefix !== "margin" ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } } ); jQuery.fn.extend( { css: function( name, value ) { return access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; if ( Array.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); } } ); function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; // Use a property on the element directly when it is not a DOM element, // or when there is no matching style property that exists. if ( tween.elem.nodeType !== 1 || tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { return tween.elem[ tween.prop ]; } // Passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails. // Simple values such as "10px" are parsed to Float; // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // Use step hook for back compat. // Use cssHook if its there. // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Support: IE <=9 only // Panic based approach to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; }, _default: "swing" }; jQuery.fx = Tween.prototype.init; // Back compat <1.8 extension point jQuery.fx.step = {}; var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; function schedule() { if ( inProgress ) { if ( document.hidden === false && window.requestAnimationFrame ) { window.requestAnimationFrame( schedule ); } else { window.setTimeout( schedule, jQuery.fx.interval ); } jQuery.fx.tick(); } } // Animations created synchronously will run synchronously function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = Date.now() ); } // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } function createTween( value, prop, animation ) { var tween, collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { // We're done with this property return tween; } } } function defaultPrefilter( elem, props, opts ) { var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree( elem ), dataShow = dataPriv.get( elem, "fxshow" ); // Queue-skipping animations hijack the fx hooks if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always( function() { // Ensure the complete handler is called before this completes anim.always( function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } } ); } ); } // Detect show/hide animations for ( prop in props ) { value = props[ prop ]; if ( rfxtypes.test( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { // Pretend to be hidden if this is a "show" and // there is still data from a stopped show/hide if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { hidden = true; // Ignore all other no-op show/hide data } else { continue; } } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); } } // Bail out if this is a no-op like .hide().hide() propTween = !jQuery.isEmptyObject( props ); if ( !propTween && jQuery.isEmptyObject( orig ) ) { return; } // Restrict "overflow" and "display" styles during box animations if ( isBox && elem.nodeType === 1 ) { // Support: IE <=9 - 11, Edge 12 - 15 // Record all 3 overflow attributes because IE does not infer the shorthand // from identically-valued overflowX and overflowY and Edge just mirrors // the overflowX value there. opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Identify a display type, preferring old show/hide data over the CSS cascade restoreDisplay = dataShow && dataShow.display; if ( restoreDisplay == null ) { restoreDisplay = dataPriv.get( elem, "display" ); } display = jQuery.css( elem, "display" ); if ( display === "none" ) { if ( restoreDisplay ) { display = restoreDisplay; } else { // Get nonempty value(s) by temporarily forcing visibility showHide( [ elem ], true ); restoreDisplay = elem.style.display || restoreDisplay; display = jQuery.css( elem, "display" ); showHide( [ elem ] ); } } // Animate inline elements as inline-block if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { if ( jQuery.css( elem, "float" ) === "none" ) { // Restore the original display value at the end of pure show/hide animations if ( !propTween ) { anim.done( function() { style.display = restoreDisplay; } ); if ( restoreDisplay == null ) { display = style.display; restoreDisplay = display === "none" ? "" : display; } } style.display = "inline-block"; } } } if ( opts.overflow ) { style.overflow = "hidden"; anim.always( function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; } ); } // Implement show/hide animations propTween = false; for ( prop in orig ) { // General show/hide setup for this element animation if ( !propTween ) { if ( dataShow ) { if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } } else { dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); } // Store hidden/visible for toggle so `.stop().toggle()` "reverses" if ( toggle ) { dataShow.hidden = !hidden; } // Show elements before animating them if ( hidden ) { showHide( [ elem ], true ); } /* eslint-disable no-loop-func */ anim.done( function() { /* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element if ( !hidden ) { showHide( [ elem ] ); } dataPriv.remove( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } } ); } // Per-property setup propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = propTween.start; if ( hidden ) { propTween.end = propTween.start; propTween.start = 0; } } } } function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( Array.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { value = hooks.expand( value ); delete props[ name ]; // Not quite $.extend, this won't overwrite existing keys. // Reusing 'index' because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always( function() { // Don't match elem in the :animated selector delete tick.elem; } ), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // Support: Android 2.3 only // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; for ( ; index < length; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ] ); // If there's more to do, yield if ( percent < 1 && length ) { return remaining; } // If this was an empty animation, synthesize a final progress notification if ( !length ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); } // Resolve the animation and report its conclusion deferred.resolveWith( elem, [ animation ] ); return false; }, animation = deferred.promise( { elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {}, easing: jQuery.easing._default }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // If we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { return this; } stopped = true; for ( ; index < length; index++ ) { animation.tweens[ index ].run( 1 ); } // Resolve when we played the last frame; otherwise, reject if ( gotoEnd ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } } ), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length; index++ ) { result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { if ( isFunction( result.stop ) ) { jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = result.stop.bind( result ); } return result; } } jQuery.map( props, createTween, animation ); if ( isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } // Attach callbacks from options animation .progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue } ) ); return animation; } jQuery.Animation = jQuery.extend( Animation, { tweeners: { "*": [ function( prop, value ) { var tween = this.createTween( prop, value ); adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); return tween; } ] }, tweener: function( props, callback ) { if ( isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.match( rnothtmlwhite ); } var prop, index = 0, length = props.length; for ( ; index < length; index++ ) { prop = props[ index ]; Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; Animation.tweeners[ prop ].unshift( callback ); } }, prefilters: [ defaultPrefilter ], prefilter: function( callback, prepend ) { if ( prepend ) { Animation.prefilters.unshift( callback ); } else { Animation.prefilters.push( callback ); } } } ); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !isFunction( easing ) && easing }; // Go to the end state if fx are off if ( jQuery.fx.off ) { opt.duration = 0; } else { if ( typeof opt.duration !== "number" ) { if ( opt.duration in jQuery.fx.speeds ) { opt.duration = jQuery.fx.speeds[ opt.duration ]; } else { opt.duration = jQuery.fx.speeds._default; } } } // Normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.fn.extend( { fadeTo: function( speed, to, easing, callback ) { // Show any hidden elements after setting opacity to 0 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() // Animate to the value specified .end().animate( { opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately if ( empty || dataPriv.get( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each( function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && ( type == null || timers[ index ].queue === type ) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // Start the next in the queue if the last step wasn't forced. // Timers currently will call their complete callbacks, which // will dequeue but only if they were gotoEnd. if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } } ); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each( function() { var index, data = dataPriv.get( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // Enable finishing flag on private data data.finish = true; // Empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.stop ) { hooks.stop.call( this, true ); } // Look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // Look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } // Turn off finishing flag delete data.finish; } ); } } ); jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; } ); // Generate shortcuts for custom animations jQuery.each( { slideDown: genFx( "show" ), slideUp: genFx( "hide" ), slideToggle: genFx( "toggle" ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; } ); jQuery.timers = []; jQuery.fx.tick = function() { var timer, i = 0, timers = jQuery.timers; fxNow = Date.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Run the timer and safely remove it when done (allowing for external removal) if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { jQuery.timers.push( timer ); jQuery.fx.start(); }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( inProgress ) { return; } inProgress = true; schedule(); }; jQuery.fx.stop = function() { inProgress = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Based off of the plugin by Clint Helfers, with permission. // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = window.setTimeout( next, time ); hooks.stop = function() { window.clearTimeout( timeout ); }; } ); }; ( function() { var input = document.createElement( "input" ), select = document.createElement( "select" ), opt = select.appendChild( document.createElement( "option" ) ); input.type = "checkbox"; // Support: Android <=4.3 only // Default value for a checkbox should be "on" support.checkOn = input.value !== ""; // Support: IE <=11 only // Must access selectedIndex to make default options select support.optSelected = opt.selected; // Support: IE <=11 only // An input loses its value after becoming a radio input = document.createElement( "input" ); input.value = "t"; input.type = "radio"; support.radioValue = input.value === "t"; } )(); var boolHook, attrHandle = jQuery.expr.attrHandle; jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each( function() { jQuery.removeAttr( this, name ); } ); } } ); jQuery.extend( { attr: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set attributes on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } // Attribute hooks are determined by the lowercase version // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { hooks = jQuery.attrHooks[ name.toLowerCase() ] || ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return; } if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } elem.setAttribute( name, value + "" ); return value; } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } ret = jQuery.find.attr( elem, name ); // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; }, attrHooks: { type: { set: function( elem, value ) { if ( !support.radioValue && value === "radio" && nodeName( elem, "input" ) ) { var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } }, removeAttr: function( elem, value ) { var name, i = 0, // Attribute names can contain non-HTML whitespace characters // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 attrNames = value && value.match( rnothtmlwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( ( name = attrNames[ i++ ] ) ) { elem.removeAttribute( name ); } } } } ); // Hooks for boolean attributes boolHook = { set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { elem.setAttribute( name, name ); } return name; } }; jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = function( elem, name, isXML ) { var ret, handle, lowercaseName = name.toLowerCase(); if ( !isXML ) { // Avoid an infinite loop by temporarily removing this function from the getter handle = attrHandle[ lowercaseName ]; attrHandle[ lowercaseName ] = ret; ret = getter( elem, name, isXML ) != null ? lowercaseName : null; attrHandle[ lowercaseName ] = handle; } return ret; }; } ); var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; jQuery.fn.extend( { prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { return this.each( function() { delete this[ jQuery.propFix[ name ] || name ]; } ); } } ); jQuery.extend( { prop: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } return ( elem[ name ] = value ); } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } return elem[ name ]; }, propHooks: { tabIndex: { get: function( elem ) { // Support: IE <=9 - 11 only // elem.tabIndex doesn't always return the // correct value when it hasn't been explicitly set // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ // Use proper attribute retrieval(#12072) var tabindex = jQuery.find.attr( elem, "tabindex" ); if ( tabindex ) { return parseInt( tabindex, 10 ); } if ( rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ) { return 0; } return -1; } } }, propFix: { "for": "htmlFor", "class": "className" } } ); // Support: IE <=11 only // Accessing the selectedIndex property // forces the browser to respect setting selected // on the option // The getter ensures a default option is selected // when in an optgroup // eslint rule "no-unused-expressions" is disabled for this code // since it considers such accessions noop if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent && parent.parentNode ) { parent.parentNode.selectedIndex; } return null; }, set: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } } }; } jQuery.each( [ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; } ); // Strip and collapse whitespace according to HTML spec // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); } function getClass( elem ) { return elem.getAttribute && elem.getAttribute( "class" ) || ""; } function classesToArray( value ) { if ( Array.isArray( value ) ) { return value; } if ( typeof value === "string" ) { return value.match( rnothtmlwhite ) || []; } return []; } jQuery.fn.extend( { addClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); } ); } classes = classesToArray( value ); if ( classes.length ) { while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, removeClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); } ); } if ( !arguments.length ) { return this.attr( "class", "" ); } classes = classesToArray( value ); if ( classes.length ) { while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) > -1 ) { cur = cur.replace( " " + clazz + " ", " " ); } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isValidValue = type === "string" || Array.isArray( value ); if ( typeof stateVal === "boolean" && isValidValue ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } if ( isFunction( value ) ) { return this.each( function( i ) { jQuery( this ).toggleClass( value.call( this, i, getClass( this ), stateVal ), stateVal ); } ); } return this.each( function() { var className, i, self, classNames; if ( isValidValue ) { // Toggle individual class names i = 0; self = jQuery( this ); classNames = classesToArray( value ); while ( ( className = classNames[ i++ ] ) ) { // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { self.addClass( className ); } } // Toggle whole class name } else if ( value === undefined || type === "boolean" ) { className = getClass( this ); if ( className ) { // Store className if set dataPriv.set( this, "__className__", className ); } // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. if ( this.setAttribute ) { this.setAttribute( "class", className || value === false ? "" : dataPriv.get( this, "__className__" ) || "" ); } } } ); }, hasClass: function( selector ) { var className, elem, i = 0; className = " " + selector + " "; while ( ( elem = this[ i++ ] ) ) { if ( elem.nodeType === 1 && ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { return true; } } return false; } } ); var rreturn = /\r/g; jQuery.fn.extend( { val: function( value ) { var hooks, ret, valueIsFunction, elem = this[ 0 ]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && ( ret = hooks.get( elem, "value" ) ) !== undefined ) { return ret; } ret = elem.value; // Handle most common string cases if ( typeof ret === "string" ) { return ret.replace( rreturn, "" ); } // Handle cases where value is null/undef or number return ret == null ? "" : ret; } return; } valueIsFunction = isFunction( value ); return this.each( function( i ) { var val; if ( this.nodeType !== 1 ) { return; } if ( valueIsFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( Array.isArray( val ) ) { val = jQuery.map( val, function( value ) { return value == null ? "" : value + ""; } ); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } } ); } } ); jQuery.extend( { valHooks: { option: { get: function( elem ) { var val = jQuery.find.attr( elem, "value" ); return val != null ? val : // Support: IE <=10 - 11 only // option.text throws exceptions (#14686, #14858) // Strip and collapse whitespace // https://html.spec.whatwg.org/#strip-and-collapse-whitespace stripAndCollapse( jQuery.text( elem ) ); } }, select: { get: function( elem ) { var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length; if ( index < 0 ) { i = max; } else { i = one ? index : 0; } // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; // Support: IE <=9 only // IE8-9 doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && // Don't return options that are disabled or in a disabled optgroup !option.disabled && ( !option.parentNode.disabled || !nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; }, set: function( elem, value ) { var optionSet, option, options = elem.options, values = jQuery.makeArray( value ), i = options.length; while ( i-- ) { option = options[ i ]; /* eslint-disable no-cond-assign */ if ( option.selected = jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) { optionSet = true; } /* eslint-enable no-cond-assign */ } // Force browsers to behave consistently when non-matching value is set if ( !optionSet ) { elem.selectedIndex = -1; } return values; } } } } ); // Radios and checkboxes getter/setter jQuery.each( [ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { if ( Array.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); } } }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { return elem.getAttribute( "value" ) === null ? "on" : elem.value; }; } } ); // Return jQuery for attributes-only inclusion support.focusin = "onfocusin" in window; var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function( e ) { e.stopPropagation(); }; jQuery.extend( jQuery.event, { trigger: function( event, data, elem, onlyHandlers ) { var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; cur = lastElement = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf( "." ) > -1 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split( "." ); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf( ":" ) < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join( "." ); event.rnamespace = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === ( elem.ownerDocument || document ) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { lastElement = cur; event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( ( !special._default || special._default.apply( eventPath.pop(), data ) === false ) && acceptData( elem ) ) { // Call a native DOM method on the target with the same name as the event. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; if ( event.isPropagationStopped() ) { lastElement.addEventListener( type, stopPropagationCallback ); } elem[ type ](); if ( event.isPropagationStopped() ) { lastElement.removeEventListener( type, stopPropagationCallback ); } jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, // Piggyback on a donor event to simulate a different one // Used only for `focus(in | out)` events simulate: function( type, elem, event ) { var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true } ); jQuery.event.trigger( e, null, elem ); } } ); jQuery.fn.extend( { trigger: function( type, data ) { return this.each( function() { jQuery.event.trigger( type, data, this ); } ); }, triggerHandler: function( type, data ) { var elem = this[ 0 ]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } } ); // Support: Firefox <=44 // Firefox doesn't have focus(in | out) events // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 // // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 // focus(in | out) events fire after focus & blur events, // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 if ( !support.focusin ) { jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); }; jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); dataPriv.remove( doc, fix ); } else { dataPriv.access( doc, fix, attaches ); } } }; } ); } var location = window.location; var nonce = Date.now(); var rquery = ( /\?/ ); // Cross-browser xml parsing jQuery.parseXML = function( data ) { var xml; if ( !data || typeof data !== "string" ) { return null; } // Support: IE 9 - 11 only // IE throws on parseFromString with invalid input. try { xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); } catch ( e ) { xml = undefined; } if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }; var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; function buildParams( prefix, obj, traditional, add ) { var name; if ( Array.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", v, traditional, add ); } } ); } else if ( !traditional && toType( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // Serialize an array of form elements or a set of // key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, valueOrFunction ) { // If value is a function, invoke it and use its return value var value = isFunction( valueOrFunction ) ? valueOrFunction() : valueOrFunction; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value == null ? "" : value ); }; // If an array was passed in, assume that it is an array of form elements. if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); } ); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ); }; jQuery.fn.extend( { serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map( function() { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; } ) .filter( function() { var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); } ) .map( function( i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { return null; } if ( Array.isArray( val ) ) { return jQuery.map( val, function( val ) { return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ); } return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ).get(); } } ); var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat( "*" ), // Anchor tag for parsing the document origin originAnchor = document.createElement( "a" ); originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; if ( isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { // Prepend if requested if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } } ); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } /* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */ function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s.throws ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; } jQuery.extend( { // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: location.href, type: "GET", isLocal: rlocalProtocol.test( location.protocol ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": JSON.parse, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var transport, // URL without anti-cache param cacheURL, // Response headers responseHeadersString, responseHeaders, // timeout handle timeoutTimer, // Url cleanup var urlAnchor, // Request state (becomes false upon send and true upon completion) completed, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // uncached part of the url uncached, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks( "once memory" ), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( completed ) { if ( !responseHeaders ) { responseHeaders = {}; while ( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match == null ? null : match; }, // Raw string getAllResponseHeaders: function() { return completed ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { if ( completed == null ) { name = requestHeadersNames[ name.toLowerCase() ] = requestHeadersNames[ name.toLowerCase() ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( completed == null ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( completed ) { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } else { // Lazy-add the new callbacks in a way that preserves old ones for ( code in map ) { statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ); // Add protocol if not provided (prefilters might expect it) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available s.url = ( ( url || s.url || location.href ) + "" ) .replace( rprotocol, location.protocol + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; // A cross-domain request is in order when the origin doesn't match the current origin. if ( s.crossDomain == null ) { urlAnchor = document.createElement( "a" ); // Support: IE <=8 - 11, Edge 12 - 15 // IE throws exception on accessing the href property if url is malformed, // e.g. http://example.com:80x/ try { urlAnchor.href = s.url; // Support: IE <=8 - 11 only // Anchor's host property isn't correctly set when s.url is relative urlAnchor.href = urlAnchor.href; s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; } catch ( e ) { // If there is an error parsing the URL, assume it is crossDomain, // it can be rejected by the transport if it is invalid s.crossDomain = true; } } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( completed ) { return jqXHR; } // We can fire global events as of now if asked to // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) fireGlobals = jQuery.event && s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on // Remove hash to simplify url manipulation cacheURL = s.url.replace( rhash, "" ); // More options handling for requests with no content if ( !s.hasContent ) { // Remember the hash so we can put it back uncached = s.url.slice( cacheURL.length ); // If data is available and should be processed, append data to url if ( s.data && ( s.processData || typeof s.data === "string" ) ) { cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add or update anti-cache param if needed if ( s.cache === false ) { cacheURL = cacheURL.replace( rantiCache, "$1" ); uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; } // Put hash and anti-cache on the URL that will be requested (gh-1732) s.url = cacheURL + uncached; // Change '%20' to '+' if this is encoded form body content (gh-2658) } else if ( s.data && s.processData && ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { s.data = s.data.replace( r20, "+" ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? s.accepts[ s.dataTypes[ 0 ] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { // Abort if not done already and return return jqXHR.abort(); } // Aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds completeDeferred.add( s.complete ); jqXHR.done( s.success ); jqXHR.fail( s.error ); // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // If request was aborted inside ajaxSend, stop there if ( completed ) { return jqXHR; } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = window.setTimeout( function() { jqXHR.abort( "timeout" ); }, s.timeout ); } try { completed = false; transport.send( requestHeaders, done ); } catch ( e ) { // Rethrow post-completion exceptions if ( completed ) { throw e; } // Propagate others as results done( -1, e ); } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } return jqXHR; }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } } ); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // Shift arguments if data argument was omitted if ( isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } // The url can be an options object (which then must have .url) return jQuery.ajax( jQuery.extend( { url: url, type: method, dataType: type, data: data, success: callback }, jQuery.isPlainObject( url ) && url ) ); }; } ); jQuery._evalUrl = function( url ) { return jQuery.ajax( { url: url, // Make this explicit, since user can override this through ajaxSetup (#11264) type: "GET", dataType: "script", cache: true, async: false, global: false, "throws": true } ); }; jQuery.fn.extend( { wrapAll: function( html ) { var wrap; if ( this[ 0 ] ) { if ( isFunction( html ) ) { html = html.call( this[ 0 ] ); } // The elements to wrap the target around wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); if ( this[ 0 ].parentNode ) { wrap.insertBefore( this[ 0 ] ); } wrap.map( function() { var elem = this; while ( elem.firstElementChild ) { elem = elem.firstElementChild; } return elem; } ).append( this ); } return this; }, wrapInner: function( html ) { if ( isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapInner( html.call( this, i ) ); } ); } return this.each( function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } } ); }, wrap: function( html ) { var htmlIsFunction = isFunction( html ); return this.each( function( i ) { jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); } ); }, unwrap: function( selector ) { this.parent( selector ).not( "body" ).each( function() { jQuery( this ).replaceWith( this.childNodes ); } ); return this; } } ); jQuery.expr.pseudos.hidden = function( elem ) { return !jQuery.expr.pseudos.visible( elem ); }; jQuery.expr.pseudos.visible = function( elem ) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; jQuery.ajaxSettings.xhr = function() { try { return new window.XMLHttpRequest(); } catch ( e ) {} }; var xhrSuccessStatus = { // File protocol always yields status code 0, assume 200 0: 200, // Support: IE <=9 only // #1450: sometimes IE returns 1223 when it should be 204 1223: 204 }, xhrSupported = jQuery.ajaxSettings.xhr(); support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); support.ajax = xhrSupported = !!xhrSupported; jQuery.ajaxTransport( function( options ) { var callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest if ( support.cors || xhrSupported && !options.crossDomain ) { return { send: function( headers, complete ) { var i, xhr = options.xhr(); xhr.open( options.type, options.url, options.async, options.username, options.password ); // Apply custom fields if provided if ( options.xhrFields ) { for ( i in options.xhrFields ) { xhr[ i ] = options.xhrFields[ i ]; } } // Override mime type if needed if ( options.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( options.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Set headers for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } // Callback callback = function( type ) { return function() { if ( callback ) { callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null; if ( type === "abort" ) { xhr.abort(); } else if ( type === "error" ) { // Support: IE <=9 only // On a manual native abort, IE9 throws // errors on any property access that is not readyState if ( typeof xhr.status !== "number" ) { complete( 0, "error" ); } else { complete( // File: protocol always yields status 0; see #8605, #14207 xhr.status, xhr.statusText ); } } else { complete( xhrSuccessStatus[ xhr.status ] || xhr.status, xhr.statusText, // Support: IE <=9 only // IE9 has no XHR2 but throws on binary (trac-11426) // For XHR2 non-text, let the caller handle it (gh-2498) ( xhr.responseType || "text" ) !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText }, xhr.getAllResponseHeaders() ); } } }; }; // Listen to events xhr.onload = callback(); errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); // Support: IE 9 only // Use onreadystatechange to replace onabort // to handle uncaught aborts if ( xhr.onabort !== undefined ) { xhr.onabort = errorCallback; } else { xhr.onreadystatechange = function() { // Check readyState before timeout as it changes if ( xhr.readyState === 4 ) { // Allow onerror to be called first, // but that will not handle a native abort // Also, save errorCallback to a variable // as xhr.onerror cannot be accessed window.setTimeout( function() { if ( callback ) { errorCallback(); } } ); } }; } // Create the abort callback callback = callback( "abort" ); try { // Do send the request (this may raise an exception) xhr.send( options.hasContent && options.data || null ); } catch ( e ) { // #14683: Only rethrow if this hasn't been notified as an error yet if ( callback ) { throw e; } } }, abort: function() { if ( callback ) { callback(); } } }; } } ); // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) jQuery.ajaxPrefilter( function( s ) { if ( s.crossDomain ) { s.contents.script = false; } } ); // Install script dataType jQuery.ajaxSetup( { accepts: { script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } } ); // Handle cache's special case and crossDomain jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; } } ); // Bind script tag hack transport jQuery.ajaxTransport( "script", function( s ) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, callback; return { send: function( _, complete ) { script = jQuery( "<script>" ).prop( { charset: s.scriptCharset, src: s.url } ).on( "load error", callback = function( evt ) { script.remove(); callback = null; if ( evt ) { complete( evt.type === "error" ? 404 : 200, evt.type ); } } ); // Use native DOM manipulation to avoid our domManip AJAX trickery document.head.appendChild( script[ 0 ] ); }, abort: function() { if ( callback ) { callback(); } } }; } } ); var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings jQuery.ajaxSetup( { jsonp: "callback", jsonpCallback: function() { var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); this[ callback ] = true; return callback; } } ); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : typeof s.data === "string" && ( s.contentType || "" ) .indexOf( "application/x-www-form-urlencoded" ) === 0 && rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data if ( jsonProp ) { s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); } else if ( s.jsonp !== false ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; } // Use data converter to retrieve json after script execution s.converters[ "script json" ] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; // Force json dataType s.dataTypes[ 0 ] = "json"; // Install callback overwritten = window[ callbackName ]; window[ callbackName ] = function() { responseContainer = arguments; }; // Clean-up function (fires after converters) jqXHR.always( function() { // If previous value didn't exist - remove it if ( overwritten === undefined ) { jQuery( window ).removeProp( callbackName ); // Otherwise restore preexisting value } else { window[ callbackName ] = overwritten; } // Save back as free if ( s[ callbackName ] ) { // Make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; // Save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response if ( responseContainer && isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; } ); // Delegate to script return "script"; } } ); // Support: Safari 8 only // In Safari 8 documents created via document.implementation.createHTMLDocument // collapse sibling forms: the second one becomes a child of the first one. // Because of that, this security measure has to be disabled in Safari 8. // https://bugs.webkit.org/show_bug.cgi?id=137337 support.createHTMLDocument = ( function() { var body = document.implementation.createHTMLDocument( "" ).body; body.innerHTML = "<form></form><form></form>"; return body.childNodes.length === 2; } )(); // Argument "data" should be string of html // context (optional): If specified, the fragment will be created in this context, // defaults to document // keepScripts (optional): If true, will include scripts passed in the html string jQuery.parseHTML = function( data, context, keepScripts ) { if ( typeof data !== "string" ) { return []; } if ( typeof context === "boolean" ) { keepScripts = context; context = false; } var base, parsed, scripts; if ( !context ) { // Stop scripts or inline event handlers from being executed immediately // by using document.implementation if ( support.createHTMLDocument ) { context = document.implementation.createHTMLDocument( "" ); // Set the base href for the created document // so any parsed elements with URLs // are based on the document's URL (gh-2965) base = context.createElement( "base" ); base.href = document.location.href; context.head.appendChild( base ); } else { context = document; } } parsed = rsingleTag.exec( data ); scripts = !keepScripts && []; // Single tag if ( parsed ) { return [ context.createElement( parsed[ 1 ] ) ]; } parsed = buildFragment( [ data ], context, scripts ); if ( scripts && scripts.length ) { jQuery( scripts ).remove(); } return jQuery.merge( [], parsed.childNodes ); }; /** * Load a url into a page */ jQuery.fn.load = function( url, params, callback ) { var selector, type, response, self = this, off = url.indexOf( " " ); if ( off > -1 ) { selector = stripAndCollapse( url.slice( off ) ); url = url.slice( 0, off ); } // If it's a function if ( isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( params && typeof params === "object" ) { type = "POST"; } // If we have elements to modify, make the request if ( self.length > 0 ) { jQuery.ajax( { url: url, // If "type" variable is undefined, then "GET" method will be used. // Make value of this field explicit since // user can override it through ajaxSetup method type: type || "GET", dataType: "html", data: params } ).done( function( responseText ) { // Save response for use in complete callback response = arguments; self.html( selector ? // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); // If the request succeeds, this function gets "data", "status", "jqXHR" // but they are ignored because response was set above. // If it fails, this function gets "jqXHR", "status", "error" } ).always( callback && function( jqXHR, status ) { self.each( function() { callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); } ); } ); } return this; }; // Attach a bunch of functions for handling common AJAX events jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { jQuery.fn[ type ] = function( fn ) { return this.on( type, fn ); }; } ); jQuery.expr.pseudos.animated = function( elem ) { return jQuery.grep( jQuery.timers, function( fn ) { return elem === fn.elem; } ).length; }; jQuery.offset = { setOffset: function( elem, options, i ) { var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css( elem, "position" ), curElem = jQuery( elem ), props = {}; // Set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } curOffset = curElem.offset(); curCSSTop = jQuery.css( elem, "top" ); curCSSLeft = jQuery.css( elem, "left" ); calculatePosition = ( position === "absolute" || position === "fixed" ) && ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; // Need to be able to calculate position if either // top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( isFunction( options ) ) { // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); } if ( options.top != null ) { props.top = ( options.top - curOffset.top ) + curTop; } if ( options.left != null ) { props.left = ( options.left - curOffset.left ) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend( { // offset() relates an element's border box to the document origin offset: function( options ) { // Preserve chaining for setter if ( arguments.length ) { return options === undefined ? this : this.each( function( i ) { jQuery.offset.setOffset( this, options, i ); } ); } var rect, win, elem = this[ 0 ]; if ( !elem ) { return; } // Return zeros for disconnected and hidden (display: none) elements (gh-2310) // Support: IE <=11 only // Running getBoundingClientRect on a // disconnected node in IE throws an error if ( !elem.getClientRects().length ) { return { top: 0, left: 0 }; } // Get document-relative position by adding viewport scroll to viewport-relative gBCR rect = elem.getBoundingClientRect(); win = elem.ownerDocument.defaultView; return { top: rect.top + win.pageYOffset, left: rect.left + win.pageXOffset }; }, // position() relates an element's margin box to its offset parent's padding box // This corresponds to the behavior of CSS absolute positioning position: function() { if ( !this[ 0 ] ) { return; } var offsetParent, offset, doc, elem = this[ 0 ], parentOffset = { top: 0, left: 0 }; // position:fixed elements are offset from the viewport, which itself always has zero offset if ( jQuery.css( elem, "position" ) === "fixed" ) { // Assume position:fixed implies availability of getBoundingClientRect offset = elem.getBoundingClientRect(); } else { offset = this.offset(); // Account for the *real* offset parent, which can be the document or its root element // when a statically positioned element is identified doc = elem.ownerDocument; offsetParent = elem.offsetParent || doc.documentElement; while ( offsetParent && ( offsetParent === doc.body || offsetParent === doc.documentElement ) && jQuery.css( offsetParent, "position" ) === "static" ) { offsetParent = offsetParent.parentNode; } if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { // Incorporate borders into its offset, since they are outside its content origin parentOffset = jQuery( offsetParent ).offset(); parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); } } // Subtract parent offsets and element margins return { top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) }; }, // This method will return documentElement in the following cases: // 1) For the element inside the iframe without offsetParent, this method will return // documentElement of the parent window // 2) For the hidden or detached element // 3) For body or html element, i.e. in case of the html node - it will return itself // // but those exceptions were never presented as a real life use-cases // and might be considered as more preferable results. // // This logic, however, is not guaranteed and can change at any point in the future offsetParent: function() { return this.map( function() { var offsetParent = this.offsetParent; while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { offsetParent = offsetParent.offsetParent; } return offsetParent || documentElement; } ); } } ); // Create scrollLeft and scrollTop methods jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { var top = "pageYOffset" === prop; jQuery.fn[ method ] = function( val ) { return access( this, function( elem, method, val ) { // Coalesce documents and windows var win; if ( isWindow( elem ) ) { win = elem; } else if ( elem.nodeType === 9 ) { win = elem.defaultView; } if ( val === undefined ) { return win ? win[ prop ] : elem[ method ]; } if ( win ) { win.scrollTo( !top ? val : win.pageXOffset, top ? val : win.pageYOffset ); } else { elem[ method ] = val; } }, method, val, arguments.length ); }; } ); // Support: Safari <=7 - 9.1, Chrome <=37 - 49 // Add the top/left cssHooks using jQuery.fn.position // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 // getComputedStyle returns percent when specified for top/left/bottom/right; // rather than make the css module depend on the offset module, just check for it here jQuery.each( [ "top", "left" ], function( i, prop ) { jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); // If curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; } } ); } ); // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); return access( this, function( elem, type, value ) { var doc; if ( isWindow( elem ) ) { // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) return funcName.indexOf( "outer" ) === 0 ? elem[ "inner" + name ] : elem.document.documentElement[ "client" + name ]; } // Get document width or height if ( elem.nodeType === 9 ) { doc = elem.documentElement; // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], // whichever is greatest return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], doc[ "client" + name ] ); } return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); }, type, chainable ? margin : undefined, chainable ); }; } ); } ); jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu" ).split( " " ), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; } ); jQuery.fn.extend( { hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } ); jQuery.fn.extend( { bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); } } ); // Bind a function to a context, optionally partially applying any // arguments. // jQuery.proxy is deprecated to promote standards (specifically Function#bind) // However, it is not slated for removal any time soon jQuery.proxy = function( fn, context ) { var tmp, args, proxy; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !isFunction( fn ) ) { return undefined; } // Simulated bind args = slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }; jQuery.holdReady = function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }; jQuery.isArray = Array.isArray; jQuery.parseJSON = JSON.parse; jQuery.nodeName = nodeName; jQuery.isFunction = isFunction; jQuery.isWindow = isWindow; jQuery.camelCase = camelCase; jQuery.type = toType; jQuery.now = Date.now; jQuery.isNumeric = function( obj ) { // As of jQuery 3.0, isNumeric is limited to // strings and numbers (primitives or objects) // that can be coerced to finite numbers (gh-2662) var type = jQuery.type( obj ); return ( type === "number" || type === "string" ) && // parseFloat NaNs numeric-cast false positives ("") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN !isNaN( obj - parseFloat( obj ) ); }; // Register as a named AMD module, since jQuery can be concatenated with other // files that may use define, but not via a proper concatenation script that // understands anonymous AMD modules. A named AMD is safest and most robust // way to register. Lowercase jquery is used because AMD module names are // derived from file names, and jQuery is normally delivered in a lowercase // file name. Do this after creating the global so that if an AMD module wants // to call noConflict to hide this version of jQuery, it will work. // Note that for maximum portability, libraries that are not jQuery should // declare themselves as anonymous modules, and avoid setting a global if an // AMD loader is present. jQuery is a special case. For more information, see // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon if ( true ) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { return jQuery; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } var // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$; jQuery.noConflict = function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }; // Expose jQuery and $ identifiers, even in AMD // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) if ( !noGlobal ) { window.jQuery = window.$ = jQuery; } return jQuery; } ); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(global) {/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.14.7 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined'; var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; var timeoutDuration = 0; for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { timeoutDuration = 1; break; } } function microtaskDebounce(fn) { var called = false; return function () { if (called) { return; } called = true; window.Promise.resolve().then(function () { called = false; fn(); }); }; } function taskDebounce(fn) { var scheduled = false; return function () { if (!scheduled) { scheduled = true; setTimeout(function () { scheduled = false; fn(); }, timeoutDuration); } }; } var supportsMicroTasks = isBrowser && window.Promise; /** * Create a debounced version of a method, that's asynchronously deferred * but called in the minimum time possible. * * @method * @memberof Popper.Utils * @argument {Function} fn * @returns {Function} */ var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; /** * Check if the given variable is a function * @method * @memberof Popper.Utils * @argument {Any} functionToCheck - variable to check * @returns {Boolean} answer to: is a function? */ function isFunction(functionToCheck) { var getType = {}; return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; } /** * Get CSS computed property of the given element * @method * @memberof Popper.Utils * @argument {Eement} element * @argument {String} property */ function getStyleComputedProperty(element, property) { if (element.nodeType !== 1) { return []; } // NOTE: 1 DOM access here var window = element.ownerDocument.defaultView; var css = window.getComputedStyle(element, null); return property ? css[property] : css; } /** * Returns the parentNode or the host of the element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} parent */ function getParentNode(element) { if (element.nodeName === 'HTML') { return element; } return element.parentNode || element.host; } /** * Returns the scrolling parent of the given element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} scroll parent */ function getScrollParent(element) { // Return body, `getScroll` will take care to get the correct `scrollTop` from it if (!element) { return document.body; } switch (element.nodeName) { case 'HTML': case 'BODY': return element.ownerDocument.body; case '#document': return element.body; } // Firefox want us to check `-x` and `-y` variations as well var _getStyleComputedProp = getStyleComputedProperty(element), overflow = _getStyleComputedProp.overflow, overflowX = _getStyleComputedProp.overflowX, overflowY = _getStyleComputedProp.overflowY; if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return element; } return getScrollParent(getParentNode(element)); } var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode); var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent); /** * Determines if the browser is Internet Explorer * @method * @memberof Popper.Utils * @param {Number} version to check * @returns {Boolean} isIE */ function isIE(version) { if (version === 11) { return isIE11; } if (version === 10) { return isIE10; } return isIE11 || isIE10; } /** * Returns the offset parent of the given element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} offset parent */ function getOffsetParent(element) { if (!element) { return document.documentElement; } var noOffsetParent = isIE(10) ? document.body : null; // NOTE: 1 DOM access here var offsetParent = element.offsetParent || null; // Skip hidden elements which don't have an offsetParent while (offsetParent === noOffsetParent && element.nextElementSibling) { offsetParent = (element = element.nextElementSibling).offsetParent; } var nodeName = offsetParent && offsetParent.nodeName; if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { return element ? element.ownerDocument.documentElement : document.documentElement; } // .offsetParent will return the closest TH, TD or TABLE in case // no offsetParent is present, I hate this job... if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { return getOffsetParent(offsetParent); } return offsetParent; } function isOffsetContainer(element) { var nodeName = element.nodeName; if (nodeName === 'BODY') { return false; } return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; } /** * Finds the root node (document, shadowDOM root) of the given element * @method * @memberof Popper.Utils * @argument {Element} node * @returns {Element} root node */ function getRoot(node) { if (node.parentNode !== null) { return getRoot(node.parentNode); } return node; } /** * Finds the offset parent common to the two provided nodes * @method * @memberof Popper.Utils * @argument {Element} element1 * @argument {Element} element2 * @returns {Element} common offset parent */ function findCommonOffsetParent(element1, element2) { // This check is needed to avoid errors in case one of the elements isn't defined for any reason if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { return document.documentElement; } // Here we make sure to give as "start" the element that comes first in the DOM var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; var start = order ? element1 : element2; var end = order ? element2 : element1; // Get common ancestor container var range = document.createRange(); range.setStart(start, 0); range.setEnd(end, 0); var commonAncestorContainer = range.commonAncestorContainer; // Both nodes are inside #document if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { if (isOffsetContainer(commonAncestorContainer)) { return commonAncestorContainer; } return getOffsetParent(commonAncestorContainer); } // one of the nodes is inside shadowDOM, find which one var element1root = getRoot(element1); if (element1root.host) { return findCommonOffsetParent(element1root.host, element2); } else { return findCommonOffsetParent(element1, getRoot(element2).host); } } /** * Gets the scroll value of the given element in the given side (top and left) * @method * @memberof Popper.Utils * @argument {Element} element * @argument {String} side `top` or `left` * @returns {number} amount of scrolled pixels */ function getScroll(element) { var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; var nodeName = element.nodeName; if (nodeName === 'BODY' || nodeName === 'HTML') { var html = element.ownerDocument.documentElement; var scrollingElement = element.ownerDocument.scrollingElement || html; return scrollingElement[upperSide]; } return element[upperSide]; } /* * Sum or subtract the element scroll values (left and top) from a given rect object * @method * @memberof Popper.Utils * @param {Object} rect - Rect object you want to change * @param {HTMLElement} element - The element from the function reads the scroll values * @param {Boolean} subtract - set to true if you want to subtract the scroll values * @return {Object} rect - The modifier rect object */ function includeScroll(rect, element) { var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); var modifier = subtract ? -1 : 1; rect.top += scrollTop * modifier; rect.bottom += scrollTop * modifier; rect.left += scrollLeft * modifier; rect.right += scrollLeft * modifier; return rect; } /* * Helper to detect borders of a given element * @method * @memberof Popper.Utils * @param {CSSStyleDeclaration} styles * Result of `getStyleComputedProperty` on the given element * @param {String} axis - `x` or `y` * @return {number} borders - The borders size of the given axis */ function getBordersSize(styles, axis) { var sideA = axis === 'x' ? 'Left' : 'Top'; var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); } function getSize(axis, body, html, computedStyle) { return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0); } function getWindowSizes(document) { var body = document.body; var html = document.documentElement; var computedStyle = isIE(10) && getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), width: getSize('Width', body, html, computedStyle) }; } var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; var createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var defineProperty = function (obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /** * Given element offsets, generate an output similar to getBoundingClientRect * @method * @memberof Popper.Utils * @argument {Object} offsets * @returns {Object} ClientRect like output */ function getClientRect(offsets) { return _extends({}, offsets, { right: offsets.left + offsets.width, bottom: offsets.top + offsets.height }); } /** * Get bounding client rect of given element * @method * @memberof Popper.Utils * @param {HTMLElement} element * @return {Object} client rect */ function getBoundingClientRect(element) { var rect = {}; // IE10 10 FIX: Please, don't ask, the element isn't // considered in DOM in some circumstances... // This isn't reproducible in IE10 compatibility mode of IE11 try { if (isIE(10)) { rect = element.getBoundingClientRect(); var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); rect.top += scrollTop; rect.left += scrollLeft; rect.bottom += scrollTop; rect.right += scrollLeft; } else { rect = element.getBoundingClientRect(); } } catch (e) {} var result = { left: rect.left, top: rect.top, width: rect.right - rect.left, height: rect.bottom - rect.top }; // subtract scrollbar size from sizes var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {}; var width = sizes.width || element.clientWidth || result.right - result.left; var height = sizes.height || element.clientHeight || result.bottom - result.top; var horizScrollbar = element.offsetWidth - width; var vertScrollbar = element.offsetHeight - height; // if an hypothetical scrollbar is detected, we must be sure it's not a `border` // we make this check conditional for performance reasons if (horizScrollbar || vertScrollbar) { var styles = getStyleComputedProperty(element); horizScrollbar -= getBordersSize(styles, 'x'); vertScrollbar -= getBordersSize(styles, 'y'); result.width -= horizScrollbar; result.height -= vertScrollbar; } return getClientRect(result); } function getOffsetRectRelativeToArbitraryNode(children, parent) { var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var isIE10 = isIE(10); var isHTML = parent.nodeName === 'HTML'; var childrenRect = getBoundingClientRect(children); var parentRect = getBoundingClientRect(parent); var scrollParent = getScrollParent(children); var styles = getStyleComputedProperty(parent); var borderTopWidth = parseFloat(styles.borderTopWidth, 10); var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); // In cases where the parent is fixed, we must ignore negative scroll in offset calc if (fixedPosition && isHTML) { parentRect.top = Math.max(parentRect.top, 0); parentRect.left = Math.max(parentRect.left, 0); } var offsets = getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, width: childrenRect.width, height: childrenRect.height }); offsets.marginTop = 0; offsets.marginLeft = 0; // Subtract margins of documentElement in case it's being used as parent // we do this only on HTML because it's the only element that behaves // differently when margins are applied to it. The margins are included in // the box of the documentElement, in the other cases not. if (!isIE10 && isHTML) { var marginTop = parseFloat(styles.marginTop, 10); var marginLeft = parseFloat(styles.marginLeft, 10); offsets.top -= borderTopWidth - marginTop; offsets.bottom -= borderTopWidth - marginTop; offsets.left -= borderLeftWidth - marginLeft; offsets.right -= borderLeftWidth - marginLeft; // Attach marginTop and marginLeft because in some circumstances we may need them offsets.marginTop = marginTop; offsets.marginLeft = marginLeft; } if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { offsets = includeScroll(offsets, parent); } return offsets; } function getViewportOffsetRectRelativeToArtbitraryNode(element) { var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var html = element.ownerDocument.documentElement; var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); var width = Math.max(html.clientWidth, window.innerWidth || 0); var height = Math.max(html.clientHeight, window.innerHeight || 0); var scrollTop = !excludeScroll ? getScroll(html) : 0; var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; var offset = { top: scrollTop - relativeOffset.top + relativeOffset.marginTop, left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, width: width, height: height }; return getClientRect(offset); } /** * Check if the given element is fixed or is inside a fixed parent * @method * @memberof Popper.Utils * @argument {Element} element * @argument {Element} customContainer * @returns {Boolean} answer to "isFixed?" */ function isFixed(element) { var nodeName = element.nodeName; if (nodeName === 'BODY' || nodeName === 'HTML') { return false; } if (getStyleComputedProperty(element, 'position') === 'fixed') { return true; } var parentNode = getParentNode(element); if (!parentNode) { return false; } return isFixed(parentNode); } /** * Finds the first parent of an element that has a transformed property defined * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} first transformed parent or documentElement */ function getFixedPositionOffsetParent(element) { // This check is needed to avoid errors in case one of the elements isn't defined for any reason if (!element || !element.parentElement || isIE()) { return document.documentElement; } var el = element.parentElement; while (el && getStyleComputedProperty(el, 'transform') === 'none') { el = el.parentElement; } return el || document.documentElement; } /** * Computed the boundaries limits and return them * @method * @memberof Popper.Utils * @param {HTMLElement} popper * @param {HTMLElement} reference * @param {number} padding * @param {HTMLElement} boundariesElement - Element used to define the boundaries * @param {Boolean} fixedPosition - Is in fixed position mode * @returns {Object} Coordinates of the boundaries */ function getBoundaries(popper, reference, padding, boundariesElement) { var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; // NOTE: 1 DOM access here var boundaries = { top: 0, left: 0 }; var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); // Handle viewport case if (boundariesElement === 'viewport') { boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); } else { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; if (boundariesElement === 'scrollParent') { boundariesNode = getScrollParent(getParentNode(reference)); if (boundariesNode.nodeName === 'BODY') { boundariesNode = popper.ownerDocument.documentElement; } } else if (boundariesElement === 'window') { boundariesNode = popper.ownerDocument.documentElement; } else { boundariesNode = boundariesElement; } var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { var _getWindowSizes = getWindowSizes(popper.ownerDocument), height = _getWindowSizes.height, width = _getWindowSizes.width; boundaries.top += offsets.top - offsets.marginTop; boundaries.bottom = height + offsets.top; boundaries.left += offsets.left - offsets.marginLeft; boundaries.right = width + offsets.left; } else { // for all the other DOM elements, this one is good boundaries = offsets; } } // Add paddings padding = padding || 0; var isPaddingNumber = typeof padding === 'number'; boundaries.left += isPaddingNumber ? padding : padding.left || 0; boundaries.top += isPaddingNumber ? padding : padding.top || 0; boundaries.right -= isPaddingNumber ? padding : padding.right || 0; boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; return boundaries; } function getArea(_ref) { var width = _ref.width, height = _ref.height; return width * height; } /** * Utility used to transform the `auto` placement to the placement with more * available space. * @method * @memberof Popper.Utils * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; if (placement.indexOf('auto') === -1) { return placement; } var boundaries = getBoundaries(popper, reference, padding, boundariesElement); var rects = { top: { width: boundaries.width, height: refRect.top - boundaries.top }, right: { width: boundaries.right - refRect.right, height: boundaries.height }, bottom: { width: boundaries.width, height: boundaries.bottom - refRect.bottom }, left: { width: refRect.left - boundaries.left, height: boundaries.height } }; var sortedAreas = Object.keys(rects).map(function (key) { return _extends({ key: key }, rects[key], { area: getArea(rects[key]) }); }).sort(function (a, b) { return b.area - a.area; }); var filteredAreas = sortedAreas.filter(function (_ref2) { var width = _ref2.width, height = _ref2.height; return width >= popper.clientWidth && height >= popper.clientHeight; }); var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; var variation = placement.split('-')[1]; return computedPlacement + (variation ? '-' + variation : ''); } /** * Get offsets to the reference element * @method * @memberof Popper.Utils * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) * @param {Element} fixedPosition - is in fixed position mode * @returns {Object} An object containing the offsets which will be applied to the popper */ function getReferenceOffsets(state, popper, reference) { var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); } /** * Get the outer sizes of the given element (offset size + margins) * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Object} object containing width and height properties */ function getOuterSizes(element) { var window = element.ownerDocument.defaultView; var styles = window.getComputedStyle(element); var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0); var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0); var result = { width: element.offsetWidth + y, height: element.offsetHeight + x }; return result; } /** * Get the opposite placement of the given one * @method * @memberof Popper.Utils * @argument {String} placement * @returns {String} flipped placement */ function getOppositePlacement(placement) { var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; return placement.replace(/left|right|bottom|top/g, function (matched) { return hash[matched]; }); } /** * Get offsets to the popper * @method * @memberof Popper.Utils * @param {Object} position - CSS position the Popper will get applied * @param {HTMLElement} popper - the popper element * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) * @param {String} placement - one of the valid placement options * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper */ function getPopperOffsets(popper, referenceOffsets, placement) { placement = placement.split('-')[0]; // Get popper node sizes var popperRect = getOuterSizes(popper); // Add position, width and height to our offsets object var popperOffsets = { width: popperRect.width, height: popperRect.height }; // depending by the popper placement we have to compute its offsets slightly differently var isHoriz = ['right', 'left'].indexOf(placement) !== -1; var mainSide = isHoriz ? 'top' : 'left'; var secondarySide = isHoriz ? 'left' : 'top'; var measurement = isHoriz ? 'height' : 'width'; var secondaryMeasurement = !isHoriz ? 'height' : 'width'; popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; if (placement === secondarySide) { popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; } else { popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; } return popperOffsets; } /** * Mimics the `find` method of Array * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1 */ function find(arr, check) { // use native find if supported if (Array.prototype.find) { return arr.find(check); } // use `filter` to obtain the same behavior of `find` return arr.filter(check)[0]; } /** * Return the index of the matching object * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1 */ function findIndex(arr, prop, value) { // use native findIndex if supported if (Array.prototype.findIndex) { return arr.findIndex(function (cur) { return cur[prop] === value; }); } // use `find` + `indexOf` if `findIndex` isn't supported var match = find(arr, function (obj) { return obj[prop] === value; }); return arr.indexOf(match); } /** * Loop trough the list of modifiers and run them in order, * each of them will then edit the data object. * @method * @memberof Popper.Utils * @param {dataObject} data * @param {Array} modifiers * @param {String} ends - Optional modifier name used as stopper * @returns {dataObject} */ function runModifiers(modifiers, data, ends) { var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); modifiersToRun.forEach(function (modifier) { if (modifier['function']) { // eslint-disable-line dot-notation console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); } var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation if (modifier.enabled && isFunction(fn)) { // Add properties to offsets to make them a complete clientRect object // we do this before each modifier to make sure the previous one doesn't // mess with these values data.offsets.popper = getClientRect(data.offsets.popper); data.offsets.reference = getClientRect(data.offsets.reference); data = fn(data, modifier); } }); return data; } /** * Updates the position of the popper, computing the new offsets and applying * the new style.<br /> * Prefer `scheduleUpdate` over `update` because of performance reasons. * @method * @memberof Popper */ function update() { // if popper is destroyed, don't perform any further update if (this.state.isDestroyed) { return; } var data = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: false, offsets: {} }; // compute reference element offsets data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement` data.originalPlacement = data.placement; data.positionFixed = this.options.positionFixed; // compute the popper offsets data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback // the other ones will call `onUpdate` callback if (!this.state.isCreated) { this.state.isCreated = true; this.options.onCreate(data); } else { this.options.onUpdate(data); } } /** * Helper used to know if the given modifier is enabled. * @method * @memberof Popper.Utils * @returns {Boolean} */ function isModifierEnabled(modifiers, modifierName) { return modifiers.some(function (_ref) { var name = _ref.name, enabled = _ref.enabled; return enabled && name === modifierName; }); } /** * Get the prefixed supported property name * @method * @memberof Popper.Utils * @argument {String} property (camelCase) * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) */ function getSupportedPropertyName(property) { var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; var upperProp = property.charAt(0).toUpperCase() + property.slice(1); for (var i = 0; i < prefixes.length; i++) { var prefix = prefixes[i]; var toCheck = prefix ? '' + prefix + upperProp : property; if (typeof document.body.style[toCheck] !== 'undefined') { return toCheck; } } return null; } /** * Destroys the popper. * @method * @memberof Popper */ function destroy() { this.state.isDestroyed = true; // touch DOM only if `applyStyle` modifier is enabled if (isModifierEnabled(this.modifiers, 'applyStyle')) { this.popper.removeAttribute('x-placement'); this.popper.style.position = ''; this.popper.style.top = ''; this.popper.style.left = ''; this.popper.style.right = ''; this.popper.style.bottom = ''; this.popper.style.willChange = ''; this.popper.style[getSupportedPropertyName('transform')] = ''; } this.disableEventListeners(); // remove the popper if user explicity asked for the deletion on destroy // do not use `remove` because IE11 doesn't support it if (this.options.removeOnDestroy) { this.popper.parentNode.removeChild(this.popper); } return this; } /** * Get the window associated with the element * @argument {Element} element * @returns {Window} */ function getWindow(element) { var ownerDocument = element.ownerDocument; return ownerDocument ? ownerDocument.defaultView : window; } function attachToScrollParents(scrollParent, event, callback, scrollParents) { var isBody = scrollParent.nodeName === 'BODY'; var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; target.addEventListener(event, callback, { passive: true }); if (!isBody) { attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); } scrollParents.push(target); } /** * Setup needed event listeners used to update the popper position * @method * @memberof Popper.Utils * @private */ function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(reference); attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); state.scrollElement = scrollElement; state.eventsEnabled = true; return state; } /** * It will add resize/scroll events and start recalculating * position of the popper element when they are triggered. * @method * @memberof Popper */ function enableEventListeners() { if (!this.state.eventsEnabled) { this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); } } /** * Remove event listeners used to update the popper position * @method * @memberof Popper.Utils * @private */ function removeEventListeners(reference, state) { // Remove resize event listener on window getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { target.removeEventListener('scroll', state.updateBound); }); // Reset state state.updateBound = null; state.scrollParents = []; state.scrollElement = null; state.eventsEnabled = false; return state; } /** * It will remove resize/scroll events and won't recalculate popper position * when they are triggered. It also won't trigger `onUpdate` callback anymore, * unless you call `update` method manually. * @method * @memberof Popper */ function disableEventListeners() { if (this.state.eventsEnabled) { cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } } /** * Tells if a given input is a number * @method * @memberof Popper.Utils * @param {*} input to check * @return {Boolean} */ function isNumeric(n) { return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); } /** * Set the style to the given popper * @method * @memberof Popper.Utils * @argument {Element} element - Element to apply the style to * @argument {Object} styles * Object with a list of properties and values which will be applied to the element */ function setStyles(element, styles) { Object.keys(styles).forEach(function (prop) { var unit = ''; // add unit if the value is numeric and is one of the following if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { unit = 'px'; } element.style[prop] = styles[prop] + unit; }); } /** * Set the attributes to the given popper * @method * @memberof Popper.Utils * @argument {Element} element - Element to apply the attributes to * @argument {Object} styles * Object with a list of properties and values which will be applied to the element */ function setAttributes(element, attributes) { Object.keys(attributes).forEach(function (prop) { var value = attributes[prop]; if (value !== false) { element.setAttribute(prop, attributes[prop]); } else { element.removeAttribute(prop); } }); } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} data.styles - List of style properties - values to apply to popper element * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element * @argument {Object} options - Modifiers configuration and options * @returns {Object} The same data object */ function applyStyle(data) { // any property present in `data.styles` will be applied to the popper, // in this way we can make the 3rd party modifiers add custom styles to it // Be aware, modifiers could override the properties defined in the previous // lines of this modifier! setStyles(data.instance.popper, data.styles); // any property present in `data.attributes` will be applied to the popper, // they will be set as HTML attributes of the element setAttributes(data.instance.popper, data.attributes); // if arrowElement is defined and arrowStyles has some properties if (data.arrowElement && Object.keys(data.arrowStyles).length) { setStyles(data.arrowElement, data.arrowStyles); } return data; } /** * Set the x-placement attribute before everything else because it could be used * to add margins to the popper margins needs to be calculated to get the * correct popper offsets. * @method * @memberof Popper.modifiers * @param {HTMLElement} reference - The reference element used to position the popper * @param {HTMLElement} popper - The HTML element used as popper * @param {Object} options - Popper.js options */ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { // compute reference element offsets var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); popper.setAttribute('x-placement', placement); // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); return options; } /** * @function * @memberof Popper.Utils * @argument {Object} data - The data object generated by `update` method * @argument {Boolean} shouldRound - If the offsets should be rounded at all * @returns {Object} The popper's position offsets rounded * * The tale of pixel-perfect positioning. It's still not 100% perfect, but as * good as it can be within reason. * Discussion here: https://github.com/FezVrasta/popper.js/pull/715 * * Low DPI screens cause a popper to be blurry if not using full pixels (Safari * as well on High DPI screens). * * Firefox prefers no rounding for positioning and does not have blurriness on * high DPI screens. * * Only horizontal placement and left/right values need to be considered. */ function getRoundedOffsets(data, shouldRound) { var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var round = Math.round, floor = Math.floor; var noRound = function noRound(v) { return v; }; var referenceWidth = round(reference.width); var popperWidth = round(popper.width); var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; var isVariation = data.placement.indexOf('-') !== -1; var sameWidthParity = referenceWidth % 2 === popperWidth % 2; var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1; var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor; var verticalToInteger = !shouldRound ? noRound : round; return { left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), top: verticalToInteger(popper.top), bottom: verticalToInteger(popper.bottom), right: horizontalToInteger(popper.right) }; } var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent); /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function computeStyle(data, options) { var x = options.x, y = options.y; var popper = data.offsets.popper; // Remove this legacy support in Popper.js v2 var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) { return modifier.name === 'applyStyle'; }).gpuAcceleration; if (legacyGpuAccelerationOption !== undefined) { console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); } var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; var offsetParent = getOffsetParent(data.instance.popper); var offsetParentRect = getBoundingClientRect(offsetParent); // Styles var styles = { position: popper.position }; var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox); var sideA = x === 'bottom' ? 'top' : 'bottom'; var sideB = y === 'right' ? 'left' : 'right'; // if gpuAcceleration is set to `true` and transform is supported, // we use `translate3d` to apply the position to the popper we // automatically use the supported prefixed version if needed var prefixedProperty = getSupportedPropertyName('transform'); // now, let's make a step back and look at this code closely (wtf?) // If the content of the popper grows once it's been positioned, it // may happen that the popper gets misplaced because of the new content // overflowing its reference element // To avoid this problem, we provide two options (x and y), which allow // the consumer to define the offset origin. // If we position a popper on top of a reference element, we can set // `x` to `top` to make the popper grow towards its top instead of // its bottom. var left = void 0, top = void 0; if (sideA === 'bottom') { // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar) // and not the bottom of the html element if (offsetParent.nodeName === 'HTML') { top = -offsetParent.clientHeight + offsets.bottom; } else { top = -offsetParentRect.height + offsets.bottom; } } else { top = offsets.top; } if (sideB === 'right') { if (offsetParent.nodeName === 'HTML') { left = -offsetParent.clientWidth + offsets.right; } else { left = -offsetParentRect.width + offsets.right; } } else { left = offsets.left; } if (gpuAcceleration && prefixedProperty) { styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; styles[sideA] = 0; styles[sideB] = 0; styles.willChange = 'transform'; } else { // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties var invertTop = sideA === 'bottom' ? -1 : 1; var invertLeft = sideB === 'right' ? -1 : 1; styles[sideA] = top * invertTop; styles[sideB] = left * invertLeft; styles.willChange = sideA + ', ' + sideB; } // Attributes var attributes = { 'x-placement': data.placement }; // Update `data` attributes, styles and arrowStyles data.attributes = _extends({}, attributes, data.attributes); data.styles = _extends({}, styles, data.styles); data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles); return data; } /** * Helper used to know if the given modifier depends from another one.<br /> * It checks if the needed modifier is listed and enabled. * @method * @memberof Popper.Utils * @param {Array} modifiers - list of modifiers * @param {String} requestingName - name of requesting modifier * @param {String} requestedName - name of requested modifier * @returns {Boolean} */ function isModifierRequired(modifiers, requestingName, requestedName) { var requesting = find(modifiers, function (_ref) { var name = _ref.name; return name === requestingName; }); var isRequired = !!requesting && modifiers.some(function (modifier) { return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; }); if (!isRequired) { var _requesting = '`' + requestingName + '`'; var requested = '`' + requestedName + '`'; console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); } return isRequired; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function arrow(data, options) { var _data$offsets$arrow; // arrow depends on keepTogether in order to work if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { return data; } var arrowElement = options.element; // if arrowElement is a string, suppose it's a CSS selector if (typeof arrowElement === 'string') { arrowElement = data.instance.popper.querySelector(arrowElement); // if arrowElement is not found, don't run the modifier if (!arrowElement) { return data; } } else { // if the arrowElement isn't a query selector we must check that the // provided DOM node is child of its popper node if (!data.instance.popper.contains(arrowElement)) { console.warn('WARNING: `arrow.element` must be child of its popper element!'); return data; } } var placement = data.placement.split('-')[0]; var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var isVertical = ['left', 'right'].indexOf(placement) !== -1; var len = isVertical ? 'height' : 'width'; var sideCapitalized = isVertical ? 'Top' : 'Left'; var side = sideCapitalized.toLowerCase(); var altSide = isVertical ? 'left' : 'top'; var opSide = isVertical ? 'bottom' : 'right'; var arrowElementSize = getOuterSizes(arrowElement)[len]; // // extends keepTogether behavior making sure the popper and its // reference have enough pixels in conjunction // // top/left side if (reference[opSide] - arrowElementSize < popper[side]) { data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); } // bottom/right side if (reference[side] + arrowElementSize > popper[opSide]) { data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; } data.offsets.popper = getClientRect(data.offsets.popper); // compute center of the popper var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; // Compute the sideValue using the updated popper offsets // take popper margin in account because we don't have this info available var css = getStyleComputedProperty(data.instance.popper); var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10); var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10); var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); data.arrowElement = arrowElement; data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); return data; } /** * Get the opposite placement variation of the given one * @method * @memberof Popper.Utils * @argument {String} placement variation * @returns {String} flipped placement variation */ function getOppositeVariation(variation) { if (variation === 'end') { return 'start'; } else if (variation === 'start') { return 'end'; } return variation; } /** * List of accepted placements to use as values of the `placement` option.<br /> * Valid placements are: * - `auto` * - `top` * - `right` * - `bottom` * - `left` * * Each placement can have a variation from this list: * - `-start` * - `-end` * * Variations are interpreted easily if you think of them as the left to right * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` * is right.<br /> * Vertically (`left` and `right`), `start` is top and `end` is bottom. * * Some valid examples are: * - `top-end` (on top of reference, right aligned) * - `right-start` (on right of reference, top aligned) * - `bottom` (on bottom, centered) * - `auto-end` (on the side with more space available, alignment depends by placement) * * @static * @type {Array} * @enum {String} * @readonly * @method placements * @memberof Popper */ var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; // Get rid of `auto` `auto-start` and `auto-end` var validPlacements = placements.slice(3); /** * Given an initial placement, returns all the subsequent placements * clockwise (or counter-clockwise). * * @method * @memberof Popper.Utils * @argument {String} placement - A valid placement (it accepts variations) * @argument {Boolean} counter - Set to true to walk the placements counterclockwise * @returns {Array} placements including their variations */ function clockwise(placement) { var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var index = validPlacements.indexOf(placement); var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); return counter ? arr.reverse() : arr; } var BEHAVIORS = { FLIP: 'flip', CLOCKWISE: 'clockwise', COUNTERCLOCKWISE: 'counterclockwise' }; /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function flip(data, options) { // if `inner` modifier is enabled, we can't use the `flip` modifier if (isModifierEnabled(data.instance.modifiers, 'inner')) { return data; } if (data.flipped && data.placement === data.originalPlacement) { // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides return data; } var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); var placement = data.placement.split('-')[0]; var placementOpposite = getOppositePlacement(placement); var variation = data.placement.split('-')[1] || ''; var flipOrder = []; switch (options.behavior) { case BEHAVIORS.FLIP: flipOrder = [placement, placementOpposite]; break; case BEHAVIORS.CLOCKWISE: flipOrder = clockwise(placement); break; case BEHAVIORS.COUNTERCLOCKWISE: flipOrder = clockwise(placement, true); break; default: flipOrder = options.behavior; } flipOrder.forEach(function (step, index) { if (placement !== step || flipOrder.length === index + 1) { return data; } placement = data.placement.split('-')[0]; placementOpposite = getOppositePlacement(placement); var popperOffsets = data.offsets.popper; var refOffsets = data.offsets.reference; // using floor because the reference offsets may contain decimals we are not going to consider here var floor = Math.floor; var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; // flip the variation if required var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); if (overlapsRef || overflowsBoundaries || flippedVariation) { // this boolean to detect any flip loop data.flipped = true; if (overlapsRef || overflowsBoundaries) { placement = flipOrder[index + 1]; } if (flippedVariation) { variation = getOppositeVariation(variation); } data.placement = placement + (variation ? '-' + variation : ''); // this object contains `position`, we want to preserve it along with // any additional property we may add in the future data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); data = runModifiers(data.instance.modifiers, data, 'flip'); } }); return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function keepTogether(data) { var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var placement = data.placement.split('-')[0]; var floor = Math.floor; var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; var side = isVertical ? 'right' : 'bottom'; var opSide = isVertical ? 'left' : 'top'; var measurement = isVertical ? 'width' : 'height'; if (popper[side] < floor(reference[opSide])) { data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; } if (popper[opSide] > floor(reference[side])) { data.offsets.popper[opSide] = floor(reference[side]); } return data; } /** * Converts a string containing value + unit into a px value number * @function * @memberof {modifiers~offset} * @private * @argument {String} str - Value + unit string * @argument {String} measurement - `height` or `width` * @argument {Object} popperOffsets * @argument {Object} referenceOffsets * @returns {Number|String} * Value in pixels, or original string if no values were extracted */ function toValue(str, measurement, popperOffsets, referenceOffsets) { // separate value from unit var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); var value = +split[1]; var unit = split[2]; // If it's not a number it's an operator, I guess if (!value) { return str; } if (unit.indexOf('%') === 0) { var element = void 0; switch (unit) { case '%p': element = popperOffsets; break; case '%': case '%r': default: element = referenceOffsets; } var rect = getClientRect(element); return rect[measurement] / 100 * value; } else if (unit === 'vh' || unit === 'vw') { // if is a vh or vw, we calculate the size based on the viewport var size = void 0; if (unit === 'vh') { size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); } else { size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); } return size / 100 * value; } else { // if is an explicit pixel unit, we get rid of the unit and keep the value // if is an implicit unit, it's px, and we return just the value return value; } } /** * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. * @function * @memberof {modifiers~offset} * @private * @argument {String} offset * @argument {Object} popperOffsets * @argument {Object} referenceOffsets * @argument {String} basePlacement * @returns {Array} a two cells array with x and y offsets in numbers */ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { var offsets = [0, 0]; // Use height if placement is left or right and index is 0 otherwise use width // in this way the first offset will use an axis and the second one // will use the other one var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; // Split the offset string to obtain a list of values and operands // The regex addresses values with the plus or minus sign in front (+10, -20, etc) var fragments = offset.split(/(\+|\-)/).map(function (frag) { return frag.trim(); }); // Detect if the offset string contains a pair of values or a single one // they could be separated by comma or space var divider = fragments.indexOf(find(fragments, function (frag) { return frag.search(/,|\s/) !== -1; })); if (fragments[divider] && fragments[divider].indexOf(',') === -1) { console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); } // If divider is found, we divide the list of values and operands to divide // them by ofset X and Y. var splitRegex = /\s*,\s*|\s+/; var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; // Convert the values with units to absolute pixels to allow our computations ops = ops.map(function (op, index) { // Most of the units rely on the orientation of the popper var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; var mergeWithPrevious = false; return op // This aggregates any `+` or `-` sign that aren't considered operators // e.g.: 10 + +5 => [10, +, +5] .reduce(function (a, b) { if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { a[a.length - 1] = b; mergeWithPrevious = true; return a; } else if (mergeWithPrevious) { a[a.length - 1] += b; mergeWithPrevious = false; return a; } else { return a.concat(b); } }, []) // Here we convert the string values into number values (in px) .map(function (str) { return toValue(str, measurement, popperOffsets, referenceOffsets); }); }); // Loop trough the offsets arrays and execute the operations ops.forEach(function (op, index) { op.forEach(function (frag, index2) { if (isNumeric(frag)) { offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); } }); }); return offsets; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @argument {Number|String} options.offset=0 * The offset value as described in the modifier description * @returns {Object} The data object, properly modified */ function offset(data, _ref) { var offset = _ref.offset; var placement = data.placement, _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var basePlacement = placement.split('-')[0]; var offsets = void 0; if (isNumeric(+offset)) { offsets = [+offset, 0]; } else { offsets = parseOffset(offset, popper, reference, basePlacement); } if (basePlacement === 'left') { popper.top += offsets[0]; popper.left -= offsets[1]; } else if (basePlacement === 'right') { popper.top += offsets[0]; popper.left += offsets[1]; } else if (basePlacement === 'top') { popper.left += offsets[0]; popper.top -= offsets[1]; } else if (basePlacement === 'bottom') { popper.left += offsets[0]; popper.top += offsets[1]; } data.popper = popper; return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function preventOverflow(data, options) { var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); // If offsetParent is the reference element, we really want to // go one step up and use the next offsetParent as reference to // avoid to make this modifier completely useless and look like broken if (data.instance.reference === boundariesElement) { boundariesElement = getOffsetParent(boundariesElement); } // NOTE: DOM access here // resets the popper's position so that the document size can be calculated excluding // the size of the popper element itself var transformProp = getSupportedPropertyName('transform'); var popperStyles = data.instance.popper.style; // assignment to help minification var top = popperStyles.top, left = popperStyles.left, transform = popperStyles[transformProp]; popperStyles.top = ''; popperStyles.left = ''; popperStyles[transformProp] = ''; var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); // NOTE: DOM access here // restores the original style properties after the offsets have been computed popperStyles.top = top; popperStyles.left = left; popperStyles[transformProp] = transform; options.boundaries = boundaries; var order = options.priority; var popper = data.offsets.popper; var check = { primary: function primary(placement) { var value = popper[placement]; if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { value = Math.max(popper[placement], boundaries[placement]); } return defineProperty({}, placement, value); }, secondary: function secondary(placement) { var mainSide = placement === 'right' ? 'left' : 'top'; var value = popper[mainSide]; if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); } return defineProperty({}, mainSide, value); } }; order.forEach(function (placement) { var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; popper = _extends({}, popper, check[side](placement)); }); data.offsets.popper = popper; return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function shift(data) { var placement = data.placement; var basePlacement = placement.split('-')[0]; var shiftvariation = placement.split('-')[1]; // if shift shiftvariation is specified, run the modifier if (shiftvariation) { var _data$offsets = data.offsets, reference = _data$offsets.reference, popper = _data$offsets.popper; var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; var side = isVertical ? 'left' : 'top'; var measurement = isVertical ? 'width' : 'height'; var shiftOffsets = { start: defineProperty({}, side, reference[side]), end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) }; data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]); } return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function hide(data) { if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { return data; } var refRect = data.offsets.reference; var bound = find(data.instance.modifiers, function (modifier) { return modifier.name === 'preventOverflow'; }).boundaries; if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === true) { return data; } data.hide = true; data.attributes['x-out-of-boundaries'] = ''; } else { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === false) { return data; } data.hide = false; data.attributes['x-out-of-boundaries'] = false; } return data; } /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function inner(data) { var placement = data.placement; var basePlacement = placement.split('-')[0]; var _data$offsets = data.offsets, popper = _data$offsets.popper, reference = _data$offsets.reference; var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); data.placement = getOppositePlacement(placement); data.offsets.popper = getClientRect(popper); return data; } /** * Modifier function, each modifier can have a function of this type assigned * to its `fn` property.<br /> * These functions will be called on each update, this means that you must * make sure they are performant enough to avoid performance bottlenecks. * * @function ModifierFn * @argument {dataObject} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {dataObject} The data object, properly modified */ /** * Modifiers are plugins used to alter the behavior of your poppers.<br /> * Popper.js uses a set of 9 modifiers to provide all the basic functionalities * needed by the library. * * Usually you don't want to override the `order`, `fn` and `onLoad` props. * All the other properties are configurations that could be tweaked. * @namespace modifiers */ var modifiers = { /** * Modifier used to shift the popper on the start or end of its reference * element.<br /> * It will read the variation of the `placement` property.<br /> * It can be one either `-end` or `-start`. * @memberof modifiers * @inner */ shift: { /** @prop {number} order=100 - Index used to define the order of execution */ order: 100, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: shift }, /** * The `offset` modifier can shift your popper on both its axis. * * It accepts the following units: * - `px` or unit-less, interpreted as pixels * - `%` or `%r`, percentage relative to the length of the reference element * - `%p`, percentage relative to the length of the popper element * - `vw`, CSS viewport width unit * - `vh`, CSS viewport height unit * * For length is intended the main axis relative to the placement of the popper.<br /> * This means that if the placement is `top` or `bottom`, the length will be the * `width`. In case of `left` or `right`, it will be the `height`. * * You can provide a single value (as `Number` or `String`), or a pair of values * as `String` divided by a comma or one (or more) white spaces.<br /> * The latter is a deprecated method because it leads to confusion and will be * removed in v2.<br /> * Additionally, it accepts additions and subtractions between different units. * Note that multiplications and divisions aren't supported. * * Valid examples are: * ``` * 10 * '10%' * '10, 10' * '10%, 10' * '10 + 10%' * '10 - 5vh + 3%' * '-10px + 5vh, 5px - 6%' * ``` * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap * > with their reference element, unfortunately, you will have to disable the `flip` modifier. * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373). * * @memberof modifiers * @inner */ offset: { /** @prop {number} order=200 - Index used to define the order of execution */ order: 200, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: offset, /** @prop {Number|String} offset=0 * The offset value as described in the modifier description */ offset: 0 }, /** * Modifier used to prevent the popper from being positioned outside the boundary. * * A scenario exists where the reference itself is not within the boundaries.<br /> * We can say it has "escaped the boundaries" — or just "escaped".<br /> * In this case we need to decide whether the popper should either: * * - detach from the reference and remain "trapped" in the boundaries, or * - if it should ignore the boundary and "escape with its reference" * * When `escapeWithReference` is set to`true` and reference is completely * outside its boundaries, the popper will overflow (or completely leave) * the boundaries in order to remain attached to the edge of the reference. * * @memberof modifiers * @inner */ preventOverflow: { /** @prop {number} order=300 - Index used to define the order of execution */ order: 300, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: preventOverflow, /** * @prop {Array} [priority=['left','right','top','bottom']] * Popper will try to prevent overflow following these priorities by default, * then, it could overflow on the left and on top of the `boundariesElement` */ priority: ['left', 'right', 'top', 'bottom'], /** * @prop {number} padding=5 * Amount of pixel used to define a minimum distance between the boundaries * and the popper. This makes sure the popper always has a little padding * between the edges of its container */ padding: 5, /** * @prop {String|HTMLElement} boundariesElement='scrollParent' * Boundaries used by the modifier. Can be `scrollParent`, `window`, * `viewport` or any DOM element. */ boundariesElement: 'scrollParent' }, /** * Modifier used to make sure the reference and its popper stay near each other * without leaving any gap between the two. Especially useful when the arrow is * enabled and you want to ensure that it points to its reference element. * It cares only about the first axis. You can still have poppers with margin * between the popper and its reference element. * @memberof modifiers * @inner */ keepTogether: { /** @prop {number} order=400 - Index used to define the order of execution */ order: 400, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: keepTogether }, /** * This modifier is used to move the `arrowElement` of the popper to make * sure it is positioned between the reference element and its popper element. * It will read the outer size of the `arrowElement` node to detect how many * pixels of conjunction are needed. * * It has no effect if no `arrowElement` is provided. * @memberof modifiers * @inner */ arrow: { /** @prop {number} order=500 - Index used to define the order of execution */ order: 500, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: arrow, /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ element: '[x-arrow]' }, /** * Modifier used to flip the popper's placement when it starts to overlap its * reference element. * * Requires the `preventOverflow` modifier before it in order to work. * * **NOTE:** this modifier will interrupt the current update cycle and will * restart it if it detects the need to flip the placement. * @memberof modifiers * @inner */ flip: { /** @prop {number} order=600 - Index used to define the order of execution */ order: 600, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: flip, /** * @prop {String|Array} behavior='flip' * The behavior used to change the popper's placement. It can be one of * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid * placements (with optional variations) */ behavior: 'flip', /** * @prop {number} padding=5 * The popper will flip if it hits the edges of the `boundariesElement` */ padding: 5, /** * @prop {String|HTMLElement} boundariesElement='viewport' * The element which will define the boundaries of the popper position. * The popper will never be placed outside of the defined boundaries * (except if `keepTogether` is enabled) */ boundariesElement: 'viewport' }, /** * Modifier used to make the popper flow toward the inner of the reference element. * By default, when this modifier is disabled, the popper will be placed outside * the reference element. * @memberof modifiers * @inner */ inner: { /** @prop {number} order=700 - Index used to define the order of execution */ order: 700, /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ enabled: false, /** @prop {ModifierFn} */ fn: inner }, /** * Modifier used to hide the popper when its reference element is outside of the * popper boundaries. It will set a `x-out-of-boundaries` attribute which can * be used to hide with a CSS selector the popper when its reference is * out of boundaries. * * Requires the `preventOverflow` modifier before it in order to work. * @memberof modifiers * @inner */ hide: { /** @prop {number} order=800 - Index used to define the order of execution */ order: 800, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: hide }, /** * Computes the style that will be applied to the popper element to gets * properly positioned. * * Note that this modifier will not touch the DOM, it just prepares the styles * so that `applyStyle` modifier can apply it. This separation is useful * in case you need to replace `applyStyle` with a custom implementation. * * This modifier has `850` as `order` value to maintain backward compatibility * with previous versions of Popper.js. Expect the modifiers ordering method * to change in future major versions of the library. * * @memberof modifiers * @inner */ computeStyle: { /** @prop {number} order=850 - Index used to define the order of execution */ order: 850, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: computeStyle, /** * @prop {Boolean} gpuAcceleration=true * If true, it uses the CSS 3D transformation to position the popper. * Otherwise, it will use the `top` and `left` properties */ gpuAcceleration: true, /** * @prop {string} [x='bottom'] * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. * Change this if your popper should grow in a direction different from `bottom` */ x: 'bottom', /** * @prop {string} [x='left'] * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. * Change this if your popper should grow in a direction different from `right` */ y: 'right' }, /** * Applies the computed styles to the popper element. * * All the DOM manipulations are limited to this modifier. This is useful in case * you want to integrate Popper.js inside a framework or view library and you * want to delegate all the DOM manipulations to it. * * Note that if you disable this modifier, you must make sure the popper element * has its position set to `absolute` before Popper.js can do its work! * * Just disable this modifier and define your own to achieve the desired effect. * * @memberof modifiers * @inner */ applyStyle: { /** @prop {number} order=900 - Index used to define the order of execution */ order: 900, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ fn: applyStyle, /** @prop {Function} */ onLoad: applyStyleOnLoad, /** * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier * @prop {Boolean} gpuAcceleration=true * If true, it uses the CSS 3D transformation to position the popper. * Otherwise, it will use the `top` and `left` properties */ gpuAcceleration: undefined } }; /** * The `dataObject` is an object containing all the information used by Popper.js. * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks. * @name dataObject * @property {Object} data.instance The Popper.js instance * @property {String} data.placement Placement applied to popper * @property {String} data.originalPlacement Placement originally defined on init * @property {Boolean} data.flipped True if popper has been flipped by flip modifier * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.boundaries Offsets of the popper boundaries * @property {Object} data.offsets The measurements of popper, reference and arrow elements * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 */ /** * Default options provided to Popper.js constructor.<br /> * These can be overridden using the `options` argument of Popper.js.<br /> * To override an option, simply pass an object with the same * structure of the `options` object, as the 3rd argument. For example: * ``` * new Popper(ref, pop, { * modifiers: { * preventOverflow: { enabled: false } * } * }) * ``` * @type {Object} * @static * @memberof Popper */ var Defaults = { /** * Popper's placement. * @prop {Popper.placements} placement='bottom' */ placement: 'bottom', /** * Set this to true if you want popper to position it self in 'fixed' mode * @prop {Boolean} positionFixed=false */ positionFixed: false, /** * Whether events (resize, scroll) are initially enabled. * @prop {Boolean} eventsEnabled=true */ eventsEnabled: true, /** * Set to true if you want to automatically remove the popper when * you call the `destroy` method. * @prop {Boolean} removeOnDestroy=false */ removeOnDestroy: false, /** * Callback called when the popper is created.<br /> * By default, it is set to no-op.<br /> * Access Popper.js instance with `data.instance`. * @prop {onCreate} */ onCreate: function onCreate() {}, /** * Callback called when the popper is updated. This callback is not called * on the initialization/creation of the popper, but only on subsequent * updates.<br /> * By default, it is set to no-op.<br /> * Access Popper.js instance with `data.instance`. * @prop {onUpdate} */ onUpdate: function onUpdate() {}, /** * List of modifiers used to modify the offsets before they are applied to the popper. * They provide most of the functionalities of Popper.js. * @prop {modifiers} */ modifiers: modifiers }; /** * @callback onCreate * @param {dataObject} data */ /** * @callback onUpdate * @param {dataObject} data */ // Utils // Methods var Popper = function () { /** * Creates a new Popper.js instance. * @class Popper * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper * @param {HTMLElement} popper - The HTML element used as the popper * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) * @return {Object} instance - The generated Popper.js instance */ function Popper(reference, popper) { var _this = this; var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; classCallCheck(this, Popper); this.scheduleUpdate = function () { return requestAnimationFrame(_this.update); }; // make update() debounced, so that it only runs at most once-per-tick this.update = debounce(this.update.bind(this)); // with {} we create a new object with the options inside it this.options = _extends({}, Popper.Defaults, options); // init state this.state = { isDestroyed: false, isCreated: false, scrollParents: [] }; // get reference and popper elements (allow jQuery wrappers) this.reference = reference && reference.jquery ? reference[0] : reference; this.popper = popper && popper.jquery ? popper[0] : popper; // Deep merge modifiers options this.options.modifiers = {}; Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); }); // Refactoring modifiers' list (Object => Array) this.modifiers = Object.keys(this.options.modifiers).map(function (name) { return _extends({ name: name }, _this.options.modifiers[name]); }) // sort the modifiers by order .sort(function (a, b) { return a.order - b.order; }); // modifiers have the ability to execute arbitrary code when Popper.js get inited // such code is executed in the same order of its modifier // they could add new properties to their options configuration // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! this.modifiers.forEach(function (modifierOptions) { if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); } }); // fire the first update to position the popper in the right place this.update(); var eventsEnabled = this.options.eventsEnabled; if (eventsEnabled) { // setup event listeners, they will take care of update the position in specific situations this.enableEventListeners(); } this.state.eventsEnabled = eventsEnabled; } // We can't use class properties because they don't get listed in the // class prototype and break stuff like Sinon stubs createClass(Popper, [{ key: 'update', value: function update$$1() { return update.call(this); } }, { key: 'destroy', value: function destroy$$1() { return destroy.call(this); } }, { key: 'enableEventListeners', value: function enableEventListeners$$1() { return enableEventListeners.call(this); } }, { key: 'disableEventListeners', value: function disableEventListeners$$1() { return disableEventListeners.call(this); } /** * Schedules an update. It will run on the next UI update available. * @method scheduleUpdate * @memberof Popper */ /** * Collection of utilities useful when writing custom modifiers. * Starting from version 1.7, this method is available only if you * include `popper-utils.js` before `popper.js`. * * **DEPRECATION**: This way to access PopperUtils is deprecated * and will be removed in v2! Use the PopperUtils module directly instead. * Due to the high instability of the methods contained in Utils, we can't * guarantee them to follow semver. Use them at your own risk! * @static * @private * @type {Object} * @deprecated since version 1.8 * @member Utils * @memberof Popper */ }]); return Popper; }(); /** * The `referenceObject` is an object that provides an interface compatible with Popper.js * and lets you use it as replacement of a real DOM node.<br /> * You can use this method to position a popper relatively to a set of coordinates * in case you don't have a DOM node to use as reference. * * ``` * new Popper(referenceObject, popperNode); * ``` * * NB: This feature isn't supported in Internet Explorer 10. * @name referenceObject * @property {Function} data.getBoundingClientRect * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. * @property {number} data.clientWidth * An ES6 getter that will return the width of the virtual reference element. * @property {number} data.clientHeight * An ES6 getter that will return the height of the virtual reference element. */ Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; Popper.placements = placements; Popper.Defaults = Defaults; /* harmony default export */ __webpack_exports__["default"] = (Popper); //# sourceMappingURL=popper.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2))) /***/ }), /* 2 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(4); module.exports = __webpack_require__(14); /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(5); __webpack_require__(8); __webpack_require__(9); __webpack_require__(10); __webpack_require__(11); __webpack_require__(12); __webpack_require__(13); /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ !function (a, b) { "use strict"; "object" == ( false ? "undefined" : _typeof(module)) && "object" == _typeof(module.exports) ? module.exports = a.document ? b(a, !0) : function (a) { if (!a.document) throw new Error("jQuery requires a window with a document");return b(a); } : b(a); }("undefined" != typeof window ? window : this, function (a, b) { "use strict"; var c = [], d = a.document, e = Object.getPrototypeOf, f = c.slice, g = c.concat, h = c.push, i = c.indexOf, j = {}, k = j.toString, l = j.hasOwnProperty, m = l.toString, n = m.call(Object), o = {};function p(a, b) { b = b || d;var c = b.createElement("script");c.text = a, b.head.appendChild(c).parentNode.removeChild(c); }var q = "3.2.1", r = function r(a, b) { return new r.fn.init(a, b); }, s = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, t = /^-ms-/, u = /-([a-z])/g, v = function v(a, b) { return b.toUpperCase(); };r.fn = r.prototype = { jquery: q, constructor: r, length: 0, toArray: function toArray() { return f.call(this); }, get: function get(a) { return null == a ? f.call(this) : a < 0 ? this[a + this.length] : this[a]; }, pushStack: function pushStack(a) { var b = r.merge(this.constructor(), a);return b.prevObject = this, b; }, each: function each(a) { return r.each(this, a); }, map: function map(a) { return this.pushStack(r.map(this, function (b, c) { return a.call(b, c, b); })); }, slice: function slice() { return this.pushStack(f.apply(this, arguments)); }, first: function first() { return this.eq(0); }, last: function last() { return this.eq(-1); }, eq: function eq(a) { var b = this.length, c = +a + (a < 0 ? b : 0);return this.pushStack(c >= 0 && c < b ? [this[c]] : []); }, end: function end() { return this.prevObject || this.constructor(); }, push: h, sort: c.sort, splice: c.splice }, r.extend = r.fn.extend = function () { var a, b, c, d, e, f, g = arguments[0] || {}, h = 1, i = arguments.length, j = !1;for ("boolean" == typeof g && (j = g, g = arguments[h] || {}, h++), "object" == (typeof g === "undefined" ? "undefined" : _typeof(g)) || r.isFunction(g) || (g = {}), h === i && (g = this, h--); h < i; h++) { if (null != (a = arguments[h])) for (b in a) { c = g[b], d = a[b], g !== d && (j && d && (r.isPlainObject(d) || (e = Array.isArray(d))) ? (e ? (e = !1, f = c && Array.isArray(c) ? c : []) : f = c && r.isPlainObject(c) ? c : {}, g[b] = r.extend(j, f, d)) : void 0 !== d && (g[b] = d)); } }return g; }, r.extend({ expando: "jQuery" + (q + Math.random()).replace(/\D/g, ""), isReady: !0, error: function error(a) { throw new Error(a); }, noop: function noop() {}, isFunction: function isFunction(a) { return "function" === r.type(a); }, isWindow: function isWindow(a) { return null != a && a === a.window; }, isNumeric: function isNumeric(a) { var b = r.type(a);return ("number" === b || "string" === b) && !isNaN(a - parseFloat(a)); }, isPlainObject: function isPlainObject(a) { var b, c;return !(!a || "[object Object]" !== k.call(a)) && (!(b = e(a)) || (c = l.call(b, "constructor") && b.constructor, "function" == typeof c && m.call(c) === n)); }, isEmptyObject: function isEmptyObject(a) { var b;for (b in a) { return !1; }return !0; }, type: function type(a) { return null == a ? a + "" : "object" == (typeof a === "undefined" ? "undefined" : _typeof(a)) || "function" == typeof a ? j[k.call(a)] || "object" : typeof a === "undefined" ? "undefined" : _typeof(a); }, globalEval: function globalEval(a) { p(a); }, camelCase: function camelCase(a) { return a.replace(t, "ms-").replace(u, v); }, each: function each(a, b) { var c, d = 0;if (w(a)) { for (c = a.length; d < c; d++) { if (b.call(a[d], d, a[d]) === !1) break; } } else for (d in a) { if (b.call(a[d], d, a[d]) === !1) break; }return a; }, trim: function trim(a) { return null == a ? "" : (a + "").replace(s, ""); }, makeArray: function makeArray(a, b) { var c = b || [];return null != a && (w(Object(a)) ? r.merge(c, "string" == typeof a ? [a] : a) : h.call(c, a)), c; }, inArray: function inArray(a, b, c) { return null == b ? -1 : i.call(b, a, c); }, merge: function merge(a, b) { for (var c = +b.length, d = 0, e = a.length; d < c; d++) { a[e++] = b[d]; }return a.length = e, a; }, grep: function grep(a, b, c) { for (var d, e = [], f = 0, g = a.length, h = !c; f < g; f++) { d = !b(a[f], f), d !== h && e.push(a[f]); }return e; }, map: function map(a, b, c) { var d, e, f = 0, h = [];if (w(a)) for (d = a.length; f < d; f++) { e = b(a[f], f, c), null != e && h.push(e); } else for (f in a) { e = b(a[f], f, c), null != e && h.push(e); }return g.apply([], h); }, guid: 1, proxy: function proxy(a, b) { var c, d, e;if ("string" == typeof b && (c = a[b], b = a, a = c), r.isFunction(a)) return d = f.call(arguments, 2), e = function e() { return a.apply(b || this, d.concat(f.call(arguments))); }, e.guid = a.guid = a.guid || r.guid++, e; }, now: Date.now, support: o }), "function" == typeof Symbol && (r.fn[Symbol.iterator] = c[Symbol.iterator]), r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (a, b) { j["[object " + b + "]"] = b.toLowerCase(); });function w(a) { var b = !!a && "length" in a && a.length, c = r.type(a);return "function" !== c && !r.isWindow(a) && ("array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a); }var x = function (a) { var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u = "sizzle" + 1 * new Date(), v = a.document, w = 0, x = 0, y = ha(), z = ha(), A = ha(), B = function B(a, b) { return a === b && (l = !0), 0; }, C = {}.hasOwnProperty, D = [], E = D.pop, F = D.push, G = D.push, H = D.slice, I = function I(a, b) { for (var c = 0, d = a.length; c < d; c++) { if (a[c] === b) return c; }return -1; }, J = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", K = "[\\x20\\t\\r\\n\\f]", L = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", M = "\\[" + K + "*(" + L + ")(?:" + K + "*([*^$|!~]?=)" + K + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + L + "))|)" + K + "*\\]", N = ":(" + L + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + M + ")*)|.*)\\)|)", O = new RegExp(K + "+", "g"), P = new RegExp("^" + K + "+|((?:^|[^\\\\])(?:\\\\.)*)" + K + "+$", "g"), Q = new RegExp("^" + K + "*," + K + "*"), R = new RegExp("^" + K + "*([>+~]|" + K + ")" + K + "*"), S = new RegExp("=" + K + "*([^\\]'\"]*?)" + K + "*\\]", "g"), T = new RegExp(N), U = new RegExp("^" + L + "$"), V = { ID: new RegExp("^#(" + L + ")"), CLASS: new RegExp("^\\.(" + L + ")"), TAG: new RegExp("^(" + L + "|[*])"), ATTR: new RegExp("^" + M), PSEUDO: new RegExp("^" + N), CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + K + "*(even|odd|(([+-]|)(\\d*)n|)" + K + "*(?:([+-]|)" + K + "*(\\d+)|))" + K + "*\\)|)", "i"), bool: new RegExp("^(?:" + J + ")$", "i"), needsContext: new RegExp("^" + K + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + K + "*((?:-\\d)?\\d*)" + K + "*\\)|)(?=[^-]|$)", "i") }, W = /^(?:input|select|textarea|button)$/i, X = /^h\d$/i, Y = /^[^{]+\{\s*\[native \w/, Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, $ = /[+~]/, _ = new RegExp("\\\\([\\da-f]{1,6}" + K + "?|(" + K + ")|.)", "ig"), aa = function aa(a, b, c) { var d = "0x" + b - 65536;return d !== d || c ? b : d < 0 ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320); }, ba = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, ca = function ca(a, b) { return b ? "\0" === a ? "\uFFFD" : a.slice(0, -1) + "\\" + a.charCodeAt(a.length - 1).toString(16) + " " : "\\" + a; }, da = function da() { m(); }, ea = ta(function (a) { return a.disabled === !0 && ("form" in a || "label" in a); }, { dir: "parentNode", next: "legend" });try { G.apply(D = H.call(v.childNodes), v.childNodes), D[v.childNodes.length].nodeType; } catch (fa) { G = { apply: D.length ? function (a, b) { F.apply(a, H.call(b)); } : function (a, b) { var c = a.length, d = 0;while (a[c++] = b[d++]) {}a.length = c - 1; } }; }function ga(a, b, d, e) { var f, h, j, k, l, o, r, s = b && b.ownerDocument, w = b ? b.nodeType : 9;if (d = d || [], "string" != typeof a || !a || 1 !== w && 9 !== w && 11 !== w) return d;if (!e && ((b ? b.ownerDocument || b : v) !== n && m(b), b = b || n, p)) { if (11 !== w && (l = Z.exec(a))) if (f = l[1]) { if (9 === w) { if (!(j = b.getElementById(f))) return d;if (j.id === f) return d.push(j), d; } else if (s && (j = s.getElementById(f)) && t(b, j) && j.id === f) return d.push(j), d; } else { if (l[2]) return G.apply(d, b.getElementsByTagName(a)), d;if ((f = l[3]) && c.getElementsByClassName && b.getElementsByClassName) return G.apply(d, b.getElementsByClassName(f)), d; }if (c.qsa && !A[a + " "] && (!q || !q.test(a))) { if (1 !== w) s = b, r = a;else if ("object" !== b.nodeName.toLowerCase()) { (k = b.getAttribute("id")) ? k = k.replace(ba, ca) : b.setAttribute("id", k = u), o = g(a), h = o.length;while (h--) { o[h] = "#" + k + " " + sa(o[h]); }r = o.join(","), s = $.test(a) && qa(b.parentNode) || b; }if (r) try { return G.apply(d, s.querySelectorAll(r)), d; } catch (x) {} finally { k === u && b.removeAttribute("id"); } } }return i(a.replace(P, "$1"), b, d, e); }function ha() { var a = [];function b(c, e) { return a.push(c + " ") > d.cacheLength && delete b[a.shift()], b[c + " "] = e; }return b; }function ia(a) { return a[u] = !0, a; }function ja(a) { var b = n.createElement("fieldset");try { return !!a(b); } catch (c) { return !1; } finally { b.parentNode && b.parentNode.removeChild(b), b = null; } }function ka(a, b) { var c = a.split("|"), e = c.length;while (e--) { d.attrHandle[c[e]] = b; } }function la(a, b) { var c = b && a, d = c && 1 === a.nodeType && 1 === b.nodeType && a.sourceIndex - b.sourceIndex;if (d) return d;if (c) while (c = c.nextSibling) { if (c === b) return -1; }return a ? 1 : -1; }function ma(a) { return function (b) { var c = b.nodeName.toLowerCase();return "input" === c && b.type === a; }; }function na(a) { return function (b) { var c = b.nodeName.toLowerCase();return ("input" === c || "button" === c) && b.type === a; }; }function oa(a) { return function (b) { return "form" in b ? b.parentNode && b.disabled === !1 ? "label" in b ? "label" in b.parentNode ? b.parentNode.disabled === a : b.disabled === a : b.isDisabled === a || b.isDisabled !== !a && ea(b) === a : b.disabled === a : "label" in b && b.disabled === a; }; }function pa(a) { return ia(function (b) { return b = +b, ia(function (c, d) { var e, f = a([], c.length, b), g = f.length;while (g--) { c[e = f[g]] && (c[e] = !(d[e] = c[e])); } }); }); }function qa(a) { return a && "undefined" != typeof a.getElementsByTagName && a; }c = ga.support = {}, f = ga.isXML = function (a) { var b = a && (a.ownerDocument || a).documentElement;return !!b && "HTML" !== b.nodeName; }, m = ga.setDocument = function (a) { var b, e, g = a ? a.ownerDocument || a : v;return g !== n && 9 === g.nodeType && g.documentElement ? (n = g, o = n.documentElement, p = !f(n), v !== n && (e = n.defaultView) && e.top !== e && (e.addEventListener ? e.addEventListener("unload", da, !1) : e.attachEvent && e.attachEvent("onunload", da)), c.attributes = ja(function (a) { return a.className = "i", !a.getAttribute("className"); }), c.getElementsByTagName = ja(function (a) { return a.appendChild(n.createComment("")), !a.getElementsByTagName("*").length; }), c.getElementsByClassName = Y.test(n.getElementsByClassName), c.getById = ja(function (a) { return o.appendChild(a).id = u, !n.getElementsByName || !n.getElementsByName(u).length; }), c.getById ? (d.filter.ID = function (a) { var b = a.replace(_, aa);return function (a) { return a.getAttribute("id") === b; }; }, d.find.ID = function (a, b) { if ("undefined" != typeof b.getElementById && p) { var c = b.getElementById(a);return c ? [c] : []; } }) : (d.filter.ID = function (a) { var b = a.replace(_, aa);return function (a) { var c = "undefined" != typeof a.getAttributeNode && a.getAttributeNode("id");return c && c.value === b; }; }, d.find.ID = function (a, b) { if ("undefined" != typeof b.getElementById && p) { var c, d, e, f = b.getElementById(a);if (f) { if (c = f.getAttributeNode("id"), c && c.value === a) return [f];e = b.getElementsByName(a), d = 0;while (f = e[d++]) { if (c = f.getAttributeNode("id"), c && c.value === a) return [f]; } }return []; } }), d.find.TAG = c.getElementsByTagName ? function (a, b) { return "undefined" != typeof b.getElementsByTagName ? b.getElementsByTagName(a) : c.qsa ? b.querySelectorAll(a) : void 0; } : function (a, b) { var c, d = [], e = 0, f = b.getElementsByTagName(a);if ("*" === a) { while (c = f[e++]) { 1 === c.nodeType && d.push(c); }return d; }return f; }, d.find.CLASS = c.getElementsByClassName && function (a, b) { if ("undefined" != typeof b.getElementsByClassName && p) return b.getElementsByClassName(a); }, r = [], q = [], (c.qsa = Y.test(n.querySelectorAll)) && (ja(function (a) { o.appendChild(a).innerHTML = "<a id='" + u + "'></a><select id='" + u + "-\r\\' msallowcapture=''><option selected=''></option></select>", a.querySelectorAll("[msallowcapture^='']").length && q.push("[*^$]=" + K + "*(?:''|\"\")"), a.querySelectorAll("[selected]").length || q.push("\\[" + K + "*(?:value|" + J + ")"), a.querySelectorAll("[id~=" + u + "-]").length || q.push("~="), a.querySelectorAll(":checked").length || q.push(":checked"), a.querySelectorAll("a#" + u + "+*").length || q.push(".#.+[+~]"); }), ja(function (a) { a.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b = n.createElement("input");b.setAttribute("type", "hidden"), a.appendChild(b).setAttribute("name", "D"), a.querySelectorAll("[name=d]").length && q.push("name" + K + "*[*^$|!~]?="), 2 !== a.querySelectorAll(":enabled").length && q.push(":enabled", ":disabled"), o.appendChild(a).disabled = !0, 2 !== a.querySelectorAll(":disabled").length && q.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), q.push(",.*:"); })), (c.matchesSelector = Y.test(s = o.matches || o.webkitMatchesSelector || o.mozMatchesSelector || o.oMatchesSelector || o.msMatchesSelector)) && ja(function (a) { c.disconnectedMatch = s.call(a, "*"), s.call(a, "[s!='']:x"), r.push("!=", N); }), q = q.length && new RegExp(q.join("|")), r = r.length && new RegExp(r.join("|")), b = Y.test(o.compareDocumentPosition), t = b || Y.test(o.contains) ? function (a, b) { var c = 9 === a.nodeType ? a.documentElement : a, d = b && b.parentNode;return a === d || !(!d || 1 !== d.nodeType || !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d))); } : function (a, b) { if (b) while (b = b.parentNode) { if (b === a) return !0; }return !1; }, B = b ? function (a, b) { if (a === b) return l = !0, 0;var d = !a.compareDocumentPosition - !b.compareDocumentPosition;return d ? d : (d = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1, 1 & d || !c.sortDetached && b.compareDocumentPosition(a) === d ? a === n || a.ownerDocument === v && t(v, a) ? -1 : b === n || b.ownerDocument === v && t(v, b) ? 1 : k ? I(k, a) - I(k, b) : 0 : 4 & d ? -1 : 1); } : function (a, b) { if (a === b) return l = !0, 0;var c, d = 0, e = a.parentNode, f = b.parentNode, g = [a], h = [b];if (!e || !f) return a === n ? -1 : b === n ? 1 : e ? -1 : f ? 1 : k ? I(k, a) - I(k, b) : 0;if (e === f) return la(a, b);c = a;while (c = c.parentNode) { g.unshift(c); }c = b;while (c = c.parentNode) { h.unshift(c); }while (g[d] === h[d]) { d++; }return d ? la(g[d], h[d]) : g[d] === v ? -1 : h[d] === v ? 1 : 0; }, n) : n; }, ga.matches = function (a, b) { return ga(a, null, null, b); }, ga.matchesSelector = function (a, b) { if ((a.ownerDocument || a) !== n && m(a), b = b.replace(S, "='$1']"), c.matchesSelector && p && !A[b + " "] && (!r || !r.test(b)) && (!q || !q.test(b))) try { var d = s.call(a, b);if (d || c.disconnectedMatch || a.document && 11 !== a.document.nodeType) return d; } catch (e) {}return ga(b, n, null, [a]).length > 0; }, ga.contains = function (a, b) { return (a.ownerDocument || a) !== n && m(a), t(a, b); }, ga.attr = function (a, b) { (a.ownerDocument || a) !== n && m(a);var e = d.attrHandle[b.toLowerCase()], f = e && C.call(d.attrHandle, b.toLowerCase()) ? e(a, b, !p) : void 0;return void 0 !== f ? f : c.attributes || !p ? a.getAttribute(b) : (f = a.getAttributeNode(b)) && f.specified ? f.value : null; }, ga.escape = function (a) { return (a + "").replace(ba, ca); }, ga.error = function (a) { throw new Error("Syntax error, unrecognized expression: " + a); }, ga.uniqueSort = function (a) { var b, d = [], e = 0, f = 0;if (l = !c.detectDuplicates, k = !c.sortStable && a.slice(0), a.sort(B), l) { while (b = a[f++]) { b === a[f] && (e = d.push(f)); }while (e--) { a.splice(d[e], 1); } }return k = null, a; }, e = ga.getText = function (a) { var b, c = "", d = 0, f = a.nodeType;if (f) { if (1 === f || 9 === f || 11 === f) { if ("string" == typeof a.textContent) return a.textContent;for (a = a.firstChild; a; a = a.nextSibling) { c += e(a); } } else if (3 === f || 4 === f) return a.nodeValue; } else while (b = a[d++]) { c += e(b); }return c; }, d = ga.selectors = { cacheLength: 50, createPseudo: ia, match: V, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling" } }, preFilter: { ATTR: function ATTR(a) { return a[1] = a[1].replace(_, aa), a[3] = (a[3] || a[4] || a[5] || "").replace(_, aa), "~=" === a[2] && (a[3] = " " + a[3] + " "), a.slice(0, 4); }, CHILD: function CHILD(a) { return a[1] = a[1].toLowerCase(), "nth" === a[1].slice(0, 3) ? (a[3] || ga.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && ga.error(a[0]), a; }, PSEUDO: function PSEUDO(a) { var b, c = !a[6] && a[2];return V.CHILD.test(a[0]) ? null : (a[3] ? a[2] = a[4] || a[5] || "" : c && T.test(c) && (b = g(c, !0)) && (b = c.indexOf(")", c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3)); } }, filter: { TAG: function TAG(a) { var b = a.replace(_, aa).toLowerCase();return "*" === a ? function () { return !0; } : function (a) { return a.nodeName && a.nodeName.toLowerCase() === b; }; }, CLASS: function CLASS(a) { var b = y[a + " "];return b || (b = new RegExp("(^|" + K + ")" + a + "(" + K + "|$)")) && y(a, function (a) { return b.test("string" == typeof a.className && a.className || "undefined" != typeof a.getAttribute && a.getAttribute("class") || ""); }); }, ATTR: function ATTR(a, b, c) { return function (d) { var e = ga.attr(d, a);return null == e ? "!=" === b : !b || (e += "", "=" === b ? e === c : "!=" === b ? e !== c : "^=" === b ? c && 0 === e.indexOf(c) : "*=" === b ? c && e.indexOf(c) > -1 : "$=" === b ? c && e.slice(-c.length) === c : "~=" === b ? (" " + e.replace(O, " ") + " ").indexOf(c) > -1 : "|=" === b && (e === c || e.slice(0, c.length + 1) === c + "-")); }; }, CHILD: function CHILD(a, b, c, d, e) { var f = "nth" !== a.slice(0, 3), g = "last" !== a.slice(-4), h = "of-type" === b;return 1 === d && 0 === e ? function (a) { return !!a.parentNode; } : function (b, c, i) { var j, k, l, m, n, o, p = f !== g ? "nextSibling" : "previousSibling", q = b.parentNode, r = h && b.nodeName.toLowerCase(), s = !i && !h, t = !1;if (q) { if (f) { while (p) { m = b;while (m = m[p]) { if (h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) return !1; }o = p = "only" === a && !o && "nextSibling"; }return !0; }if (o = [g ? q.firstChild : q.lastChild], g && s) { m = q, l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), j = k[a] || [], n = j[0] === w && j[1], t = n && j[2], m = n && q.childNodes[n];while (m = ++n && m && m[p] || (t = n = 0) || o.pop()) { if (1 === m.nodeType && ++t && m === b) { k[a] = [w, n, t];break; } } } else if (s && (m = b, l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), j = k[a] || [], n = j[0] === w && j[1], t = n), t === !1) while (m = ++n && m && m[p] || (t = n = 0) || o.pop()) { if ((h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) && ++t && (s && (l = m[u] || (m[u] = {}), k = l[m.uniqueID] || (l[m.uniqueID] = {}), k[a] = [w, t]), m === b)) break; }return t -= e, t === d || t % d === 0 && t / d >= 0; } }; }, PSEUDO: function PSEUDO(a, b) { var c, e = d.pseudos[a] || d.setFilters[a.toLowerCase()] || ga.error("unsupported pseudo: " + a);return e[u] ? e(b) : e.length > 1 ? (c = [a, a, "", b], d.setFilters.hasOwnProperty(a.toLowerCase()) ? ia(function (a, c) { var d, f = e(a, b), g = f.length;while (g--) { d = I(a, f[g]), a[d] = !(c[d] = f[g]); } }) : function (a) { return e(a, 0, c); }) : e; } }, pseudos: { not: ia(function (a) { var b = [], c = [], d = h(a.replace(P, "$1"));return d[u] ? ia(function (a, b, c, e) { var f, g = d(a, null, e, []), h = a.length;while (h--) { (f = g[h]) && (a[h] = !(b[h] = f)); } }) : function (a, e, f) { return b[0] = a, d(b, null, f, c), b[0] = null, !c.pop(); }; }), has: ia(function (a) { return function (b) { return ga(a, b).length > 0; }; }), contains: ia(function (a) { return a = a.replace(_, aa), function (b) { return (b.textContent || b.innerText || e(b)).indexOf(a) > -1; }; }), lang: ia(function (a) { return U.test(a || "") || ga.error("unsupported lang: " + a), a = a.replace(_, aa).toLowerCase(), function (b) { var c;do { if (c = p ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang")) return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + "-"); } while ((b = b.parentNode) && 1 === b.nodeType);return !1; }; }), target: function target(b) { var c = a.location && a.location.hash;return c && c.slice(1) === b.id; }, root: function root(a) { return a === o; }, focus: function focus(a) { return a === n.activeElement && (!n.hasFocus || n.hasFocus()) && !!(a.type || a.href || ~a.tabIndex); }, enabled: oa(!1), disabled: oa(!0), checked: function checked(a) { var b = a.nodeName.toLowerCase();return "input" === b && !!a.checked || "option" === b && !!a.selected; }, selected: function selected(a) { return a.parentNode && a.parentNode.selectedIndex, a.selected === !0; }, empty: function empty(a) { for (a = a.firstChild; a; a = a.nextSibling) { if (a.nodeType < 6) return !1; }return !0; }, parent: function parent(a) { return !d.pseudos.empty(a); }, header: function header(a) { return X.test(a.nodeName); }, input: function input(a) { return W.test(a.nodeName); }, button: function button(a) { var b = a.nodeName.toLowerCase();return "input" === b && "button" === a.type || "button" === b; }, text: function text(a) { var b;return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase()); }, first: pa(function () { return [0]; }), last: pa(function (a, b) { return [b - 1]; }), eq: pa(function (a, b, c) { return [c < 0 ? c + b : c]; }), even: pa(function (a, b) { for (var c = 0; c < b; c += 2) { a.push(c); }return a; }), odd: pa(function (a, b) { for (var c = 1; c < b; c += 2) { a.push(c); }return a; }), lt: pa(function (a, b, c) { for (var d = c < 0 ? c + b : c; --d >= 0;) { a.push(d); }return a; }), gt: pa(function (a, b, c) { for (var d = c < 0 ? c + b : c; ++d < b;) { a.push(d); }return a; }) } }, d.pseudos.nth = d.pseudos.eq;for (b in { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) { d.pseudos[b] = ma(b); }for (b in { submit: !0, reset: !0 }) { d.pseudos[b] = na(b); }function ra() {}ra.prototype = d.filters = d.pseudos, d.setFilters = new ra(), g = ga.tokenize = function (a, b) { var c, e, f, g, h, i, j, k = z[a + " "];if (k) return b ? 0 : k.slice(0);h = a, i = [], j = d.preFilter;while (h) { c && !(e = Q.exec(h)) || (e && (h = h.slice(e[0].length) || h), i.push(f = [])), c = !1, (e = R.exec(h)) && (c = e.shift(), f.push({ value: c, type: e[0].replace(P, " ") }), h = h.slice(c.length));for (g in d.filter) { !(e = V[g].exec(h)) || j[g] && !(e = j[g](e)) || (c = e.shift(), f.push({ value: c, type: g, matches: e }), h = h.slice(c.length)); }if (!c) break; }return b ? h.length : h ? ga.error(a) : z(a, i).slice(0); };function sa(a) { for (var b = 0, c = a.length, d = ""; b < c; b++) { d += a[b].value; }return d; }function ta(a, b, c) { var d = b.dir, e = b.next, f = e || d, g = c && "parentNode" === f, h = x++;return b.first ? function (b, c, e) { while (b = b[d]) { if (1 === b.nodeType || g) return a(b, c, e); }return !1; } : function (b, c, i) { var j, k, l, m = [w, h];if (i) { while (b = b[d]) { if ((1 === b.nodeType || g) && a(b, c, i)) return !0; } } else while (b = b[d]) { if (1 === b.nodeType || g) if (l = b[u] || (b[u] = {}), k = l[b.uniqueID] || (l[b.uniqueID] = {}), e && e === b.nodeName.toLowerCase()) b = b[d] || b;else { if ((j = k[f]) && j[0] === w && j[1] === h) return m[2] = j[2];if (k[f] = m, m[2] = a(b, c, i)) return !0; } }return !1; }; }function ua(a) { return a.length > 1 ? function (b, c, d) { var e = a.length;while (e--) { if (!a[e](b, c, d)) return !1; }return !0; } : a[0]; }function va(a, b, c) { for (var d = 0, e = b.length; d < e; d++) { ga(a, b[d], c); }return c; }function wa(a, b, c, d, e) { for (var f, g = [], h = 0, i = a.length, j = null != b; h < i; h++) { (f = a[h]) && (c && !c(f, d, e) || (g.push(f), j && b.push(h))); }return g; }function xa(a, b, c, d, e, f) { return d && !d[u] && (d = xa(d)), e && !e[u] && (e = xa(e, f)), ia(function (f, g, h, i) { var j, k, l, m = [], n = [], o = g.length, p = f || va(b || "*", h.nodeType ? [h] : h, []), q = !a || !f && b ? p : wa(p, m, a, h, i), r = c ? e || (f ? a : o || d) ? [] : g : q;if (c && c(q, r, h, i), d) { j = wa(r, n), d(j, [], h, i), k = j.length;while (k--) { (l = j[k]) && (r[n[k]] = !(q[n[k]] = l)); } }if (f) { if (e || a) { if (e) { j = [], k = r.length;while (k--) { (l = r[k]) && j.push(q[k] = l); }e(null, r = [], j, i); }k = r.length;while (k--) { (l = r[k]) && (j = e ? I(f, l) : m[k]) > -1 && (f[j] = !(g[j] = l)); } } } else r = wa(r === g ? r.splice(o, r.length) : r), e ? e(null, g, r, i) : G.apply(g, r); }); }function ya(a) { for (var b, c, e, f = a.length, g = d.relative[a[0].type], h = g || d.relative[" "], i = g ? 1 : 0, k = ta(function (a) { return a === b; }, h, !0), l = ta(function (a) { return I(b, a) > -1; }, h, !0), m = [function (a, c, d) { var e = !g && (d || c !== j) || ((b = c).nodeType ? k(a, c, d) : l(a, c, d));return b = null, e; }]; i < f; i++) { if (c = d.relative[a[i].type]) m = [ta(ua(m), c)];else { if (c = d.filter[a[i].type].apply(null, a[i].matches), c[u]) { for (e = ++i; e < f; e++) { if (d.relative[a[e].type]) break; }return xa(i > 1 && ua(m), i > 1 && sa(a.slice(0, i - 1).concat({ value: " " === a[i - 2].type ? "*" : "" })).replace(P, "$1"), c, i < e && ya(a.slice(i, e)), e < f && ya(a = a.slice(e)), e < f && sa(a)); }m.push(c); } }return ua(m); }function za(a, b) { var c = b.length > 0, e = a.length > 0, f = function f(_f, g, h, i, k) { var l, o, q, r = 0, s = "0", t = _f && [], u = [], v = j, x = _f || e && d.find.TAG("*", k), y = w += null == v ? 1 : Math.random() || .1, z = x.length;for (k && (j = g === n || g || k); s !== z && null != (l = x[s]); s++) { if (e && l) { o = 0, g || l.ownerDocument === n || (m(l), h = !p);while (q = a[o++]) { if (q(l, g || n, h)) { i.push(l);break; } }k && (w = y); }c && ((l = !q && l) && r--, _f && t.push(l)); }if (r += s, c && s !== r) { o = 0;while (q = b[o++]) { q(t, u, g, h); }if (_f) { if (r > 0) while (s--) { t[s] || u[s] || (u[s] = E.call(i)); }u = wa(u); }G.apply(i, u), k && !_f && u.length > 0 && r + b.length > 1 && ga.uniqueSort(i); }return k && (w = y, j = v), t; };return c ? ia(f) : f; }return h = ga.compile = function (a, b) { var c, d = [], e = [], f = A[a + " "];if (!f) { b || (b = g(a)), c = b.length;while (c--) { f = ya(b[c]), f[u] ? d.push(f) : e.push(f); }f = A(a, za(e, d)), f.selector = a; }return f; }, i = ga.select = function (a, b, c, e) { var f, i, j, k, l, m = "function" == typeof a && a, n = !e && g(a = m.selector || a);if (c = c || [], 1 === n.length) { if (i = n[0] = n[0].slice(0), i.length > 2 && "ID" === (j = i[0]).type && 9 === b.nodeType && p && d.relative[i[1].type]) { if (b = (d.find.ID(j.matches[0].replace(_, aa), b) || [])[0], !b) return c;m && (b = b.parentNode), a = a.slice(i.shift().value.length); }f = V.needsContext.test(a) ? 0 : i.length;while (f--) { if (j = i[f], d.relative[k = j.type]) break;if ((l = d.find[k]) && (e = l(j.matches[0].replace(_, aa), $.test(i[0].type) && qa(b.parentNode) || b))) { if (i.splice(f, 1), a = e.length && sa(i), !a) return G.apply(c, e), c;break; } } }return (m || h(a, n))(e, b, !p, c, !b || $.test(a) && qa(b.parentNode) || b), c; }, c.sortStable = u.split("").sort(B).join("") === u, c.detectDuplicates = !!l, m(), c.sortDetached = ja(function (a) { return 1 & a.compareDocumentPosition(n.createElement("fieldset")); }), ja(function (a) { return a.innerHTML = "<a href='#'></a>", "#" === a.firstChild.getAttribute("href"); }) || ka("type|href|height|width", function (a, b, c) { if (!c) return a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2); }), c.attributes && ja(function (a) { return a.innerHTML = "<input/>", a.firstChild.setAttribute("value", ""), "" === a.firstChild.getAttribute("value"); }) || ka("value", function (a, b, c) { if (!c && "input" === a.nodeName.toLowerCase()) return a.defaultValue; }), ja(function (a) { return null == a.getAttribute("disabled"); }) || ka(J, function (a, b, c) { var d;if (!c) return a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null; }), ga; }(a);r.find = x, r.expr = x.selectors, r.expr[":"] = r.expr.pseudos, r.uniqueSort = r.unique = x.uniqueSort, r.text = x.getText, r.isXMLDoc = x.isXML, r.contains = x.contains, r.escapeSelector = x.escape;var y = function y(a, b, c) { var d = [], e = void 0 !== c;while ((a = a[b]) && 9 !== a.nodeType) { if (1 === a.nodeType) { if (e && r(a).is(c)) break;d.push(a); } }return d; }, z = function z(a, b) { for (var c = []; a; a = a.nextSibling) { 1 === a.nodeType && a !== b && c.push(a); }return c; }, A = r.expr.match.needsContext;function B(a, b) { return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase(); }var C = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i, D = /^.[^:#\[\.,]*$/;function E(a, b, c) { return r.isFunction(b) ? r.grep(a, function (a, d) { return !!b.call(a, d, a) !== c; }) : b.nodeType ? r.grep(a, function (a) { return a === b !== c; }) : "string" != typeof b ? r.grep(a, function (a) { return i.call(b, a) > -1 !== c; }) : D.test(b) ? r.filter(b, a, c) : (b = r.filter(b, a), r.grep(a, function (a) { return i.call(b, a) > -1 !== c && 1 === a.nodeType; })); }r.filter = function (a, b, c) { var d = b[0];return c && (a = ":not(" + a + ")"), 1 === b.length && 1 === d.nodeType ? r.find.matchesSelector(d, a) ? [d] : [] : r.find.matches(a, r.grep(b, function (a) { return 1 === a.nodeType; })); }, r.fn.extend({ find: function find(a) { var b, c, d = this.length, e = this;if ("string" != typeof a) return this.pushStack(r(a).filter(function () { for (b = 0; b < d; b++) { if (r.contains(e[b], this)) return !0; } }));for (c = this.pushStack([]), b = 0; b < d; b++) { r.find(a, e[b], c); }return d > 1 ? r.uniqueSort(c) : c; }, filter: function filter(a) { return this.pushStack(E(this, a || [], !1)); }, not: function not(a) { return this.pushStack(E(this, a || [], !0)); }, is: function is(a) { return !!E(this, "string" == typeof a && A.test(a) ? r(a) : a || [], !1).length; } });var F, G = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, H = r.fn.init = function (a, b, c) { var e, f;if (!a) return this;if (c = c || F, "string" == typeof a) { if (e = "<" === a[0] && ">" === a[a.length - 1] && a.length >= 3 ? [null, a, null] : G.exec(a), !e || !e[1] && b) return !b || b.jquery ? (b || c).find(a) : this.constructor(b).find(a);if (e[1]) { if (b = b instanceof r ? b[0] : b, r.merge(this, r.parseHTML(e[1], b && b.nodeType ? b.ownerDocument || b : d, !0)), C.test(e[1]) && r.isPlainObject(b)) for (e in b) { r.isFunction(this[e]) ? this[e](b[e]) : this.attr(e, b[e]); }return this; }return f = d.getElementById(e[2]), f && (this[0] = f, this.length = 1), this; }return a.nodeType ? (this[0] = a, this.length = 1, this) : r.isFunction(a) ? void 0 !== c.ready ? c.ready(a) : a(r) : r.makeArray(a, this); };H.prototype = r.fn, F = r(d);var I = /^(?:parents|prev(?:Until|All))/, J = { children: !0, contents: !0, next: !0, prev: !0 };r.fn.extend({ has: function has(a) { var b = r(a, this), c = b.length;return this.filter(function () { for (var a = 0; a < c; a++) { if (r.contains(this, b[a])) return !0; } }); }, closest: function closest(a, b) { var c, d = 0, e = this.length, f = [], g = "string" != typeof a && r(a);if (!A.test(a)) for (; d < e; d++) { for (c = this[d]; c && c !== b; c = c.parentNode) { if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && r.find.matchesSelector(c, a))) { f.push(c);break; } } }return this.pushStack(f.length > 1 ? r.uniqueSort(f) : f); }, index: function index(a) { return a ? "string" == typeof a ? i.call(r(a), this[0]) : i.call(this, a.jquery ? a[0] : a) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1; }, add: function add(a, b) { return this.pushStack(r.uniqueSort(r.merge(this.get(), r(a, b)))); }, addBack: function addBack(a) { return this.add(null == a ? this.prevObject : this.prevObject.filter(a)); } });function K(a, b) { while ((a = a[b]) && 1 !== a.nodeType) {}return a; }r.each({ parent: function parent(a) { var b = a.parentNode;return b && 11 !== b.nodeType ? b : null; }, parents: function parents(a) { return y(a, "parentNode"); }, parentsUntil: function parentsUntil(a, b, c) { return y(a, "parentNode", c); }, next: function next(a) { return K(a, "nextSibling"); }, prev: function prev(a) { return K(a, "previousSibling"); }, nextAll: function nextAll(a) { return y(a, "nextSibling"); }, prevAll: function prevAll(a) { return y(a, "previousSibling"); }, nextUntil: function nextUntil(a, b, c) { return y(a, "nextSibling", c); }, prevUntil: function prevUntil(a, b, c) { return y(a, "previousSibling", c); }, siblings: function siblings(a) { return z((a.parentNode || {}).firstChild, a); }, children: function children(a) { return z(a.firstChild); }, contents: function contents(a) { return B(a, "iframe") ? a.contentDocument : (B(a, "template") && (a = a.content || a), r.merge([], a.childNodes)); } }, function (a, b) { r.fn[a] = function (c, d) { var e = r.map(this, b, c);return "Until" !== a.slice(-5) && (d = c), d && "string" == typeof d && (e = r.filter(d, e)), this.length > 1 && (J[a] || r.uniqueSort(e), I.test(a) && e.reverse()), this.pushStack(e); }; });var L = /[^\x20\t\r\n\f]+/g;function M(a) { var b = {};return r.each(a.match(L) || [], function (a, c) { b[c] = !0; }), b; }r.Callbacks = function (a) { a = "string" == typeof a ? M(a) : r.extend({}, a);var b, c, d, e, f = [], g = [], h = -1, i = function i() { for (e = e || a.once, d = b = !0; g.length; h = -1) { c = g.shift();while (++h < f.length) { f[h].apply(c[0], c[1]) === !1 && a.stopOnFalse && (h = f.length, c = !1); } }a.memory || (c = !1), b = !1, e && (f = c ? [] : ""); }, j = { add: function add() { return f && (c && !b && (h = f.length - 1, g.push(c)), function d(b) { r.each(b, function (b, c) { r.isFunction(c) ? a.unique && j.has(c) || f.push(c) : c && c.length && "string" !== r.type(c) && d(c); }); }(arguments), c && !b && i()), this; }, remove: function remove() { return r.each(arguments, function (a, b) { var c;while ((c = r.inArray(b, f, c)) > -1) { f.splice(c, 1), c <= h && h--; } }), this; }, has: function has(a) { return a ? r.inArray(a, f) > -1 : f.length > 0; }, empty: function empty() { return f && (f = []), this; }, disable: function disable() { return e = g = [], f = c = "", this; }, disabled: function disabled() { return !f; }, lock: function lock() { return e = g = [], c || b || (f = c = ""), this; }, locked: function locked() { return !!e; }, fireWith: function fireWith(a, c) { return e || (c = c || [], c = [a, c.slice ? c.slice() : c], g.push(c), b || i()), this; }, fire: function fire() { return j.fireWith(this, arguments), this; }, fired: function fired() { return !!d; } };return j; };function N(a) { return a; }function O(a) { throw a; }function P(a, b, c, d) { var e;try { a && r.isFunction(e = a.promise) ? e.call(a).done(b).fail(c) : a && r.isFunction(e = a.then) ? e.call(a, b, c) : b.apply(void 0, [a].slice(d)); } catch (a) { c.apply(void 0, [a]); } }r.extend({ Deferred: function Deferred(b) { var c = [["notify", "progress", r.Callbacks("memory"), r.Callbacks("memory"), 2], ["resolve", "done", r.Callbacks("once memory"), r.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", r.Callbacks("once memory"), r.Callbacks("once memory"), 1, "rejected"]], d = "pending", e = { state: function state() { return d; }, always: function always() { return f.done(arguments).fail(arguments), this; }, "catch": function _catch(a) { return e.then(null, a); }, pipe: function pipe() { var a = arguments;return r.Deferred(function (b) { r.each(c, function (c, d) { var e = r.isFunction(a[d[4]]) && a[d[4]];f[d[1]](function () { var a = e && e.apply(this, arguments);a && r.isFunction(a.promise) ? a.promise().progress(b.notify).done(b.resolve).fail(b.reject) : b[d[0] + "With"](this, e ? [a] : arguments); }); }), a = null; }).promise(); }, then: function then(b, d, e) { var f = 0;function g(b, c, d, e) { return function () { var h = this, i = arguments, j = function j() { var a, j;if (!(b < f)) { if (a = d.apply(h, i), a === c.promise()) throw new TypeError("Thenable self-resolution");j = a && ("object" == (typeof a === "undefined" ? "undefined" : _typeof(a)) || "function" == typeof a) && a.then, r.isFunction(j) ? e ? j.call(a, g(f, c, N, e), g(f, c, O, e)) : (f++, j.call(a, g(f, c, N, e), g(f, c, O, e), g(f, c, N, c.notifyWith))) : (d !== N && (h = void 0, i = [a]), (e || c.resolveWith)(h, i)); } }, k = e ? j : function () { try { j(); } catch (a) { r.Deferred.exceptionHook && r.Deferred.exceptionHook(a, k.stackTrace), b + 1 >= f && (d !== O && (h = void 0, i = [a]), c.rejectWith(h, i)); } };b ? k() : (r.Deferred.getStackHook && (k.stackTrace = r.Deferred.getStackHook()), a.setTimeout(k)); }; }return r.Deferred(function (a) { c[0][3].add(g(0, a, r.isFunction(e) ? e : N, a.notifyWith)), c[1][3].add(g(0, a, r.isFunction(b) ? b : N)), c[2][3].add(g(0, a, r.isFunction(d) ? d : O)); }).promise(); }, promise: function promise(a) { return null != a ? r.extend(a, e) : e; } }, f = {};return r.each(c, function (a, b) { var g = b[2], h = b[5];e[b[1]] = g.add, h && g.add(function () { d = h; }, c[3 - a][2].disable, c[0][2].lock), g.add(b[3].fire), f[b[0]] = function () { return f[b[0] + "With"](this === f ? void 0 : this, arguments), this; }, f[b[0] + "With"] = g.fireWith; }), e.promise(f), b && b.call(f, f), f; }, when: function when(a) { var b = arguments.length, c = b, d = Array(c), e = f.call(arguments), g = r.Deferred(), h = function h(a) { return function (c) { d[a] = this, e[a] = arguments.length > 1 ? f.call(arguments) : c, --b || g.resolveWith(d, e); }; };if (b <= 1 && (P(a, g.done(h(c)).resolve, g.reject, !b), "pending" === g.state() || r.isFunction(e[c] && e[c].then))) return g.then();while (c--) { P(e[c], h(c), g.reject); }return g.promise(); } });var Q = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook = function (b, c) { a.console && a.console.warn && b && Q.test(b.name) && a.console.warn("jQuery.Deferred exception: " + b.message, b.stack, c); }, r.readyException = function (b) { a.setTimeout(function () { throw b; }); };var R = r.Deferred();r.fn.ready = function (a) { return R.then(a)["catch"](function (a) { r.readyException(a); }), this; }, r.extend({ isReady: !1, readyWait: 1, ready: function ready(a) { (a === !0 ? --r.readyWait : r.isReady) || (r.isReady = !0, a !== !0 && --r.readyWait > 0 || R.resolveWith(d, [r])); } }), r.ready.then = R.then;function S() { d.removeEventListener("DOMContentLoaded", S), a.removeEventListener("load", S), r.ready(); }"complete" === d.readyState || "loading" !== d.readyState && !d.documentElement.doScroll ? a.setTimeout(r.ready) : (d.addEventListener("DOMContentLoaded", S), a.addEventListener("load", S));var T = function T(a, b, c, d, e, f, g) { var h = 0, i = a.length, j = null == c;if ("object" === r.type(c)) { e = !0;for (h in c) { T(a, b, h, c[h], !0, f, g); } } else if (void 0 !== d && (e = !0, r.isFunction(d) || (g = !0), j && (g ? (b.call(a, d), b = null) : (j = b, b = function b(a, _b, c) { return j.call(r(a), c); })), b)) for (; h < i; h++) { b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c))); }return e ? a : j ? b.call(a) : i ? b(a[0], c) : f; }, U = function U(a) { return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType; };function V() { this.expando = r.expando + V.uid++; }V.uid = 1, V.prototype = { cache: function cache(a) { var b = a[this.expando];return b || (b = {}, U(a) && (a.nodeType ? a[this.expando] = b : Object.defineProperty(a, this.expando, { value: b, configurable: !0 }))), b; }, set: function set(a, b, c) { var d, e = this.cache(a);if ("string" == typeof b) e[r.camelCase(b)] = c;else for (d in b) { e[r.camelCase(d)] = b[d]; }return e; }, get: function get(a, b) { return void 0 === b ? this.cache(a) : a[this.expando] && a[this.expando][r.camelCase(b)]; }, access: function access(a, b, c) { return void 0 === b || b && "string" == typeof b && void 0 === c ? this.get(a, b) : (this.set(a, b, c), void 0 !== c ? c : b); }, remove: function remove(a, b) { var c, d = a[this.expando];if (void 0 !== d) { if (void 0 !== b) { Array.isArray(b) ? b = b.map(r.camelCase) : (b = r.camelCase(b), b = b in d ? [b] : b.match(L) || []), c = b.length;while (c--) { delete d[b[c]]; } }(void 0 === b || r.isEmptyObject(d)) && (a.nodeType ? a[this.expando] = void 0 : delete a[this.expando]); } }, hasData: function hasData(a) { var b = a[this.expando];return void 0 !== b && !r.isEmptyObject(b); } };var W = new V(), X = new V(), Y = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, Z = /[A-Z]/g;function $(a) { return "true" === a || "false" !== a && ("null" === a ? null : a === +a + "" ? +a : Y.test(a) ? JSON.parse(a) : a); }function _(a, b, c) { var d;if (void 0 === c && 1 === a.nodeType) if (d = "data-" + b.replace(Z, "-$&").toLowerCase(), c = a.getAttribute(d), "string" == typeof c) { try { c = $(c); } catch (e) {}X.set(a, b, c); } else c = void 0;return c; }r.extend({ hasData: function hasData(a) { return X.hasData(a) || W.hasData(a); }, data: function data(a, b, c) { return X.access(a, b, c); }, removeData: function removeData(a, b) { X.remove(a, b); }, _data: function _data(a, b, c) { return W.access(a, b, c); }, _removeData: function _removeData(a, b) { W.remove(a, b); } }), r.fn.extend({ data: function data(a, b) { var c, d, e, f = this[0], g = f && f.attributes;if (void 0 === a) { if (this.length && (e = X.get(f), 1 === f.nodeType && !W.get(f, "hasDataAttrs"))) { c = g.length;while (c--) { g[c] && (d = g[c].name, 0 === d.indexOf("data-") && (d = r.camelCase(d.slice(5)), _(f, d, e[d]))); }W.set(f, "hasDataAttrs", !0); }return e; }return "object" == (typeof a === "undefined" ? "undefined" : _typeof(a)) ? this.each(function () { X.set(this, a); }) : T(this, function (b) { var c;if (f && void 0 === b) { if (c = X.get(f, a), void 0 !== c) return c;if (c = _(f, a), void 0 !== c) return c; } else this.each(function () { X.set(this, a, b); }); }, null, b, arguments.length > 1, null, !0); }, removeData: function removeData(a) { return this.each(function () { X.remove(this, a); }); } }), r.extend({ queue: function queue(a, b, c) { var d;if (a) return b = (b || "fx") + "queue", d = W.get(a, b), c && (!d || Array.isArray(c) ? d = W.access(a, b, r.makeArray(c)) : d.push(c)), d || []; }, dequeue: function dequeue(a, b) { b = b || "fx";var c = r.queue(a, b), d = c.length, e = c.shift(), f = r._queueHooks(a, b), g = function g() { r.dequeue(a, b); };"inprogress" === e && (e = c.shift(), d--), e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire(); }, _queueHooks: function _queueHooks(a, b) { var c = b + "queueHooks";return W.get(a, c) || W.access(a, c, { empty: r.Callbacks("once memory").add(function () { W.remove(a, [b + "queue", c]); }) }); } }), r.fn.extend({ queue: function queue(a, b) { var c = 2;return "string" != typeof a && (b = a, a = "fx", c--), arguments.length < c ? r.queue(this[0], a) : void 0 === b ? this : this.each(function () { var c = r.queue(this, a, b);r._queueHooks(this, a), "fx" === a && "inprogress" !== c[0] && r.dequeue(this, a); }); }, dequeue: function dequeue(a) { return this.each(function () { r.dequeue(this, a); }); }, clearQueue: function clearQueue(a) { return this.queue(a || "fx", []); }, promise: function promise(a, b) { var c, d = 1, e = r.Deferred(), f = this, g = this.length, h = function h() { --d || e.resolveWith(f, [f]); };"string" != typeof a && (b = a, a = void 0), a = a || "fx";while (g--) { c = W.get(f[g], a + "queueHooks"), c && c.empty && (d++, c.empty.add(h)); }return h(), e.promise(b); } });var aa = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, ba = new RegExp("^(?:([+-])=|)(" + aa + ")([a-z%]*)$", "i"), ca = ["Top", "Right", "Bottom", "Left"], da = function da(a, b) { return a = b || a, "none" === a.style.display || "" === a.style.display && r.contains(a.ownerDocument, a) && "none" === r.css(a, "display"); }, ea = function ea(a, b, c, d) { var e, f, g = {};for (f in b) { g[f] = a.style[f], a.style[f] = b[f]; }e = c.apply(a, d || []);for (f in b) { a.style[f] = g[f]; }return e; };function fa(a, b, c, d) { var e, f = 1, g = 20, h = d ? function () { return d.cur(); } : function () { return r.css(a, b, ""); }, i = h(), j = c && c[3] || (r.cssNumber[b] ? "" : "px"), k = (r.cssNumber[b] || "px" !== j && +i) && ba.exec(r.css(a, b));if (k && k[3] !== j) { j = j || k[3], c = c || [], k = +i || 1;do { f = f || ".5", k /= f, r.style(a, b, k + j); } while (f !== (f = h() / i) && 1 !== f && --g); }return c && (k = +k || +i || 0, e = c[1] ? k + (c[1] + 1) * c[2] : +c[2], d && (d.unit = j, d.start = k, d.end = e)), e; }var ga = {};function ha(a) { var b, c = a.ownerDocument, d = a.nodeName, e = ga[d];return e ? e : (b = c.body.appendChild(c.createElement(d)), e = r.css(b, "display"), b.parentNode.removeChild(b), "none" === e && (e = "block"), ga[d] = e, e); }function ia(a, b) { for (var c, d, e = [], f = 0, g = a.length; f < g; f++) { d = a[f], d.style && (c = d.style.display, b ? ("none" === c && (e[f] = W.get(d, "display") || null, e[f] || (d.style.display = "")), "" === d.style.display && da(d) && (e[f] = ha(d))) : "none" !== c && (e[f] = "none", W.set(d, "display", c))); }for (f = 0; f < g; f++) { null != e[f] && (a[f].style.display = e[f]); }return a; }r.fn.extend({ show: function show() { return ia(this, !0); }, hide: function hide() { return ia(this); }, toggle: function toggle(a) { return "boolean" == typeof a ? a ? this.show() : this.hide() : this.each(function () { da(this) ? r(this).show() : r(this).hide(); }); } });var ja = /^(?:checkbox|radio)$/i, ka = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i, la = /^$|\/(?:java|ecma)script/i, ma = { option: [1, "<select multiple='multiple'>", "</select>"], thead: [1, "<table>", "</table>"], col: [2, "<table><colgroup>", "</colgroup></table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], _default: [0, "", ""] };ma.optgroup = ma.option, ma.tbody = ma.tfoot = ma.colgroup = ma.caption = ma.thead, ma.th = ma.td;function na(a, b) { var c;return c = "undefined" != typeof a.getElementsByTagName ? a.getElementsByTagName(b || "*") : "undefined" != typeof a.querySelectorAll ? a.querySelectorAll(b || "*") : [], void 0 === b || b && B(a, b) ? r.merge([a], c) : c; }function oa(a, b) { for (var c = 0, d = a.length; c < d; c++) { W.set(a[c], "globalEval", !b || W.get(b[c], "globalEval")); } }var pa = /<|&#?\w+;/;function qa(a, b, c, d, e) { for (var f, g, h, i, j, k, l = b.createDocumentFragment(), m = [], n = 0, o = a.length; n < o; n++) { if (f = a[n], f || 0 === f) if ("object" === r.type(f)) r.merge(m, f.nodeType ? [f] : f);else if (pa.test(f)) { g = g || l.appendChild(b.createElement("div")), h = (ka.exec(f) || ["", ""])[1].toLowerCase(), i = ma[h] || ma._default, g.innerHTML = i[1] + r.htmlPrefilter(f) + i[2], k = i[0];while (k--) { g = g.lastChild; }r.merge(m, g.childNodes), g = l.firstChild, g.textContent = ""; } else m.push(b.createTextNode(f)); }l.textContent = "", n = 0;while (f = m[n++]) { if (d && r.inArray(f, d) > -1) e && e.push(f);else if (j = r.contains(f.ownerDocument, f), g = na(l.appendChild(f), "script"), j && oa(g), c) { k = 0;while (f = g[k++]) { la.test(f.type || "") && c.push(f); } } }return l; }!function () { var a = d.createDocumentFragment(), b = a.appendChild(d.createElement("div")), c = d.createElement("input");c.setAttribute("type", "radio"), c.setAttribute("checked", "checked"), c.setAttribute("name", "t"), b.appendChild(c), o.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked, b.innerHTML = "<textarea>x</textarea>", o.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue; }();var ra = d.documentElement, sa = /^key/, ta = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, ua = /^([^.]*)(?:\.(.+)|)/;function va() { return !0; }function wa() { return !1; }function xa() { try { return d.activeElement; } catch (a) {} }function ya(a, b, c, d, e, f) { var g, h;if ("object" == (typeof b === "undefined" ? "undefined" : _typeof(b))) { "string" != typeof c && (d = d || c, c = void 0);for (h in b) { ya(a, h, c, d, b[h], f); }return a; }if (null == d && null == e ? (e = c, d = c = void 0) : null == e && ("string" == typeof c ? (e = d, d = void 0) : (e = d, d = c, c = void 0)), e === !1) e = wa;else if (!e) return a;return 1 === f && (g = e, e = function e(a) { return r().off(a), g.apply(this, arguments); }, e.guid = g.guid || (g.guid = r.guid++)), a.each(function () { r.event.add(this, b, e, d, c); }); }r.event = { global: {}, add: function add(a, b, c, d, e) { var f, g, h, i, j, k, l, m, n, o, p, q = W.get(a);if (q) { c.handler && (f = c, c = f.handler, e = f.selector), e && r.find.matchesSelector(ra, e), c.guid || (c.guid = r.guid++), (i = q.events) || (i = q.events = {}), (g = q.handle) || (g = q.handle = function (b) { return "undefined" != typeof r && r.event.triggered !== b.type ? r.event.dispatch.apply(a, arguments) : void 0; }), b = (b || "").match(L) || [""], j = b.length;while (j--) { h = ua.exec(b[j]) || [], n = p = h[1], o = (h[2] || "").split(".").sort(), n && (l = r.event.special[n] || {}, n = (e ? l.delegateType : l.bindType) || n, l = r.event.special[n] || {}, k = r.extend({ type: n, origType: p, data: d, handler: c, guid: c.guid, selector: e, needsContext: e && r.expr.match.needsContext.test(e), namespace: o.join(".") }, f), (m = i[n]) || (m = i[n] = [], m.delegateCount = 0, l.setup && l.setup.call(a, d, o, g) !== !1 || a.addEventListener && a.addEventListener(n, g)), l.add && (l.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, k) : m.push(k), r.event.global[n] = !0); } } }, remove: function remove(a, b, c, d, e) { var f, g, h, i, j, k, l, m, n, o, p, q = W.hasData(a) && W.get(a);if (q && (i = q.events)) { b = (b || "").match(L) || [""], j = b.length;while (j--) { if (h = ua.exec(b[j]) || [], n = p = h[1], o = (h[2] || "").split(".").sort(), n) { l = r.event.special[n] || {}, n = (d ? l.delegateType : l.bindType) || n, m = i[n] || [], h = h[2] && new RegExp("(^|\\.)" + o.join("\\.(?:.*\\.|)") + "(\\.|$)"), g = f = m.length;while (f--) { k = m[f], !e && p !== k.origType || c && c.guid !== k.guid || h && !h.test(k.namespace) || d && d !== k.selector && ("**" !== d || !k.selector) || (m.splice(f, 1), k.selector && m.delegateCount--, l.remove && l.remove.call(a, k)); }g && !m.length && (l.teardown && l.teardown.call(a, o, q.handle) !== !1 || r.removeEvent(a, n, q.handle), delete i[n]); } else for (n in i) { r.event.remove(a, n + b[j], c, d, !0); } }r.isEmptyObject(i) && W.remove(a, "handle events"); } }, dispatch: function dispatch(a) { var b = r.event.fix(a), c, d, e, f, g, h, i = new Array(arguments.length), j = (W.get(this, "events") || {})[b.type] || [], k = r.event.special[b.type] || {};for (i[0] = b, c = 1; c < arguments.length; c++) { i[c] = arguments[c]; }if (b.delegateTarget = this, !k.preDispatch || k.preDispatch.call(this, b) !== !1) { h = r.event.handlers.call(this, b, j), c = 0;while ((f = h[c++]) && !b.isPropagationStopped()) { b.currentTarget = f.elem, d = 0;while ((g = f.handlers[d++]) && !b.isImmediatePropagationStopped()) { b.rnamespace && !b.rnamespace.test(g.namespace) || (b.handleObj = g, b.data = g.data, e = ((r.event.special[g.origType] || {}).handle || g.handler).apply(f.elem, i), void 0 !== e && (b.result = e) === !1 && (b.preventDefault(), b.stopPropagation())); } }return k.postDispatch && k.postDispatch.call(this, b), b.result; } }, handlers: function handlers(a, b) { var c, d, e, f, g, h = [], i = b.delegateCount, j = a.target;if (i && j.nodeType && !("click" === a.type && a.button >= 1)) for (; j !== this; j = j.parentNode || this) { if (1 === j.nodeType && ("click" !== a.type || j.disabled !== !0)) { for (f = [], g = {}, c = 0; c < i; c++) { d = b[c], e = d.selector + " ", void 0 === g[e] && (g[e] = d.needsContext ? r(e, this).index(j) > -1 : r.find(e, this, null, [j]).length), g[e] && f.push(d); }f.length && h.push({ elem: j, handlers: f }); } }return j = this, i < b.length && h.push({ elem: j, handlers: b.slice(i) }), h; }, addProp: function addProp(a, b) { Object.defineProperty(r.Event.prototype, a, { enumerable: !0, configurable: !0, get: r.isFunction(b) ? function () { if (this.originalEvent) return b(this.originalEvent); } : function () { if (this.originalEvent) return this.originalEvent[a]; }, set: function set(b) { Object.defineProperty(this, a, { enumerable: !0, configurable: !0, writable: !0, value: b }); } }); }, fix: function fix(a) { return a[r.expando] ? a : new r.Event(a); }, special: { load: { noBubble: !0 }, focus: { trigger: function trigger() { if (this !== xa() && this.focus) return this.focus(), !1; }, delegateType: "focusin" }, blur: { trigger: function trigger() { if (this === xa() && this.blur) return this.blur(), !1; }, delegateType: "focusout" }, click: { trigger: function trigger() { if ("checkbox" === this.type && this.click && B(this, "input")) return this.click(), !1; }, _default: function _default(a) { return B(a.target, "a"); } }, beforeunload: { postDispatch: function postDispatch(a) { void 0 !== a.result && a.originalEvent && (a.originalEvent.returnValue = a.result); } } } }, r.removeEvent = function (a, b, c) { a.removeEventListener && a.removeEventListener(b, c); }, r.Event = function (a, b) { return this instanceof r.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || void 0 === a.defaultPrevented && a.returnValue === !1 ? va : wa, this.target = a.target && 3 === a.target.nodeType ? a.target.parentNode : a.target, this.currentTarget = a.currentTarget, this.relatedTarget = a.relatedTarget) : this.type = a, b && r.extend(this, b), this.timeStamp = a && a.timeStamp || r.now(), void (this[r.expando] = !0)) : new r.Event(a, b); }, r.Event.prototype = { constructor: r.Event, isDefaultPrevented: wa, isPropagationStopped: wa, isImmediatePropagationStopped: wa, isSimulated: !1, preventDefault: function preventDefault() { var a = this.originalEvent;this.isDefaultPrevented = va, a && !this.isSimulated && a.preventDefault(); }, stopPropagation: function stopPropagation() { var a = this.originalEvent;this.isPropagationStopped = va, a && !this.isSimulated && a.stopPropagation(); }, stopImmediatePropagation: function stopImmediatePropagation() { var a = this.originalEvent;this.isImmediatePropagationStopped = va, a && !this.isSimulated && a.stopImmediatePropagation(), this.stopPropagation(); } }, r.each({ altKey: !0, bubbles: !0, cancelable: !0, changedTouches: !0, ctrlKey: !0, detail: !0, eventPhase: !0, metaKey: !0, pageX: !0, pageY: !0, shiftKey: !0, view: !0, "char": !0, charCode: !0, key: !0, keyCode: !0, button: !0, buttons: !0, clientX: !0, clientY: !0, offsetX: !0, offsetY: !0, pointerId: !0, pointerType: !0, screenX: !0, screenY: !0, targetTouches: !0, toElement: !0, touches: !0, which: function which(a) { var b = a.button;return null == a.which && sa.test(a.type) ? null != a.charCode ? a.charCode : a.keyCode : !a.which && void 0 !== b && ta.test(a.type) ? 1 & b ? 1 : 2 & b ? 3 : 4 & b ? 2 : 0 : a.which; } }, r.event.addProp), r.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function (a, b) { r.event.special[a] = { delegateType: b, bindType: b, handle: function handle(a) { var c, d = this, e = a.relatedTarget, f = a.handleObj;return e && (e === d || r.contains(d, e)) || (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c; } }; }), r.fn.extend({ on: function on(a, b, c, d) { return ya(this, a, b, c, d); }, one: function one(a, b, c, d) { return ya(this, a, b, c, d, 1); }, off: function off(a, b, c) { var d, e;if (a && a.preventDefault && a.handleObj) return d = a.handleObj, r(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this;if ("object" == (typeof a === "undefined" ? "undefined" : _typeof(a))) { for (e in a) { this.off(e, b, a[e]); }return this; }return b !== !1 && "function" != typeof b || (c = b, b = void 0), c === !1 && (c = wa), this.each(function () { r.event.remove(this, a, c, b); }); } });var za = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, Aa = /<script|<style|<link/i, Ba = /checked\s*(?:[^=]|=\s*.checked.)/i, Ca = /^true\/(.*)/, Da = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ea(a, b) { return B(a, "table") && B(11 !== b.nodeType ? b : b.firstChild, "tr") ? r(">tbody", a)[0] || a : a; }function Fa(a) { return a.type = (null !== a.getAttribute("type")) + "/" + a.type, a; }function Ga(a) { var b = Ca.exec(a.type);return b ? a.type = b[1] : a.removeAttribute("type"), a; }function Ha(a, b) { var c, d, e, f, g, h, i, j;if (1 === b.nodeType) { if (W.hasData(a) && (f = W.access(a), g = W.set(b, f), j = f.events)) { delete g.handle, g.events = {};for (e in j) { for (c = 0, d = j[e].length; c < d; c++) { r.event.add(b, e, j[e][c]); } } }X.hasData(a) && (h = X.access(a), i = r.extend({}, h), X.set(b, i)); } }function Ia(a, b) { var c = b.nodeName.toLowerCase();"input" === c && ja.test(a.type) ? b.checked = a.checked : "input" !== c && "textarea" !== c || (b.defaultValue = a.defaultValue); }function Ja(a, b, c, d) { b = g.apply([], b);var e, f, h, i, j, k, l = 0, m = a.length, n = m - 1, q = b[0], s = r.isFunction(q);if (s || m > 1 && "string" == typeof q && !o.checkClone && Ba.test(q)) return a.each(function (e) { var f = a.eq(e);s && (b[0] = q.call(this, e, f.html())), Ja(f, b, c, d); });if (m && (e = qa(b, a[0].ownerDocument, !1, a, d), f = e.firstChild, 1 === e.childNodes.length && (e = f), f || d)) { for (h = r.map(na(e, "script"), Fa), i = h.length; l < m; l++) { j = e, l !== n && (j = r.clone(j, !0, !0), i && r.merge(h, na(j, "script"))), c.call(a[l], j, l); }if (i) for (k = h[h.length - 1].ownerDocument, r.map(h, Ga), l = 0; l < i; l++) { j = h[l], la.test(j.type || "") && !W.access(j, "globalEval") && r.contains(k, j) && (j.src ? r._evalUrl && r._evalUrl(j.src) : p(j.textContent.replace(Da, ""), k)); } }return a; }function Ka(a, b, c) { for (var d, e = b ? r.filter(b, a) : a, f = 0; null != (d = e[f]); f++) { c || 1 !== d.nodeType || r.cleanData(na(d)), d.parentNode && (c && r.contains(d.ownerDocument, d) && oa(na(d, "script")), d.parentNode.removeChild(d)); }return a; }r.extend({ htmlPrefilter: function htmlPrefilter(a) { return a.replace(za, "<$1></$2>"); }, clone: function clone(a, b, c) { var d, e, f, g, h = a.cloneNode(!0), i = r.contains(a.ownerDocument, a);if (!(o.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || r.isXMLDoc(a))) for (g = na(h), f = na(a), d = 0, e = f.length; d < e; d++) { Ia(f[d], g[d]); }if (b) if (c) for (f = f || na(a), g = g || na(h), d = 0, e = f.length; d < e; d++) { Ha(f[d], g[d]); } else Ha(a, h);return g = na(h, "script"), g.length > 0 && oa(g, !i && na(a, "script")), h; }, cleanData: function cleanData(a) { for (var b, c, d, e = r.event.special, f = 0; void 0 !== (c = a[f]); f++) { if (U(c)) { if (b = c[W.expando]) { if (b.events) for (d in b.events) { e[d] ? r.event.remove(c, d) : r.removeEvent(c, d, b.handle); }c[W.expando] = void 0; }c[X.expando] && (c[X.expando] = void 0); } } } }), r.fn.extend({ detach: function detach(a) { return Ka(this, a, !0); }, remove: function remove(a) { return Ka(this, a); }, text: function text(a) { return T(this, function (a) { return void 0 === a ? r.text(this) : this.empty().each(function () { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = a); }); }, null, a, arguments.length); }, append: function append() { return Ja(this, arguments, function (a) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var b = Ea(this, a);b.appendChild(a); } }); }, prepend: function prepend() { return Ja(this, arguments, function (a) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var b = Ea(this, a);b.insertBefore(a, b.firstChild); } }); }, before: function before() { return Ja(this, arguments, function (a) { this.parentNode && this.parentNode.insertBefore(a, this); }); }, after: function after() { return Ja(this, arguments, function (a) { this.parentNode && this.parentNode.insertBefore(a, this.nextSibling); }); }, empty: function empty() { for (var a, b = 0; null != (a = this[b]); b++) { 1 === a.nodeType && (r.cleanData(na(a, !1)), a.textContent = ""); }return this; }, clone: function clone(a, b) { return a = null != a && a, b = null == b ? a : b, this.map(function () { return r.clone(this, a, b); }); }, html: function html(a) { return T(this, function (a) { var b = this[0] || {}, c = 0, d = this.length;if (void 0 === a && 1 === b.nodeType) return b.innerHTML;if ("string" == typeof a && !Aa.test(a) && !ma[(ka.exec(a) || ["", ""])[1].toLowerCase()]) { a = r.htmlPrefilter(a);try { for (; c < d; c++) { b = this[c] || {}, 1 === b.nodeType && (r.cleanData(na(b, !1)), b.innerHTML = a); }b = 0; } catch (e) {} }b && this.empty().append(a); }, null, a, arguments.length); }, replaceWith: function replaceWith() { var a = [];return Ja(this, arguments, function (b) { var c = this.parentNode;r.inArray(this, a) < 0 && (r.cleanData(na(this)), c && c.replaceChild(b, this)); }, a); } }), r.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (a, b) { r.fn[a] = function (a) { for (var c, d = [], e = r(a), f = e.length - 1, g = 0; g <= f; g++) { c = g === f ? this : this.clone(!0), r(e[g])[b](c), h.apply(d, c.get()); }return this.pushStack(d); }; });var La = /^margin/, Ma = new RegExp("^(" + aa + ")(?!px)[a-z%]+$", "i"), Na = function Na(b) { var c = b.ownerDocument.defaultView;return c && c.opener || (c = a), c.getComputedStyle(b); };!function () { function b() { if (i) { i.style.cssText = "box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", i.innerHTML = "", ra.appendChild(h);var b = a.getComputedStyle(i);c = "1%" !== b.top, g = "2px" === b.marginLeft, e = "4px" === b.width, i.style.marginRight = "50%", f = "4px" === b.marginRight, ra.removeChild(h), i = null; } }var c, e, f, g, h = d.createElement("div"), i = d.createElement("div");i.style && (i.style.backgroundClip = "content-box", i.cloneNode(!0).style.backgroundClip = "", o.clearCloneStyle = "content-box" === i.style.backgroundClip, h.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", h.appendChild(i), r.extend(o, { pixelPosition: function pixelPosition() { return b(), c; }, boxSizingReliable: function boxSizingReliable() { return b(), e; }, pixelMarginRight: function pixelMarginRight() { return b(), f; }, reliableMarginLeft: function reliableMarginLeft() { return b(), g; } })); }();function Oa(a, b, c) { var d, e, f, g, h = a.style;return c = c || Na(a), c && (g = c.getPropertyValue(b) || c[b], "" !== g || r.contains(a.ownerDocument, a) || (g = r.style(a, b)), !o.pixelMarginRight() && Ma.test(g) && La.test(b) && (d = h.width, e = h.minWidth, f = h.maxWidth, h.minWidth = h.maxWidth = h.width = g, g = c.width, h.width = d, h.minWidth = e, h.maxWidth = f)), void 0 !== g ? g + "" : g; }function Pa(a, b) { return { get: function get() { return a() ? void delete this.get : (this.get = b).apply(this, arguments); } }; }var Qa = /^(none|table(?!-c[ea]).+)/, Ra = /^--/, Sa = { position: "absolute", visibility: "hidden", display: "block" }, Ta = { letterSpacing: "0", fontWeight: "400" }, Ua = ["Webkit", "Moz", "ms"], Va = d.createElement("div").style;function Wa(a) { if (a in Va) return a;var b = a[0].toUpperCase() + a.slice(1), c = Ua.length;while (c--) { if (a = Ua[c] + b, a in Va) return a; } }function Xa(a) { var b = r.cssProps[a];return b || (b = r.cssProps[a] = Wa(a) || a), b; }function Ya(a, b, c) { var d = ba.exec(b);return d ? Math.max(0, d[2] - (c || 0)) + (d[3] || "px") : b; }function Za(a, b, c, d, e) { var f, g = 0;for (f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0; f < 4; f += 2) { "margin" === c && (g += r.css(a, c + ca[f], !0, e)), d ? ("content" === c && (g -= r.css(a, "padding" + ca[f], !0, e)), "margin" !== c && (g -= r.css(a, "border" + ca[f] + "Width", !0, e))) : (g += r.css(a, "padding" + ca[f], !0, e), "padding" !== c && (g += r.css(a, "border" + ca[f] + "Width", !0, e))); }return g; }function $a(a, b, c) { var d, e = Na(a), f = Oa(a, b, e), g = "border-box" === r.css(a, "boxSizing", !1, e);return Ma.test(f) ? f : (d = g && (o.boxSizingReliable() || f === a.style[b]), "auto" === f && (f = a["offset" + b[0].toUpperCase() + b.slice(1)]), f = parseFloat(f) || 0, f + Za(a, b, c || (g ? "border" : "content"), d, e) + "px"); }r.extend({ cssHooks: { opacity: { get: function get(a, b) { if (b) { var c = Oa(a, "opacity");return "" === c ? "1" : c; } } } }, cssNumber: { animationIterationCount: !0, columnCount: !0, fillOpacity: !0, flexGrow: !0, flexShrink: !0, fontWeight: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: { "float": "cssFloat" }, style: function style(a, b, c, d) { if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) { var e, f, g, h = r.camelCase(b), i = Ra.test(b), j = a.style;return i || (b = Xa(h)), g = r.cssHooks[b] || r.cssHooks[h], void 0 === c ? g && "get" in g && void 0 !== (e = g.get(a, !1, d)) ? e : j[b] : (f = typeof c === "undefined" ? "undefined" : _typeof(c), "string" === f && (e = ba.exec(c)) && e[1] && (c = fa(a, b, e), f = "number"), null != c && c === c && ("number" === f && (c += e && e[3] || (r.cssNumber[h] ? "" : "px")), o.clearCloneStyle || "" !== c || 0 !== b.indexOf("background") || (j[b] = "inherit"), g && "set" in g && void 0 === (c = g.set(a, c, d)) || (i ? j.setProperty(b, c) : j[b] = c)), void 0); } }, css: function css(a, b, c, d) { var e, f, g, h = r.camelCase(b), i = Ra.test(b);return i || (b = Xa(h)), g = r.cssHooks[b] || r.cssHooks[h], g && "get" in g && (e = g.get(a, !0, c)), void 0 === e && (e = Oa(a, b, d)), "normal" === e && b in Ta && (e = Ta[b]), "" === c || c ? (f = parseFloat(e), c === !0 || isFinite(f) ? f || 0 : e) : e; } }), r.each(["height", "width"], function (a, b) { r.cssHooks[b] = { get: function get(a, c, d) { if (c) return !Qa.test(r.css(a, "display")) || a.getClientRects().length && a.getBoundingClientRect().width ? $a(a, b, d) : ea(a, Sa, function () { return $a(a, b, d); }); }, set: function set(a, c, d) { var e, f = d && Na(a), g = d && Za(a, b, d, "border-box" === r.css(a, "boxSizing", !1, f), f);return g && (e = ba.exec(c)) && "px" !== (e[3] || "px") && (a.style[b] = c, c = r.css(a, b)), Ya(a, c, g); } }; }), r.cssHooks.marginLeft = Pa(o.reliableMarginLeft, function (a, b) { if (b) return (parseFloat(Oa(a, "marginLeft")) || a.getBoundingClientRect().left - ea(a, { marginLeft: 0 }, function () { return a.getBoundingClientRect().left; })) + "px"; }), r.each({ margin: "", padding: "", border: "Width" }, function (a, b) { r.cssHooks[a + b] = { expand: function expand(c) { for (var d = 0, e = {}, f = "string" == typeof c ? c.split(" ") : [c]; d < 4; d++) { e[a + ca[d] + b] = f[d] || f[d - 2] || f[0]; }return e; } }, La.test(a) || (r.cssHooks[a + b].set = Ya); }), r.fn.extend({ css: function css(a, b) { return T(this, function (a, b, c) { var d, e, f = {}, g = 0;if (Array.isArray(b)) { for (d = Na(a), e = b.length; g < e; g++) { f[b[g]] = r.css(a, b[g], !1, d); }return f; }return void 0 !== c ? r.style(a, b, c) : r.css(a, b); }, a, b, arguments.length > 1); } });function _a(a, b, c, d, e) { return new _a.prototype.init(a, b, c, d, e); }r.Tween = _a, _a.prototype = { constructor: _a, init: function init(a, b, c, d, e, f) { this.elem = a, this.prop = c, this.easing = e || r.easing._default, this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (r.cssNumber[c] ? "" : "px"); }, cur: function cur() { var a = _a.propHooks[this.prop];return a && a.get ? a.get(this) : _a.propHooks._default.get(this); }, run: function run(a) { var b, c = _a.propHooks[this.prop];return this.options.duration ? this.pos = b = r.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : this.pos = b = a, this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : _a.propHooks._default.set(this), this; } }, _a.prototype.init.prototype = _a.prototype, _a.propHooks = { _default: { get: function get(a) { var b;return 1 !== a.elem.nodeType || null != a.elem[a.prop] && null == a.elem.style[a.prop] ? a.elem[a.prop] : (b = r.css(a.elem, a.prop, ""), b && "auto" !== b ? b : 0); }, set: function set(a) { r.fx.step[a.prop] ? r.fx.step[a.prop](a) : 1 !== a.elem.nodeType || null == a.elem.style[r.cssProps[a.prop]] && !r.cssHooks[a.prop] ? a.elem[a.prop] = a.now : r.style(a.elem, a.prop, a.now + a.unit); } } }, _a.propHooks.scrollTop = _a.propHooks.scrollLeft = { set: function set(a) { a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now); } }, r.easing = { linear: function linear(a) { return a; }, swing: function swing(a) { return .5 - Math.cos(a * Math.PI) / 2; }, _default: "swing" }, r.fx = _a.prototype.init, r.fx.step = {};var ab, bb, cb = /^(?:toggle|show|hide)$/, db = /queueHooks$/;function eb() { bb && (d.hidden === !1 && a.requestAnimationFrame ? a.requestAnimationFrame(eb) : a.setTimeout(eb, r.fx.interval), r.fx.tick()); }function fb() { return a.setTimeout(function () { ab = void 0; }), ab = r.now(); }function gb(a, b) { var c, d = 0, e = { height: a };for (b = b ? 1 : 0; d < 4; d += 2 - b) { c = ca[d], e["margin" + c] = e["padding" + c] = a; }return b && (e.opacity = e.width = a), e; }function hb(a, b, c) { for (var d, e = (kb.tweeners[b] || []).concat(kb.tweeners["*"]), f = 0, g = e.length; f < g; f++) { if (d = e[f].call(c, b, a)) return d; } }function ib(a, b, c) { var d, e, f, g, h, i, j, k, l = "width" in b || "height" in b, m = this, n = {}, o = a.style, p = a.nodeType && da(a), q = W.get(a, "fxshow");c.queue || (g = r._queueHooks(a, "fx"), null == g.unqueued && (g.unqueued = 0, h = g.empty.fire, g.empty.fire = function () { g.unqueued || h(); }), g.unqueued++, m.always(function () { m.always(function () { g.unqueued--, r.queue(a, "fx").length || g.empty.fire(); }); }));for (d in b) { if (e = b[d], cb.test(e)) { if (delete b[d], f = f || "toggle" === e, e === (p ? "hide" : "show")) { if ("show" !== e || !q || void 0 === q[d]) continue;p = !0; }n[d] = q && q[d] || r.style(a, d); } }if (i = !r.isEmptyObject(b), i || !r.isEmptyObject(n)) { l && 1 === a.nodeType && (c.overflow = [o.overflow, o.overflowX, o.overflowY], j = q && q.display, null == j && (j = W.get(a, "display")), k = r.css(a, "display"), "none" === k && (j ? k = j : (ia([a], !0), j = a.style.display || j, k = r.css(a, "display"), ia([a]))), ("inline" === k || "inline-block" === k && null != j) && "none" === r.css(a, "float") && (i || (m.done(function () { o.display = j; }), null == j && (k = o.display, j = "none" === k ? "" : k)), o.display = "inline-block")), c.overflow && (o.overflow = "hidden", m.always(function () { o.overflow = c.overflow[0], o.overflowX = c.overflow[1], o.overflowY = c.overflow[2]; })), i = !1;for (d in n) { i || (q ? "hidden" in q && (p = q.hidden) : q = W.access(a, "fxshow", { display: j }), f && (q.hidden = !p), p && ia([a], !0), m.done(function () { p || ia([a]), W.remove(a, "fxshow");for (d in n) { r.style(a, d, n[d]); } })), i = hb(p ? q[d] : 0, d, m), d in q || (q[d] = i.start, p && (i.end = i.start, i.start = 0)); } } }function jb(a, b) { var c, d, e, f, g;for (c in a) { if (d = r.camelCase(c), e = b[d], f = a[c], Array.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = r.cssHooks[d], g && "expand" in g) { f = g.expand(f), delete a[d];for (c in f) { c in a || (a[c] = f[c], b[c] = e); } } else b[d] = e; } }function kb(a, b, c) { var d, e, f = 0, g = kb.prefilters.length, h = r.Deferred().always(function () { delete i.elem; }), i = function i() { if (e) return !1;for (var b = ab || fb(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length; g < i; g++) { j.tweens[g].run(f); }return h.notifyWith(a, [j, f, c]), f < 1 && i ? c : (i || h.notifyWith(a, [j, 1, 0]), h.resolveWith(a, [j]), !1); }, j = h.promise({ elem: a, props: r.extend({}, b), opts: r.extend(!0, { specialEasing: {}, easing: r.easing._default }, c), originalProperties: b, originalOptions: c, startTime: ab || fb(), duration: c.duration, tweens: [], createTween: function createTween(b, c) { var d = r.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);return j.tweens.push(d), d; }, stop: function stop(b) { var c = 0, d = b ? j.tweens.length : 0;if (e) return this;for (e = !0; c < d; c++) { j.tweens[c].run(1); }return b ? (h.notifyWith(a, [j, 1, 0]), h.resolveWith(a, [j, b])) : h.rejectWith(a, [j, b]), this; } }), k = j.props;for (jb(k, j.opts.specialEasing); f < g; f++) { if (d = kb.prefilters[f].call(j, a, k, j.opts)) return r.isFunction(d.stop) && (r._queueHooks(j.elem, j.opts.queue).stop = r.proxy(d.stop, d)), d; }return r.map(k, hb, j), r.isFunction(j.opts.start) && j.opts.start.call(a, j), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always), r.fx.timer(r.extend(i, { elem: a, anim: j, queue: j.opts.queue })), j; }r.Animation = r.extend(kb, { tweeners: { "*": [function (a, b) { var c = this.createTween(a, b);return fa(c.elem, a, ba.exec(b), c), c; }] }, tweener: function tweener(a, b) { r.isFunction(a) ? (b = a, a = ["*"]) : a = a.match(L);for (var c, d = 0, e = a.length; d < e; d++) { c = a[d], kb.tweeners[c] = kb.tweeners[c] || [], kb.tweeners[c].unshift(b); } }, prefilters: [ib], prefilter: function prefilter(a, b) { b ? kb.prefilters.unshift(a) : kb.prefilters.push(a); } }), r.speed = function (a, b, c) { var d = a && "object" == (typeof a === "undefined" ? "undefined" : _typeof(a)) ? r.extend({}, a) : { complete: c || !c && b || r.isFunction(a) && a, duration: a, easing: c && b || b && !r.isFunction(b) && b };return r.fx.off ? d.duration = 0 : "number" != typeof d.duration && (d.duration in r.fx.speeds ? d.duration = r.fx.speeds[d.duration] : d.duration = r.fx.speeds._default), null != d.queue && d.queue !== !0 || (d.queue = "fx"), d.old = d.complete, d.complete = function () { r.isFunction(d.old) && d.old.call(this), d.queue && r.dequeue(this, d.queue); }, d; }, r.fn.extend({ fadeTo: function fadeTo(a, b, c, d) { return this.filter(da).css("opacity", 0).show().end().animate({ opacity: b }, a, c, d); }, animate: function animate(a, b, c, d) { var e = r.isEmptyObject(a), f = r.speed(b, c, d), g = function g() { var b = kb(this, r.extend({}, a), f);(e || W.get(this, "finish")) && b.stop(!0); };return g.finish = g, e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g); }, stop: function stop(a, b, c) { var d = function d(a) { var b = a.stop;delete a.stop, b(c); };return "string" != typeof a && (c = b, b = a, a = void 0), b && a !== !1 && this.queue(a || "fx", []), this.each(function () { var b = !0, e = null != a && a + "queueHooks", f = r.timers, g = W.get(this);if (e) g[e] && g[e].stop && d(g[e]);else for (e in g) { g[e] && g[e].stop && db.test(e) && d(g[e]); }for (e = f.length; e--;) { f[e].elem !== this || null != a && f[e].queue !== a || (f[e].anim.stop(c), b = !1, f.splice(e, 1)); }!b && c || r.dequeue(this, a); }); }, finish: function finish(a) { return a !== !1 && (a = a || "fx"), this.each(function () { var b, c = W.get(this), d = c[a + "queue"], e = c[a + "queueHooks"], f = r.timers, g = d ? d.length : 0;for (c.finish = !0, r.queue(this, a, []), e && e.stop && e.stop.call(this, !0), b = f.length; b--;) { f[b].elem === this && f[b].queue === a && (f[b].anim.stop(!0), f.splice(b, 1)); }for (b = 0; b < g; b++) { d[b] && d[b].finish && d[b].finish.call(this); }delete c.finish; }); } }), r.each(["toggle", "show", "hide"], function (a, b) { var c = r.fn[b];r.fn[b] = function (a, d, e) { return null == a || "boolean" == typeof a ? c.apply(this, arguments) : this.animate(gb(b, !0), a, d, e); }; }), r.each({ slideDown: gb("show"), slideUp: gb("hide"), slideToggle: gb("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (a, b) { r.fn[a] = function (a, c, d) { return this.animate(b, a, c, d); }; }), r.timers = [], r.fx.tick = function () { var a, b = 0, c = r.timers;for (ab = r.now(); b < c.length; b++) { a = c[b], a() || c[b] !== a || c.splice(b--, 1); }c.length || r.fx.stop(), ab = void 0; }, r.fx.timer = function (a) { r.timers.push(a), r.fx.start(); }, r.fx.interval = 13, r.fx.start = function () { bb || (bb = !0, eb()); }, r.fx.stop = function () { bb = null; }, r.fx.speeds = { slow: 600, fast: 200, _default: 400 }, r.fn.delay = function (b, c) { return b = r.fx ? r.fx.speeds[b] || b : b, c = c || "fx", this.queue(c, function (c, d) { var e = a.setTimeout(c, b);d.stop = function () { a.clearTimeout(e); }; }); }, function () { var a = d.createElement("input"), b = d.createElement("select"), c = b.appendChild(d.createElement("option"));a.type = "checkbox", o.checkOn = "" !== a.value, o.optSelected = c.selected, a = d.createElement("input"), a.value = "t", a.type = "radio", o.radioValue = "t" === a.value; }();var lb, mb = r.expr.attrHandle;r.fn.extend({ attr: function attr(a, b) { return T(this, r.attr, a, b, arguments.length > 1); }, removeAttr: function removeAttr(a) { return this.each(function () { r.removeAttr(this, a); }); } }), r.extend({ attr: function attr(a, b, c) { var d, e, f = a.nodeType;if (3 !== f && 8 !== f && 2 !== f) return "undefined" == typeof a.getAttribute ? r.prop(a, b, c) : (1 === f && r.isXMLDoc(a) || (e = r.attrHooks[b.toLowerCase()] || (r.expr.match.bool.test(b) ? lb : void 0)), void 0 !== c ? null === c ? void r.removeAttr(a, b) : e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : (a.setAttribute(b, c + ""), c) : e && "get" in e && null !== (d = e.get(a, b)) ? d : (d = r.find.attr(a, b), null == d ? void 0 : d)); }, attrHooks: { type: { set: function set(a, b) { if (!o.radioValue && "radio" === b && B(a, "input")) { var c = a.value;return a.setAttribute("type", b), c && (a.value = c), b; } } } }, removeAttr: function removeAttr(a, b) { var c, d = 0, e = b && b.match(L);if (e && 1 === a.nodeType) while (c = e[d++]) { a.removeAttribute(c); } } }), lb = { set: function set(a, b, c) { return b === !1 ? r.removeAttr(a, c) : a.setAttribute(c, c), c; } }, r.each(r.expr.match.bool.source.match(/\w+/g), function (a, b) { var c = mb[b] || r.find.attr;mb[b] = function (a, b, d) { var e, f, g = b.toLowerCase();return d || (f = mb[g], mb[g] = e, e = null != c(a, b, d) ? g : null, mb[g] = f), e; }; });var nb = /^(?:input|select|textarea|button)$/i, ob = /^(?:a|area)$/i;r.fn.extend({ prop: function prop(a, b) { return T(this, r.prop, a, b, arguments.length > 1); }, removeProp: function removeProp(a) { return this.each(function () { delete this[r.propFix[a] || a]; }); } }), r.extend({ prop: function prop(a, b, c) { var d, e, f = a.nodeType;if (3 !== f && 8 !== f && 2 !== f) return 1 === f && r.isXMLDoc(a) || (b = r.propFix[b] || b, e = r.propHooks[b]), void 0 !== c ? e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : a[b] = c : e && "get" in e && null !== (d = e.get(a, b)) ? d : a[b]; }, propHooks: { tabIndex: { get: function get(a) { var b = r.find.attr(a, "tabindex");return b ? parseInt(b, 10) : nb.test(a.nodeName) || ob.test(a.nodeName) && a.href ? 0 : -1; } } }, propFix: { "for": "htmlFor", "class": "className" } }), o.optSelected || (r.propHooks.selected = { get: function get(a) { var b = a.parentNode;return b && b.parentNode && b.parentNode.selectedIndex, null; }, set: function set(a) { var b = a.parentNode;b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex); } }), r.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { r.propFix[this.toLowerCase()] = this; });function pb(a) { var b = a.match(L) || [];return b.join(" "); }function qb(a) { return a.getAttribute && a.getAttribute("class") || ""; }r.fn.extend({ addClass: function addClass(a) { var b, c, d, e, f, g, h, i = 0;if (r.isFunction(a)) return this.each(function (b) { r(this).addClass(a.call(this, b, qb(this))); });if ("string" == typeof a && a) { b = a.match(L) || [];while (c = this[i++]) { if (e = qb(c), d = 1 === c.nodeType && " " + pb(e) + " ") { g = 0;while (f = b[g++]) { d.indexOf(" " + f + " ") < 0 && (d += f + " "); }h = pb(d), e !== h && c.setAttribute("class", h); } } }return this; }, removeClass: function removeClass(a) { var b, c, d, e, f, g, h, i = 0;if (r.isFunction(a)) return this.each(function (b) { r(this).removeClass(a.call(this, b, qb(this))); });if (!arguments.length) return this.attr("class", "");if ("string" == typeof a && a) { b = a.match(L) || [];while (c = this[i++]) { if (e = qb(c), d = 1 === c.nodeType && " " + pb(e) + " ") { g = 0;while (f = b[g++]) { while (d.indexOf(" " + f + " ") > -1) { d = d.replace(" " + f + " ", " "); } }h = pb(d), e !== h && c.setAttribute("class", h); } } }return this; }, toggleClass: function toggleClass(a, b) { var c = typeof a === "undefined" ? "undefined" : _typeof(a);return "boolean" == typeof b && "string" === c ? b ? this.addClass(a) : this.removeClass(a) : r.isFunction(a) ? this.each(function (c) { r(this).toggleClass(a.call(this, c, qb(this), b), b); }) : this.each(function () { var b, d, e, f;if ("string" === c) { d = 0, e = r(this), f = a.match(L) || [];while (b = f[d++]) { e.hasClass(b) ? e.removeClass(b) : e.addClass(b); } } else void 0 !== a && "boolean" !== c || (b = qb(this), b && W.set(this, "__className__", b), this.setAttribute && this.setAttribute("class", b || a === !1 ? "" : W.get(this, "__className__") || "")); }); }, hasClass: function hasClass(a) { var b, c, d = 0;b = " " + a + " ";while (c = this[d++]) { if (1 === c.nodeType && (" " + pb(qb(c)) + " ").indexOf(b) > -1) return !0; }return !1; } });var rb = /\r/g;r.fn.extend({ val: function val(a) { var b, c, d, e = this[0];{ if (arguments.length) return d = r.isFunction(a), this.each(function (c) { var e;1 === this.nodeType && (e = d ? a.call(this, c, r(this).val()) : a, null == e ? e = "" : "number" == typeof e ? e += "" : Array.isArray(e) && (e = r.map(e, function (a) { return null == a ? "" : a + ""; })), b = r.valHooks[this.type] || r.valHooks[this.nodeName.toLowerCase()], b && "set" in b && void 0 !== b.set(this, e, "value") || (this.value = e)); });if (e) return b = r.valHooks[e.type] || r.valHooks[e.nodeName.toLowerCase()], b && "get" in b && void 0 !== (c = b.get(e, "value")) ? c : (c = e.value, "string" == typeof c ? c.replace(rb, "") : null == c ? "" : c); } } }), r.extend({ valHooks: { option: { get: function get(a) { var b = r.find.attr(a, "value");return null != b ? b : pb(r.text(a)); } }, select: { get: function get(a) { var b, c, d, e = a.options, f = a.selectedIndex, g = "select-one" === a.type, h = g ? null : [], i = g ? f + 1 : e.length;for (d = f < 0 ? i : g ? f : 0; d < i; d++) { if (c = e[d], (c.selected || d === f) && !c.disabled && (!c.parentNode.disabled || !B(c.parentNode, "optgroup"))) { if (b = r(c).val(), g) return b;h.push(b); } }return h; }, set: function set(a, b) { var c, d, e = a.options, f = r.makeArray(b), g = e.length;while (g--) { d = e[g], (d.selected = r.inArray(r.valHooks.option.get(d), f) > -1) && (c = !0); }return c || (a.selectedIndex = -1), f; } } } }), r.each(["radio", "checkbox"], function () { r.valHooks[this] = { set: function set(a, b) { if (Array.isArray(b)) return a.checked = r.inArray(r(a).val(), b) > -1; } }, o.checkOn || (r.valHooks[this].get = function (a) { return null === a.getAttribute("value") ? "on" : a.value; }); });var sb = /^(?:focusinfocus|focusoutblur)$/;r.extend(r.event, { trigger: function trigger(b, c, e, f) { var g, h, i, j, k, m, n, o = [e || d], p = l.call(b, "type") ? b.type : b, q = l.call(b, "namespace") ? b.namespace.split(".") : [];if (h = i = e = e || d, 3 !== e.nodeType && 8 !== e.nodeType && !sb.test(p + r.event.triggered) && (p.indexOf(".") > -1 && (q = p.split("."), p = q.shift(), q.sort()), k = p.indexOf(":") < 0 && "on" + p, b = b[r.expando] ? b : new r.Event(p, "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && b), b.isTrigger = f ? 2 : 3, b.namespace = q.join("."), b.rnamespace = b.namespace ? new RegExp("(^|\\.)" + q.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, b.result = void 0, b.target || (b.target = e), c = null == c ? [b] : r.makeArray(c, [b]), n = r.event.special[p] || {}, f || !n.trigger || n.trigger.apply(e, c) !== !1)) { if (!f && !n.noBubble && !r.isWindow(e)) { for (j = n.delegateType || p, sb.test(j + p) || (h = h.parentNode); h; h = h.parentNode) { o.push(h), i = h; }i === (e.ownerDocument || d) && o.push(i.defaultView || i.parentWindow || a); }g = 0;while ((h = o[g++]) && !b.isPropagationStopped()) { b.type = g > 1 ? j : n.bindType || p, m = (W.get(h, "events") || {})[b.type] && W.get(h, "handle"), m && m.apply(h, c), m = k && h[k], m && m.apply && U(h) && (b.result = m.apply(h, c), b.result === !1 && b.preventDefault()); }return b.type = p, f || b.isDefaultPrevented() || n._default && n._default.apply(o.pop(), c) !== !1 || !U(e) || k && r.isFunction(e[p]) && !r.isWindow(e) && (i = e[k], i && (e[k] = null), r.event.triggered = p, e[p](), r.event.triggered = void 0, i && (e[k] = i)), b.result; } }, simulate: function simulate(a, b, c) { var d = r.extend(new r.Event(), c, { type: a, isSimulated: !0 });r.event.trigger(d, null, b); } }), r.fn.extend({ trigger: function trigger(a, b) { return this.each(function () { r.event.trigger(a, b, this); }); }, triggerHandler: function triggerHandler(a, b) { var c = this[0];if (c) return r.event.trigger(a, b, c, !0); } }), r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function (a, b) { r.fn[b] = function (a, c) { return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b); }; }), r.fn.extend({ hover: function hover(a, b) { return this.mouseenter(a).mouseleave(b || a); } }), o.focusin = "onfocusin" in a, o.focusin || r.each({ focus: "focusin", blur: "focusout" }, function (a, b) { var c = function c(a) { r.event.simulate(b, a.target, r.event.fix(a)); };r.event.special[b] = { setup: function setup() { var d = this.ownerDocument || this, e = W.access(d, b);e || d.addEventListener(a, c, !0), W.access(d, b, (e || 0) + 1); }, teardown: function teardown() { var d = this.ownerDocument || this, e = W.access(d, b) - 1;e ? W.access(d, b, e) : (d.removeEventListener(a, c, !0), W.remove(d, b)); } }; });var tb = a.location, ub = r.now(), vb = /\?/;r.parseXML = function (b) { var c;if (!b || "string" != typeof b) return null;try { c = new a.DOMParser().parseFromString(b, "text/xml"); } catch (d) { c = void 0; }return c && !c.getElementsByTagName("parsererror").length || r.error("Invalid XML: " + b), c; };var wb = /\[\]$/, xb = /\r?\n/g, yb = /^(?:submit|button|image|reset|file)$/i, zb = /^(?:input|select|textarea|keygen)/i;function Ab(a, b, c, d) { var e;if (Array.isArray(b)) r.each(b, function (b, e) { c || wb.test(a) ? d(a, e) : Ab(a + "[" + ("object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) && null != e ? b : "") + "]", e, c, d); });else if (c || "object" !== r.type(b)) d(a, b);else for (e in b) { Ab(a + "[" + e + "]", b[e], c, d); } }r.param = function (a, b) { var c, d = [], e = function e(a, b) { var c = r.isFunction(b) ? b() : b;d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(null == c ? "" : c); };if (Array.isArray(a) || a.jquery && !r.isPlainObject(a)) r.each(a, function () { e(this.name, this.value); });else for (c in a) { Ab(c, a[c], b, e); }return d.join("&"); }, r.fn.extend({ serialize: function serialize() { return r.param(this.serializeArray()); }, serializeArray: function serializeArray() { return this.map(function () { var a = r.prop(this, "elements");return a ? r.makeArray(a) : this; }).filter(function () { var a = this.type;return this.name && !r(this).is(":disabled") && zb.test(this.nodeName) && !yb.test(a) && (this.checked || !ja.test(a)); }).map(function (a, b) { var c = r(this).val();return null == c ? null : Array.isArray(c) ? r.map(c, function (a) { return { name: b.name, value: a.replace(xb, "\r\n") }; }) : { name: b.name, value: c.replace(xb, "\r\n") }; }).get(); } });var Bb = /%20/g, Cb = /#.*$/, Db = /([?&])_=[^&]*/, Eb = /^(.*?):[ \t]*([^\r\n]*)$/gm, Fb = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, Gb = /^(?:GET|HEAD)$/, Hb = /^\/\//, Ib = {}, Jb = {}, Kb = "*/".concat("*"), Lb = d.createElement("a");Lb.href = tb.href;function Mb(a) { return function (b, c) { "string" != typeof b && (c = b, b = "*");var d, e = 0, f = b.toLowerCase().match(L) || [];if (r.isFunction(c)) while (d = f[e++]) { "+" === d[0] ? (d = d.slice(1) || "*", (a[d] = a[d] || []).unshift(c)) : (a[d] = a[d] || []).push(c); } }; }function Nb(a, b, c, d) { var e = {}, f = a === Jb;function g(h) { var i;return e[h] = !0, r.each(a[h] || [], function (a, h) { var j = h(b, c, d);return "string" != typeof j || f || e[j] ? f ? !(i = j) : void 0 : (b.dataTypes.unshift(j), g(j), !1); }), i; }return g(b.dataTypes[0]) || !e["*"] && g("*"); }function Ob(a, b) { var c, d, e = r.ajaxSettings.flatOptions || {};for (c in b) { void 0 !== b[c] && ((e[c] ? a : d || (d = {}))[c] = b[c]); }return d && r.extend(!0, a, d), a; }function Pb(a, b, c) { var d, e, f, g, h = a.contents, i = a.dataTypes;while ("*" === i[0]) { i.shift(), void 0 === d && (d = a.mimeType || b.getResponseHeader("Content-Type")); }if (d) for (e in h) { if (h[e] && h[e].test(d)) { i.unshift(e);break; } }if (i[0] in c) f = i[0];else { for (e in c) { if (!i[0] || a.converters[e + " " + i[0]]) { f = e;break; }g || (g = e); }f = f || g; }if (f) return f !== i[0] && i.unshift(f), c[f]; }function Qb(a, b, c, d) { var e, f, g, h, i, j = {}, k = a.dataTypes.slice();if (k[1]) for (g in a.converters) { j[g.toLowerCase()] = a.converters[g]; }f = k.shift();while (f) { if (a.responseFields[f] && (c[a.responseFields[f]] = b), !i && d && a.dataFilter && (b = a.dataFilter(b, a.dataType)), i = f, f = k.shift()) if ("*" === f) f = i;else if ("*" !== i && i !== f) { if (g = j[i + " " + f] || j["* " + f], !g) for (e in j) { if (h = e.split(" "), h[1] === f && (g = j[i + " " + h[0]] || j["* " + h[0]])) { g === !0 ? g = j[e] : j[e] !== !0 && (f = h[0], k.unshift(h[1]));break; } }if (g !== !0) if (g && a["throws"]) b = g(b);else try { b = g(b); } catch (l) { return { state: "parsererror", error: g ? l : "No conversion from " + i + " to " + f }; } } }return { state: "success", data: b }; }r.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: tb.href, type: "GET", isLocal: Fb.test(tb.protocol), global: !0, processData: !0, async: !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": Kb, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, converters: { "* text": String, "text html": !0, "text json": JSON.parse, "text xml": r.parseXML }, flatOptions: { url: !0, context: !0 } }, ajaxSetup: function ajaxSetup(a, b) { return b ? Ob(Ob(a, r.ajaxSettings), b) : Ob(r.ajaxSettings, a); }, ajaxPrefilter: Mb(Ib), ajaxTransport: Mb(Jb), ajax: function ajax(b, c) { "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && (c = b, b = void 0), c = c || {};var e, f, g, h, i, j, k, l, m, n, o = r.ajaxSetup({}, c), p = o.context || o, q = o.context && (p.nodeType || p.jquery) ? r(p) : r.event, s = r.Deferred(), t = r.Callbacks("once memory"), u = o.statusCode || {}, v = {}, w = {}, x = "canceled", y = { readyState: 0, getResponseHeader: function getResponseHeader(a) { var b;if (k) { if (!h) { h = {};while (b = Eb.exec(g)) { h[b[1].toLowerCase()] = b[2]; } }b = h[a.toLowerCase()]; }return null == b ? null : b; }, getAllResponseHeaders: function getAllResponseHeaders() { return k ? g : null; }, setRequestHeader: function setRequestHeader(a, b) { return null == k && (a = w[a.toLowerCase()] = w[a.toLowerCase()] || a, v[a] = b), this; }, overrideMimeType: function overrideMimeType(a) { return null == k && (o.mimeType = a), this; }, statusCode: function statusCode(a) { var b;if (a) if (k) y.always(a[y.status]);else for (b in a) { u[b] = [u[b], a[b]]; }return this; }, abort: function abort(a) { var b = a || x;return e && e.abort(b), A(0, b), this; } };if (s.promise(y), o.url = ((b || o.url || tb.href) + "").replace(Hb, tb.protocol + "//"), o.type = c.method || c.type || o.method || o.type, o.dataTypes = (o.dataType || "*").toLowerCase().match(L) || [""], null == o.crossDomain) { j = d.createElement("a");try { j.href = o.url, j.href = j.href, o.crossDomain = Lb.protocol + "//" + Lb.host != j.protocol + "//" + j.host; } catch (z) { o.crossDomain = !0; } }if (o.data && o.processData && "string" != typeof o.data && (o.data = r.param(o.data, o.traditional)), Nb(Ib, o, c, y), k) return y;l = r.event && o.global, l && 0 === r.active++ && r.event.trigger("ajaxStart"), o.type = o.type.toUpperCase(), o.hasContent = !Gb.test(o.type), f = o.url.replace(Cb, ""), o.hasContent ? o.data && o.processData && 0 === (o.contentType || "").indexOf("application/x-www-form-urlencoded") && (o.data = o.data.replace(Bb, "+")) : (n = o.url.slice(f.length), o.data && (f += (vb.test(f) ? "&" : "?") + o.data, delete o.data), o.cache === !1 && (f = f.replace(Db, "$1"), n = (vb.test(f) ? "&" : "?") + "_=" + ub++ + n), o.url = f + n), o.ifModified && (r.lastModified[f] && y.setRequestHeader("If-Modified-Since", r.lastModified[f]), r.etag[f] && y.setRequestHeader("If-None-Match", r.etag[f])), (o.data && o.hasContent && o.contentType !== !1 || c.contentType) && y.setRequestHeader("Content-Type", o.contentType), y.setRequestHeader("Accept", o.dataTypes[0] && o.accepts[o.dataTypes[0]] ? o.accepts[o.dataTypes[0]] + ("*" !== o.dataTypes[0] ? ", " + Kb + "; q=0.01" : "") : o.accepts["*"]);for (m in o.headers) { y.setRequestHeader(m, o.headers[m]); }if (o.beforeSend && (o.beforeSend.call(p, y, o) === !1 || k)) return y.abort();if (x = "abort", t.add(o.complete), y.done(o.success), y.fail(o.error), e = Nb(Jb, o, c, y)) { if (y.readyState = 1, l && q.trigger("ajaxSend", [y, o]), k) return y;o.async && o.timeout > 0 && (i = a.setTimeout(function () { y.abort("timeout"); }, o.timeout));try { k = !1, e.send(v, A); } catch (z) { if (k) throw z;A(-1, z); } } else A(-1, "No Transport");function A(b, c, d, h) { var j, m, n, v, w, x = c;k || (k = !0, i && a.clearTimeout(i), e = void 0, g = h || "", y.readyState = b > 0 ? 4 : 0, j = b >= 200 && b < 300 || 304 === b, d && (v = Pb(o, y, d)), v = Qb(o, v, y, j), j ? (o.ifModified && (w = y.getResponseHeader("Last-Modified"), w && (r.lastModified[f] = w), w = y.getResponseHeader("etag"), w && (r.etag[f] = w)), 204 === b || "HEAD" === o.type ? x = "nocontent" : 304 === b ? x = "notmodified" : (x = v.state, m = v.data, n = v.error, j = !n)) : (n = x, !b && x || (x = "error", b < 0 && (b = 0))), y.status = b, y.statusText = (c || x) + "", j ? s.resolveWith(p, [m, x, y]) : s.rejectWith(p, [y, x, n]), y.statusCode(u), u = void 0, l && q.trigger(j ? "ajaxSuccess" : "ajaxError", [y, o, j ? m : n]), t.fireWith(p, [y, x]), l && (q.trigger("ajaxComplete", [y, o]), --r.active || r.event.trigger("ajaxStop"))); }return y; }, getJSON: function getJSON(a, b, c) { return r.get(a, b, c, "json"); }, getScript: function getScript(a, b) { return r.get(a, void 0, b, "script"); } }), r.each(["get", "post"], function (a, b) { r[b] = function (a, c, d, e) { return r.isFunction(c) && (e = e || d, d = c, c = void 0), r.ajax(r.extend({ url: a, type: b, dataType: e, data: c, success: d }, r.isPlainObject(a) && a)); }; }), r._evalUrl = function (a) { return r.ajax({ url: a, type: "GET", dataType: "script", cache: !0, async: !1, global: !1, "throws": !0 }); }, r.fn.extend({ wrapAll: function wrapAll(a) { var b;return this[0] && (r.isFunction(a) && (a = a.call(this[0])), b = r(a, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && b.insertBefore(this[0]), b.map(function () { var a = this;while (a.firstElementChild) { a = a.firstElementChild; }return a; }).append(this)), this; }, wrapInner: function wrapInner(a) { return r.isFunction(a) ? this.each(function (b) { r(this).wrapInner(a.call(this, b)); }) : this.each(function () { var b = r(this), c = b.contents();c.length ? c.wrapAll(a) : b.append(a); }); }, wrap: function wrap(a) { var b = r.isFunction(a);return this.each(function (c) { r(this).wrapAll(b ? a.call(this, c) : a); }); }, unwrap: function unwrap(a) { return this.parent(a).not("body").each(function () { r(this).replaceWith(this.childNodes); }), this; } }), r.expr.pseudos.hidden = function (a) { return !r.expr.pseudos.visible(a); }, r.expr.pseudos.visible = function (a) { return !!(a.offsetWidth || a.offsetHeight || a.getClientRects().length); }, r.ajaxSettings.xhr = function () { try { return new a.XMLHttpRequest(); } catch (b) {} };var Rb = { 0: 200, 1223: 204 }, Sb = r.ajaxSettings.xhr();o.cors = !!Sb && "withCredentials" in Sb, o.ajax = Sb = !!Sb, r.ajaxTransport(function (b) { var _c, d;if (o.cors || Sb && !b.crossDomain) return { send: function send(e, f) { var g, h = b.xhr();if (h.open(b.type, b.url, b.async, b.username, b.password), b.xhrFields) for (g in b.xhrFields) { h[g] = b.xhrFields[g]; }b.mimeType && h.overrideMimeType && h.overrideMimeType(b.mimeType), b.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest");for (g in e) { h.setRequestHeader(g, e[g]); }_c = function c(a) { return function () { _c && (_c = d = h.onload = h.onerror = h.onabort = h.onreadystatechange = null, "abort" === a ? h.abort() : "error" === a ? "number" != typeof h.status ? f(0, "error") : f(h.status, h.statusText) : f(Rb[h.status] || h.status, h.statusText, "text" !== (h.responseType || "text") || "string" != typeof h.responseText ? { binary: h.response } : { text: h.responseText }, h.getAllResponseHeaders())); }; }, h.onload = _c(), d = h.onerror = _c("error"), void 0 !== h.onabort ? h.onabort = d : h.onreadystatechange = function () { 4 === h.readyState && a.setTimeout(function () { _c && d(); }); }, _c = _c("abort");try { h.send(b.hasContent && b.data || null); } catch (i) { if (_c) throw i; } }, abort: function abort() { _c && _c(); } }; }), r.ajaxPrefilter(function (a) { a.crossDomain && (a.contents.script = !1); }), r.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function textScript(a) { return r.globalEval(a), a; } } }), r.ajaxPrefilter("script", function (a) { void 0 === a.cache && (a.cache = !1), a.crossDomain && (a.type = "GET"); }), r.ajaxTransport("script", function (a) { if (a.crossDomain) { var b, _c2;return { send: function send(e, f) { b = r("<script>").prop({ charset: a.scriptCharset, src: a.url }).on("load error", _c2 = function c(a) { b.remove(), _c2 = null, a && f("error" === a.type ? 404 : 200, a.type); }), d.head.appendChild(b[0]); }, abort: function abort() { _c2 && _c2(); } }; } });var Tb = [], Ub = /(=)\?(?=&|$)|\?\?/;r.ajaxSetup({ jsonp: "callback", jsonpCallback: function jsonpCallback() { var a = Tb.pop() || r.expando + "_" + ub++;return this[a] = !0, a; } }), r.ajaxPrefilter("json jsonp", function (b, c, d) { var e, f, g, h = b.jsonp !== !1 && (Ub.test(b.url) ? "url" : "string" == typeof b.data && 0 === (b.contentType || "").indexOf("application/x-www-form-urlencoded") && Ub.test(b.data) && "data");if (h || "jsonp" === b.dataTypes[0]) return e = b.jsonpCallback = r.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, h ? b[h] = b[h].replace(Ub, "$1" + e) : b.jsonp !== !1 && (b.url += (vb.test(b.url) ? "&" : "?") + b.jsonp + "=" + e), b.converters["script json"] = function () { return g || r.error(e + " was not called"), g[0]; }, b.dataTypes[0] = "json", f = a[e], a[e] = function () { g = arguments; }, d.always(function () { void 0 === f ? r(a).removeProp(e) : a[e] = f, b[e] && (b.jsonpCallback = c.jsonpCallback, Tb.push(e)), g && r.isFunction(f) && f(g[0]), g = f = void 0; }), "script"; }), o.createHTMLDocument = function () { var a = d.implementation.createHTMLDocument("").body;return a.innerHTML = "<form></form><form></form>", 2 === a.childNodes.length; }(), r.parseHTML = function (a, b, c) { if ("string" != typeof a) return [];"boolean" == typeof b && (c = b, b = !1);var e, f, g;return b || (o.createHTMLDocument ? (b = d.implementation.createHTMLDocument(""), e = b.createElement("base"), e.href = d.location.href, b.head.appendChild(e)) : b = d), f = C.exec(a), g = !c && [], f ? [b.createElement(f[1])] : (f = qa([a], b, g), g && g.length && r(g).remove(), r.merge([], f.childNodes)); }, r.fn.load = function (a, b, c) { var d, e, f, g = this, h = a.indexOf(" ");return h > -1 && (d = pb(a.slice(h)), a = a.slice(0, h)), r.isFunction(b) ? (c = b, b = void 0) : b && "object" == (typeof b === "undefined" ? "undefined" : _typeof(b)) && (e = "POST"), g.length > 0 && r.ajax({ url: a, type: e || "GET", dataType: "html", data: b }).done(function (a) { f = arguments, g.html(d ? r("<div>").append(r.parseHTML(a)).find(d) : a); }).always(c && function (a, b) { g.each(function () { c.apply(this, f || [a.responseText, b, a]); }); }), this; }, r.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (a, b) { r.fn[b] = function (a) { return this.on(b, a); }; }), r.expr.pseudos.animated = function (a) { return r.grep(r.timers, function (b) { return a === b.elem; }).length; }, r.offset = { setOffset: function setOffset(a, b, c) { var d, e, f, g, h, i, j, k = r.css(a, "position"), l = r(a), m = {};"static" === k && (a.style.position = "relative"), h = l.offset(), f = r.css(a, "top"), i = r.css(a, "left"), j = ("absolute" === k || "fixed" === k) && (f + i).indexOf("auto") > -1, j ? (d = l.position(), g = d.top, e = d.left) : (g = parseFloat(f) || 0, e = parseFloat(i) || 0), r.isFunction(b) && (b = b.call(a, c, r.extend({}, h))), null != b.top && (m.top = b.top - h.top + g), null != b.left && (m.left = b.left - h.left + e), "using" in b ? b.using.call(a, m) : l.css(m); } }, r.fn.extend({ offset: function offset(a) { if (arguments.length) return void 0 === a ? this : this.each(function (b) { r.offset.setOffset(this, a, b); });var b, c, d, e, f = this[0];if (f) return f.getClientRects().length ? (d = f.getBoundingClientRect(), b = f.ownerDocument, c = b.documentElement, e = b.defaultView, { top: d.top + e.pageYOffset - c.clientTop, left: d.left + e.pageXOffset - c.clientLeft }) : { top: 0, left: 0 }; }, position: function position() { if (this[0]) { var a, b, c = this[0], d = { top: 0, left: 0 };return "fixed" === r.css(c, "position") ? b = c.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), B(a[0], "html") || (d = a.offset()), d = { top: d.top + r.css(a[0], "borderTopWidth", !0), left: d.left + r.css(a[0], "borderLeftWidth", !0) }), { top: b.top - d.top - r.css(c, "marginTop", !0), left: b.left - d.left - r.css(c, "marginLeft", !0) }; } }, offsetParent: function offsetParent() { return this.map(function () { var a = this.offsetParent;while (a && "static" === r.css(a, "position")) { a = a.offsetParent; }return a || ra; }); } }), r.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (a, b) { var c = "pageYOffset" === b;r.fn[a] = function (d) { return T(this, function (a, d, e) { var f;return r.isWindow(a) ? f = a : 9 === a.nodeType && (f = a.defaultView), void 0 === e ? f ? f[b] : a[d] : void (f ? f.scrollTo(c ? f.pageXOffset : e, c ? e : f.pageYOffset) : a[d] = e); }, a, d, arguments.length); }; }), r.each(["top", "left"], function (a, b) { r.cssHooks[b] = Pa(o.pixelPosition, function (a, c) { if (c) return c = Oa(a, b), Ma.test(c) ? r(a).position()[b] + "px" : c; }); }), r.each({ Height: "height", Width: "width" }, function (a, b) { r.each({ padding: "inner" + a, content: b, "": "outer" + a }, function (c, d) { r.fn[d] = function (e, f) { var g = arguments.length && (c || "boolean" != typeof e), h = c || (e === !0 || f === !0 ? "margin" : "border");return T(this, function (b, c, e) { var f;return r.isWindow(b) ? 0 === d.indexOf("outer") ? b["inner" + a] : b.document.documentElement["client" + a] : 9 === b.nodeType ? (f = b.documentElement, Math.max(b.body["scroll" + a], f["scroll" + a], b.body["offset" + a], f["offset" + a], f["client" + a])) : void 0 === e ? r.css(b, c, h) : r.style(b, c, e, h); }, b, g ? e : void 0, g); }; }); }), r.fn.extend({ bind: function bind(a, b, c) { return this.on(a, null, b, c); }, unbind: function unbind(a, b) { return this.off(a, null, b); }, delegate: function delegate(a, b, c, d) { return this.on(b, a, c, d); }, undelegate: function undelegate(a, b, c) { return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c); } }), r.holdReady = function (a) { a ? r.readyWait++ : r.ready(!0); }, r.isArray = Array.isArray, r.parseJSON = JSON.parse, r.nodeName = B, "function" == "function" && __webpack_require__(7) && !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return r; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));var Vb = a.jQuery, Wb = a.$;return r.noConflict = function (b) { return a.$ === r && (a.$ = Wb), b && a.jQuery === r && (a.jQuery = Vb), r; }, b || (a.jQuery = a.$ = r), r; }); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)(module))) /***/ }), /* 6 */ /***/ (function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default if(!module.children) module.children = []; Object.defineProperty(module, "loaded", { enumerable: true, get: function() { return module.l; } }); Object.defineProperty(module, "id", { enumerable: true, get: function() { return module.i; } }); module.webpackPolyfill = 1; } return module; }; /***/ }), /* 7 */ /***/ (function(module, exports) { /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */ module.exports = __webpack_amd_options__; /* WEBPACK VAR INJECTION */}.call(exports, {})) /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /*! * Bootstrap v4.1.1 (https://getbootstrap.com/) * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ !function (t, e) { "object" == ( false ? "undefined" : _typeof(exports)) && "undefined" != typeof module ? e(exports, __webpack_require__(0), __webpack_require__(1)) : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(0), __webpack_require__(1)], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : e(t.bootstrap = {}, t.jQuery, t.Popper); }(this, function (t, e, c) { "use strict"; function i(t, e) { for (var n = 0; n < e.length; n++) { var i = e[n];i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i); } }function o(t, e, n) { return e && i(t.prototype, e), n && i(t, n), t; }function h(r) { for (var t = 1; t < arguments.length; t++) { var s = null != arguments[t] ? arguments[t] : {}, e = Object.keys(s);"function" == typeof Object.getOwnPropertySymbols && (e = e.concat(Object.getOwnPropertySymbols(s).filter(function (t) { return Object.getOwnPropertyDescriptor(s, t).enumerable; }))), e.forEach(function (t) { var e, n, i;e = r, i = s[n = t], n in e ? Object.defineProperty(e, n, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = i; }); }return r; }e = e && e.hasOwnProperty("default") ? e.default : e, c = c && c.hasOwnProperty("default") ? c.default : c;var r, n, s, a, l, u, f, d, _, g, m, p, v, E, y, T, C, I, A, D, b, S, w, N, O, k, P, L, j, R, H, W, M, x, U, K, F, V, Q, B, Y, G, q, z, X, J, Z, $, tt, et, nt, it, rt, st, ot, at, lt, ht, ct, ut, ft, dt, _t, gt, mt, pt, vt, Et, yt, Tt, Ct, It, At, Dt, bt, St, wt, Nt, Ot, kt, Pt, Lt, jt, Rt, Ht, Wt, Mt, xt, Ut, Kt, Ft, Vt, Qt, Bt, Yt, Gt, qt, zt, Xt, Jt, Zt, $t, te, ee, ne, ie, re, se, oe, ae, le, he, ce, ue, fe, de, _e, ge, me, pe, ve, Ee, ye, Te, Ce, Ie, Ae, De, be, Se, we, Ne, Oe, ke, Pe, Le, je, Re, He, We, Me, xe, Ue, Ke, Fe, Ve, Qe, Be, Ye, Ge, qe, ze, Xe, Je, Ze, $e, tn, en, nn, rn, sn, on, an, ln, hn, cn, un, fn, dn, _n, gn, mn, pn, vn, En, yn, Tn, Cn = function (i) { var e = "transitionend";function t(t) { var e = this, n = !1;return i(this).one(l.TRANSITION_END, function () { n = !0; }), setTimeout(function () { n || l.triggerTransitionEnd(e); }, t), this; }var l = { TRANSITION_END: "bsTransitionEnd", getUID: function getUID(t) { for (; t += ~~(1e6 * Math.random()), document.getElementById(t);) {}return t; }, getSelectorFromElement: function getSelectorFromElement(t) { var e = t.getAttribute("data-target");e && "#" !== e || (e = t.getAttribute("href") || "");try { return 0 < i(document).find(e).length ? e : null; } catch (t) { return null; } }, getTransitionDurationFromElement: function getTransitionDurationFromElement(t) { if (!t) return 0;var e = i(t).css("transition-duration");return parseFloat(e) ? (e = e.split(",")[0], 1e3 * parseFloat(e)) : 0; }, reflow: function reflow(t) { return t.offsetHeight; }, triggerTransitionEnd: function triggerTransitionEnd(t) { i(t).trigger(e); }, supportsTransitionEnd: function supportsTransitionEnd() { return Boolean(e); }, isElement: function isElement(t) { return (t[0] || t).nodeType; }, typeCheckConfig: function typeCheckConfig(t, e, n) { for (var i in n) { if (Object.prototype.hasOwnProperty.call(n, i)) { var r = n[i], s = e[i], o = s && l.isElement(s) ? "element" : (a = s, {}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if (!new RegExp(r).test(o)) throw new Error(t.toUpperCase() + ': Option "' + i + '" provided type "' + o + '" but expected type "' + r + '".'); } }var a; } };return i.fn.emulateTransitionEnd = t, i.event.special[l.TRANSITION_END] = { bindType: e, delegateType: e, handle: function handle(t) { if (i(t.target).is(this)) return t.handleObj.handler.apply(this, arguments); } }, l; }(e), In = (n = "alert", a = "." + (s = "bs.alert"), l = (r = e).fn[n], u = { CLOSE: "close" + a, CLOSED: "closed" + a, CLICK_DATA_API: "click" + a + ".data-api" }, f = "alert", d = "fade", _ = "show", g = function () { function i(t) { this._element = t; }var t = i.prototype;return t.close = function (t) { var e = this._element;t && (e = this._getRootElement(t)), this._triggerCloseEvent(e).isDefaultPrevented() || this._removeElement(e); }, t.dispose = function () { r.removeData(this._element, s), this._element = null; }, t._getRootElement = function (t) { var e = Cn.getSelectorFromElement(t), n = !1;return e && (n = r(e)[0]), n || (n = r(t).closest("." + f)[0]), n; }, t._triggerCloseEvent = function (t) { var e = r.Event(u.CLOSE);return r(t).trigger(e), e; }, t._removeElement = function (e) { var n = this;if (r(e).removeClass(_), r(e).hasClass(d)) { var t = Cn.getTransitionDurationFromElement(e);r(e).one(Cn.TRANSITION_END, function (t) { return n._destroyElement(e, t); }).emulateTransitionEnd(t); } else this._destroyElement(e); }, t._destroyElement = function (t) { r(t).detach().trigger(u.CLOSED).remove(); }, i._jQueryInterface = function (n) { return this.each(function () { var t = r(this), e = t.data(s);e || (e = new i(this), t.data(s, e)), "close" === n && e[n](this); }); }, i._handleDismiss = function (e) { return function (t) { t && t.preventDefault(), e.close(this); }; }, o(i, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }]), i; }(), r(document).on(u.CLICK_DATA_API, '[data-dismiss="alert"]', g._handleDismiss(new g())), r.fn[n] = g._jQueryInterface, r.fn[n].Constructor = g, r.fn[n].noConflict = function () { return r.fn[n] = l, g._jQueryInterface; }, g), An = (p = "button", E = "." + (v = "bs.button"), y = ".data-api", T = (m = e).fn[p], C = "active", I = "btn", D = '[data-toggle^="button"]', b = '[data-toggle="buttons"]', S = "input", w = ".active", N = ".btn", O = { CLICK_DATA_API: "click" + E + y, FOCUS_BLUR_DATA_API: (A = "focus") + E + y + " blur" + E + y }, k = function () { function n(t) { this._element = t; }var t = n.prototype;return t.toggle = function () { var t = !0, e = !0, n = m(this._element).closest(b)[0];if (n) { var i = m(this._element).find(S)[0];if (i) { if ("radio" === i.type) if (i.checked && m(this._element).hasClass(C)) t = !1;else { var r = m(n).find(w)[0];r && m(r).removeClass(C); }if (t) { if (i.hasAttribute("disabled") || n.hasAttribute("disabled") || i.classList.contains("disabled") || n.classList.contains("disabled")) return;i.checked = !m(this._element).hasClass(C), m(i).trigger("change"); }i.focus(), e = !1; } }e && this._element.setAttribute("aria-pressed", !m(this._element).hasClass(C)), t && m(this._element).toggleClass(C); }, t.dispose = function () { m.removeData(this._element, v), this._element = null; }, n._jQueryInterface = function (e) { return this.each(function () { var t = m(this).data(v);t || (t = new n(this), m(this).data(v, t)), "toggle" === e && t[e](); }); }, o(n, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }]), n; }(), m(document).on(O.CLICK_DATA_API, D, function (t) { t.preventDefault();var e = t.target;m(e).hasClass(I) || (e = m(e).closest(N)), k._jQueryInterface.call(m(e), "toggle"); }).on(O.FOCUS_BLUR_DATA_API, D, function (t) { var e = m(t.target).closest(N)[0];m(e).toggleClass(A, /^focus(in)?$/.test(t.type)); }), m.fn[p] = k._jQueryInterface, m.fn[p].Constructor = k, m.fn[p].noConflict = function () { return m.fn[p] = T, k._jQueryInterface; }, k), Dn = (L = "carousel", R = "." + (j = "bs.carousel"), H = ".data-api", W = (P = e).fn[L], M = { interval: 5e3, keyboard: !0, slide: !1, pause: "hover", wrap: !0 }, x = { interval: "(number|boolean)", keyboard: "boolean", slide: "(boolean|string)", pause: "(string|boolean)", wrap: "boolean" }, U = "next", K = "prev", F = "left", V = "right", Q = { SLIDE: "slide" + R, SLID: "slid" + R, KEYDOWN: "keydown" + R, MOUSEENTER: "mouseenter" + R, MOUSELEAVE: "mouseleave" + R, TOUCHEND: "touchend" + R, LOAD_DATA_API: "load" + R + H, CLICK_DATA_API: "click" + R + H }, B = "carousel", Y = "active", G = "slide", q = "carousel-item-right", z = "carousel-item-left", X = "carousel-item-next", J = "carousel-item-prev", Z = { ACTIVE: ".active", ACTIVE_ITEM: ".active.carousel-item", ITEM: ".carousel-item", NEXT_PREV: ".carousel-item-next, .carousel-item-prev", INDICATORS: ".carousel-indicators", DATA_SLIDE: "[data-slide], [data-slide-to]", DATA_RIDE: '[data-ride="carousel"]' }, $ = function () { function s(t, e) { this._items = null, this._interval = null, this._activeElement = null, this._isPaused = !1, this._isSliding = !1, this.touchTimeout = null, this._config = this._getConfig(e), this._element = P(t)[0], this._indicatorsElement = P(this._element).find(Z.INDICATORS)[0], this._addEventListeners(); }var t = s.prototype;return t.next = function () { this._isSliding || this._slide(U); }, t.nextWhenVisible = function () { !document.hidden && P(this._element).is(":visible") && "hidden" !== P(this._element).css("visibility") && this.next(); }, t.prev = function () { this._isSliding || this._slide(K); }, t.pause = function (t) { t || (this._isPaused = !0), P(this._element).find(Z.NEXT_PREV)[0] && (Cn.triggerTransitionEnd(this._element), this.cycle(!0)), clearInterval(this._interval), this._interval = null; }, t.cycle = function (t) { t || (this._isPaused = !1), this._interval && (clearInterval(this._interval), this._interval = null), this._config.interval && !this._isPaused && (this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval)); }, t.to = function (t) { var e = this;this._activeElement = P(this._element).find(Z.ACTIVE_ITEM)[0];var n = this._getItemIndex(this._activeElement);if (!(t > this._items.length - 1 || t < 0)) if (this._isSliding) P(this._element).one(Q.SLID, function () { return e.to(t); });else { if (n === t) return this.pause(), void this.cycle();var i = n < t ? U : K;this._slide(i, this._items[t]); } }, t.dispose = function () { P(this._element).off(R), P.removeData(this._element, j), this._items = null, this._config = null, this._element = null, this._interval = null, this._isPaused = null, this._isSliding = null, this._activeElement = null, this._indicatorsElement = null; }, t._getConfig = function (t) { return t = h({}, M, t), Cn.typeCheckConfig(L, t, x), t; }, t._addEventListeners = function () { var e = this;this._config.keyboard && P(this._element).on(Q.KEYDOWN, function (t) { return e._keydown(t); }), "hover" === this._config.pause && (P(this._element).on(Q.MOUSEENTER, function (t) { return e.pause(t); }).on(Q.MOUSELEAVE, function (t) { return e.cycle(t); }), "ontouchstart" in document.documentElement && P(this._element).on(Q.TOUCHEND, function () { e.pause(), e.touchTimeout && clearTimeout(e.touchTimeout), e.touchTimeout = setTimeout(function (t) { return e.cycle(t); }, 500 + e._config.interval); })); }, t._keydown = function (t) { if (!/input|textarea/i.test(t.target.tagName)) switch (t.which) {case 37: t.preventDefault(), this.prev();break;case 39: t.preventDefault(), this.next();} }, t._getItemIndex = function (t) { return this._items = P.makeArray(P(t).parent().find(Z.ITEM)), this._items.indexOf(t); }, t._getItemByDirection = function (t, e) { var n = t === U, i = t === K, r = this._getItemIndex(e), s = this._items.length - 1;if ((i && 0 === r || n && r === s) && !this._config.wrap) return e;var o = (r + (t === K ? -1 : 1)) % this._items.length;return -1 === o ? this._items[this._items.length - 1] : this._items[o]; }, t._triggerSlideEvent = function (t, e) { var n = this._getItemIndex(t), i = this._getItemIndex(P(this._element).find(Z.ACTIVE_ITEM)[0]), r = P.Event(Q.SLIDE, { relatedTarget: t, direction: e, from: i, to: n });return P(this._element).trigger(r), r; }, t._setActiveIndicatorElement = function (t) { if (this._indicatorsElement) { P(this._indicatorsElement).find(Z.ACTIVE).removeClass(Y);var e = this._indicatorsElement.children[this._getItemIndex(t)];e && P(e).addClass(Y); } }, t._slide = function (t, e) { var n, i, r, s = this, o = P(this._element).find(Z.ACTIVE_ITEM)[0], a = this._getItemIndex(o), l = e || o && this._getItemByDirection(t, o), h = this._getItemIndex(l), c = Boolean(this._interval);if (t === U ? (n = z, i = X, r = F) : (n = q, i = J, r = V), l && P(l).hasClass(Y)) this._isSliding = !1;else if (!this._triggerSlideEvent(l, r).isDefaultPrevented() && o && l) { this._isSliding = !0, c && this.pause(), this._setActiveIndicatorElement(l);var u = P.Event(Q.SLID, { relatedTarget: l, direction: r, from: a, to: h });if (P(this._element).hasClass(G)) { P(l).addClass(i), Cn.reflow(l), P(o).addClass(n), P(l).addClass(n);var f = Cn.getTransitionDurationFromElement(o);P(o).one(Cn.TRANSITION_END, function () { P(l).removeClass(n + " " + i).addClass(Y), P(o).removeClass(Y + " " + i + " " + n), s._isSliding = !1, setTimeout(function () { return P(s._element).trigger(u); }, 0); }).emulateTransitionEnd(f); } else P(o).removeClass(Y), P(l).addClass(Y), this._isSliding = !1, P(this._element).trigger(u);c && this.cycle(); } }, s._jQueryInterface = function (i) { return this.each(function () { var t = P(this).data(j), e = h({}, M, P(this).data());"object" == (typeof i === "undefined" ? "undefined" : _typeof(i)) && (e = h({}, e, i));var n = "string" == typeof i ? i : e.slide;if (t || (t = new s(this, e), P(this).data(j, t)), "number" == typeof i) t.to(i);else if ("string" == typeof n) { if ("undefined" == typeof t[n]) throw new TypeError('No method named "' + n + '"');t[n](); } else e.interval && (t.pause(), t.cycle()); }); }, s._dataApiClickHandler = function (t) { var e = Cn.getSelectorFromElement(this);if (e) { var n = P(e)[0];if (n && P(n).hasClass(B)) { var i = h({}, P(n).data(), P(this).data()), r = this.getAttribute("data-slide-to");r && (i.interval = !1), s._jQueryInterface.call(P(n), i), r && P(n).data(j).to(r), t.preventDefault(); } } }, o(s, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }, { key: "Default", get: function get() { return M; } }]), s; }(), P(document).on(Q.CLICK_DATA_API, Z.DATA_SLIDE, $._dataApiClickHandler), P(window).on(Q.LOAD_DATA_API, function () { P(Z.DATA_RIDE).each(function () { var t = P(this);$._jQueryInterface.call(t, t.data()); }); }), P.fn[L] = $._jQueryInterface, P.fn[L].Constructor = $, P.fn[L].noConflict = function () { return P.fn[L] = W, $._jQueryInterface; }, $), bn = (et = "collapse", it = "." + (nt = "bs.collapse"), rt = (tt = e).fn[et], st = { toggle: !0, parent: "" }, ot = { toggle: "boolean", parent: "(string|element)" }, at = { SHOW: "show" + it, SHOWN: "shown" + it, HIDE: "hide" + it, HIDDEN: "hidden" + it, CLICK_DATA_API: "click" + it + ".data-api" }, lt = "show", ht = "collapse", ct = "collapsing", ut = "collapsed", ft = "width", dt = "height", _t = { ACTIVES: ".show, .collapsing", DATA_TOGGLE: '[data-toggle="collapse"]' }, gt = function () { function a(t, e) { this._isTransitioning = !1, this._element = t, this._config = this._getConfig(e), this._triggerArray = tt.makeArray(tt('[data-toggle="collapse"][href="#' + t.id + '"],[data-toggle="collapse"][data-target="#' + t.id + '"]'));for (var n = tt(_t.DATA_TOGGLE), i = 0; i < n.length; i++) { var r = n[i], s = Cn.getSelectorFromElement(r);null !== s && 0 < tt(s).filter(t).length && (this._selector = s, this._triggerArray.push(r)); }this._parent = this._config.parent ? this._getParent() : null, this._config.parent || this._addAriaAndCollapsedClass(this._element, this._triggerArray), this._config.toggle && this.toggle(); }var t = a.prototype;return t.toggle = function () { tt(this._element).hasClass(lt) ? this.hide() : this.show(); }, t.show = function () { var t, e, n = this;if (!this._isTransitioning && !tt(this._element).hasClass(lt) && (this._parent && 0 === (t = tt.makeArray(tt(this._parent).find(_t.ACTIVES).filter('[data-parent="' + this._config.parent + '"]'))).length && (t = null), !(t && (e = tt(t).not(this._selector).data(nt)) && e._isTransitioning))) { var i = tt.Event(at.SHOW);if (tt(this._element).trigger(i), !i.isDefaultPrevented()) { t && (a._jQueryInterface.call(tt(t).not(this._selector), "hide"), e || tt(t).data(nt, null));var r = this._getDimension();tt(this._element).removeClass(ht).addClass(ct), (this._element.style[r] = 0) < this._triggerArray.length && tt(this._triggerArray).removeClass(ut).attr("aria-expanded", !0), this.setTransitioning(!0);var s = "scroll" + (r[0].toUpperCase() + r.slice(1)), o = Cn.getTransitionDurationFromElement(this._element);tt(this._element).one(Cn.TRANSITION_END, function () { tt(n._element).removeClass(ct).addClass(ht).addClass(lt), n._element.style[r] = "", n.setTransitioning(!1), tt(n._element).trigger(at.SHOWN); }).emulateTransitionEnd(o), this._element.style[r] = this._element[s] + "px"; } } }, t.hide = function () { var t = this;if (!this._isTransitioning && tt(this._element).hasClass(lt)) { var e = tt.Event(at.HIDE);if (tt(this._element).trigger(e), !e.isDefaultPrevented()) { var n = this._getDimension();if (this._element.style[n] = this._element.getBoundingClientRect()[n] + "px", Cn.reflow(this._element), tt(this._element).addClass(ct).removeClass(ht).removeClass(lt), 0 < this._triggerArray.length) for (var i = 0; i < this._triggerArray.length; i++) { var r = this._triggerArray[i], s = Cn.getSelectorFromElement(r);if (null !== s) tt(s).hasClass(lt) || tt(r).addClass(ut).attr("aria-expanded", !1); }this.setTransitioning(!0);this._element.style[n] = "";var o = Cn.getTransitionDurationFromElement(this._element);tt(this._element).one(Cn.TRANSITION_END, function () { t.setTransitioning(!1), tt(t._element).removeClass(ct).addClass(ht).trigger(at.HIDDEN); }).emulateTransitionEnd(o); } } }, t.setTransitioning = function (t) { this._isTransitioning = t; }, t.dispose = function () { tt.removeData(this._element, nt), this._config = null, this._parent = null, this._element = null, this._triggerArray = null, this._isTransitioning = null; }, t._getConfig = function (t) { return (t = h({}, st, t)).toggle = Boolean(t.toggle), Cn.typeCheckConfig(et, t, ot), t; }, t._getDimension = function () { return tt(this._element).hasClass(ft) ? ft : dt; }, t._getParent = function () { var n = this, t = null;Cn.isElement(this._config.parent) ? (t = this._config.parent, "undefined" != typeof this._config.parent.jquery && (t = this._config.parent[0])) : t = tt(this._config.parent)[0];var e = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]';return tt(t).find(e).each(function (t, e) { n._addAriaAndCollapsedClass(a._getTargetFromElement(e), [e]); }), t; }, t._addAriaAndCollapsedClass = function (t, e) { if (t) { var n = tt(t).hasClass(lt);0 < e.length && tt(e).toggleClass(ut, !n).attr("aria-expanded", n); } }, a._getTargetFromElement = function (t) { var e = Cn.getSelectorFromElement(t);return e ? tt(e)[0] : null; }, a._jQueryInterface = function (i) { return this.each(function () { var t = tt(this), e = t.data(nt), n = h({}, st, t.data(), "object" == (typeof i === "undefined" ? "undefined" : _typeof(i)) && i ? i : {});if (!e && n.toggle && /show|hide/.test(i) && (n.toggle = !1), e || (e = new a(this, n), t.data(nt, e)), "string" == typeof i) { if ("undefined" == typeof e[i]) throw new TypeError('No method named "' + i + '"');e[i](); } }); }, o(a, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }, { key: "Default", get: function get() { return st; } }]), a; }(), tt(document).on(at.CLICK_DATA_API, _t.DATA_TOGGLE, function (t) { "A" === t.currentTarget.tagName && t.preventDefault();var n = tt(this), e = Cn.getSelectorFromElement(this);tt(e).each(function () { var t = tt(this), e = t.data(nt) ? "toggle" : n.data();gt._jQueryInterface.call(t, e); }); }), tt.fn[et] = gt._jQueryInterface, tt.fn[et].Constructor = gt, tt.fn[et].noConflict = function () { return tt.fn[et] = rt, gt._jQueryInterface; }, gt), Sn = (pt = "dropdown", Et = "." + (vt = "bs.dropdown"), yt = ".data-api", Tt = (mt = e).fn[pt], Ct = new RegExp("38|40|27"), It = { HIDE: "hide" + Et, HIDDEN: "hidden" + Et, SHOW: "show" + Et, SHOWN: "shown" + Et, CLICK: "click" + Et, CLICK_DATA_API: "click" + Et + yt, KEYDOWN_DATA_API: "keydown" + Et + yt, KEYUP_DATA_API: "keyup" + Et + yt }, At = "disabled", Dt = "show", bt = "dropup", St = "dropright", wt = "dropleft", Nt = "dropdown-menu-right", Ot = "position-static", kt = '[data-toggle="dropdown"]', Pt = ".dropdown form", Lt = ".dropdown-menu", jt = ".navbar-nav", Rt = ".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)", Ht = "top-start", Wt = "top-end", Mt = "bottom-start", xt = "bottom-end", Ut = "right-start", Kt = "left-start", Ft = { offset: 0, flip: !0, boundary: "scrollParent", reference: "toggle", display: "dynamic" }, Vt = { offset: "(number|string|function)", flip: "boolean", boundary: "(string|element)", reference: "(string|element)", display: "string" }, Qt = function () { function l(t, e) { this._element = t, this._popper = null, this._config = this._getConfig(e), this._menu = this._getMenuElement(), this._inNavbar = this._detectNavbar(), this._addEventListeners(); }var t = l.prototype;return t.toggle = function () { if (!this._element.disabled && !mt(this._element).hasClass(At)) { var t = l._getParentFromElement(this._element), e = mt(this._menu).hasClass(Dt);if (l._clearMenus(), !e) { var n = { relatedTarget: this._element }, i = mt.Event(It.SHOW, n);if (mt(t).trigger(i), !i.isDefaultPrevented()) { if (!this._inNavbar) { if ("undefined" == typeof c) throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var r = this._element;"parent" === this._config.reference ? r = t : Cn.isElement(this._config.reference) && (r = this._config.reference, "undefined" != typeof this._config.reference.jquery && (r = this._config.reference[0])), "scrollParent" !== this._config.boundary && mt(t).addClass(Ot), this._popper = new c(r, this._menu, this._getPopperConfig()); }"ontouchstart" in document.documentElement && 0 === mt(t).closest(jt).length && mt(document.body).children().on("mouseover", null, mt.noop), this._element.focus(), this._element.setAttribute("aria-expanded", !0), mt(this._menu).toggleClass(Dt), mt(t).toggleClass(Dt).trigger(mt.Event(It.SHOWN, n)); } } } }, t.dispose = function () { mt.removeData(this._element, vt), mt(this._element).off(Et), this._element = null, (this._menu = null) !== this._popper && (this._popper.destroy(), this._popper = null); }, t.update = function () { this._inNavbar = this._detectNavbar(), null !== this._popper && this._popper.scheduleUpdate(); }, t._addEventListeners = function () { var e = this;mt(this._element).on(It.CLICK, function (t) { t.preventDefault(), t.stopPropagation(), e.toggle(); }); }, t._getConfig = function (t) { return t = h({}, this.constructor.Default, mt(this._element).data(), t), Cn.typeCheckConfig(pt, t, this.constructor.DefaultType), t; }, t._getMenuElement = function () { if (!this._menu) { var t = l._getParentFromElement(this._element);this._menu = mt(t).find(Lt)[0]; }return this._menu; }, t._getPlacement = function () { var t = mt(this._element).parent(), e = Mt;return t.hasClass(bt) ? (e = Ht, mt(this._menu).hasClass(Nt) && (e = Wt)) : t.hasClass(St) ? e = Ut : t.hasClass(wt) ? e = Kt : mt(this._menu).hasClass(Nt) && (e = xt), e; }, t._detectNavbar = function () { return 0 < mt(this._element).closest(".navbar").length; }, t._getPopperConfig = function () { var e = this, t = {};"function" == typeof this._config.offset ? t.fn = function (t) { return t.offsets = h({}, t.offsets, e._config.offset(t.offsets) || {}), t; } : t.offset = this._config.offset;var n = { placement: this._getPlacement(), modifiers: { offset: t, flip: { enabled: this._config.flip }, preventOverflow: { boundariesElement: this._config.boundary } } };return "static" === this._config.display && (n.modifiers.applyStyle = { enabled: !1 }), n; }, l._jQueryInterface = function (e) { return this.each(function () { var t = mt(this).data(vt);if (t || (t = new l(this, "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) ? e : null), mt(this).data(vt, t)), "string" == typeof e) { if ("undefined" == typeof t[e]) throw new TypeError('No method named "' + e + '"');t[e](); } }); }, l._clearMenus = function (t) { if (!t || 3 !== t.which && ("keyup" !== t.type || 9 === t.which)) for (var e = mt.makeArray(mt(kt)), n = 0; n < e.length; n++) { var i = l._getParentFromElement(e[n]), r = mt(e[n]).data(vt), s = { relatedTarget: e[n] };if (r) { var o = r._menu;if (mt(i).hasClass(Dt) && !(t && ("click" === t.type && /input|textarea/i.test(t.target.tagName) || "keyup" === t.type && 9 === t.which) && mt.contains(i, t.target))) { var a = mt.Event(It.HIDE, s);mt(i).trigger(a), a.isDefaultPrevented() || ("ontouchstart" in document.documentElement && mt(document.body).children().off("mouseover", null, mt.noop), e[n].setAttribute("aria-expanded", "false"), mt(o).removeClass(Dt), mt(i).removeClass(Dt).trigger(mt.Event(It.HIDDEN, s))); } } } }, l._getParentFromElement = function (t) { var e, n = Cn.getSelectorFromElement(t);return n && (e = mt(n)[0]), e || t.parentNode; }, l._dataApiKeydownHandler = function (t) { if ((/input|textarea/i.test(t.target.tagName) ? !(32 === t.which || 27 !== t.which && (40 !== t.which && 38 !== t.which || mt(t.target).closest(Lt).length)) : Ct.test(t.which)) && (t.preventDefault(), t.stopPropagation(), !this.disabled && !mt(this).hasClass(At))) { var e = l._getParentFromElement(this), n = mt(e).hasClass(Dt);if ((n || 27 === t.which && 32 === t.which) && (!n || 27 !== t.which && 32 !== t.which)) { var i = mt(e).find(Rt).get();if (0 !== i.length) { var r = i.indexOf(t.target);38 === t.which && 0 < r && r--, 40 === t.which && r < i.length - 1 && r++, r < 0 && (r = 0), i[r].focus(); } } else { if (27 === t.which) { var s = mt(e).find(kt)[0];mt(s).trigger("focus"); }mt(this).trigger("click"); } } }, o(l, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }, { key: "Default", get: function get() { return Ft; } }, { key: "DefaultType", get: function get() { return Vt; } }]), l; }(), mt(document).on(It.KEYDOWN_DATA_API, kt, Qt._dataApiKeydownHandler).on(It.KEYDOWN_DATA_API, Lt, Qt._dataApiKeydownHandler).on(It.CLICK_DATA_API + " " + It.KEYUP_DATA_API, Qt._clearMenus).on(It.CLICK_DATA_API, kt, function (t) { t.preventDefault(), t.stopPropagation(), Qt._jQueryInterface.call(mt(this), "toggle"); }).on(It.CLICK_DATA_API, Pt, function (t) { t.stopPropagation(); }), mt.fn[pt] = Qt._jQueryInterface, mt.fn[pt].Constructor = Qt, mt.fn[pt].noConflict = function () { return mt.fn[pt] = Tt, Qt._jQueryInterface; }, Qt), wn = (Yt = "modal", qt = "." + (Gt = "bs.modal"), zt = (Bt = e).fn[Yt], Xt = { backdrop: !0, keyboard: !0, focus: !0, show: !0 }, Jt = { backdrop: "(boolean|string)", keyboard: "boolean", focus: "boolean", show: "boolean" }, Zt = { HIDE: "hide" + qt, HIDDEN: "hidden" + qt, SHOW: "show" + qt, SHOWN: "shown" + qt, FOCUSIN: "focusin" + qt, RESIZE: "resize" + qt, CLICK_DISMISS: "click.dismiss" + qt, KEYDOWN_DISMISS: "keydown.dismiss" + qt, MOUSEUP_DISMISS: "mouseup.dismiss" + qt, MOUSEDOWN_DISMISS: "mousedown.dismiss" + qt, CLICK_DATA_API: "click" + qt + ".data-api" }, $t = "modal-scrollbar-measure", te = "modal-backdrop", ee = "modal-open", ne = "fade", ie = "show", re = { DIALOG: ".modal-dialog", DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', FIXED_CONTENT: ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", STICKY_CONTENT: ".sticky-top", NAVBAR_TOGGLER: ".navbar-toggler" }, se = function () { function r(t, e) { this._config = this._getConfig(e), this._element = t, this._dialog = Bt(t).find(re.DIALOG)[0], this._backdrop = null, this._isShown = !1, this._isBodyOverflowing = !1, this._ignoreBackdropClick = !1, this._scrollbarWidth = 0; }var t = r.prototype;return t.toggle = function (t) { return this._isShown ? this.hide() : this.show(t); }, t.show = function (t) { var e = this;if (!this._isTransitioning && !this._isShown) { Bt(this._element).hasClass(ne) && (this._isTransitioning = !0);var n = Bt.Event(Zt.SHOW, { relatedTarget: t });Bt(this._element).trigger(n), this._isShown || n.isDefaultPrevented() || (this._isShown = !0, this._checkScrollbar(), this._setScrollbar(), this._adjustDialog(), Bt(document.body).addClass(ee), this._setEscapeEvent(), this._setResizeEvent(), Bt(this._element).on(Zt.CLICK_DISMISS, re.DATA_DISMISS, function (t) { return e.hide(t); }), Bt(this._dialog).on(Zt.MOUSEDOWN_DISMISS, function () { Bt(e._element).one(Zt.MOUSEUP_DISMISS, function (t) { Bt(t.target).is(e._element) && (e._ignoreBackdropClick = !0); }); }), this._showBackdrop(function () { return e._showElement(t); })); } }, t.hide = function (t) { var e = this;if (t && t.preventDefault(), !this._isTransitioning && this._isShown) { var n = Bt.Event(Zt.HIDE);if (Bt(this._element).trigger(n), this._isShown && !n.isDefaultPrevented()) { this._isShown = !1;var i = Bt(this._element).hasClass(ne);if (i && (this._isTransitioning = !0), this._setEscapeEvent(), this._setResizeEvent(), Bt(document).off(Zt.FOCUSIN), Bt(this._element).removeClass(ie), Bt(this._element).off(Zt.CLICK_DISMISS), Bt(this._dialog).off(Zt.MOUSEDOWN_DISMISS), i) { var r = Cn.getTransitionDurationFromElement(this._element);Bt(this._element).one(Cn.TRANSITION_END, function (t) { return e._hideModal(t); }).emulateTransitionEnd(r); } else this._hideModal(); } } }, t.dispose = function () { Bt.removeData(this._element, Gt), Bt(window, document, this._element, this._backdrop).off(qt), this._config = null, this._element = null, this._dialog = null, this._backdrop = null, this._isShown = null, this._isBodyOverflowing = null, this._ignoreBackdropClick = null, this._scrollbarWidth = null; }, t.handleUpdate = function () { this._adjustDialog(); }, t._getConfig = function (t) { return t = h({}, Xt, t), Cn.typeCheckConfig(Yt, t, Jt), t; }, t._showElement = function (t) { var e = this, n = Bt(this._element).hasClass(ne);this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.appendChild(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.scrollTop = 0, n && Cn.reflow(this._element), Bt(this._element).addClass(ie), this._config.focus && this._enforceFocus();var i = Bt.Event(Zt.SHOWN, { relatedTarget: t }), r = function r() { e._config.focus && e._element.focus(), e._isTransitioning = !1, Bt(e._element).trigger(i); };if (n) { var s = Cn.getTransitionDurationFromElement(this._element);Bt(this._dialog).one(Cn.TRANSITION_END, r).emulateTransitionEnd(s); } else r(); }, t._enforceFocus = function () { var e = this;Bt(document).off(Zt.FOCUSIN).on(Zt.FOCUSIN, function (t) { document !== t.target && e._element !== t.target && 0 === Bt(e._element).has(t.target).length && e._element.focus(); }); }, t._setEscapeEvent = function () { var e = this;this._isShown && this._config.keyboard ? Bt(this._element).on(Zt.KEYDOWN_DISMISS, function (t) { 27 === t.which && (t.preventDefault(), e.hide()); }) : this._isShown || Bt(this._element).off(Zt.KEYDOWN_DISMISS); }, t._setResizeEvent = function () { var e = this;this._isShown ? Bt(window).on(Zt.RESIZE, function (t) { return e.handleUpdate(t); }) : Bt(window).off(Zt.RESIZE); }, t._hideModal = function () { var t = this;this._element.style.display = "none", this._element.setAttribute("aria-hidden", !0), this._isTransitioning = !1, this._showBackdrop(function () { Bt(document.body).removeClass(ee), t._resetAdjustments(), t._resetScrollbar(), Bt(t._element).trigger(Zt.HIDDEN); }); }, t._removeBackdrop = function () { this._backdrop && (Bt(this._backdrop).remove(), this._backdrop = null); }, t._showBackdrop = function (t) { var e = this, n = Bt(this._element).hasClass(ne) ? ne : "";if (this._isShown && this._config.backdrop) { if (this._backdrop = document.createElement("div"), this._backdrop.className = te, n && Bt(this._backdrop).addClass(n), Bt(this._backdrop).appendTo(document.body), Bt(this._element).on(Zt.CLICK_DISMISS, function (t) { e._ignoreBackdropClick ? e._ignoreBackdropClick = !1 : t.target === t.currentTarget && ("static" === e._config.backdrop ? e._element.focus() : e.hide()); }), n && Cn.reflow(this._backdrop), Bt(this._backdrop).addClass(ie), !t) return;if (!n) return void t();var i = Cn.getTransitionDurationFromElement(this._backdrop);Bt(this._backdrop).one(Cn.TRANSITION_END, t).emulateTransitionEnd(i); } else if (!this._isShown && this._backdrop) { Bt(this._backdrop).removeClass(ie);var r = function r() { e._removeBackdrop(), t && t(); };if (Bt(this._element).hasClass(ne)) { var s = Cn.getTransitionDurationFromElement(this._backdrop);Bt(this._backdrop).one(Cn.TRANSITION_END, r).emulateTransitionEnd(s); } else r(); } else t && t(); }, t._adjustDialog = function () { var t = this._element.scrollHeight > document.documentElement.clientHeight;!this._isBodyOverflowing && t && (this._element.style.paddingLeft = this._scrollbarWidth + "px"), this._isBodyOverflowing && !t && (this._element.style.paddingRight = this._scrollbarWidth + "px"); }, t._resetAdjustments = function () { this._element.style.paddingLeft = "", this._element.style.paddingRight = ""; }, t._checkScrollbar = function () { var t = document.body.getBoundingClientRect();this._isBodyOverflowing = t.left + t.right < window.innerWidth, this._scrollbarWidth = this._getScrollbarWidth(); }, t._setScrollbar = function () { var r = this;if (this._isBodyOverflowing) { Bt(re.FIXED_CONTENT).each(function (t, e) { var n = Bt(e)[0].style.paddingRight, i = Bt(e).css("padding-right");Bt(e).data("padding-right", n).css("padding-right", parseFloat(i) + r._scrollbarWidth + "px"); }), Bt(re.STICKY_CONTENT).each(function (t, e) { var n = Bt(e)[0].style.marginRight, i = Bt(e).css("margin-right");Bt(e).data("margin-right", n).css("margin-right", parseFloat(i) - r._scrollbarWidth + "px"); }), Bt(re.NAVBAR_TOGGLER).each(function (t, e) { var n = Bt(e)[0].style.marginRight, i = Bt(e).css("margin-right");Bt(e).data("margin-right", n).css("margin-right", parseFloat(i) + r._scrollbarWidth + "px"); });var t = document.body.style.paddingRight, e = Bt(document.body).css("padding-right");Bt(document.body).data("padding-right", t).css("padding-right", parseFloat(e) + this._scrollbarWidth + "px"); } }, t._resetScrollbar = function () { Bt(re.FIXED_CONTENT).each(function (t, e) { var n = Bt(e).data("padding-right");"undefined" != typeof n && Bt(e).css("padding-right", n).removeData("padding-right"); }), Bt(re.STICKY_CONTENT + ", " + re.NAVBAR_TOGGLER).each(function (t, e) { var n = Bt(e).data("margin-right");"undefined" != typeof n && Bt(e).css("margin-right", n).removeData("margin-right"); });var t = Bt(document.body).data("padding-right");"undefined" != typeof t && Bt(document.body).css("padding-right", t).removeData("padding-right"); }, t._getScrollbarWidth = function () { var t = document.createElement("div");t.className = $t, document.body.appendChild(t);var e = t.getBoundingClientRect().width - t.clientWidth;return document.body.removeChild(t), e; }, r._jQueryInterface = function (n, i) { return this.each(function () { var t = Bt(this).data(Gt), e = h({}, Xt, Bt(this).data(), "object" == (typeof n === "undefined" ? "undefined" : _typeof(n)) && n ? n : {});if (t || (t = new r(this, e), Bt(this).data(Gt, t)), "string" == typeof n) { if ("undefined" == typeof t[n]) throw new TypeError('No method named "' + n + '"');t[n](i); } else e.show && t.show(i); }); }, o(r, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }, { key: "Default", get: function get() { return Xt; } }]), r; }(), Bt(document).on(Zt.CLICK_DATA_API, re.DATA_TOGGLE, function (t) { var e, n = this, i = Cn.getSelectorFromElement(this);i && (e = Bt(i)[0]);var r = Bt(e).data(Gt) ? "toggle" : h({}, Bt(e).data(), Bt(this).data());"A" !== this.tagName && "AREA" !== this.tagName || t.preventDefault();var s = Bt(e).one(Zt.SHOW, function (t) { t.isDefaultPrevented() || s.one(Zt.HIDDEN, function () { Bt(n).is(":visible") && n.focus(); }); });se._jQueryInterface.call(Bt(e), r, this); }), Bt.fn[Yt] = se._jQueryInterface, Bt.fn[Yt].Constructor = se, Bt.fn[Yt].noConflict = function () { return Bt.fn[Yt] = zt, se._jQueryInterface; }, se), Nn = (ae = "tooltip", he = "." + (le = "bs.tooltip"), ce = (oe = e).fn[ae], ue = "bs-tooltip", fe = new RegExp("(^|\\s)" + ue + "\\S+", "g"), ge = { animation: !0, template: '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover focus", title: "", delay: 0, html: !(_e = { AUTO: "auto", TOP: "top", RIGHT: "right", BOTTOM: "bottom", LEFT: "left" }), selector: !(de = { animation: "boolean", template: "string", title: "(string|element|function)", trigger: "string", delay: "(number|object)", html: "boolean", selector: "(string|boolean)", placement: "(string|function)", offset: "(number|string)", container: "(string|element|boolean)", fallbackPlacement: "(string|array)", boundary: "(string|element)" }), placement: "top", offset: 0, container: !1, fallbackPlacement: "flip", boundary: "scrollParent" }, pe = "out", ve = { HIDE: "hide" + he, HIDDEN: "hidden" + he, SHOW: (me = "show") + he, SHOWN: "shown" + he, INSERTED: "inserted" + he, CLICK: "click" + he, FOCUSIN: "focusin" + he, FOCUSOUT: "focusout" + he, MOUSEENTER: "mouseenter" + he, MOUSELEAVE: "mouseleave" + he }, Ee = "fade", ye = "show", Te = ".tooltip-inner", Ce = ".arrow", Ie = "hover", Ae = "focus", De = "click", be = "manual", Se = function () { function i(t, e) { if ("undefined" == typeof c) throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled = !0, this._timeout = 0, this._hoverState = "", this._activeTrigger = {}, this._popper = null, this.element = t, this.config = this._getConfig(e), this.tip = null, this._setListeners(); }var t = i.prototype;return t.enable = function () { this._isEnabled = !0; }, t.disable = function () { this._isEnabled = !1; }, t.toggleEnabled = function () { this._isEnabled = !this._isEnabled; }, t.toggle = function (t) { if (this._isEnabled) if (t) { var e = this.constructor.DATA_KEY, n = oe(t.currentTarget).data(e);n || (n = new this.constructor(t.currentTarget, this._getDelegateConfig()), oe(t.currentTarget).data(e, n)), n._activeTrigger.click = !n._activeTrigger.click, n._isWithActiveTrigger() ? n._enter(null, n) : n._leave(null, n); } else { if (oe(this.getTipElement()).hasClass(ye)) return void this._leave(null, this);this._enter(null, this); } }, t.dispose = function () { clearTimeout(this._timeout), oe.removeData(this.element, this.constructor.DATA_KEY), oe(this.element).off(this.constructor.EVENT_KEY), oe(this.element).closest(".modal").off("hide.bs.modal"), this.tip && oe(this.tip).remove(), this._isEnabled = null, this._timeout = null, this._hoverState = null, (this._activeTrigger = null) !== this._popper && this._popper.destroy(), this._popper = null, this.element = null, this.config = null, this.tip = null; }, t.show = function () { var e = this;if ("none" === oe(this.element).css("display")) throw new Error("Please use show on visible elements");var t = oe.Event(this.constructor.Event.SHOW);if (this.isWithContent() && this._isEnabled) { oe(this.element).trigger(t);var n = oe.contains(this.element.ownerDocument.documentElement, this.element);if (t.isDefaultPrevented() || !n) return;var i = this.getTipElement(), r = Cn.getUID(this.constructor.NAME);i.setAttribute("id", r), this.element.setAttribute("aria-describedby", r), this.setContent(), this.config.animation && oe(i).addClass(Ee);var s = "function" == typeof this.config.placement ? this.config.placement.call(this, i, this.element) : this.config.placement, o = this._getAttachment(s);this.addAttachmentClass(o);var a = !1 === this.config.container ? document.body : oe(this.config.container);oe(i).data(this.constructor.DATA_KEY, this), oe.contains(this.element.ownerDocument.documentElement, this.tip) || oe(i).appendTo(a), oe(this.element).trigger(this.constructor.Event.INSERTED), this._popper = new c(this.element, i, { placement: o, modifiers: { offset: { offset: this.config.offset }, flip: { behavior: this.config.fallbackPlacement }, arrow: { element: Ce }, preventOverflow: { boundariesElement: this.config.boundary } }, onCreate: function onCreate(t) { t.originalPlacement !== t.placement && e._handlePopperPlacementChange(t); }, onUpdate: function onUpdate(t) { e._handlePopperPlacementChange(t); } }), oe(i).addClass(ye), "ontouchstart" in document.documentElement && oe(document.body).children().on("mouseover", null, oe.noop);var l = function l() { e.config.animation && e._fixTransition();var t = e._hoverState;e._hoverState = null, oe(e.element).trigger(e.constructor.Event.SHOWN), t === pe && e._leave(null, e); };if (oe(this.tip).hasClass(Ee)) { var h = Cn.getTransitionDurationFromElement(this.tip);oe(this.tip).one(Cn.TRANSITION_END, l).emulateTransitionEnd(h); } else l(); } }, t.hide = function (t) { var e = this, n = this.getTipElement(), i = oe.Event(this.constructor.Event.HIDE), r = function r() { e._hoverState !== me && n.parentNode && n.parentNode.removeChild(n), e._cleanTipClass(), e.element.removeAttribute("aria-describedby"), oe(e.element).trigger(e.constructor.Event.HIDDEN), null !== e._popper && e._popper.destroy(), t && t(); };if (oe(this.element).trigger(i), !i.isDefaultPrevented()) { if (oe(n).removeClass(ye), "ontouchstart" in document.documentElement && oe(document.body).children().off("mouseover", null, oe.noop), this._activeTrigger[De] = !1, this._activeTrigger[Ae] = !1, this._activeTrigger[Ie] = !1, oe(this.tip).hasClass(Ee)) { var s = Cn.getTransitionDurationFromElement(n);oe(n).one(Cn.TRANSITION_END, r).emulateTransitionEnd(s); } else r();this._hoverState = ""; } }, t.update = function () { null !== this._popper && this._popper.scheduleUpdate(); }, t.isWithContent = function () { return Boolean(this.getTitle()); }, t.addAttachmentClass = function (t) { oe(this.getTipElement()).addClass(ue + "-" + t); }, t.getTipElement = function () { return this.tip = this.tip || oe(this.config.template)[0], this.tip; }, t.setContent = function () { var t = oe(this.getTipElement());this.setElementContent(t.find(Te), this.getTitle()), t.removeClass(Ee + " " + ye); }, t.setElementContent = function (t, e) { var n = this.config.html;"object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) && (e.nodeType || e.jquery) ? n ? oe(e).parent().is(t) || t.empty().append(e) : t.text(oe(e).text()) : t[n ? "html" : "text"](e); }, t.getTitle = function () { var t = this.element.getAttribute("data-original-title");return t || (t = "function" == typeof this.config.title ? this.config.title.call(this.element) : this.config.title), t; }, t._getAttachment = function (t) { return _e[t.toUpperCase()]; }, t._setListeners = function () { var i = this;this.config.trigger.split(" ").forEach(function (t) { if ("click" === t) oe(i.element).on(i.constructor.Event.CLICK, i.config.selector, function (t) { return i.toggle(t); });else if (t !== be) { var e = t === Ie ? i.constructor.Event.MOUSEENTER : i.constructor.Event.FOCUSIN, n = t === Ie ? i.constructor.Event.MOUSELEAVE : i.constructor.Event.FOCUSOUT;oe(i.element).on(e, i.config.selector, function (t) { return i._enter(t); }).on(n, i.config.selector, function (t) { return i._leave(t); }); }oe(i.element).closest(".modal").on("hide.bs.modal", function () { return i.hide(); }); }), this.config.selector ? this.config = h({}, this.config, { trigger: "manual", selector: "" }) : this._fixTitle(); }, t._fixTitle = function () { var t = _typeof(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title") || "string" !== t) && (this.element.setAttribute("data-original-title", this.element.getAttribute("title") || ""), this.element.setAttribute("title", "")); }, t._enter = function (t, e) { var n = this.constructor.DATA_KEY;(e = e || oe(t.currentTarget).data(n)) || (e = new this.constructor(t.currentTarget, this._getDelegateConfig()), oe(t.currentTarget).data(n, e)), t && (e._activeTrigger["focusin" === t.type ? Ae : Ie] = !0), oe(e.getTipElement()).hasClass(ye) || e._hoverState === me ? e._hoverState = me : (clearTimeout(e._timeout), e._hoverState = me, e.config.delay && e.config.delay.show ? e._timeout = setTimeout(function () { e._hoverState === me && e.show(); }, e.config.delay.show) : e.show()); }, t._leave = function (t, e) { var n = this.constructor.DATA_KEY;(e = e || oe(t.currentTarget).data(n)) || (e = new this.constructor(t.currentTarget, this._getDelegateConfig()), oe(t.currentTarget).data(n, e)), t && (e._activeTrigger["focusout" === t.type ? Ae : Ie] = !1), e._isWithActiveTrigger() || (clearTimeout(e._timeout), e._hoverState = pe, e.config.delay && e.config.delay.hide ? e._timeout = setTimeout(function () { e._hoverState === pe && e.hide(); }, e.config.delay.hide) : e.hide()); }, t._isWithActiveTrigger = function () { for (var t in this._activeTrigger) { if (this._activeTrigger[t]) return !0; }return !1; }, t._getConfig = function (t) { return "number" == typeof (t = h({}, this.constructor.Default, oe(this.element).data(), "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) && t ? t : {})).delay && (t.delay = { show: t.delay, hide: t.delay }), "number" == typeof t.title && (t.title = t.title.toString()), "number" == typeof t.content && (t.content = t.content.toString()), Cn.typeCheckConfig(ae, t, this.constructor.DefaultType), t; }, t._getDelegateConfig = function () { var t = {};if (this.config) for (var e in this.config) { this.constructor.Default[e] !== this.config[e] && (t[e] = this.config[e]); }return t; }, t._cleanTipClass = function () { var t = oe(this.getTipElement()), e = t.attr("class").match(fe);null !== e && 0 < e.length && t.removeClass(e.join("")); }, t._handlePopperPlacementChange = function (t) { this._cleanTipClass(), this.addAttachmentClass(this._getAttachment(t.placement)); }, t._fixTransition = function () { var t = this.getTipElement(), e = this.config.animation;null === t.getAttribute("x-placement") && (oe(t).removeClass(Ee), this.config.animation = !1, this.hide(), this.show(), this.config.animation = e); }, i._jQueryInterface = function (n) { return this.each(function () { var t = oe(this).data(le), e = "object" == (typeof n === "undefined" ? "undefined" : _typeof(n)) && n;if ((t || !/dispose|hide/.test(n)) && (t || (t = new i(this, e), oe(this).data(le, t)), "string" == typeof n)) { if ("undefined" == typeof t[n]) throw new TypeError('No method named "' + n + '"');t[n](); } }); }, o(i, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }, { key: "Default", get: function get() { return ge; } }, { key: "NAME", get: function get() { return ae; } }, { key: "DATA_KEY", get: function get() { return le; } }, { key: "Event", get: function get() { return ve; } }, { key: "EVENT_KEY", get: function get() { return he; } }, { key: "DefaultType", get: function get() { return de; } }]), i; }(), oe.fn[ae] = Se._jQueryInterface, oe.fn[ae].Constructor = Se, oe.fn[ae].noConflict = function () { return oe.fn[ae] = ce, Se._jQueryInterface; }, Se), On = (Ne = "popover", ke = "." + (Oe = "bs.popover"), Pe = (we = e).fn[Ne], Le = "bs-popover", je = new RegExp("(^|\\s)" + Le + "\\S+", "g"), Re = h({}, Nn.Default, { placement: "right", trigger: "click", content: "", template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>' }), He = h({}, Nn.DefaultType, { content: "(string|element|function)" }), We = "fade", xe = ".popover-header", Ue = ".popover-body", Ke = { HIDE: "hide" + ke, HIDDEN: "hidden" + ke, SHOW: (Me = "show") + ke, SHOWN: "shown" + ke, INSERTED: "inserted" + ke, CLICK: "click" + ke, FOCUSIN: "focusin" + ke, FOCUSOUT: "focusout" + ke, MOUSEENTER: "mouseenter" + ke, MOUSELEAVE: "mouseleave" + ke }, Fe = function (t) { var e, n;function i() { return t.apply(this, arguments) || this; }n = t, (e = i).prototype = Object.create(n.prototype), (e.prototype.constructor = e).__proto__ = n;var r = i.prototype;return r.isWithContent = function () { return this.getTitle() || this._getContent(); }, r.addAttachmentClass = function (t) { we(this.getTipElement()).addClass(Le + "-" + t); }, r.getTipElement = function () { return this.tip = this.tip || we(this.config.template)[0], this.tip; }, r.setContent = function () { var t = we(this.getTipElement());this.setElementContent(t.find(xe), this.getTitle());var e = this._getContent();"function" == typeof e && (e = e.call(this.element)), this.setElementContent(t.find(Ue), e), t.removeClass(We + " " + Me); }, r._getContent = function () { return this.element.getAttribute("data-content") || this.config.content; }, r._cleanTipClass = function () { var t = we(this.getTipElement()), e = t.attr("class").match(je);null !== e && 0 < e.length && t.removeClass(e.join("")); }, i._jQueryInterface = function (n) { return this.each(function () { var t = we(this).data(Oe), e = "object" == (typeof n === "undefined" ? "undefined" : _typeof(n)) ? n : null;if ((t || !/destroy|hide/.test(n)) && (t || (t = new i(this, e), we(this).data(Oe, t)), "string" == typeof n)) { if ("undefined" == typeof t[n]) throw new TypeError('No method named "' + n + '"');t[n](); } }); }, o(i, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }, { key: "Default", get: function get() { return Re; } }, { key: "NAME", get: function get() { return Ne; } }, { key: "DATA_KEY", get: function get() { return Oe; } }, { key: "Event", get: function get() { return Ke; } }, { key: "EVENT_KEY", get: function get() { return ke; } }, { key: "DefaultType", get: function get() { return He; } }]), i; }(Nn), we.fn[Ne] = Fe._jQueryInterface, we.fn[Ne].Constructor = Fe, we.fn[Ne].noConflict = function () { return we.fn[Ne] = Pe, Fe._jQueryInterface; }, Fe), kn = (Qe = "scrollspy", Ye = "." + (Be = "bs.scrollspy"), Ge = (Ve = e).fn[Qe], qe = { offset: 10, method: "auto", target: "" }, ze = { offset: "number", method: "string", target: "(string|element)" }, Xe = { ACTIVATE: "activate" + Ye, SCROLL: "scroll" + Ye, LOAD_DATA_API: "load" + Ye + ".data-api" }, Je = "dropdown-item", Ze = "active", $e = { DATA_SPY: '[data-spy="scroll"]', ACTIVE: ".active", NAV_LIST_GROUP: ".nav, .list-group", NAV_LINKS: ".nav-link", NAV_ITEMS: ".nav-item", LIST_ITEMS: ".list-group-item", DROPDOWN: ".dropdown", DROPDOWN_ITEMS: ".dropdown-item", DROPDOWN_TOGGLE: ".dropdown-toggle" }, tn = "offset", en = "position", nn = function () { function n(t, e) { var n = this;this._element = t, this._scrollElement = "BODY" === t.tagName ? window : t, this._config = this._getConfig(e), this._selector = this._config.target + " " + $e.NAV_LINKS + "," + this._config.target + " " + $e.LIST_ITEMS + "," + this._config.target + " " + $e.DROPDOWN_ITEMS, this._offsets = [], this._targets = [], this._activeTarget = null, this._scrollHeight = 0, Ve(this._scrollElement).on(Xe.SCROLL, function (t) { return n._process(t); }), this.refresh(), this._process(); }var t = n.prototype;return t.refresh = function () { var e = this, t = this._scrollElement === this._scrollElement.window ? tn : en, r = "auto" === this._config.method ? t : this._config.method, s = r === en ? this._getScrollTop() : 0;this._offsets = [], this._targets = [], this._scrollHeight = this._getScrollHeight(), Ve.makeArray(Ve(this._selector)).map(function (t) { var e, n = Cn.getSelectorFromElement(t);if (n && (e = Ve(n)[0]), e) { var i = e.getBoundingClientRect();if (i.width || i.height) return [Ve(e)[r]().top + s, n]; }return null; }).filter(function (t) { return t; }).sort(function (t, e) { return t[0] - e[0]; }).forEach(function (t) { e._offsets.push(t[0]), e._targets.push(t[1]); }); }, t.dispose = function () { Ve.removeData(this._element, Be), Ve(this._scrollElement).off(Ye), this._element = null, this._scrollElement = null, this._config = null, this._selector = null, this._offsets = null, this._targets = null, this._activeTarget = null, this._scrollHeight = null; }, t._getConfig = function (t) { if ("string" != typeof (t = h({}, qe, "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) && t ? t : {})).target) { var e = Ve(t.target).attr("id");e || (e = Cn.getUID(Qe), Ve(t.target).attr("id", e)), t.target = "#" + e; }return Cn.typeCheckConfig(Qe, t, ze), t; }, t._getScrollTop = function () { return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; }, t._getScrollHeight = function () { return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); }, t._getOffsetHeight = function () { return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; }, t._process = function () { var t = this._getScrollTop() + this._config.offset, e = this._getScrollHeight(), n = this._config.offset + e - this._getOffsetHeight();if (this._scrollHeight !== e && this.refresh(), n <= t) { var i = this._targets[this._targets.length - 1];this._activeTarget !== i && this._activate(i); } else { if (this._activeTarget && t < this._offsets[0] && 0 < this._offsets[0]) return this._activeTarget = null, void this._clear();for (var r = this._offsets.length; r--;) { this._activeTarget !== this._targets[r] && t >= this._offsets[r] && ("undefined" == typeof this._offsets[r + 1] || t < this._offsets[r + 1]) && this._activate(this._targets[r]); } } }, t._activate = function (e) { this._activeTarget = e, this._clear();var t = this._selector.split(",");t = t.map(function (t) { return t + '[data-target="' + e + '"],' + t + '[href="' + e + '"]'; });var n = Ve(t.join(","));n.hasClass(Je) ? (n.closest($e.DROPDOWN).find($e.DROPDOWN_TOGGLE).addClass(Ze), n.addClass(Ze)) : (n.addClass(Ze), n.parents($e.NAV_LIST_GROUP).prev($e.NAV_LINKS + ", " + $e.LIST_ITEMS).addClass(Ze), n.parents($e.NAV_LIST_GROUP).prev($e.NAV_ITEMS).children($e.NAV_LINKS).addClass(Ze)), Ve(this._scrollElement).trigger(Xe.ACTIVATE, { relatedTarget: e }); }, t._clear = function () { Ve(this._selector).filter($e.ACTIVE).removeClass(Ze); }, n._jQueryInterface = function (e) { return this.each(function () { var t = Ve(this).data(Be);if (t || (t = new n(this, "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) && e), Ve(this).data(Be, t)), "string" == typeof e) { if ("undefined" == typeof t[e]) throw new TypeError('No method named "' + e + '"');t[e](); } }); }, o(n, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }, { key: "Default", get: function get() { return qe; } }]), n; }(), Ve(window).on(Xe.LOAD_DATA_API, function () { for (var t = Ve.makeArray(Ve($e.DATA_SPY)), e = t.length; e--;) { var n = Ve(t[e]);nn._jQueryInterface.call(n, n.data()); } }), Ve.fn[Qe] = nn._jQueryInterface, Ve.fn[Qe].Constructor = nn, Ve.fn[Qe].noConflict = function () { return Ve.fn[Qe] = Ge, nn._jQueryInterface; }, nn), Pn = (on = "." + (sn = "bs.tab"), an = (rn = e).fn.tab, ln = { HIDE: "hide" + on, HIDDEN: "hidden" + on, SHOW: "show" + on, SHOWN: "shown" + on, CLICK_DATA_API: "click" + on + ".data-api" }, hn = "dropdown-menu", cn = "active", un = "disabled", fn = "fade", dn = "show", _n = ".dropdown", gn = ".nav, .list-group", mn = ".active", pn = "> li > .active", vn = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', En = ".dropdown-toggle", yn = "> .dropdown-menu .active", Tn = function () { function i(t) { this._element = t; }var t = i.prototype;return t.show = function () { var n = this;if (!(this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && rn(this._element).hasClass(cn) || rn(this._element).hasClass(un))) { var t, i, e = rn(this._element).closest(gn)[0], r = Cn.getSelectorFromElement(this._element);if (e) { var s = "UL" === e.nodeName ? pn : mn;i = (i = rn.makeArray(rn(e).find(s)))[i.length - 1]; }var o = rn.Event(ln.HIDE, { relatedTarget: this._element }), a = rn.Event(ln.SHOW, { relatedTarget: i });if (i && rn(i).trigger(o), rn(this._element).trigger(a), !a.isDefaultPrevented() && !o.isDefaultPrevented()) { r && (t = rn(r)[0]), this._activate(this._element, e);var l = function l() { var t = rn.Event(ln.HIDDEN, { relatedTarget: n._element }), e = rn.Event(ln.SHOWN, { relatedTarget: i });rn(i).trigger(t), rn(n._element).trigger(e); };t ? this._activate(t, t.parentNode, l) : l(); } } }, t.dispose = function () { rn.removeData(this._element, sn), this._element = null; }, t._activate = function (t, e, n) { var i = this, r = ("UL" === e.nodeName ? rn(e).find(pn) : rn(e).children(mn))[0], s = n && r && rn(r).hasClass(fn), o = function o() { return i._transitionComplete(t, r, n); };if (r && s) { var a = Cn.getTransitionDurationFromElement(r);rn(r).one(Cn.TRANSITION_END, o).emulateTransitionEnd(a); } else o(); }, t._transitionComplete = function (t, e, n) { if (e) { rn(e).removeClass(dn + " " + cn);var i = rn(e.parentNode).find(yn)[0];i && rn(i).removeClass(cn), "tab" === e.getAttribute("role") && e.setAttribute("aria-selected", !1); }if (rn(t).addClass(cn), "tab" === t.getAttribute("role") && t.setAttribute("aria-selected", !0), Cn.reflow(t), rn(t).addClass(dn), t.parentNode && rn(t.parentNode).hasClass(hn)) { var r = rn(t).closest(_n)[0];r && rn(r).find(En).addClass(cn), t.setAttribute("aria-expanded", !0); }n && n(); }, i._jQueryInterface = function (n) { return this.each(function () { var t = rn(this), e = t.data(sn);if (e || (e = new i(this), t.data(sn, e)), "string" == typeof n) { if ("undefined" == typeof e[n]) throw new TypeError('No method named "' + n + '"');e[n](); } }); }, o(i, null, [{ key: "VERSION", get: function get() { return "4.1.1"; } }]), i; }(), rn(document).on(ln.CLICK_DATA_API, vn, function (t) { t.preventDefault(), Tn._jQueryInterface.call(rn(this), "show"); }), rn.fn.tab = Tn._jQueryInterface, rn.fn.tab.Constructor = Tn, rn.fn.tab.noConflict = function () { return rn.fn.tab = an, Tn._jQueryInterface; }, Tn);!function (t) { if ("undefined" == typeof t) throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e = t.fn.jquery.split(" ")[0].split(".");if (e[0] < 2 && e[1] < 9 || 1 === e[0] && 9 === e[1] && e[2] < 1 || 4 <= e[0]) throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0"); }(e), t.Util = Cn, t.Alert = In, t.Button = An, t.Carousel = Dn, t.Collapse = bn, t.Dropdown = Sn, t.Modal = wn, t.Popover = On, t.Scrollspy = kn, t.Tab = Pn, t.Tooltip = Nn, Object.defineProperty(t, "__esModule", { value: !0 }); }); //# sourceMappingURL=bootstrap.min.js.map /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* Copyright (C) Federico Zivolo 2017 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */(function (e, t) { 'object' == ( false ? 'undefined' : _typeof(exports)) && 'undefined' != typeof module ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (t), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : e.Popper = t(); })(this, function () { 'use strict'; function e(e) { return e && '[object Function]' === {}.toString.call(e); }function t(e, t) { if (1 !== e.nodeType) return [];var o = window.getComputedStyle(e, null);return t ? o[t] : o; }function o(e) { return 'HTML' === e.nodeName ? e : e.parentNode || e.host; }function n(e) { if (!e || -1 !== ['HTML', 'BODY', '#document'].indexOf(e.nodeName)) return window.document.body;var i = t(e), r = i.overflow, p = i.overflowX, s = i.overflowY;return (/(auto|scroll)/.test(r + s + p) ? e : n(o(e)) ); }function r(e) { var o = e && e.offsetParent, i = o && o.nodeName;return i && 'BODY' !== i && 'HTML' !== i ? -1 !== ['TD', 'TABLE'].indexOf(o.nodeName) && 'static' === t(o, 'position') ? r(o) : o : window.document.documentElement; }function p(e) { var t = e.nodeName;return 'BODY' !== t && ('HTML' === t || r(e.firstElementChild) === e); }function s(e) { return null === e.parentNode ? e : s(e.parentNode); }function d(e, t) { if (!e || !e.nodeType || !t || !t.nodeType) return window.document.documentElement;var o = e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING, i = o ? e : t, n = o ? t : e, a = document.createRange();a.setStart(i, 0), a.setEnd(n, 0);var f = a.commonAncestorContainer;if (e !== f && t !== f || i.contains(n)) return p(f) ? f : r(f);var l = s(e);return l.host ? d(l.host, t) : d(e, s(t).host); }function a(e) { var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 'top', o = 'top' === t ? 'scrollTop' : 'scrollLeft', i = e.nodeName;if ('BODY' === i || 'HTML' === i) { var n = window.document.documentElement, r = window.document.scrollingElement || n;return r[o]; }return e[o]; }function f(e, t) { var o = 2 < arguments.length && void 0 !== arguments[2] && arguments[2], i = a(t, 'top'), n = a(t, 'left'), r = o ? -1 : 1;return e.top += i * r, e.bottom += i * r, e.left += n * r, e.right += n * r, e; }function l(e, t) { var o = 'x' === t ? 'Left' : 'Top', i = 'Left' == o ? 'Right' : 'Bottom';return +e['border' + o + 'Width'].split('px')[0] + +e['border' + i + 'Width'].split('px')[0]; }function m(e, t, o, i) { return _(t['offset' + e], o['client' + e], o['offset' + e], ie() ? o['offset' + e] + i['margin' + ('Height' === e ? 'Top' : 'Left')] + i['margin' + ('Height' === e ? 'Bottom' : 'Right')] : 0); }function h() { var e = window.document.body, t = window.document.documentElement, o = ie() && window.getComputedStyle(t);return { height: m('Height', e, t, o), width: m('Width', e, t, o) }; }function c(e) { return se({}, e, { right: e.left + e.width, bottom: e.top + e.height }); }function g(e) { var o = {};if (ie()) try { o = e.getBoundingClientRect();var i = a(e, 'top'), n = a(e, 'left');o.top += i, o.left += n, o.bottom += i, o.right += n; } catch (e) {} else o = e.getBoundingClientRect();var r = { left: o.left, top: o.top, width: o.right - o.left, height: o.bottom - o.top }, p = 'HTML' === e.nodeName ? h() : {}, s = p.width || e.clientWidth || r.right - r.left, d = p.height || e.clientHeight || r.bottom - r.top, f = e.offsetWidth - s, m = e.offsetHeight - d;if (f || m) { var g = t(e);f -= l(g, 'x'), m -= l(g, 'y'), r.width -= f, r.height -= m; }return c(r); }function u(e, o) { var i = ie(), r = 'HTML' === o.nodeName, p = g(e), s = g(o), d = n(e), a = t(o), l = +a.borderTopWidth.split('px')[0], m = +a.borderLeftWidth.split('px')[0], h = c({ top: p.top - s.top - l, left: p.left - s.left - m, width: p.width, height: p.height });if (h.marginTop = 0, h.marginLeft = 0, !i && r) { var u = +a.marginTop.split('px')[0], b = +a.marginLeft.split('px')[0];h.top -= l - u, h.bottom -= l - u, h.left -= m - b, h.right -= m - b, h.marginTop = u, h.marginLeft = b; }return (i ? o.contains(d) : o === d && 'BODY' !== d.nodeName) && (h = f(h, o)), h; }function b(e) { var t = window.document.documentElement, o = u(e, t), i = _(t.clientWidth, window.innerWidth || 0), n = _(t.clientHeight, window.innerHeight || 0), r = a(t), p = a(t, 'left'), s = { top: r - o.top + o.marginTop, left: p - o.left + o.marginLeft, width: i, height: n };return c(s); }function y(e) { var i = e.nodeName;return 'BODY' === i || 'HTML' === i ? !1 : 'fixed' === t(e, 'position') || y(o(e)); }function w(e, t, i, r) { var p = { top: 0, left: 0 }, s = d(e, t);if ('viewport' === r) p = b(s);else { var a;'scrollParent' === r ? (a = n(o(e)), 'BODY' === a.nodeName && (a = window.document.documentElement)) : 'window' === r ? a = window.document.documentElement : a = r;var f = u(a, s);if ('HTML' === a.nodeName && !y(s)) { var l = h(), m = l.height, c = l.width;p.top += f.top - f.marginTop, p.bottom = m + f.top, p.left += f.left - f.marginLeft, p.right = c + f.left; } else p = f; }return p.left += i, p.top += i, p.right -= i, p.bottom -= i, p; }function v(e) { var t = e.width, o = e.height;return t * o; }function E(e, t, o, i, n) { var r = 5 < arguments.length && void 0 !== arguments[5] ? arguments[5] : 0;if (-1 === e.indexOf('auto')) return e;var p = w(o, i, r, n), s = { top: { width: p.width, height: t.top - p.top }, right: { width: p.right - t.right, height: p.height }, bottom: { width: p.width, height: p.bottom - t.bottom }, left: { width: t.left - p.left, height: p.height } }, d = Object.keys(s).map(function (e) { return se({ key: e }, s[e], { area: v(s[e]) }); }).sort(function (e, t) { return t.area - e.area; }), a = d.filter(function (e) { var t = e.width, i = e.height;return t >= o.clientWidth && i >= o.clientHeight; }), f = 0 < a.length ? a[0].key : d[0].key, l = e.split('-')[1];return f + (l ? '-' + l : ''); }function x(e, t, o) { var i = d(t, o);return u(o, i); }function O(e) { var t = window.getComputedStyle(e), o = parseFloat(t.marginTop) + parseFloat(t.marginBottom), i = parseFloat(t.marginLeft) + parseFloat(t.marginRight), n = { width: e.offsetWidth + i, height: e.offsetHeight + o };return n; }function L(e) { var t = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };return e.replace(/left|right|bottom|top/g, function (e) { return t[e]; }); }function S(e, t, o) { o = o.split('-')[0];var i = O(e), n = { width: i.width, height: i.height }, r = -1 !== ['right', 'left'].indexOf(o), p = r ? 'top' : 'left', s = r ? 'left' : 'top', d = r ? 'height' : 'width', a = r ? 'width' : 'height';return n[p] = t[p] + t[d] / 2 - i[d] / 2, n[s] = o === s ? t[s] - i[a] : t[L(s)], n; }function T(e, t) { return Array.prototype.find ? e.find(t) : e.filter(t)[0]; }function C(e, t, o) { if (Array.prototype.findIndex) return e.findIndex(function (e) { return e[t] === o; });var i = T(e, function (e) { return e[t] === o; });return e.indexOf(i); }function N(t, o, i) { var n = void 0 === i ? t : t.slice(0, C(t, 'name', i));return n.forEach(function (t) { t.function && console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var i = t.function || t.fn;t.enabled && e(i) && (o.offsets.popper = c(o.offsets.popper), o.offsets.reference = c(o.offsets.reference), o = i(o, t)); }), o; }function k() { if (!this.state.isDestroyed) { var e = { instance: this, styles: {}, attributes: {}, flipped: !1, offsets: {} };e.offsets.reference = x(this.state, this.popper, this.reference), e.placement = E(this.options.placement, e.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding), e.originalPlacement = e.placement, e.offsets.popper = S(this.popper, e.offsets.reference, e.placement), e.offsets.popper.position = 'absolute', e = N(this.modifiers, e), this.state.isCreated ? this.options.onUpdate(e) : (this.state.isCreated = !0, this.options.onCreate(e)); } }function W(e, t) { return e.some(function (e) { var o = e.name, i = e.enabled;return i && o === t; }); }function B(e) { for (var t = [!1, 'ms', 'Webkit', 'Moz', 'O'], o = e.charAt(0).toUpperCase() + e.slice(1), n = 0; n < t.length - 1; n++) { var i = t[n], r = i ? '' + i + o : e;if ('undefined' != typeof window.document.body.style[r]) return r; }return null; }function D() { return this.state.isDestroyed = !0, W(this.modifiers, 'applyStyle') && (this.popper.removeAttribute('x-placement'), this.popper.style.left = '', this.popper.style.position = '', this.popper.style.top = '', this.popper.style[B('transform')] = ''), this.disableEventListeners(), this.options.removeOnDestroy && this.popper.parentNode.removeChild(this.popper), this; }function H(e, t, o, i) { var r = 'BODY' === e.nodeName, p = r ? window : e;p.addEventListener(t, o, { passive: !0 }), r || H(n(p.parentNode), t, o, i), i.push(p); }function P(e, t, o, i) { o.updateBound = i, window.addEventListener('resize', o.updateBound, { passive: !0 });var r = n(e);return H(r, 'scroll', o.updateBound, o.scrollParents), o.scrollElement = r, o.eventsEnabled = !0, o; }function A() { this.state.eventsEnabled || (this.state = P(this.reference, this.options, this.state, this.scheduleUpdate)); }function M(e, t) { return window.removeEventListener('resize', t.updateBound), t.scrollParents.forEach(function (e) { e.removeEventListener('scroll', t.updateBound); }), t.updateBound = null, t.scrollParents = [], t.scrollElement = null, t.eventsEnabled = !1, t; }function I() { this.state.eventsEnabled && (window.cancelAnimationFrame(this.scheduleUpdate), this.state = M(this.reference, this.state)); }function R(e) { return '' !== e && !isNaN(parseFloat(e)) && isFinite(e); }function U(e, t) { Object.keys(t).forEach(function (o) { var i = '';-1 !== ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(o) && R(t[o]) && (i = 'px'), e.style[o] = t[o] + i; }); }function Y(e, t) { Object.keys(t).forEach(function (o) { var i = t[o];!1 === i ? e.removeAttribute(o) : e.setAttribute(o, t[o]); }); }function F(e, t, o) { var i = T(e, function (e) { var o = e.name;return o === t; }), n = !!i && e.some(function (e) { return e.name === o && e.enabled && e.order < i.order; });if (!n) { var r = '`' + t + '`';console.warn('`' + o + '`' + ' modifier is required by ' + r + ' modifier in order to work, be sure to include it before ' + r + '!'); }return n; }function j(e) { return 'end' === e ? 'start' : 'start' === e ? 'end' : e; }function K(e) { var t = 1 < arguments.length && void 0 !== arguments[1] && arguments[1], o = ae.indexOf(e), i = ae.slice(o + 1).concat(ae.slice(0, o));return t ? i.reverse() : i; }function q(e, t, o, i) { var n = e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/), r = +n[1], p = n[2];if (!r) return e;if (0 === p.indexOf('%')) { var s;switch (p) {case '%p': s = o;break;case '%':case '%r':default: s = i;}var d = c(s);return d[t] / 100 * r; }if ('vh' === p || 'vw' === p) { var a;return a = 'vh' === p ? _(document.documentElement.clientHeight, window.innerHeight || 0) : _(document.documentElement.clientWidth, window.innerWidth || 0), a / 100 * r; }return r; }function G(e, t, o, i) { var n = [0, 0], r = -1 !== ['right', 'left'].indexOf(i), p = e.split(/(\+|\-)/).map(function (e) { return e.trim(); }), s = p.indexOf(T(p, function (e) { return -1 !== e.search(/,|\s/); }));p[s] && -1 === p[s].indexOf(',') && console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d = /\s*,\s*|\s+/, a = -1 === s ? [p] : [p.slice(0, s).concat([p[s].split(d)[0]]), [p[s].split(d)[1]].concat(p.slice(s + 1))];return a = a.map(function (e, i) { var n = (1 === i ? !r : r) ? 'height' : 'width', p = !1;return e.reduce(function (e, t) { return '' === e[e.length - 1] && -1 !== ['+', '-'].indexOf(t) ? (e[e.length - 1] = t, p = !0, e) : p ? (e[e.length - 1] += t, p = !1, e) : e.concat(t); }, []).map(function (e) { return q(e, n, t, o); }); }), a.forEach(function (e, t) { e.forEach(function (o, i) { R(o) && (n[t] += o * ('-' === e[i - 1] ? -1 : 1)); }); }), n; }for (var z = Math.min, V = Math.floor, _ = Math.max, X = ['native code', '[object MutationObserverConstructor]'], Q = function Q(e) { return X.some(function (t) { return -1 < (e || '').toString().indexOf(t); }); }, J = 'undefined' != typeof window, Z = ['Edge', 'Trident', 'Firefox'], $ = 0, ee = 0; ee < Z.length; ee += 1) { if (J && 0 <= navigator.userAgent.indexOf(Z[ee])) { $ = 1;break; } }var i, te = J && Q(window.MutationObserver), oe = te ? function (e) { var t = !1, o = 0, i = document.createElement('span'), n = new MutationObserver(function () { e(), t = !1; });return n.observe(i, { attributes: !0 }), function () { t || (t = !0, i.setAttribute('x-index', o), ++o); }; } : function (e) { var t = !1;return function () { t || (t = !0, setTimeout(function () { t = !1, e(); }, $)); }; }, ie = function ie() { return void 0 == i && (i = -1 !== navigator.appVersion.indexOf('MSIE 10')), i; }, ne = function ne(e, t) { if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function'); }, re = function () { function e(e, t) { for (var o, n = 0; n < t.length; n++) { o = t[n], o.enumerable = o.enumerable || !1, o.configurable = !0, 'value' in o && (o.writable = !0), Object.defineProperty(e, o.key, o); } }return function (t, o, i) { return o && e(t.prototype, o), i && e(t, i), t; }; }(), pe = function pe(e, t, o) { return t in e ? Object.defineProperty(e, t, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = o, e; }, se = Object.assign || function (e) { for (var t, o = 1; o < arguments.length; o++) { for (var i in t = arguments[o], t) { Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); } }return e; }, de = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'], ae = de.slice(3), fe = { FLIP: 'flip', CLOCKWISE: 'clockwise', COUNTERCLOCKWISE: 'counterclockwise' }, le = function () { function t(o, i) { var n = this, r = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : {};ne(this, t), this.scheduleUpdate = function () { return requestAnimationFrame(n.update); }, this.update = oe(this.update.bind(this)), this.options = se({}, t.Defaults, r), this.state = { isDestroyed: !1, isCreated: !1, scrollParents: [] }, this.reference = o.jquery ? o[0] : o, this.popper = i.jquery ? i[0] : i, this.options.modifiers = {}, Object.keys(se({}, t.Defaults.modifiers, r.modifiers)).forEach(function (e) { n.options.modifiers[e] = se({}, t.Defaults.modifiers[e] || {}, r.modifiers ? r.modifiers[e] : {}); }), this.modifiers = Object.keys(this.options.modifiers).map(function (e) { return se({ name: e }, n.options.modifiers[e]); }).sort(function (e, t) { return e.order - t.order; }), this.modifiers.forEach(function (t) { t.enabled && e(t.onLoad) && t.onLoad(n.reference, n.popper, n.options, t, n.state); }), this.update();var p = this.options.eventsEnabled;p && this.enableEventListeners(), this.state.eventsEnabled = p; }return re(t, [{ key: 'update', value: function value() { return k.call(this); } }, { key: 'destroy', value: function value() { return D.call(this); } }, { key: 'enableEventListeners', value: function value() { return A.call(this); } }, { key: 'disableEventListeners', value: function value() { return I.call(this); } }]), t; }();return le.Utils = ('undefined' == typeof window ? global : window).PopperUtils, le.placements = de, le.Defaults = { placement: 'bottom', eventsEnabled: !0, removeOnDestroy: !1, onCreate: function onCreate() {}, onUpdate: function onUpdate() {}, modifiers: { shift: { order: 100, enabled: !0, fn: function fn(e) { var t = e.placement, o = t.split('-')[0], i = t.split('-')[1];if (i) { var n = e.offsets, r = n.reference, p = n.popper, s = -1 !== ['bottom', 'top'].indexOf(o), d = s ? 'left' : 'top', a = s ? 'width' : 'height', f = { start: pe({}, d, r[d]), end: pe({}, d, r[d] + r[a] - p[a]) };e.offsets.popper = se({}, p, f[i]); }return e; } }, offset: { order: 200, enabled: !0, fn: function fn(e, t) { var o, i = t.offset, n = e.placement, r = e.offsets, p = r.popper, s = r.reference, d = n.split('-')[0];return o = R(+i) ? [+i, 0] : G(i, p, s, d), 'left' === d ? (p.top += o[0], p.left -= o[1]) : 'right' === d ? (p.top += o[0], p.left += o[1]) : 'top' === d ? (p.left += o[0], p.top -= o[1]) : 'bottom' === d && (p.left += o[0], p.top += o[1]), e.popper = p, e; }, offset: 0 }, preventOverflow: { order: 300, enabled: !0, fn: function fn(e, t) { var o = t.boundariesElement || r(e.instance.popper);e.instance.reference === o && (o = r(o));var i = w(e.instance.popper, e.instance.reference, t.padding, o);t.boundaries = i;var n = t.priority, p = e.offsets.popper, s = { primary: function primary(e) { var o = p[e];return p[e] < i[e] && !t.escapeWithReference && (o = _(p[e], i[e])), pe({}, e, o); }, secondary: function secondary(e) { var o = 'right' === e ? 'left' : 'top', n = p[o];return p[e] > i[e] && !t.escapeWithReference && (n = z(p[o], i[e] - ('right' === e ? p.width : p.height))), pe({}, o, n); } };return n.forEach(function (e) { var t = -1 === ['left', 'top'].indexOf(e) ? 'secondary' : 'primary';p = se({}, p, s[t](e)); }), e.offsets.popper = p, e; }, priority: ['left', 'right', 'top', 'bottom'], padding: 5, boundariesElement: 'scrollParent' }, keepTogether: { order: 400, enabled: !0, fn: function fn(e) { var t = e.offsets, o = t.popper, i = t.reference, n = e.placement.split('-')[0], r = V, p = -1 !== ['top', 'bottom'].indexOf(n), s = p ? 'right' : 'bottom', d = p ? 'left' : 'top', a = p ? 'width' : 'height';return o[s] < r(i[d]) && (e.offsets.popper[d] = r(i[d]) - o[a]), o[d] > r(i[s]) && (e.offsets.popper[d] = r(i[s])), e; } }, arrow: { order: 500, enabled: !0, fn: function fn(e, t) { if (!F(e.instance.modifiers, 'arrow', 'keepTogether')) return e;var o = t.element;if ('string' == typeof o) { if (o = e.instance.popper.querySelector(o), !o) return e; } else if (!e.instance.popper.contains(o)) return console.warn('WARNING: `arrow.element` must be child of its popper element!'), e;var i = e.placement.split('-')[0], n = e.offsets, r = n.popper, p = n.reference, s = -1 !== ['left', 'right'].indexOf(i), d = s ? 'height' : 'width', a = s ? 'top' : 'left', f = s ? 'left' : 'top', l = s ? 'bottom' : 'right', m = O(o)[d];p[l] - m < r[a] && (e.offsets.popper[a] -= r[a] - (p[l] - m)), p[a] + m > r[l] && (e.offsets.popper[a] += p[a] + m - r[l]);var h = p[a] + p[d] / 2 - m / 2, g = h - c(e.offsets.popper)[a];return g = _(z(r[d] - m, g), 0), e.arrowElement = o, e.offsets.arrow = {}, e.offsets.arrow[a] = Math.round(g), e.offsets.arrow[f] = '', e; }, element: '[x-arrow]' }, flip: { order: 600, enabled: !0, fn: function fn(e, t) { if (W(e.instance.modifiers, 'inner')) return e;if (e.flipped && e.placement === e.originalPlacement) return e;var o = w(e.instance.popper, e.instance.reference, t.padding, t.boundariesElement), i = e.placement.split('-')[0], n = L(i), r = e.placement.split('-')[1] || '', p = [];switch (t.behavior) {case fe.FLIP: p = [i, n];break;case fe.CLOCKWISE: p = K(i);break;case fe.COUNTERCLOCKWISE: p = K(i, !0);break;default: p = t.behavior;}return p.forEach(function (s, d) { if (i !== s || p.length === d + 1) return e;i = e.placement.split('-')[0], n = L(i);var a = e.offsets.popper, f = e.offsets.reference, l = V, m = 'left' === i && l(a.right) > l(f.left) || 'right' === i && l(a.left) < l(f.right) || 'top' === i && l(a.bottom) > l(f.top) || 'bottom' === i && l(a.top) < l(f.bottom), h = l(a.left) < l(o.left), c = l(a.right) > l(o.right), g = l(a.top) < l(o.top), u = l(a.bottom) > l(o.bottom), b = 'left' === i && h || 'right' === i && c || 'top' === i && g || 'bottom' === i && u, y = -1 !== ['top', 'bottom'].indexOf(i), w = !!t.flipVariations && (y && 'start' === r && h || y && 'end' === r && c || !y && 'start' === r && g || !y && 'end' === r && u);(m || b || w) && (e.flipped = !0, (m || b) && (i = p[d + 1]), w && (r = j(r)), e.placement = i + (r ? '-' + r : ''), e.offsets.popper = se({}, e.offsets.popper, S(e.instance.popper, e.offsets.reference, e.placement)), e = N(e.instance.modifiers, e, 'flip')); }), e; }, behavior: 'flip', padding: 5, boundariesElement: 'viewport' }, inner: { order: 700, enabled: !1, fn: function fn(e) { var t = e.placement, o = t.split('-')[0], i = e.offsets, n = i.popper, r = i.reference, p = -1 !== ['left', 'right'].indexOf(o), s = -1 === ['top', 'left'].indexOf(o);return n[p ? 'left' : 'top'] = r[t] - (s ? n[p ? 'width' : 'height'] : 0), e.placement = L(t), e.offsets.popper = c(n), e; } }, hide: { order: 800, enabled: !0, fn: function fn(e) { if (!F(e.instance.modifiers, 'hide', 'preventOverflow')) return e;var t = e.offsets.reference, o = T(e.instance.modifiers, function (e) { return 'preventOverflow' === e.name; }).boundaries;if (t.bottom < o.top || t.left > o.right || t.top > o.bottom || t.right < o.left) { if (!0 === e.hide) return e;e.hide = !0, e.attributes['x-out-of-boundaries'] = ''; } else { if (!1 === e.hide) return e;e.hide = !1, e.attributes['x-out-of-boundaries'] = !1; }return e; } }, computeStyle: { order: 850, enabled: !0, fn: function fn(e, t) { var o = t.x, i = t.y, n = e.offsets.popper, p = T(e.instance.modifiers, function (e) { return 'applyStyle' === e.name; }).gpuAcceleration;void 0 !== p && console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s, d, a = void 0 === p ? t.gpuAcceleration : p, f = r(e.instance.popper), l = g(f), m = { position: n.position }, h = { left: V(n.left), top: V(n.top), bottom: V(n.bottom), right: V(n.right) }, c = 'bottom' === o ? 'top' : 'bottom', u = 'right' === i ? 'left' : 'right', b = B('transform');if (d = 'bottom' == c ? -l.height + h.bottom : h.top, s = 'right' == u ? -l.width + h.right : h.left, a && b) m[b] = 'translate3d(' + s + 'px, ' + d + 'px, 0)', m[c] = 0, m[u] = 0, m.willChange = 'transform';else { var y = 'bottom' == c ? -1 : 1, w = 'right' == u ? -1 : 1;m[c] = d * y, m[u] = s * w, m.willChange = c + ', ' + u; }var v = { "x-placement": e.placement };return e.attributes = se({}, v, e.attributes), e.styles = se({}, m, e.styles), e; }, gpuAcceleration: !0, x: 'bottom', y: 'right' }, applyStyle: { order: 900, enabled: !0, fn: function fn(e) { return U(e.instance.popper, e.styles), Y(e.instance.popper, e.attributes), e.offsets.arrow && U(e.arrowElement, e.offsets.arrow), e; }, onLoad: function onLoad(e, t, o, i, n) { var r = x(n, t, e), p = E(o.placement, r, t, e, o.modifiers.flip.boundariesElement, o.modifiers.flip.padding);return t.setAttribute('x-placement', p), U(t, { position: 'absolute' }), o; }, gpuAcceleration: void 0 } } }, le; }); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2))) /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* Creative Tim Modifications Lines: 238, 239 was changed from top: 5px to top: 50% and we added margin-top: -13px. In this way the close button will be aligned vertically Line:222 - modified when the icon is set, we add the class "alert-with-icon", so there will be enough space for the icon. */ /* * Project: Bootstrap Notify = v3.1.5 * Description: Turns standard Bootstrap alerts into "Growl-like" notifications. * Author: Mouse0270 aka Robert McIntosh * License: MIT License * Website: https://github.com/mouse0270/bootstrap-growl */ /* global define:false, require: false, jQuery:false */ (function (factory) { if (true) { // AMD. Register as an anonymous module. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object') { // Node/CommonJS factory(require('jquery')); } else { // Browser globals factory(jQuery); } })(function ($) { // Create the defaults once var defaults = { element: 'body', position: null, type: "info", allow_dismiss: true, allow_duplicates: true, newest_on_top: false, showProgressbar: false, placement: { from: "top", align: "right" }, offset: 20, spacing: 10, z_index: 1060, delay: 5000, timer: 1000, url_target: '_blank', mouse_over: null, animate: { enter: 'animated fadeInDown', exit: 'animated fadeOutUp' }, onShow: null, onShown: null, onClose: null, onClosed: null, onClick: null, icon_type: 'class', template: '<div data-notify="container" class="col-11 col-md-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss"><i class="nc-icon nc-simple-remove"></i></button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>' }; String.format = function () { var args = arguments; var str = arguments[0]; return str.replace(/(\{\{\d\}\}|\{\d\})/g, function (str) { if (str.substring(0, 2) === "{{") return str; var num = parseInt(str.match(/\d/)[0]); return args[num + 1]; }); }; function isDuplicateNotification(notification) { var isDupe = false; $('[data-notify="container"]').each(function (i, el) { var $el = $(el); var title = $el.find('[data-notify="title"]').html().trim(); var message = $el.find('[data-notify="message"]').html().trim(); // The input string might be different than the actual parsed HTML string! // (<br> vs <br /> for example) // So we have to force-parse this as HTML here! var isSameTitle = title === $("<div>" + notification.settings.content.title + "</div>").html().trim(); var isSameMsg = message === $("<div>" + notification.settings.content.message + "</div>").html().trim(); var isSameType = $el.hasClass('alert-' + notification.settings.type); if (isSameTitle && isSameMsg && isSameType) { //we found the dupe. Set the var and stop checking. isDupe = true; } return !isDupe; }); return isDupe; } function Notify(element, content, options) { // Setup Content of Notify var contentObj = { content: { message: (typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' ? content.message : content, title: content.title ? content.title : '', icon: content.icon ? content.icon : '', url: content.url ? content.url : '#', target: content.target ? content.target : '-' } }; options = $.extend(true, {}, contentObj, options); this.settings = $.extend(true, {}, defaults, options); this._defaults = defaults; if (this.settings.content.target === "-") { this.settings.content.target = this.settings.url_target; } this.animations = { start: 'webkitAnimationStart oanimationstart MSAnimationStart animationstart', end: 'webkitAnimationEnd oanimationend MSAnimationEnd animationend' }; if (typeof this.settings.offset === 'number') { this.settings.offset = { x: this.settings.offset, y: this.settings.offset }; } //if duplicate messages are not allowed, then only continue if this new message is not a duplicate of one that it already showing if (this.settings.allow_duplicates || !this.settings.allow_duplicates && !isDuplicateNotification(this)) { this.init(); } } $.extend(Notify.prototype, { init: function init() { var self = this; this.buildNotify(); if (this.settings.content.icon) { this.setIcon(); } if (this.settings.content.url != "#") { this.styleURL(); } this.styleDismiss(); this.placement(); this.bind(); this.notify = { $ele: this.$ele, update: function update(command, _update) { var commands = {}; if (typeof command === "string") { commands[command] = _update; } else { commands = command; } for (var cmd in commands) { switch (cmd) { case "type": this.$ele.removeClass('alert-' + self.settings.type); this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass('progress-bar-' + self.settings.type); self.settings.type = commands[cmd]; this.$ele.addClass('alert-' + commands[cmd]).find('[data-notify="progressbar"] > .progress-bar').addClass('progress-bar-' + commands[cmd]); break; case "icon": var $icon = this.$ele.find('[data-notify="icon"]'); if (self.settings.icon_type.toLowerCase() === 'class') { $icon.removeClass(self.settings.content.icon).addClass(commands[cmd]); } else { if (!$icon.is('img')) { $icon.find('img'); } $icon.attr('src', commands[cmd]); } self.settings.content.icon = commands[command]; break; case "progress": var newDelay = self.settings.delay - self.settings.delay * (commands[cmd] / 100); this.$ele.data('notify-delay', newDelay); this.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', commands[cmd]).css('width', commands[cmd] + '%'); break; case "url": this.$ele.find('[data-notify="url"]').attr('href', commands[cmd]); break; case "target": this.$ele.find('[data-notify="url"]').attr('target', commands[cmd]); break; default: this.$ele.find('[data-notify="' + cmd + '"]').html(commands[cmd]); } } var posX = this.$ele.outerHeight() + parseInt(self.settings.spacing) + parseInt(self.settings.offset.y); self.reposition(posX); }, close: function close() { self.close(); } }; }, buildNotify: function buildNotify() { var content = this.settings.content; this.$ele = $(String.format(this.settings.template, this.settings.type, content.title, content.message, content.url, content.target)); this.$ele.attr('data-notify-position', this.settings.placement.from + '-' + this.settings.placement.align); if (!this.settings.allow_dismiss) { this.$ele.find('[data-notify="dismiss"]').css('display', 'none'); } if (this.settings.delay <= 0 && !this.settings.showProgressbar || !this.settings.showProgressbar) { this.$ele.find('[data-notify="progressbar"]').remove(); } }, setIcon: function setIcon() { this.$ele.addClass('alert-with-icon'); if (this.settings.icon_type.toLowerCase() === 'class') { this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon); } else { if (this.$ele.find('[data-notify="icon"]').is('img')) { this.$ele.find('[data-notify="icon"]').attr('src', this.settings.content.icon); } else { this.$ele.find('[data-notify="icon"]').append('<img src="' + this.settings.content.icon + '" alt="Notify Icon" />'); } } }, styleDismiss: function styleDismiss() { this.$ele.find('[data-notify="dismiss"]').css({ position: 'absolute', right: '10px', top: '50%', marginTop: '-13px', zIndex: this.settings.z_index + 2 }); }, styleURL: function styleURL() { this.$ele.find('[data-notify="url"]').css({ backgroundImage: 'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)', height: '100%', left: 0, position: 'absolute', top: 0, width: '100%', zIndex: this.settings.z_index + 1 }); }, placement: function placement() { var self = this, offsetAmt = this.settings.offset.y, css = { display: 'inline-block', margin: '0px auto', position: this.settings.position ? this.settings.position : this.settings.element === 'body' ? 'fixed' : 'absolute', transition: 'all .5s ease-in-out', zIndex: this.settings.z_index }, hasAnimation = false, settings = this.settings; $('[data-notify-position="' + this.settings.placement.from + '-' + this.settings.placement.align + '"]:not([data-closing="true"])').each(function () { offsetAmt = Math.max(offsetAmt, parseInt($(this).css(settings.placement.from)) + parseInt($(this).outerHeight()) + parseInt(settings.spacing)); }); if (this.settings.newest_on_top === true) { offsetAmt = this.settings.offset.y; } css[this.settings.placement.from] = offsetAmt + 'px'; switch (this.settings.placement.align) { case "left": case "right": css[this.settings.placement.align] = this.settings.offset.x + 'px'; break; case "center": css.left = 0; css.right = 0; break; } this.$ele.css(css).addClass(this.settings.animate.enter); $.each(Array('webkit-', 'moz-', 'o-', 'ms-', ''), function (index, prefix) { self.$ele[0].style[prefix + 'AnimationIterationCount'] = 1; }); $(this.settings.element).append(this.$ele); if (this.settings.newest_on_top === true) { offsetAmt = parseInt(offsetAmt) + parseInt(this.settings.spacing) + this.$ele.outerHeight(); this.reposition(offsetAmt); } if ($.isFunction(self.settings.onShow)) { self.settings.onShow.call(this.$ele); } this.$ele.one(this.animations.start, function () { hasAnimation = true; }).one(this.animations.end, function () { self.$ele.removeClass(self.settings.animate.enter); if ($.isFunction(self.settings.onShown)) { self.settings.onShown.call(this); } }); setTimeout(function () { if (!hasAnimation) { if ($.isFunction(self.settings.onShown)) { self.settings.onShown.call(this); } } }, 600); }, bind: function bind() { var self = this; this.$ele.find('[data-notify="dismiss"]').on('click', function () { self.close(); }); if ($.isFunction(self.settings.onClick)) { this.$ele.on('click', function (event) { if (event.target != self.$ele.find('[data-notify="dismiss"]')[0]) { self.settings.onClick.call(this, event); } }); } this.$ele.mouseover(function () { $(this).data('data-hover', "true"); }).mouseout(function () { $(this).data('data-hover', "false"); }); this.$ele.data('data-hover', "false"); if (this.settings.delay > 0) { self.$ele.data('notify-delay', self.settings.delay); var timer = setInterval(function () { var delay = parseInt(self.$ele.data('notify-delay')) - self.settings.timer; if (self.$ele.data('data-hover') === 'false' && self.settings.mouse_over === "pause" || self.settings.mouse_over != "pause") { var percent = (self.settings.delay - delay) / self.settings.delay * 100; self.$ele.data('notify-delay', delay); self.$ele.find('[data-notify="progressbar"] > div').attr('aria-valuenow', percent).css('width', percent + '%'); } if (delay <= -self.settings.timer) { clearInterval(timer); self.close(); } }, self.settings.timer); } }, close: function close() { var self = this, posX = parseInt(this.$ele.css(this.settings.placement.from)), hasAnimation = false; this.$ele.attr('data-closing', 'true').addClass(this.settings.animate.exit); self.reposition(posX); if ($.isFunction(self.settings.onClose)) { self.settings.onClose.call(this.$ele); } this.$ele.one(this.animations.start, function () { hasAnimation = true; }).one(this.animations.end, function () { $(this).remove(); if ($.isFunction(self.settings.onClosed)) { self.settings.onClosed.call(this); } }); setTimeout(function () { if (!hasAnimation) { self.$ele.remove(); if (self.settings.onClosed) { self.settings.onClosed(self.$ele); } } }, 600); }, reposition: function reposition(posX) { var self = this, notifies = '[data-notify-position="' + this.settings.placement.from + '-' + this.settings.placement.align + '"]:not([data-closing="true"])', $elements = this.$ele.nextAll(notifies); if (this.settings.newest_on_top === true) { $elements = this.$ele.prevAll(notifies); } $elements.each(function () { $(this).css(self.settings.placement.from, posX); posX = parseInt(posX) + parseInt(self.settings.spacing) + $(this).outerHeight(); }); } }); $.notify = function (content, options) { var plugin = new Notify(this, content, options); return plugin.notify; }; $.notifyDefaults = function (options) { defaults = $.extend(true, {}, defaults, options); return defaults; }; $.notifyClose = function (selector) { if (typeof selector === "undefined" || selector === "all") { $('[data-notify]').find('[data-notify="dismiss"]').trigger('click'); } else if (selector === 'success' || selector === 'info' || selector === 'warning' || selector === 'danger') { $('.alert-' + selector + '[data-notify]').find('[data-notify="dismiss"]').trigger('click'); } else if (selector) { $(selector + '[data-notify]').find('[data-notify="dismiss"]').trigger('click'); } else { $('[data-notify-position="' + selector + '"]').find('[data-notify="dismiss"]').trigger('click'); } }; $.notifyCloseExcept = function (selector) { if (selector === 'success' || selector === 'info' || selector === 'warning' || selector === 'danger') { $('[data-notify]').not('.alert-' + selector).find('[data-notify="dismiss"]').trigger('click'); } else { $('[data-notify]').not(selector).find('[data-notify="dismiss"]').trigger('click'); } }; }); /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /*! * Chart.js * http://chartjs.org/ * Version: 2.7.1 * * Copyright 2017 Nick Downie * Released under the MIT license * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md */ !function (t) { if ("object" == ( false ? "undefined" : _typeof(exports)) && "undefined" != typeof module) module.exports = t();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else { ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).Chart = t(); } }(function () { return function t(e, n, i) { function a(r, l) { if (!n[r]) { if (!e[r]) { var s = "function" == typeof require && require;if (!l && s) return require(r, !0);if (o) return o(r, !0);var u = new Error("Cannot find module '" + r + "'");throw u.code = "MODULE_NOT_FOUND", u; }var d = n[r] = { exports: {} };e[r][0].call(d.exports, function (t) { var n = e[r][1][t];return a(n || t); }, d, d.exports, t, e, n, i); }return n[r].exports; }for (var o = "function" == typeof require && require, r = 0; r < i.length; r++) { a(i[r]); }return a; }({ 1: [function (t, e, n) {}, {}], 2: [function (t, e, n) { function i(t) { if (t) { var e = [0, 0, 0], n = 1, i = t.match(/^#([a-fA-F0-9]{3})$/i);if (i) { i = i[1];for (a = 0; a < e.length; a++) { e[a] = parseInt(i[a] + i[a], 16); } } else if (i = t.match(/^#([a-fA-F0-9]{6})$/i)) { i = i[1];for (a = 0; a < e.length; a++) { e[a] = parseInt(i.slice(2 * a, 2 * a + 2), 16); } } else if (i = t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)) { for (a = 0; a < e.length; a++) { e[a] = parseInt(i[a + 1]); }n = parseFloat(i[4]); } else if (i = t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)) { for (a = 0; a < e.length; a++) { e[a] = Math.round(2.55 * parseFloat(i[a + 1])); }n = parseFloat(i[4]); } else if (i = t.match(/(\w+)/)) { if ("transparent" == i[1]) return [0, 0, 0, 0];if (!(e = c[i[1]])) return; }for (var a = 0; a < e.length; a++) { e[a] = u(e[a], 0, 255); }return n = n || 0 == n ? u(n, 0, 1) : 1, e[3] = n, e; } }function a(t) { if (t) { var e = t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if (e) { var n = parseFloat(e[4]);return [u(parseInt(e[1]), 0, 360), u(parseFloat(e[2]), 0, 100), u(parseFloat(e[3]), 0, 100), u(isNaN(n) ? 1 : n, 0, 1)]; } } }function o(t) { if (t) { var e = t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if (e) { var n = parseFloat(e[4]);return [u(parseInt(e[1]), 0, 360), u(parseFloat(e[2]), 0, 100), u(parseFloat(e[3]), 0, 100), u(isNaN(n) ? 1 : n, 0, 1)]; } } }function r(t, e) { return void 0 === e && (e = void 0 !== t[3] ? t[3] : 1), "rgba(" + t[0] + ", " + t[1] + ", " + t[2] + ", " + e + ")"; }function l(t, e) { return "rgba(" + Math.round(t[0] / 255 * 100) + "%, " + Math.round(t[1] / 255 * 100) + "%, " + Math.round(t[2] / 255 * 100) + "%, " + (e || t[3] || 1) + ")"; }function s(t, e) { return void 0 === e && (e = void 0 !== t[3] ? t[3] : 1), "hsla(" + t[0] + ", " + t[1] + "%, " + t[2] + "%, " + e + ")"; }function u(t, e, n) { return Math.min(Math.max(e, t), n); }function d(t) { var e = t.toString(16).toUpperCase();return e.length < 2 ? "0" + e : e; }var c = t(6);e.exports = { getRgba: i, getHsla: a, getRgb: function getRgb(t) { var e = i(t);return e && e.slice(0, 3); }, getHsl: function getHsl(t) { var e = a(t);return e && e.slice(0, 3); }, getHwb: o, getAlpha: function getAlpha(t) { var e = i(t);return e ? e[3] : (e = a(t)) ? e[3] : (e = o(t)) ? e[3] : void 0; }, hexString: function hexString(t) { return "#" + d(t[0]) + d(t[1]) + d(t[2]); }, rgbString: function rgbString(t, e) { return e < 1 || t[3] && t[3] < 1 ? r(t, e) : "rgb(" + t[0] + ", " + t[1] + ", " + t[2] + ")"; }, rgbaString: r, percentString: function percentString(t, e) { return e < 1 || t[3] && t[3] < 1 ? l(t, e) : "rgb(" + Math.round(t[0] / 255 * 100) + "%, " + Math.round(t[1] / 255 * 100) + "%, " + Math.round(t[2] / 255 * 100) + "%)"; }, percentaString: l, hslString: function hslString(t, e) { return e < 1 || t[3] && t[3] < 1 ? s(t, e) : "hsl(" + t[0] + ", " + t[1] + "%, " + t[2] + "%)"; }, hslaString: s, hwbString: function hwbString(t, e) { return void 0 === e && (e = void 0 !== t[3] ? t[3] : 1), "hwb(" + t[0] + ", " + t[1] + "%, " + t[2] + "%" + (void 0 !== e && 1 !== e ? ", " + e : "") + ")"; }, keyword: function keyword(t) { return h[t.slice(0, 3)]; } };var h = {};for (var f in c) { h[c[f]] = f; } }, { 6: 6 }], 3: [function (t, e, n) { var i = t(5), a = t(2), o = function o(t) { if (t instanceof o) return t;if (!(this instanceof o)) return new o(t);this.valid = !1, this.values = { rgb: [0, 0, 0], hsl: [0, 0, 0], hsv: [0, 0, 0], hwb: [0, 0, 0], cmyk: [0, 0, 0, 0], alpha: 1 };var e;"string" == typeof t ? (e = a.getRgba(t)) ? this.setValues("rgb", e) : (e = a.getHsla(t)) ? this.setValues("hsl", e) : (e = a.getHwb(t)) && this.setValues("hwb", e) : "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) && (void 0 !== (e = t).r || void 0 !== e.red ? this.setValues("rgb", e) : void 0 !== e.l || void 0 !== e.lightness ? this.setValues("hsl", e) : void 0 !== e.v || void 0 !== e.value ? this.setValues("hsv", e) : void 0 !== e.w || void 0 !== e.whiteness ? this.setValues("hwb", e) : void 0 === e.c && void 0 === e.cyan || this.setValues("cmyk", e)); };o.prototype = { isValid: function isValid() { return this.valid; }, rgb: function rgb() { return this.setSpace("rgb", arguments); }, hsl: function hsl() { return this.setSpace("hsl", arguments); }, hsv: function hsv() { return this.setSpace("hsv", arguments); }, hwb: function hwb() { return this.setSpace("hwb", arguments); }, cmyk: function cmyk() { return this.setSpace("cmyk", arguments); }, rgbArray: function rgbArray() { return this.values.rgb; }, hslArray: function hslArray() { return this.values.hsl; }, hsvArray: function hsvArray() { return this.values.hsv; }, hwbArray: function hwbArray() { var t = this.values;return 1 !== t.alpha ? t.hwb.concat([t.alpha]) : t.hwb; }, cmykArray: function cmykArray() { return this.values.cmyk; }, rgbaArray: function rgbaArray() { var t = this.values;return t.rgb.concat([t.alpha]); }, hslaArray: function hslaArray() { var t = this.values;return t.hsl.concat([t.alpha]); }, alpha: function alpha(t) { return void 0 === t ? this.values.alpha : (this.setValues("alpha", t), this); }, red: function red(t) { return this.setChannel("rgb", 0, t); }, green: function green(t) { return this.setChannel("rgb", 1, t); }, blue: function blue(t) { return this.setChannel("rgb", 2, t); }, hue: function hue(t) { return t && (t = (t %= 360) < 0 ? 360 + t : t), this.setChannel("hsl", 0, t); }, saturation: function saturation(t) { return this.setChannel("hsl", 1, t); }, lightness: function lightness(t) { return this.setChannel("hsl", 2, t); }, saturationv: function saturationv(t) { return this.setChannel("hsv", 1, t); }, whiteness: function whiteness(t) { return this.setChannel("hwb", 1, t); }, blackness: function blackness(t) { return this.setChannel("hwb", 2, t); }, value: function value(t) { return this.setChannel("hsv", 2, t); }, cyan: function cyan(t) { return this.setChannel("cmyk", 0, t); }, magenta: function magenta(t) { return this.setChannel("cmyk", 1, t); }, yellow: function yellow(t) { return this.setChannel("cmyk", 2, t); }, black: function black(t) { return this.setChannel("cmyk", 3, t); }, hexString: function hexString() { return a.hexString(this.values.rgb); }, rgbString: function rgbString() { return a.rgbString(this.values.rgb, this.values.alpha); }, rgbaString: function rgbaString() { return a.rgbaString(this.values.rgb, this.values.alpha); }, percentString: function percentString() { return a.percentString(this.values.rgb, this.values.alpha); }, hslString: function hslString() { return a.hslString(this.values.hsl, this.values.alpha); }, hslaString: function hslaString() { return a.hslaString(this.values.hsl, this.values.alpha); }, hwbString: function hwbString() { return a.hwbString(this.values.hwb, this.values.alpha); }, keyword: function keyword() { return a.keyword(this.values.rgb, this.values.alpha); }, rgbNumber: function rgbNumber() { var t = this.values.rgb;return t[0] << 16 | t[1] << 8 | t[2]; }, luminosity: function luminosity() { for (var t = this.values.rgb, e = [], n = 0; n < t.length; n++) { var i = t[n] / 255;e[n] = i <= .03928 ? i / 12.92 : Math.pow((i + .055) / 1.055, 2.4); }return .2126 * e[0] + .7152 * e[1] + .0722 * e[2]; }, contrast: function contrast(t) { var e = this.luminosity(), n = t.luminosity();return e > n ? (e + .05) / (n + .05) : (n + .05) / (e + .05); }, level: function level(t) { var e = this.contrast(t);return e >= 7.1 ? "AAA" : e >= 4.5 ? "AA" : ""; }, dark: function dark() { var t = this.values.rgb;return (299 * t[0] + 587 * t[1] + 114 * t[2]) / 1e3 < 128; }, light: function light() { return !this.dark(); }, negate: function negate() { for (var t = [], e = 0; e < 3; e++) { t[e] = 255 - this.values.rgb[e]; }return this.setValues("rgb", t), this; }, lighten: function lighten(t) { var e = this.values.hsl;return e[2] += e[2] * t, this.setValues("hsl", e), this; }, darken: function darken(t) { var e = this.values.hsl;return e[2] -= e[2] * t, this.setValues("hsl", e), this; }, saturate: function saturate(t) { var e = this.values.hsl;return e[1] += e[1] * t, this.setValues("hsl", e), this; }, desaturate: function desaturate(t) { var e = this.values.hsl;return e[1] -= e[1] * t, this.setValues("hsl", e), this; }, whiten: function whiten(t) { var e = this.values.hwb;return e[1] += e[1] * t, this.setValues("hwb", e), this; }, blacken: function blacken(t) { var e = this.values.hwb;return e[2] += e[2] * t, this.setValues("hwb", e), this; }, greyscale: function greyscale() { var t = this.values.rgb, e = .3 * t[0] + .59 * t[1] + .11 * t[2];return this.setValues("rgb", [e, e, e]), this; }, clearer: function clearer(t) { var e = this.values.alpha;return this.setValues("alpha", e - e * t), this; }, opaquer: function opaquer(t) { var e = this.values.alpha;return this.setValues("alpha", e + e * t), this; }, rotate: function rotate(t) { var e = this.values.hsl, n = (e[0] + t) % 360;return e[0] = n < 0 ? 360 + n : n, this.setValues("hsl", e), this; }, mix: function mix(t, e) { var n = this, i = t, a = void 0 === e ? .5 : e, o = 2 * a - 1, r = n.alpha() - i.alpha(), l = ((o * r == -1 ? o : (o + r) / (1 + o * r)) + 1) / 2, s = 1 - l;return this.rgb(l * n.red() + s * i.red(), l * n.green() + s * i.green(), l * n.blue() + s * i.blue()).alpha(n.alpha() * a + i.alpha() * (1 - a)); }, toJSON: function toJSON() { return this.rgb(); }, clone: function clone() { var t, e, n = new o(), i = this.values, a = n.values;for (var r in i) { i.hasOwnProperty(r) && (t = i[r], "[object Array]" === (e = {}.toString.call(t)) ? a[r] = t.slice(0) : "[object Number]" === e ? a[r] = t : console.error("unexpected color value:", t)); }return n; } }, o.prototype.spaces = { rgb: ["red", "green", "blue"], hsl: ["hue", "saturation", "lightness"], hsv: ["hue", "saturation", "value"], hwb: ["hue", "whiteness", "blackness"], cmyk: ["cyan", "magenta", "yellow", "black"] }, o.prototype.maxes = { rgb: [255, 255, 255], hsl: [360, 100, 100], hsv: [360, 100, 100], hwb: [360, 100, 100], cmyk: [100, 100, 100, 100] }, o.prototype.getValues = function (t) { for (var e = this.values, n = {}, i = 0; i < t.length; i++) { n[t.charAt(i)] = e[t][i]; }return 1 !== e.alpha && (n.a = e.alpha), n; }, o.prototype.setValues = function (t, e) { var n, a = this.values, o = this.spaces, r = this.maxes, l = 1;if (this.valid = !0, "alpha" === t) l = e;else if (e.length) a[t] = e.slice(0, t.length), l = e[t.length];else if (void 0 !== e[t.charAt(0)]) { for (n = 0; n < t.length; n++) { a[t][n] = e[t.charAt(n)]; }l = e.a; } else if (void 0 !== e[o[t][0]]) { var s = o[t];for (n = 0; n < t.length; n++) { a[t][n] = e[s[n]]; }l = e.alpha; }if (a.alpha = Math.max(0, Math.min(1, void 0 === l ? a.alpha : l)), "alpha" === t) return !1;var u;for (n = 0; n < t.length; n++) { u = Math.max(0, Math.min(r[t][n], a[t][n])), a[t][n] = Math.round(u); }for (var d in o) { d !== t && (a[d] = i[t][d](a[t])); }return !0; }, o.prototype.setSpace = function (t, e) { var n = e[0];return void 0 === n ? this.getValues(t) : ("number" == typeof n && (n = Array.prototype.slice.call(e)), this.setValues(t, n), this); }, o.prototype.setChannel = function (t, e, n) { var i = this.values[t];return void 0 === n ? i[e] : n === i[e] ? this : (i[e] = n, this.setValues(t, i), this); }, "undefined" != typeof window && (window.Color = o), e.exports = o; }, { 2: 2, 5: 5 }], 4: [function (t, e, n) { function i(t) { var e, n, i, a = t[0] / 255, o = t[1] / 255, r = t[2] / 255, l = Math.min(a, o, r), s = Math.max(a, o, r), u = s - l;return s == l ? e = 0 : a == s ? e = (o - r) / u : o == s ? e = 2 + (r - a) / u : r == s && (e = 4 + (a - o) / u), (e = Math.min(60 * e, 360)) < 0 && (e += 360), i = (l + s) / 2, n = s == l ? 0 : i <= .5 ? u / (s + l) : u / (2 - s - l), [e, 100 * n, 100 * i]; }function a(t) { var e, n, i, a = t[0], o = t[1], r = t[2], l = Math.min(a, o, r), s = Math.max(a, o, r), u = s - l;return n = 0 == s ? 0 : u / s * 1e3 / 10, s == l ? e = 0 : a == s ? e = (o - r) / u : o == s ? e = 2 + (r - a) / u : r == s && (e = 4 + (a - o) / u), (e = Math.min(60 * e, 360)) < 0 && (e += 360), i = s / 255 * 1e3 / 10, [e, n, i]; }function o(t) { var e = t[0], n = t[1], a = t[2];return [i(t)[0], 100 * (1 / 255 * Math.min(e, Math.min(n, a))), 100 * (a = 1 - 1 / 255 * Math.max(e, Math.max(n, a)))]; }function l(t) { var e, n, i, a, o = t[0] / 255, r = t[1] / 255, l = t[2] / 255;return a = Math.min(1 - o, 1 - r, 1 - l), e = (1 - o - a) / (1 - a) || 0, n = (1 - r - a) / (1 - a) || 0, i = (1 - l - a) / (1 - a) || 0, [100 * e, 100 * n, 100 * i, 100 * a]; }function s(t) { return C[JSON.stringify(t)]; }function u(t) { var e = t[0] / 255, n = t[1] / 255, i = t[2] / 255;return [100 * (.4124 * (e = e > .04045 ? Math.pow((e + .055) / 1.055, 2.4) : e / 12.92) + .3576 * (n = n > .04045 ? Math.pow((n + .055) / 1.055, 2.4) : n / 12.92) + .1805 * (i = i > .04045 ? Math.pow((i + .055) / 1.055, 2.4) : i / 12.92)), 100 * (.2126 * e + .7152 * n + .0722 * i), 100 * (.0193 * e + .1192 * n + .9505 * i)]; }function d(t) { var e, n, i, a = u(t), o = a[0], r = a[1], l = a[2];return o /= 95.047, r /= 100, l /= 108.883, o = o > .008856 ? Math.pow(o, 1 / 3) : 7.787 * o + 16 / 116, r = r > .008856 ? Math.pow(r, 1 / 3) : 7.787 * r + 16 / 116, l = l > .008856 ? Math.pow(l, 1 / 3) : 7.787 * l + 16 / 116, e = 116 * r - 16, n = 500 * (o - r), i = 200 * (r - l), [e, n, i]; }function c(t) { var e, n, i, a, o, r = t[0] / 360, l = t[1] / 100, s = t[2] / 100;if (0 == l) return o = 255 * s, [o, o, o];e = 2 * s - (n = s < .5 ? s * (1 + l) : s + l - s * l), a = [0, 0, 0];for (var u = 0; u < 3; u++) { (i = r + 1 / 3 * -(u - 1)) < 0 && i++, i > 1 && i--, o = 6 * i < 1 ? e + 6 * (n - e) * i : 2 * i < 1 ? n : 3 * i < 2 ? e + (n - e) * (2 / 3 - i) * 6 : e, a[u] = 255 * o; }return a; }function h(t) { var e = t[0] / 60, n = t[1] / 100, i = t[2] / 100, a = Math.floor(e) % 6, o = e - Math.floor(e), r = 255 * i * (1 - n), l = 255 * i * (1 - n * o), s = 255 * i * (1 - n * (1 - o)), i = 255 * i;switch (a) {case 0: return [i, s, r];case 1: return [l, i, r];case 2: return [r, i, s];case 3: return [r, l, i];case 4: return [s, r, i];case 5: return [i, r, l];} }function f(t) { var e, n, i, a, o = t[0] / 360, l = t[1] / 100, s = t[2] / 100, u = l + s;switch (u > 1 && (l /= u, s /= u), e = Math.floor(6 * o), n = 1 - s, i = 6 * o - e, 0 != (1 & e) && (i = 1 - i), a = l + i * (n - l), e) {default:case 6:case 0: r = n, g = a, b = l;break;case 1: r = a, g = n, b = l;break;case 2: r = l, g = n, b = a;break;case 3: r = l, g = a, b = n;break;case 4: r = a, g = l, b = n;break;case 5: r = n, g = l, b = a;}return [255 * r, 255 * g, 255 * b]; }function p(t) { var e, n, i, a = t[0] / 100, o = t[1] / 100, r = t[2] / 100, l = t[3] / 100;return e = 1 - Math.min(1, a * (1 - l) + l), n = 1 - Math.min(1, o * (1 - l) + l), i = 1 - Math.min(1, r * (1 - l) + l), [255 * e, 255 * n, 255 * i]; }function v(t) { var e, n, i, a = t[0] / 100, o = t[1] / 100, r = t[2] / 100;return e = 3.2406 * a + -1.5372 * o + -.4986 * r, n = -.9689 * a + 1.8758 * o + .0415 * r, i = .0557 * a + -.204 * o + 1.057 * r, e = e > .0031308 ? 1.055 * Math.pow(e, 1 / 2.4) - .055 : e *= 12.92, n = n > .0031308 ? 1.055 * Math.pow(n, 1 / 2.4) - .055 : n *= 12.92, i = i > .0031308 ? 1.055 * Math.pow(i, 1 / 2.4) - .055 : i *= 12.92, e = Math.min(Math.max(0, e), 1), n = Math.min(Math.max(0, n), 1), i = Math.min(Math.max(0, i), 1), [255 * e, 255 * n, 255 * i]; }function m(t) { var e, n, i, a = t[0], o = t[1], r = t[2];return a /= 95.047, o /= 100, r /= 108.883, a = a > .008856 ? Math.pow(a, 1 / 3) : 7.787 * a + 16 / 116, o = o > .008856 ? Math.pow(o, 1 / 3) : 7.787 * o + 16 / 116, r = r > .008856 ? Math.pow(r, 1 / 3) : 7.787 * r + 16 / 116, e = 116 * o - 16, n = 500 * (a - o), i = 200 * (o - r), [e, n, i]; }function x(t) { var e, n, i, a, o = t[0], r = t[1], l = t[2];return o <= 8 ? a = (n = 100 * o / 903.3) / 100 * 7.787 + 16 / 116 : (n = 100 * Math.pow((o + 16) / 116, 3), a = Math.pow(n / 100, 1 / 3)), e = e / 95.047 <= .008856 ? e = 95.047 * (r / 500 + a - 16 / 116) / 7.787 : 95.047 * Math.pow(r / 500 + a, 3), i = i / 108.883 <= .008859 ? i = 108.883 * (a - l / 200 - 16 / 116) / 7.787 : 108.883 * Math.pow(a - l / 200, 3), [e, n, i]; }function y(t) { var e, n, i, a = t[0], o = t[1], r = t[2];return e = Math.atan2(r, o), (n = 360 * e / 2 / Math.PI) < 0 && (n += 360), i = Math.sqrt(o * o + r * r), [a, i, n]; }function k(t) { return v(x(t)); }function w(t) { var e, n, i, a = t[0], o = t[1];return i = t[2] / 360 * 2 * Math.PI, e = o * Math.cos(i), n = o * Math.sin(i), [a, e, n]; }function M(t) { return S[t]; }e.exports = { rgb2hsl: i, rgb2hsv: a, rgb2hwb: o, rgb2cmyk: l, rgb2keyword: s, rgb2xyz: u, rgb2lab: d, rgb2lch: function rgb2lch(t) { return y(d(t)); }, hsl2rgb: c, hsl2hsv: function hsl2hsv(t) { var e, n, i = t[0], a = t[1] / 100, o = t[2] / 100;return 0 === o ? [0, 0, 0] : (o *= 2, a *= o <= 1 ? o : 2 - o, n = (o + a) / 2, e = 2 * a / (o + a), [i, 100 * e, 100 * n]); }, hsl2hwb: function hsl2hwb(t) { return o(c(t)); }, hsl2cmyk: function hsl2cmyk(t) { return l(c(t)); }, hsl2keyword: function hsl2keyword(t) { return s(c(t)); }, hsv2rgb: h, hsv2hsl: function hsv2hsl(t) { var e, n, i = t[0], a = t[1] / 100, o = t[2] / 100;return n = (2 - a) * o, e = a * o, e /= n <= 1 ? n : 2 - n, e = e || 0, n /= 2, [i, 100 * e, 100 * n]; }, hsv2hwb: function hsv2hwb(t) { return o(h(t)); }, hsv2cmyk: function hsv2cmyk(t) { return l(h(t)); }, hsv2keyword: function hsv2keyword(t) { return s(h(t)); }, hwb2rgb: f, hwb2hsl: function hwb2hsl(t) { return i(f(t)); }, hwb2hsv: function hwb2hsv(t) { return a(f(t)); }, hwb2cmyk: function hwb2cmyk(t) { return l(f(t)); }, hwb2keyword: function hwb2keyword(t) { return s(f(t)); }, cmyk2rgb: p, cmyk2hsl: function cmyk2hsl(t) { return i(p(t)); }, cmyk2hsv: function cmyk2hsv(t) { return a(p(t)); }, cmyk2hwb: function cmyk2hwb(t) { return o(p(t)); }, cmyk2keyword: function cmyk2keyword(t) { return s(p(t)); }, keyword2rgb: M, keyword2hsl: function keyword2hsl(t) { return i(M(t)); }, keyword2hsv: function keyword2hsv(t) { return a(M(t)); }, keyword2hwb: function keyword2hwb(t) { return o(M(t)); }, keyword2cmyk: function keyword2cmyk(t) { return l(M(t)); }, keyword2lab: function keyword2lab(t) { return d(M(t)); }, keyword2xyz: function keyword2xyz(t) { return u(M(t)); }, xyz2rgb: v, xyz2lab: m, xyz2lch: function xyz2lch(t) { return y(m(t)); }, lab2xyz: x, lab2rgb: k, lab2lch: y, lch2lab: w, lch2xyz: function lch2xyz(t) { return x(w(t)); }, lch2rgb: function lch2rgb(t) { return k(w(t)); } };var S = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] }, C = {};for (var _ in S) { C[JSON.stringify(S[_])] = _; } }, {}], 5: [function (t, e, n) { var i = t(4), a = function a() { return new u(); };for (var o in i) { a[o + "Raw"] = function (t) { return function (e) { return "number" == typeof e && (e = Array.prototype.slice.call(arguments)), i[t](e); }; }(o);var r = /(\w+)2(\w+)/.exec(o), l = r[1], s = r[2];(a[l] = a[l] || {})[s] = a[o] = function (t) { return function (e) { "number" == typeof e && (e = Array.prototype.slice.call(arguments));var n = i[t](e);if ("string" == typeof n || void 0 === n) return n;for (var a = 0; a < n.length; a++) { n[a] = Math.round(n[a]); }return n; }; }(o); }var u = function u() { this.convs = {}; };u.prototype.routeSpace = function (t, e) { var n = e[0];return void 0 === n ? this.getValues(t) : ("number" == typeof n && (n = Array.prototype.slice.call(e)), this.setValues(t, n)); }, u.prototype.setValues = function (t, e) { return this.space = t, this.convs = {}, this.convs[t] = e, this; }, u.prototype.getValues = function (t) { var e = this.convs[t];if (!e) { var n = this.space, i = this.convs[n];e = a[n][t](i), this.convs[t] = e; }return e; }, ["rgb", "hsl", "hsv", "cmyk", "keyword"].forEach(function (t) { u.prototype[t] = function (e) { return this.routeSpace(t, arguments); }; }), e.exports = a; }, { 4: 4 }], 6: [function (t, e, n) { "use strict"; e.exports = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] }; }, {}], 7: [function (t, e, n) { var i = t(29)();i.helpers = t(45), t(27)(i), i.defaults = t(25), i.Element = t(26), i.elements = t(40), i.Interaction = t(28), i.platform = t(48), t(31)(i), t(22)(i), t(23)(i), t(24)(i), t(30)(i), t(33)(i), t(32)(i), t(35)(i), t(54)(i), t(52)(i), t(53)(i), t(55)(i), t(56)(i), t(57)(i), t(15)(i), t(16)(i), t(17)(i), t(18)(i), t(19)(i), t(20)(i), t(21)(i), t(8)(i), t(9)(i), t(10)(i), t(11)(i), t(12)(i), t(13)(i), t(14)(i);var a = [];a.push(t(49)(i), t(50)(i), t(51)(i)), i.plugins.register(a), i.platform.initialize(), e.exports = i, "undefined" != typeof window && (window.Chart = i), i.canvasHelpers = i.helpers.canvas; }, { 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 35: 35, 40: 40, 45: 45, 48: 48, 49: 49, 50: 50, 51: 51, 52: 52, 53: 53, 54: 54, 55: 55, 56: 56, 57: 57, 8: 8, 9: 9 }], 8: [function (t, e, n) { "use strict"; e.exports = function (t) { t.Bar = function (e, n) { return n.type = "bar", new t(e, n); }; }; }, {}], 9: [function (t, e, n) { "use strict"; e.exports = function (t) { t.Bubble = function (e, n) { return n.type = "bubble", new t(e, n); }; }; }, {}], 10: [function (t, e, n) { "use strict"; e.exports = function (t) { t.Doughnut = function (e, n) { return n.type = "doughnut", new t(e, n); }; }; }, {}], 11: [function (t, e, n) { "use strict"; e.exports = function (t) { t.Line = function (e, n) { return n.type = "line", new t(e, n); }; }; }, {}], 12: [function (t, e, n) { "use strict"; e.exports = function (t) { t.PolarArea = function (e, n) { return n.type = "polarArea", new t(e, n); }; }; }, {}], 13: [function (t, e, n) { "use strict"; e.exports = function (t) { t.Radar = function (e, n) { return n.type = "radar", new t(e, n); }; }; }, {}], 14: [function (t, e, n) { "use strict"; e.exports = function (t) { t.Scatter = function (e, n) { return n.type = "scatter", new t(e, n); }; }; }, {}], 15: [function (t, e, n) { "use strict"; var i = t(25), a = t(40), o = t(45);i._set("bar", { hover: { mode: "label" }, scales: { xAxes: [{ type: "category", categoryPercentage: .8, barPercentage: .9, offset: !0, gridLines: { offsetGridLines: !0 } }], yAxes: [{ type: "linear" }] } }), i._set("horizontalBar", { hover: { mode: "index", axis: "y" }, scales: { xAxes: [{ type: "linear", position: "bottom" }], yAxes: [{ position: "left", type: "category", categoryPercentage: .8, barPercentage: .9, offset: !0, gridLines: { offsetGridLines: !0 } }] }, elements: { rectangle: { borderSkipped: "left" } }, tooltips: { callbacks: { title: function title(t, e) { var n = "";return t.length > 0 && (t[0].yLabel ? n = t[0].yLabel : e.labels.length > 0 && t[0].index < e.labels.length && (n = e.labels[t[0].index])), n; }, label: function label(t, e) { return (e.datasets[t.datasetIndex].label || "") + ": " + t.xLabel; } }, mode: "index", axis: "y" } }), e.exports = function (t) { t.controllers.bar = t.DatasetController.extend({ dataElementType: a.Rectangle, initialize: function initialize() { var e, n = this;t.DatasetController.prototype.initialize.apply(n, arguments), (e = n.getMeta()).stack = n.getDataset().stack, e.bar = !0; }, update: function update(t) { var e, n, i = this, a = i.getMeta().data;for (i._ruler = i.getRuler(), e = 0, n = a.length; e < n; ++e) { i.updateElement(a[e], e, t); } }, updateElement: function updateElement(t, e, n) { var i = this, a = i.chart, r = i.getMeta(), l = i.getDataset(), s = t.custom || {}, u = a.options.elements.rectangle;t._xScale = i.getScaleForId(r.xAxisID), t._yScale = i.getScaleForId(r.yAxisID), t._datasetIndex = i.index, t._index = e, t._model = { datasetLabel: l.label, label: a.data.labels[e], borderSkipped: s.borderSkipped ? s.borderSkipped : u.borderSkipped, backgroundColor: s.backgroundColor ? s.backgroundColor : o.valueAtIndexOrDefault(l.backgroundColor, e, u.backgroundColor), borderColor: s.borderColor ? s.borderColor : o.valueAtIndexOrDefault(l.borderColor, e, u.borderColor), borderWidth: s.borderWidth ? s.borderWidth : o.valueAtIndexOrDefault(l.borderWidth, e, u.borderWidth) }, i.updateElementGeometry(t, e, n), t.pivot(); }, updateElementGeometry: function updateElementGeometry(t, e, n) { var i = this, a = t._model, o = i.getValueScale(), r = o.getBasePixel(), l = o.isHorizontal(), s = i._ruler || i.getRuler(), u = i.calculateBarValuePixels(i.index, e), d = i.calculateBarIndexPixels(i.index, e, s);a.horizontal = l, a.base = n ? r : u.base, a.x = l ? n ? r : u.head : d.center, a.y = l ? d.center : n ? r : u.head, a.height = l ? d.size : void 0, a.width = l ? void 0 : d.size; }, getValueScaleId: function getValueScaleId() { return this.getMeta().yAxisID; }, getIndexScaleId: function getIndexScaleId() { return this.getMeta().xAxisID; }, getValueScale: function getValueScale() { return this.getScaleForId(this.getValueScaleId()); }, getIndexScale: function getIndexScale() { return this.getScaleForId(this.getIndexScaleId()); }, getStackCount: function getStackCount(t) { var e, n, i = this, a = i.chart, o = i.getIndexScale().options.stacked, r = void 0 === t ? a.data.datasets.length : t + 1, l = [];for (e = 0; e < r; ++e) { (n = a.getDatasetMeta(e)).bar && a.isDatasetVisible(e) && (!1 === o || !0 === o && -1 === l.indexOf(n.stack) || void 0 === o && (void 0 === n.stack || -1 === l.indexOf(n.stack))) && l.push(n.stack); }return l.length; }, getStackIndex: function getStackIndex(t) { return this.getStackCount(t) - 1; }, getRuler: function getRuler() { var t, e, n = this, i = n.getIndexScale(), a = n.getStackCount(), o = n.index, r = [], l = i.isHorizontal(), s = l ? i.left : i.top, u = s + (l ? i.width : i.height);for (t = 0, e = n.getMeta().data.length; t < e; ++t) { r.push(i.getPixelForValue(null, t, o)); }return { pixels: r, start: s, end: u, stackCount: a, scale: i }; }, calculateBarValuePixels: function calculateBarValuePixels(t, e) { var n, i, a, o, r, l, s = this, u = s.chart, d = s.getMeta(), c = s.getValueScale(), h = u.data.datasets, f = c.getRightValue(h[t].data[e]), g = c.options.stacked, p = d.stack, v = 0;if (g || void 0 === g && void 0 !== p) for (n = 0; n < t; ++n) { (i = u.getDatasetMeta(n)).bar && i.stack === p && i.controller.getValueScaleId() === c.id && u.isDatasetVisible(n) && (a = c.getRightValue(h[n].data[e]), (f < 0 && a < 0 || f >= 0 && a > 0) && (v += a)); }return o = c.getPixelForValue(v), r = c.getPixelForValue(v + f), l = (r - o) / 2, { size: l, base: o, head: r, center: r + l / 2 }; }, calculateBarIndexPixels: function calculateBarIndexPixels(t, e, n) { var i, a, r, l, s, u, d = this, c = n.scale.options, h = d.getStackIndex(t), f = n.pixels, g = f[e], p = f.length, v = n.start, m = n.end;return 1 === p ? (i = g > v ? g - v : m - g, a = g < m ? m - g : g - v) : (e > 0 && (i = (g - f[e - 1]) / 2, e === p - 1 && (a = i)), e < p - 1 && (a = (f[e + 1] - g) / 2, 0 === e && (i = a))), r = i * c.categoryPercentage, l = a * c.categoryPercentage, s = (r + l) / n.stackCount, u = s * c.barPercentage, u = Math.min(o.valueOrDefault(c.barThickness, u), o.valueOrDefault(c.maxBarThickness, 1 / 0)), g -= r, g += s * h, g += (s - u) / 2, { size: u, base: g, head: g + u, center: g + u / 2 }; }, draw: function draw() { var t = this, e = t.chart, n = t.getValueScale(), i = t.getMeta().data, a = t.getDataset(), r = i.length, l = 0;for (o.canvas.clipArea(e.ctx, e.chartArea); l < r; ++l) { isNaN(n.getRightValue(a.data[l])) || i[l].draw(); }o.canvas.unclipArea(e.ctx); }, setHoverStyle: function setHoverStyle(t) { var e = this.chart.data.datasets[t._datasetIndex], n = t._index, i = t.custom || {}, a = t._model;a.backgroundColor = i.hoverBackgroundColor ? i.hoverBackgroundColor : o.valueAtIndexOrDefault(e.hoverBackgroundColor, n, o.getHoverColor(a.backgroundColor)), a.borderColor = i.hoverBorderColor ? i.hoverBorderColor : o.valueAtIndexOrDefault(e.hoverBorderColor, n, o.getHoverColor(a.borderColor)), a.borderWidth = i.hoverBorderWidth ? i.hoverBorderWidth : o.valueAtIndexOrDefault(e.hoverBorderWidth, n, a.borderWidth); }, removeHoverStyle: function removeHoverStyle(t) { var e = this.chart.data.datasets[t._datasetIndex], n = t._index, i = t.custom || {}, a = t._model, r = this.chart.options.elements.rectangle;a.backgroundColor = i.backgroundColor ? i.backgroundColor : o.valueAtIndexOrDefault(e.backgroundColor, n, r.backgroundColor), a.borderColor = i.borderColor ? i.borderColor : o.valueAtIndexOrDefault(e.borderColor, n, r.borderColor), a.borderWidth = i.borderWidth ? i.borderWidth : o.valueAtIndexOrDefault(e.borderWidth, n, r.borderWidth); } }), t.controllers.horizontalBar = t.controllers.bar.extend({ getValueScaleId: function getValueScaleId() { return this.getMeta().xAxisID; }, getIndexScaleId: function getIndexScaleId() { return this.getMeta().yAxisID; } }); }; }, { 25: 25, 40: 40, 45: 45 }], 16: [function (t, e, n) { "use strict"; var i = t(25), a = t(40), o = t(45);i._set("bubble", { hover: { mode: "single" }, scales: { xAxes: [{ type: "linear", position: "bottom", id: "x-axis-0" }], yAxes: [{ type: "linear", position: "left", id: "y-axis-0" }] }, tooltips: { callbacks: { title: function title() { return ""; }, label: function label(t, e) { var n = e.datasets[t.datasetIndex].label || "", i = e.datasets[t.datasetIndex].data[t.index];return n + ": (" + t.xLabel + ", " + t.yLabel + ", " + i.r + ")"; } } } }), e.exports = function (t) { t.controllers.bubble = t.DatasetController.extend({ dataElementType: a.Point, update: function update(t) { var e = this, n = e.getMeta().data;o.each(n, function (n, i) { e.updateElement(n, i, t); }); }, updateElement: function updateElement(t, e, n) { var i = this, a = i.getMeta(), o = t.custom || {}, r = i.getScaleForId(a.xAxisID), l = i.getScaleForId(a.yAxisID), s = i._resolveElementOptions(t, e), u = i.getDataset().data[e], d = i.index, c = n ? r.getPixelForDecimal(.5) : r.getPixelForValue("object" == (typeof u === "undefined" ? "undefined" : _typeof(u)) ? u : NaN, e, d), h = n ? l.getBasePixel() : l.getPixelForValue(u, e, d);t._xScale = r, t._yScale = l, t._options = s, t._datasetIndex = d, t._index = e, t._model = { backgroundColor: s.backgroundColor, borderColor: s.borderColor, borderWidth: s.borderWidth, hitRadius: s.hitRadius, pointStyle: s.pointStyle, radius: n ? 0 : s.radius, skip: o.skip || isNaN(c) || isNaN(h), x: c, y: h }, t.pivot(); }, setHoverStyle: function setHoverStyle(t) { var e = t._model, n = t._options;e.backgroundColor = o.valueOrDefault(n.hoverBackgroundColor, o.getHoverColor(n.backgroundColor)), e.borderColor = o.valueOrDefault(n.hoverBorderColor, o.getHoverColor(n.borderColor)), e.borderWidth = o.valueOrDefault(n.hoverBorderWidth, n.borderWidth), e.radius = n.radius + n.hoverRadius; }, removeHoverStyle: function removeHoverStyle(t) { var e = t._model, n = t._options;e.backgroundColor = n.backgroundColor, e.borderColor = n.borderColor, e.borderWidth = n.borderWidth, e.radius = n.radius; }, _resolveElementOptions: function _resolveElementOptions(t, e) { var n, i, a, r = this, l = r.chart, s = l.data.datasets[r.index], u = t.custom || {}, d = l.options.elements.point, c = o.options.resolve, h = s.data[e], f = {}, g = { chart: l, dataIndex: e, dataset: s, datasetIndex: r.index }, p = ["backgroundColor", "borderColor", "borderWidth", "hoverBackgroundColor", "hoverBorderColor", "hoverBorderWidth", "hoverRadius", "hitRadius", "pointStyle"];for (n = 0, i = p.length; n < i; ++n) { f[a = p[n]] = c([u[a], s[a], d[a]], g, e); }return f.radius = c([u.radius, h ? h.r : void 0, s.radius, d.radius], g, e), f; } }); }; }, { 25: 25, 40: 40, 45: 45 }], 17: [function (t, e, n) { "use strict"; var i = t(25), a = t(40), o = t(45);i._set("doughnut", { animation: { animateRotate: !0, animateScale: !1 }, hover: { mode: "single" }, legendCallback: function legendCallback(t) { var e = [];e.push('<ul class="' + t.id + '-legend">');var n = t.data, i = n.datasets, a = n.labels;if (i.length) for (var o = 0; o < i[0].data.length; ++o) { e.push('<li><span style="background-color:' + i[0].backgroundColor[o] + '"></span>'), a[o] && e.push(a[o]), e.push("</li>"); }return e.push("</ul>"), e.join(""); }, legend: { labels: { generateLabels: function generateLabels(t) { var e = t.data;return e.labels.length && e.datasets.length ? e.labels.map(function (n, i) { var a = t.getDatasetMeta(0), r = e.datasets[0], l = a.data[i], s = l && l.custom || {}, u = o.valueAtIndexOrDefault, d = t.options.elements.arc;return { text: n, fillStyle: s.backgroundColor ? s.backgroundColor : u(r.backgroundColor, i, d.backgroundColor), strokeStyle: s.borderColor ? s.borderColor : u(r.borderColor, i, d.borderColor), lineWidth: s.borderWidth ? s.borderWidth : u(r.borderWidth, i, d.borderWidth), hidden: isNaN(r.data[i]) || a.data[i].hidden, index: i }; }) : []; } }, onClick: function onClick(t, e) { var n, i, a, o = e.index, r = this.chart;for (n = 0, i = (r.data.datasets || []).length; n < i; ++n) { (a = r.getDatasetMeta(n)).data[o] && (a.data[o].hidden = !a.data[o].hidden); }r.update(); } }, cutoutPercentage: 50, rotation: -.5 * Math.PI, circumference: 2 * Math.PI, tooltips: { callbacks: { title: function title() { return ""; }, label: function label(t, e) { var n = e.labels[t.index], i = ": " + e.datasets[t.datasetIndex].data[t.index];return o.isArray(n) ? (n = n.slice())[0] += i : n += i, n; } } } }), i._set("pie", o.clone(i.doughnut)), i._set("pie", { cutoutPercentage: 0 }), e.exports = function (t) { t.controllers.doughnut = t.controllers.pie = t.DatasetController.extend({ dataElementType: a.Arc, linkScales: o.noop, getRingIndex: function getRingIndex(t) { for (var e = 0, n = 0; n < t; ++n) { this.chart.isDatasetVisible(n) && ++e; }return e; }, update: function update(t) { var e = this, n = e.chart, i = n.chartArea, a = n.options, r = a.elements.arc, l = i.right - i.left - r.borderWidth, s = i.bottom - i.top - r.borderWidth, u = Math.min(l, s), d = { x: 0, y: 0 }, c = e.getMeta(), h = a.cutoutPercentage, f = a.circumference;if (f < 2 * Math.PI) { var g = a.rotation % (2 * Math.PI), p = (g += 2 * Math.PI * (g >= Math.PI ? -1 : g < -Math.PI ? 1 : 0)) + f, v = { x: Math.cos(g), y: Math.sin(g) }, m = { x: Math.cos(p), y: Math.sin(p) }, b = g <= 0 && p >= 0 || g <= 2 * Math.PI && 2 * Math.PI <= p, x = g <= .5 * Math.PI && .5 * Math.PI <= p || g <= 2.5 * Math.PI && 2.5 * Math.PI <= p, y = g <= -Math.PI && -Math.PI <= p || g <= Math.PI && Math.PI <= p, k = g <= .5 * -Math.PI && .5 * -Math.PI <= p || g <= 1.5 * Math.PI && 1.5 * Math.PI <= p, w = h / 100, M = { x: y ? -1 : Math.min(v.x * (v.x < 0 ? 1 : w), m.x * (m.x < 0 ? 1 : w)), y: k ? -1 : Math.min(v.y * (v.y < 0 ? 1 : w), m.y * (m.y < 0 ? 1 : w)) }, S = { x: b ? 1 : Math.max(v.x * (v.x > 0 ? 1 : w), m.x * (m.x > 0 ? 1 : w)), y: x ? 1 : Math.max(v.y * (v.y > 0 ? 1 : w), m.y * (m.y > 0 ? 1 : w)) }, C = { width: .5 * (S.x - M.x), height: .5 * (S.y - M.y) };u = Math.min(l / C.width, s / C.height), d = { x: -.5 * (S.x + M.x), y: -.5 * (S.y + M.y) }; }n.borderWidth = e.getMaxBorderWidth(c.data), n.outerRadius = Math.max((u - n.borderWidth) / 2, 0), n.innerRadius = Math.max(h ? n.outerRadius / 100 * h : 0, 0), n.radiusLength = (n.outerRadius - n.innerRadius) / n.getVisibleDatasetCount(), n.offsetX = d.x * n.outerRadius, n.offsetY = d.y * n.outerRadius, c.total = e.calculateTotal(), e.outerRadius = n.outerRadius - n.radiusLength * e.getRingIndex(e.index), e.innerRadius = Math.max(e.outerRadius - n.radiusLength, 0), o.each(c.data, function (n, i) { e.updateElement(n, i, t); }); }, updateElement: function updateElement(t, e, n) { var i = this, a = i.chart, r = a.chartArea, l = a.options, s = l.animation, u = (r.left + r.right) / 2, d = (r.top + r.bottom) / 2, c = l.rotation, h = l.rotation, f = i.getDataset(), g = n && s.animateRotate ? 0 : t.hidden ? 0 : i.calculateCircumference(f.data[e]) * (l.circumference / (2 * Math.PI)), p = n && s.animateScale ? 0 : i.innerRadius, v = n && s.animateScale ? 0 : i.outerRadius, m = o.valueAtIndexOrDefault;o.extend(t, { _datasetIndex: i.index, _index: e, _model: { x: u + a.offsetX, y: d + a.offsetY, startAngle: c, endAngle: h, circumference: g, outerRadius: v, innerRadius: p, label: m(f.label, e, a.data.labels[e]) } });var b = t._model;this.removeHoverStyle(t), n && s.animateRotate || (b.startAngle = 0 === e ? l.rotation : i.getMeta().data[e - 1]._model.endAngle, b.endAngle = b.startAngle + b.circumference), t.pivot(); }, removeHoverStyle: function removeHoverStyle(e) { t.DatasetController.prototype.removeHoverStyle.call(this, e, this.chart.options.elements.arc); }, calculateTotal: function calculateTotal() { var t, e = this.getDataset(), n = this.getMeta(), i = 0;return o.each(n.data, function (n, a) { t = e.data[a], isNaN(t) || n.hidden || (i += Math.abs(t)); }), i; }, calculateCircumference: function calculateCircumference(t) { var e = this.getMeta().total;return e > 0 && !isNaN(t) ? 2 * Math.PI * (t / e) : 0; }, getMaxBorderWidth: function getMaxBorderWidth(t) { for (var e, n, i = 0, a = this.index, o = t.length, r = 0; r < o; r++) { e = t[r]._model ? t[r]._model.borderWidth : 0, i = (n = t[r]._chart ? t[r]._chart.config.data.datasets[a].hoverBorderWidth : 0) > (i = e > i ? e : i) ? n : i; }return i; } }); }; }, { 25: 25, 40: 40, 45: 45 }], 18: [function (t, e, n) { "use strict"; var i = t(25), a = t(40), o = t(45);i._set("line", { showLines: !0, spanGaps: !1, hover: { mode: "label" }, scales: { xAxes: [{ type: "category", id: "x-axis-0" }], yAxes: [{ type: "linear", id: "y-axis-0" }] } }), e.exports = function (t) { function e(t, e) { return o.valueOrDefault(t.showLine, e.showLines); }t.controllers.line = t.DatasetController.extend({ datasetElementType: a.Line, dataElementType: a.Point, update: function update(t) { var n, i, a, r = this, l = r.getMeta(), s = l.dataset, u = l.data || [], d = r.chart.options, c = d.elements.line, h = r.getScaleForId(l.yAxisID), f = r.getDataset(), g = e(f, d);for (g && (a = s.custom || {}, void 0 !== f.tension && void 0 === f.lineTension && (f.lineTension = f.tension), s._scale = h, s._datasetIndex = r.index, s._children = u, s._model = { spanGaps: f.spanGaps ? f.spanGaps : d.spanGaps, tension: a.tension ? a.tension : o.valueOrDefault(f.lineTension, c.tension), backgroundColor: a.backgroundColor ? a.backgroundColor : f.backgroundColor || c.backgroundColor, borderWidth: a.borderWidth ? a.borderWidth : f.borderWidth || c.borderWidth, borderColor: a.borderColor ? a.borderColor : f.borderColor || c.borderColor, borderCapStyle: a.borderCapStyle ? a.borderCapStyle : f.borderCapStyle || c.borderCapStyle, borderDash: a.borderDash ? a.borderDash : f.borderDash || c.borderDash, borderDashOffset: a.borderDashOffset ? a.borderDashOffset : f.borderDashOffset || c.borderDashOffset, borderJoinStyle: a.borderJoinStyle ? a.borderJoinStyle : f.borderJoinStyle || c.borderJoinStyle, fill: a.fill ? a.fill : void 0 !== f.fill ? f.fill : c.fill, steppedLine: a.steppedLine ? a.steppedLine : o.valueOrDefault(f.steppedLine, c.stepped), cubicInterpolationMode: a.cubicInterpolationMode ? a.cubicInterpolationMode : o.valueOrDefault(f.cubicInterpolationMode, c.cubicInterpolationMode) }, s.pivot()), n = 0, i = u.length; n < i; ++n) { r.updateElement(u[n], n, t); }for (g && 0 !== s._model.tension && r.updateBezierControlPoints(), n = 0, i = u.length; n < i; ++n) { u[n].pivot(); } }, getPointBackgroundColor: function getPointBackgroundColor(t, e) { var n = this.chart.options.elements.point.backgroundColor, i = this.getDataset(), a = t.custom || {};return a.backgroundColor ? n = a.backgroundColor : i.pointBackgroundColor ? n = o.valueAtIndexOrDefault(i.pointBackgroundColor, e, n) : i.backgroundColor && (n = i.backgroundColor), n; }, getPointBorderColor: function getPointBorderColor(t, e) { var n = this.chart.options.elements.point.borderColor, i = this.getDataset(), a = t.custom || {};return a.borderColor ? n = a.borderColor : i.pointBorderColor ? n = o.valueAtIndexOrDefault(i.pointBorderColor, e, n) : i.borderColor && (n = i.borderColor), n; }, getPointBorderWidth: function getPointBorderWidth(t, e) { var n = this.chart.options.elements.point.borderWidth, i = this.getDataset(), a = t.custom || {};return isNaN(a.borderWidth) ? !isNaN(i.pointBorderWidth) || o.isArray(i.pointBorderWidth) ? n = o.valueAtIndexOrDefault(i.pointBorderWidth, e, n) : isNaN(i.borderWidth) || (n = i.borderWidth) : n = a.borderWidth, n; }, updateElement: function updateElement(t, e, n) { var i, a, r = this, l = r.getMeta(), s = t.custom || {}, u = r.getDataset(), d = r.index, c = u.data[e], h = r.getScaleForId(l.yAxisID), f = r.getScaleForId(l.xAxisID), g = r.chart.options.elements.point;void 0 !== u.radius && void 0 === u.pointRadius && (u.pointRadius = u.radius), void 0 !== u.hitRadius && void 0 === u.pointHitRadius && (u.pointHitRadius = u.hitRadius), i = f.getPixelForValue("object" == (typeof c === "undefined" ? "undefined" : _typeof(c)) ? c : NaN, e, d), a = n ? h.getBasePixel() : r.calculatePointY(c, e, d), t._xScale = f, t._yScale = h, t._datasetIndex = d, t._index = e, t._model = { x: i, y: a, skip: s.skip || isNaN(i) || isNaN(a), radius: s.radius || o.valueAtIndexOrDefault(u.pointRadius, e, g.radius), pointStyle: s.pointStyle || o.valueAtIndexOrDefault(u.pointStyle, e, g.pointStyle), backgroundColor: r.getPointBackgroundColor(t, e), borderColor: r.getPointBorderColor(t, e), borderWidth: r.getPointBorderWidth(t, e), tension: l.dataset._model ? l.dataset._model.tension : 0, steppedLine: !!l.dataset._model && l.dataset._model.steppedLine, hitRadius: s.hitRadius || o.valueAtIndexOrDefault(u.pointHitRadius, e, g.hitRadius) }; }, calculatePointY: function calculatePointY(t, e, n) { var i, a, o, r = this, l = r.chart, s = r.getMeta(), u = r.getScaleForId(s.yAxisID), d = 0, c = 0;if (u.options.stacked) { for (i = 0; i < n; i++) { if (a = l.data.datasets[i], "line" === (o = l.getDatasetMeta(i)).type && o.yAxisID === u.id && l.isDatasetVisible(i)) { var h = Number(u.getRightValue(a.data[e]));h < 0 ? c += h || 0 : d += h || 0; } }var f = Number(u.getRightValue(t));return f < 0 ? u.getPixelForValue(c + f) : u.getPixelForValue(d + f); }return u.getPixelForValue(t); }, updateBezierControlPoints: function updateBezierControlPoints() { function t(t, e, n) { return Math.max(Math.min(t, n), e); }var e, n, i, a, r = this, l = r.getMeta(), s = r.chart.chartArea, u = l.data || [];if (l.dataset._model.spanGaps && (u = u.filter(function (t) { return !t._model.skip; })), "monotone" === l.dataset._model.cubicInterpolationMode) o.splineCurveMonotone(u);else for (e = 0, n = u.length; e < n; ++e) { i = u[e]._model, a = o.splineCurve(o.previousItem(u, e)._model, i, o.nextItem(u, e)._model, l.dataset._model.tension), i.controlPointPreviousX = a.previous.x, i.controlPointPreviousY = a.previous.y, i.controlPointNextX = a.next.x, i.controlPointNextY = a.next.y; }if (r.chart.options.elements.line.capBezierPoints) for (e = 0, n = u.length; e < n; ++e) { (i = u[e]._model).controlPointPreviousX = t(i.controlPointPreviousX, s.left, s.right), i.controlPointPreviousY = t(i.controlPointPreviousY, s.top, s.bottom), i.controlPointNextX = t(i.controlPointNextX, s.left, s.right), i.controlPointNextY = t(i.controlPointNextY, s.top, s.bottom); } }, draw: function draw() { var t = this, n = t.chart, i = t.getMeta(), a = i.data || [], r = n.chartArea, l = a.length, s = 0;for (o.canvas.clipArea(n.ctx, r), e(t.getDataset(), n.options) && i.dataset.draw(), o.canvas.unclipArea(n.ctx); s < l; ++s) { a[s].draw(r); } }, setHoverStyle: function setHoverStyle(t) { var e = this.chart.data.datasets[t._datasetIndex], n = t._index, i = t.custom || {}, a = t._model;a.radius = i.hoverRadius || o.valueAtIndexOrDefault(e.pointHoverRadius, n, this.chart.options.elements.point.hoverRadius), a.backgroundColor = i.hoverBackgroundColor || o.valueAtIndexOrDefault(e.pointHoverBackgroundColor, n, o.getHoverColor(a.backgroundColor)), a.borderColor = i.hoverBorderColor || o.valueAtIndexOrDefault(e.pointHoverBorderColor, n, o.getHoverColor(a.borderColor)), a.borderWidth = i.hoverBorderWidth || o.valueAtIndexOrDefault(e.pointHoverBorderWidth, n, a.borderWidth); }, removeHoverStyle: function removeHoverStyle(t) { var e = this, n = e.chart.data.datasets[t._datasetIndex], i = t._index, a = t.custom || {}, r = t._model;void 0 !== n.radius && void 0 === n.pointRadius && (n.pointRadius = n.radius), r.radius = a.radius || o.valueAtIndexOrDefault(n.pointRadius, i, e.chart.options.elements.point.radius), r.backgroundColor = e.getPointBackgroundColor(t, i), r.borderColor = e.getPointBorderColor(t, i), r.borderWidth = e.getPointBorderWidth(t, i); } }); }; }, { 25: 25, 40: 40, 45: 45 }], 19: [function (t, e, n) { "use strict"; var i = t(25), a = t(40), o = t(45);i._set("polarArea", { scale: { type: "radialLinear", angleLines: { display: !1 }, gridLines: { circular: !0 }, pointLabels: { display: !1 }, ticks: { beginAtZero: !0 } }, animation: { animateRotate: !0, animateScale: !0 }, startAngle: -.5 * Math.PI, legendCallback: function legendCallback(t) { var e = [];e.push('<ul class="' + t.id + '-legend">');var n = t.data, i = n.datasets, a = n.labels;if (i.length) for (var o = 0; o < i[0].data.length; ++o) { e.push('<li><span style="background-color:' + i[0].backgroundColor[o] + '"></span>'), a[o] && e.push(a[o]), e.push("</li>"); }return e.push("</ul>"), e.join(""); }, legend: { labels: { generateLabels: function generateLabels(t) { var e = t.data;return e.labels.length && e.datasets.length ? e.labels.map(function (n, i) { var a = t.getDatasetMeta(0), r = e.datasets[0], l = a.data[i].custom || {}, s = o.valueAtIndexOrDefault, u = t.options.elements.arc;return { text: n, fillStyle: l.backgroundColor ? l.backgroundColor : s(r.backgroundColor, i, u.backgroundColor), strokeStyle: l.borderColor ? l.borderColor : s(r.borderColor, i, u.borderColor), lineWidth: l.borderWidth ? l.borderWidth : s(r.borderWidth, i, u.borderWidth), hidden: isNaN(r.data[i]) || a.data[i].hidden, index: i }; }) : []; } }, onClick: function onClick(t, e) { var n, i, a, o = e.index, r = this.chart;for (n = 0, i = (r.data.datasets || []).length; n < i; ++n) { (a = r.getDatasetMeta(n)).data[o].hidden = !a.data[o].hidden; }r.update(); } }, tooltips: { callbacks: { title: function title() { return ""; }, label: function label(t, e) { return e.labels[t.index] + ": " + t.yLabel; } } } }), e.exports = function (t) { t.controllers.polarArea = t.DatasetController.extend({ dataElementType: a.Arc, linkScales: o.noop, update: function update(t) { var e = this, n = e.chart, i = n.chartArea, a = e.getMeta(), r = n.options, l = r.elements.arc, s = Math.min(i.right - i.left, i.bottom - i.top);n.outerRadius = Math.max((s - l.borderWidth / 2) / 2, 0), n.innerRadius = Math.max(r.cutoutPercentage ? n.outerRadius / 100 * r.cutoutPercentage : 1, 0), n.radiusLength = (n.outerRadius - n.innerRadius) / n.getVisibleDatasetCount(), e.outerRadius = n.outerRadius - n.radiusLength * e.index, e.innerRadius = e.outerRadius - n.radiusLength, a.count = e.countVisibleElements(), o.each(a.data, function (n, i) { e.updateElement(n, i, t); }); }, updateElement: function updateElement(t, e, n) { for (var i = this, a = i.chart, r = i.getDataset(), l = a.options, s = l.animation, u = a.scale, d = a.data.labels, c = i.calculateCircumference(r.data[e]), h = u.xCenter, f = u.yCenter, g = 0, p = i.getMeta(), v = 0; v < e; ++v) { isNaN(r.data[v]) || p.data[v].hidden || ++g; }var m = l.startAngle, b = t.hidden ? 0 : u.getDistanceFromCenterForValue(r.data[e]), x = m + c * g, y = x + (t.hidden ? 0 : c), k = s.animateScale ? 0 : u.getDistanceFromCenterForValue(r.data[e]);o.extend(t, { _datasetIndex: i.index, _index: e, _scale: u, _model: { x: h, y: f, innerRadius: 0, outerRadius: n ? k : b, startAngle: n && s.animateRotate ? m : x, endAngle: n && s.animateRotate ? m : y, label: o.valueAtIndexOrDefault(d, e, d[e]) } }), i.removeHoverStyle(t), t.pivot(); }, removeHoverStyle: function removeHoverStyle(e) { t.DatasetController.prototype.removeHoverStyle.call(this, e, this.chart.options.elements.arc); }, countVisibleElements: function countVisibleElements() { var t = this.getDataset(), e = this.getMeta(), n = 0;return o.each(e.data, function (e, i) { isNaN(t.data[i]) || e.hidden || n++; }), n; }, calculateCircumference: function calculateCircumference(t) { var e = this.getMeta().count;return e > 0 && !isNaN(t) ? 2 * Math.PI / e : 0; } }); }; }, { 25: 25, 40: 40, 45: 45 }], 20: [function (t, e, n) { "use strict"; var i = t(25), a = t(40), o = t(45);i._set("radar", { scale: { type: "radialLinear" }, elements: { line: { tension: 0 } } }), e.exports = function (t) { t.controllers.radar = t.DatasetController.extend({ datasetElementType: a.Line, dataElementType: a.Point, linkScales: o.noop, update: function update(t) { var e = this, n = e.getMeta(), i = n.dataset, a = n.data, r = i.custom || {}, l = e.getDataset(), s = e.chart.options.elements.line, u = e.chart.scale;void 0 !== l.tension && void 0 === l.lineTension && (l.lineTension = l.tension), o.extend(n.dataset, { _datasetIndex: e.index, _scale: u, _children: a, _loop: !0, _model: { tension: r.tension ? r.tension : o.valueOrDefault(l.lineTension, s.tension), backgroundColor: r.backgroundColor ? r.backgroundColor : l.backgroundColor || s.backgroundColor, borderWidth: r.borderWidth ? r.borderWidth : l.borderWidth || s.borderWidth, borderColor: r.borderColor ? r.borderColor : l.borderColor || s.borderColor, fill: r.fill ? r.fill : void 0 !== l.fill ? l.fill : s.fill, borderCapStyle: r.borderCapStyle ? r.borderCapStyle : l.borderCapStyle || s.borderCapStyle, borderDash: r.borderDash ? r.borderDash : l.borderDash || s.borderDash, borderDashOffset: r.borderDashOffset ? r.borderDashOffset : l.borderDashOffset || s.borderDashOffset, borderJoinStyle: r.borderJoinStyle ? r.borderJoinStyle : l.borderJoinStyle || s.borderJoinStyle } }), n.dataset.pivot(), o.each(a, function (n, i) { e.updateElement(n, i, t); }, e), e.updateBezierControlPoints(); }, updateElement: function updateElement(t, e, n) { var i = this, a = t.custom || {}, r = i.getDataset(), l = i.chart.scale, s = i.chart.options.elements.point, u = l.getPointPositionForValue(e, r.data[e]);void 0 !== r.radius && void 0 === r.pointRadius && (r.pointRadius = r.radius), void 0 !== r.hitRadius && void 0 === r.pointHitRadius && (r.pointHitRadius = r.hitRadius), o.extend(t, { _datasetIndex: i.index, _index: e, _scale: l, _model: { x: n ? l.xCenter : u.x, y: n ? l.yCenter : u.y, tension: a.tension ? a.tension : o.valueOrDefault(r.lineTension, i.chart.options.elements.line.tension), radius: a.radius ? a.radius : o.valueAtIndexOrDefault(r.pointRadius, e, s.radius), backgroundColor: a.backgroundColor ? a.backgroundColor : o.valueAtIndexOrDefault(r.pointBackgroundColor, e, s.backgroundColor), borderColor: a.borderColor ? a.borderColor : o.valueAtIndexOrDefault(r.pointBorderColor, e, s.borderColor), borderWidth: a.borderWidth ? a.borderWidth : o.valueAtIndexOrDefault(r.pointBorderWidth, e, s.borderWidth), pointStyle: a.pointStyle ? a.pointStyle : o.valueAtIndexOrDefault(r.pointStyle, e, s.pointStyle), hitRadius: a.hitRadius ? a.hitRadius : o.valueAtIndexOrDefault(r.pointHitRadius, e, s.hitRadius) } }), t._model.skip = a.skip ? a.skip : isNaN(t._model.x) || isNaN(t._model.y); }, updateBezierControlPoints: function updateBezierControlPoints() { var t = this.chart.chartArea, e = this.getMeta();o.each(e.data, function (n, i) { var a = n._model, r = o.splineCurve(o.previousItem(e.data, i, !0)._model, a, o.nextItem(e.data, i, !0)._model, a.tension);a.controlPointPreviousX = Math.max(Math.min(r.previous.x, t.right), t.left), a.controlPointPreviousY = Math.max(Math.min(r.previous.y, t.bottom), t.top), a.controlPointNextX = Math.max(Math.min(r.next.x, t.right), t.left), a.controlPointNextY = Math.max(Math.min(r.next.y, t.bottom), t.top), n.pivot(); }); }, setHoverStyle: function setHoverStyle(t) { var e = this.chart.data.datasets[t._datasetIndex], n = t.custom || {}, i = t._index, a = t._model;a.radius = n.hoverRadius ? n.hoverRadius : o.valueAtIndexOrDefault(e.pointHoverRadius, i, this.chart.options.elements.point.hoverRadius), a.backgroundColor = n.hoverBackgroundColor ? n.hoverBackgroundColor : o.valueAtIndexOrDefault(e.pointHoverBackgroundColor, i, o.getHoverColor(a.backgroundColor)), a.borderColor = n.hoverBorderColor ? n.hoverBorderColor : o.valueAtIndexOrDefault(e.pointHoverBorderColor, i, o.getHoverColor(a.borderColor)), a.borderWidth = n.hoverBorderWidth ? n.hoverBorderWidth : o.valueAtIndexOrDefault(e.pointHoverBorderWidth, i, a.borderWidth); }, removeHoverStyle: function removeHoverStyle(t) { var e = this.chart.data.datasets[t._datasetIndex], n = t.custom || {}, i = t._index, a = t._model, r = this.chart.options.elements.point;a.radius = n.radius ? n.radius : o.valueAtIndexOrDefault(e.pointRadius, i, r.radius), a.backgroundColor = n.backgroundColor ? n.backgroundColor : o.valueAtIndexOrDefault(e.pointBackgroundColor, i, r.backgroundColor), a.borderColor = n.borderColor ? n.borderColor : o.valueAtIndexOrDefault(e.pointBorderColor, i, r.borderColor), a.borderWidth = n.borderWidth ? n.borderWidth : o.valueAtIndexOrDefault(e.pointBorderWidth, i, r.borderWidth); } }); }; }, { 25: 25, 40: 40, 45: 45 }], 21: [function (t, e, n) { "use strict"; t(25)._set("scatter", { hover: { mode: "single" }, scales: { xAxes: [{ id: "x-axis-1", type: "linear", position: "bottom" }], yAxes: [{ id: "y-axis-1", type: "linear", position: "left" }] }, showLines: !1, tooltips: { callbacks: { title: function title() { return ""; }, label: function label(t) { return "(" + t.xLabel + ", " + t.yLabel + ")"; } } } }), e.exports = function (t) { t.controllers.scatter = t.controllers.line; }; }, { 25: 25 }], 22: [function (t, e, n) { "use strict"; var i = t(25), a = t(26), o = t(45);i._set("global", { animation: { duration: 1e3, easing: "easeOutQuart", onProgress: o.noop, onComplete: o.noop } }), e.exports = function (t) { t.Animation = a.extend({ chart: null, currentStep: 0, numSteps: 60, easing: "", render: null, onAnimationProgress: null, onAnimationComplete: null }), t.animationService = { frameDuration: 17, animations: [], dropFrames: 0, request: null, addAnimation: function addAnimation(t, e, n, i) { var a, o, r = this.animations;for (e.chart = t, i || (t.animating = !0), a = 0, o = r.length; a < o; ++a) { if (r[a].chart === t) return void (r[a] = e); }r.push(e), 1 === r.length && this.requestAnimationFrame(); }, cancelAnimation: function cancelAnimation(t) { var e = o.findIndex(this.animations, function (e) { return e.chart === t; });-1 !== e && (this.animations.splice(e, 1), t.animating = !1); }, requestAnimationFrame: function requestAnimationFrame() { var t = this;null === t.request && (t.request = o.requestAnimFrame.call(window, function () { t.request = null, t.startDigest(); })); }, startDigest: function startDigest() { var t = this, e = Date.now(), n = 0;t.dropFrames > 1 && (n = Math.floor(t.dropFrames), t.dropFrames = t.dropFrames % 1), t.advance(1 + n);var i = Date.now();t.dropFrames += (i - e) / t.frameDuration, t.animations.length > 0 && t.requestAnimationFrame(); }, advance: function advance(t) { for (var e, n, i = this.animations, a = 0; a < i.length;) { n = (e = i[a]).chart, e.currentStep = (e.currentStep || 0) + t, e.currentStep = Math.min(e.currentStep, e.numSteps), o.callback(e.render, [n, e], n), o.callback(e.onAnimationProgress, [e], n), e.currentStep >= e.numSteps ? (o.callback(e.onAnimationComplete, [e], n), n.animating = !1, i.splice(a, 1)) : ++a; } } }, Object.defineProperty(t.Animation.prototype, "animationObject", { get: function get() { return this; } }), Object.defineProperty(t.Animation.prototype, "chartInstance", { get: function get() { return this.chart; }, set: function set(t) { this.chart = t; } }); }; }, { 25: 25, 26: 26, 45: 45 }], 23: [function (t, e, n) { "use strict"; var i = t(25), a = t(45), o = t(28), r = t(48);e.exports = function (t) { function e(t) { var e = (t = t || {}).data = t.data || {};return e.datasets = e.datasets || [], e.labels = e.labels || [], t.options = a.configMerge(i.global, i[t.type], t.options || {}), t; }function n(t) { var e = t.options;e.scale ? t.scale.options = e.scale : e.scales && e.scales.xAxes.concat(e.scales.yAxes).forEach(function (e) { t.scales[e.id].options = e; }), t.tooltip._options = e.tooltips; }function l(t) { return "top" === t || "bottom" === t; }var s = t.plugins;t.types = {}, t.instances = {}, t.controllers = {}, a.extend(t.prototype, { construct: function construct(n, i) { var o = this;i = e(i);var l = r.acquireContext(n, i), s = l && l.canvas, u = s && s.height, d = s && s.width;o.id = a.uid(), o.ctx = l, o.canvas = s, o.config = i, o.width = d, o.height = u, o.aspectRatio = u ? d / u : null, o.options = i.options, o._bufferedRender = !1, o.chart = o, o.controller = o, t.instances[o.id] = o, Object.defineProperty(o, "data", { get: function get() { return o.config.data; }, set: function set(t) { o.config.data = t; } }), l && s ? (o.initialize(), o.update()) : console.error("Failed to create chart: can't acquire context from the given item"); }, initialize: function initialize() { var t = this;return s.notify(t, "beforeInit"), a.retinaScale(t, t.options.devicePixelRatio), t.bindEvents(), t.options.responsive && t.resize(!0), t.ensureScalesHaveIDs(), t.buildScales(), t.initToolTip(), s.notify(t, "afterInit"), t; }, clear: function clear() { return a.canvas.clear(this), this; }, stop: function stop() { return t.animationService.cancelAnimation(this), this; }, resize: function resize(t) { var e = this, n = e.options, i = e.canvas, o = n.maintainAspectRatio && e.aspectRatio || null, r = Math.max(0, Math.floor(a.getMaximumWidth(i))), l = Math.max(0, Math.floor(o ? r / o : a.getMaximumHeight(i)));if ((e.width !== r || e.height !== l) && (i.width = e.width = r, i.height = e.height = l, i.style.width = r + "px", i.style.height = l + "px", a.retinaScale(e, n.devicePixelRatio), !t)) { var u = { width: r, height: l };s.notify(e, "resize", [u]), e.options.onResize && e.options.onResize(e, u), e.stop(), e.update(e.options.responsiveAnimationDuration); } }, ensureScalesHaveIDs: function ensureScalesHaveIDs() { var t = this.options, e = t.scales || {}, n = t.scale;a.each(e.xAxes, function (t, e) { t.id = t.id || "x-axis-" + e; }), a.each(e.yAxes, function (t, e) { t.id = t.id || "y-axis-" + e; }), n && (n.id = n.id || "scale"); }, buildScales: function buildScales() { var e = this, n = e.options, i = e.scales = {}, o = [];n.scales && (o = o.concat((n.scales.xAxes || []).map(function (t) { return { options: t, dtype: "category", dposition: "bottom" }; }), (n.scales.yAxes || []).map(function (t) { return { options: t, dtype: "linear", dposition: "left" }; }))), n.scale && o.push({ options: n.scale, dtype: "radialLinear", isDefault: !0, dposition: "chartArea" }), a.each(o, function (n) { var o = n.options, r = a.valueOrDefault(o.type, n.dtype), s = t.scaleService.getScaleConstructor(r);if (s) { l(o.position) !== l(n.dposition) && (o.position = n.dposition);var u = new s({ id: o.id, options: o, ctx: e.ctx, chart: e });i[u.id] = u, u.mergeTicksOptions(), n.isDefault && (e.scale = u); } }), t.scaleService.addScalesToLayout(this); }, buildOrUpdateControllers: function buildOrUpdateControllers() { var e = this, n = [], i = [];return a.each(e.data.datasets, function (a, o) { var r = e.getDatasetMeta(o), l = a.type || e.config.type;if (r.type && r.type !== l && (e.destroyDatasetMeta(o), r = e.getDatasetMeta(o)), r.type = l, n.push(r.type), r.controller) r.controller.updateIndex(o);else { var s = t.controllers[r.type];if (void 0 === s) throw new Error('"' + r.type + '" is not a chart type.');r.controller = new s(e, o), i.push(r.controller); } }, e), i; }, resetElements: function resetElements() { var t = this;a.each(t.data.datasets, function (e, n) { t.getDatasetMeta(n).controller.reset(); }, t); }, reset: function reset() { this.resetElements(), this.tooltip.initialize(); }, update: function update(t) { var e = this;if (t && "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) || (t = { duration: t, lazy: arguments[1] }), n(e), !1 !== s.notify(e, "beforeUpdate")) { e.tooltip._data = e.data;var i = e.buildOrUpdateControllers();a.each(e.data.datasets, function (t, n) { e.getDatasetMeta(n).controller.buildOrUpdateElements(); }, e), e.updateLayout(), a.each(i, function (t) { t.reset(); }), e.updateDatasets(), e.tooltip.initialize(), e.lastActive = [], s.notify(e, "afterUpdate"), e._bufferedRender ? e._bufferedRequest = { duration: t.duration, easing: t.easing, lazy: t.lazy } : e.render(t); } }, updateLayout: function updateLayout() { var e = this;!1 !== s.notify(e, "beforeLayout") && (t.layoutService.update(this, this.width, this.height), s.notify(e, "afterScaleUpdate"), s.notify(e, "afterLayout")); }, updateDatasets: function updateDatasets() { var t = this;if (!1 !== s.notify(t, "beforeDatasetsUpdate")) { for (var e = 0, n = t.data.datasets.length; e < n; ++e) { t.updateDataset(e); }s.notify(t, "afterDatasetsUpdate"); } }, updateDataset: function updateDataset(t) { var e = this, n = e.getDatasetMeta(t), i = { meta: n, index: t };!1 !== s.notify(e, "beforeDatasetUpdate", [i]) && (n.controller.update(), s.notify(e, "afterDatasetUpdate", [i])); }, render: function render(e) { var n = this;e && "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) || (e = { duration: e, lazy: arguments[1] });var i = e.duration, o = e.lazy;if (!1 !== s.notify(n, "beforeRender")) { var r = n.options.animation, l = function l(t) { s.notify(n, "afterRender"), a.callback(r && r.onComplete, [t], n); };if (r && (void 0 !== i && 0 !== i || void 0 === i && 0 !== r.duration)) { var u = new t.Animation({ numSteps: (i || r.duration) / 16.66, easing: e.easing || r.easing, render: function render(t, e) { var n = a.easing.effects[e.easing], i = e.currentStep, o = i / e.numSteps;t.draw(n(o), o, i); }, onAnimationProgress: r.onProgress, onAnimationComplete: l });t.animationService.addAnimation(n, u, i, o); } else n.draw(), l(new t.Animation({ numSteps: 0, chart: n }));return n; } }, draw: function draw(t) { var e = this;e.clear(), a.isNullOrUndef(t) && (t = 1), e.transition(t), !1 !== s.notify(e, "beforeDraw", [t]) && (a.each(e.boxes, function (t) { t.draw(e.chartArea); }, e), e.scale && e.scale.draw(), e.drawDatasets(t), e._drawTooltip(t), s.notify(e, "afterDraw", [t])); }, transition: function transition(t) { for (var e = this, n = 0, i = (e.data.datasets || []).length; n < i; ++n) { e.isDatasetVisible(n) && e.getDatasetMeta(n).controller.transition(t); }e.tooltip.transition(t); }, drawDatasets: function drawDatasets(t) { var e = this;if (!1 !== s.notify(e, "beforeDatasetsDraw", [t])) { for (var n = (e.data.datasets || []).length - 1; n >= 0; --n) { e.isDatasetVisible(n) && e.drawDataset(n, t); }s.notify(e, "afterDatasetsDraw", [t]); } }, drawDataset: function drawDataset(t, e) { var n = this, i = n.getDatasetMeta(t), a = { meta: i, index: t, easingValue: e };!1 !== s.notify(n, "beforeDatasetDraw", [a]) && (i.controller.draw(e), s.notify(n, "afterDatasetDraw", [a])); }, _drawTooltip: function _drawTooltip(t) { var e = this, n = e.tooltip, i = { tooltip: n, easingValue: t };!1 !== s.notify(e, "beforeTooltipDraw", [i]) && (n.draw(), s.notify(e, "afterTooltipDraw", [i])); }, getElementAtEvent: function getElementAtEvent(t) { return o.modes.single(this, t); }, getElementsAtEvent: function getElementsAtEvent(t) { return o.modes.label(this, t, { intersect: !0 }); }, getElementsAtXAxis: function getElementsAtXAxis(t) { return o.modes["x-axis"](this, t, { intersect: !0 }); }, getElementsAtEventForMode: function getElementsAtEventForMode(t, e, n) { var i = o.modes[e];return "function" == typeof i ? i(this, t, n) : []; }, getDatasetAtEvent: function getDatasetAtEvent(t) { return o.modes.dataset(this, t, { intersect: !0 }); }, getDatasetMeta: function getDatasetMeta(t) { var e = this, n = e.data.datasets[t];n._meta || (n._meta = {});var i = n._meta[e.id];return i || (i = n._meta[e.id] = { type: null, data: [], dataset: null, controller: null, hidden: null, xAxisID: null, yAxisID: null }), i; }, getVisibleDatasetCount: function getVisibleDatasetCount() { for (var t = 0, e = 0, n = this.data.datasets.length; e < n; ++e) { this.isDatasetVisible(e) && t++; }return t; }, isDatasetVisible: function isDatasetVisible(t) { var e = this.getDatasetMeta(t);return "boolean" == typeof e.hidden ? !e.hidden : !this.data.datasets[t].hidden; }, generateLegend: function generateLegend() { return this.options.legendCallback(this); }, destroyDatasetMeta: function destroyDatasetMeta(t) { var e = this.id, n = this.data.datasets[t], i = n._meta && n._meta[e];i && (i.controller.destroy(), delete n._meta[e]); }, destroy: function destroy() { var e, n, i = this, o = i.canvas;for (i.stop(), e = 0, n = i.data.datasets.length; e < n; ++e) { i.destroyDatasetMeta(e); }o && (i.unbindEvents(), a.canvas.clear(i), r.releaseContext(i.ctx), i.canvas = null, i.ctx = null), s.notify(i, "destroy"), delete t.instances[i.id]; }, toBase64Image: function toBase64Image() { return this.canvas.toDataURL.apply(this.canvas, arguments); }, initToolTip: function initToolTip() { var e = this;e.tooltip = new t.Tooltip({ _chart: e, _chartInstance: e, _data: e.data, _options: e.options.tooltips }, e); }, bindEvents: function bindEvents() { var t = this, e = t._listeners = {}, n = function n() { t.eventHandler.apply(t, arguments); };a.each(t.options.events, function (i) { r.addEventListener(t, i, n), e[i] = n; }), t.options.responsive && (n = function n() { t.resize(); }, r.addEventListener(t, "resize", n), e.resize = n); }, unbindEvents: function unbindEvents() { var t = this, e = t._listeners;e && (delete t._listeners, a.each(e, function (e, n) { r.removeEventListener(t, n, e); })); }, updateHoverStyle: function updateHoverStyle(t, e, n) { var i, a, o, r = n ? "setHoverStyle" : "removeHoverStyle";for (a = 0, o = t.length; a < o; ++a) { (i = t[a]) && this.getDatasetMeta(i._datasetIndex).controller[r](i); } }, eventHandler: function eventHandler(t) { var e = this, n = e.tooltip;if (!1 !== s.notify(e, "beforeEvent", [t])) { e._bufferedRender = !0, e._bufferedRequest = null;var i = e.handleEvent(t);i |= n && n.handleEvent(t), s.notify(e, "afterEvent", [t]);var a = e._bufferedRequest;return a ? e.render(a) : i && !e.animating && (e.stop(), e.render(e.options.hover.animationDuration, !0)), e._bufferedRender = !1, e._bufferedRequest = null, e; } }, handleEvent: function handleEvent(t) { var e = this, n = e.options || {}, i = n.hover, o = !1;return e.lastActive = e.lastActive || [], "mouseout" === t.type ? e.active = [] : e.active = e.getElementsAtEventForMode(t, i.mode, i), a.callback(n.onHover || n.hover.onHover, [t.native, e.active], e), "mouseup" !== t.type && "click" !== t.type || n.onClick && n.onClick.call(e, t.native, e.active), e.lastActive.length && e.updateHoverStyle(e.lastActive, i.mode, !1), e.active.length && i.mode && e.updateHoverStyle(e.active, i.mode, !0), o = !a.arrayEquals(e.active, e.lastActive), e.lastActive = e.active, o; } }), t.Controller = t; }; }, { 25: 25, 28: 28, 45: 45, 48: 48 }], 24: [function (t, e, n) { "use strict"; var i = t(45);e.exports = function (t) { function e(t, e) { t._chartjs ? t._chartjs.listeners.push(e) : (Object.defineProperty(t, "_chartjs", { configurable: !0, enumerable: !1, value: { listeners: [e] } }), a.forEach(function (e) { var n = "onData" + e.charAt(0).toUpperCase() + e.slice(1), a = t[e];Object.defineProperty(t, e, { configurable: !0, enumerable: !1, value: function value() { var e = Array.prototype.slice.call(arguments), o = a.apply(this, e);return i.each(t._chartjs.listeners, function (t) { "function" == typeof t[n] && t[n].apply(t, e); }), o; } }); })); }function n(t, e) { var n = t._chartjs;if (n) { var i = n.listeners, o = i.indexOf(e);-1 !== o && i.splice(o, 1), i.length > 0 || (a.forEach(function (e) { delete t[e]; }), delete t._chartjs); } }var a = ["push", "pop", "shift", "splice", "unshift"];t.DatasetController = function (t, e) { this.initialize(t, e); }, i.extend(t.DatasetController.prototype, { datasetElementType: null, dataElementType: null, initialize: function initialize(t, e) { var n = this;n.chart = t, n.index = e, n.linkScales(), n.addElements(); }, updateIndex: function updateIndex(t) { this.index = t; }, linkScales: function linkScales() { var t = this, e = t.getMeta(), n = t.getDataset();null === e.xAxisID && (e.xAxisID = n.xAxisID || t.chart.options.scales.xAxes[0].id), null === e.yAxisID && (e.yAxisID = n.yAxisID || t.chart.options.scales.yAxes[0].id); }, getDataset: function getDataset() { return this.chart.data.datasets[this.index]; }, getMeta: function getMeta() { return this.chart.getDatasetMeta(this.index); }, getScaleForId: function getScaleForId(t) { return this.chart.scales[t]; }, reset: function reset() { this.update(!0); }, destroy: function destroy() { this._data && n(this._data, this); }, createMetaDataset: function createMetaDataset() { var t = this, e = t.datasetElementType;return e && new e({ _chart: t.chart, _datasetIndex: t.index }); }, createMetaData: function createMetaData(t) { var e = this, n = e.dataElementType;return n && new n({ _chart: e.chart, _datasetIndex: e.index, _index: t }); }, addElements: function addElements() { var t, e, n = this, i = n.getMeta(), a = n.getDataset().data || [], o = i.data;for (t = 0, e = a.length; t < e; ++t) { o[t] = o[t] || n.createMetaData(t); }i.dataset = i.dataset || n.createMetaDataset(); }, addElementAndReset: function addElementAndReset(t) { var e = this.createMetaData(t);this.getMeta().data.splice(t, 0, e), this.updateElement(e, t, !0); }, buildOrUpdateElements: function buildOrUpdateElements() { var t = this, i = t.getDataset(), a = i.data || (i.data = []);t._data !== a && (t._data && n(t._data, t), e(a, t), t._data = a), t.resyncElements(); }, update: i.noop, transition: function transition(t) { for (var e = this.getMeta(), n = e.data || [], i = n.length, a = 0; a < i; ++a) { n[a].transition(t); }e.dataset && e.dataset.transition(t); }, draw: function draw() { var t = this.getMeta(), e = t.data || [], n = e.length, i = 0;for (t.dataset && t.dataset.draw(); i < n; ++i) { e[i].draw(); } }, removeHoverStyle: function removeHoverStyle(t, e) { var n = this.chart.data.datasets[t._datasetIndex], a = t._index, o = t.custom || {}, r = i.valueAtIndexOrDefault, l = t._model;l.backgroundColor = o.backgroundColor ? o.backgroundColor : r(n.backgroundColor, a, e.backgroundColor), l.borderColor = o.borderColor ? o.borderColor : r(n.borderColor, a, e.borderColor), l.borderWidth = o.borderWidth ? o.borderWidth : r(n.borderWidth, a, e.borderWidth); }, setHoverStyle: function setHoverStyle(t) { var e = this.chart.data.datasets[t._datasetIndex], n = t._index, a = t.custom || {}, o = i.valueAtIndexOrDefault, r = i.getHoverColor, l = t._model;l.backgroundColor = a.hoverBackgroundColor ? a.hoverBackgroundColor : o(e.hoverBackgroundColor, n, r(l.backgroundColor)), l.borderColor = a.hoverBorderColor ? a.hoverBorderColor : o(e.hoverBorderColor, n, r(l.borderColor)), l.borderWidth = a.hoverBorderWidth ? a.hoverBorderWidth : o(e.hoverBorderWidth, n, l.borderWidth); }, resyncElements: function resyncElements() { var t = this, e = t.getMeta(), n = t.getDataset().data, i = e.data.length, a = n.length;a < i ? e.data.splice(a, i - a) : a > i && t.insertElements(i, a - i); }, insertElements: function insertElements(t, e) { for (var n = 0; n < e; ++n) { this.addElementAndReset(t + n); } }, onDataPush: function onDataPush() { this.insertElements(this.getDataset().data.length - 1, arguments.length); }, onDataPop: function onDataPop() { this.getMeta().data.pop(); }, onDataShift: function onDataShift() { this.getMeta().data.shift(); }, onDataSplice: function onDataSplice(t, e) { this.getMeta().data.splice(t, e), this.insertElements(t, arguments.length - 2); }, onDataUnshift: function onDataUnshift() { this.insertElements(0, arguments.length); } }), t.DatasetController.extend = i.inherits; }; }, { 45: 45 }], 25: [function (t, e, n) { "use strict"; var i = t(45);e.exports = { _set: function _set(t, e) { return i.merge(this[t] || (this[t] = {}), e); } }; }, { 45: 45 }], 26: [function (t, e, n) { "use strict"; function i(t, e, n, i) { var o, r, l, s, u, d, c, h, f, g = Object.keys(n);for (o = 0, r = g.length; o < r; ++o) { if (l = g[o], d = n[l], e.hasOwnProperty(l) || (e[l] = d), (s = e[l]) !== d && "_" !== l[0]) { if (t.hasOwnProperty(l) || (t[l] = s), u = t[l], (c = typeof d === "undefined" ? "undefined" : _typeof(d)) === (typeof u === "undefined" ? "undefined" : _typeof(u))) if ("string" === c) { if ((h = a(u)).valid && (f = a(d)).valid) { e[l] = f.mix(h, i).rgbString();continue; } } else if ("number" === c && isFinite(u) && isFinite(d)) { e[l] = u + (d - u) * i;continue; }e[l] = d; } } }var a = t(3), o = t(45), r = function r(t) { o.extend(this, t), this.initialize.apply(this, arguments); };o.extend(r.prototype, { initialize: function initialize() { this.hidden = !1; }, pivot: function pivot() { var t = this;return t._view || (t._view = o.clone(t._model)), t._start = {}, t; }, transition: function transition(t) { var e = this, n = e._model, a = e._start, o = e._view;return n && 1 !== t ? (o || (o = e._view = {}), a || (a = e._start = {}), i(a, o, n, t), e) : (e._view = n, e._start = null, e); }, tooltipPosition: function tooltipPosition() { return { x: this._model.x, y: this._model.y }; }, hasValue: function hasValue() { return o.isNumber(this._model.x) && o.isNumber(this._model.y); } }), r.extend = o.inherits, e.exports = r; }, { 3: 3, 45: 45 }], 27: [function (t, e, n) { "use strict"; var i = t(3), a = t(25), o = t(45);e.exports = function (t) { function e(t, e, n) { var i;return "string" == typeof t ? (i = parseInt(t, 10), -1 !== t.indexOf("%") && (i = i / 100 * e.parentNode[n])) : i = t, i; }function n(t) { return void 0 !== t && null !== t && "none" !== t; }function r(t, i, a) { var o = document.defaultView, r = t.parentNode, l = o.getComputedStyle(t)[i], s = o.getComputedStyle(r)[i], u = n(l), d = n(s), c = Number.POSITIVE_INFINITY;return u || d ? Math.min(u ? e(l, t, a) : c, d ? e(s, r, a) : c) : "none"; }o.configMerge = function () { return o.merge(o.clone(arguments[0]), [].slice.call(arguments, 1), { merger: function merger(e, n, i, a) { var r = n[e] || {}, l = i[e];"scales" === e ? n[e] = o.scaleMerge(r, l) : "scale" === e ? n[e] = o.merge(r, [t.scaleService.getScaleDefaults(l.type), l]) : o._merger(e, n, i, a); } }); }, o.scaleMerge = function () { return o.merge(o.clone(arguments[0]), [].slice.call(arguments, 1), { merger: function merger(e, n, i, a) { if ("xAxes" === e || "yAxes" === e) { var r, l, s, u = i[e].length;for (n[e] || (n[e] = []), r = 0; r < u; ++r) { s = i[e][r], l = o.valueOrDefault(s.type, "xAxes" === e ? "category" : "linear"), r >= n[e].length && n[e].push({}), !n[e][r].type || s.type && s.type !== n[e][r].type ? o.merge(n[e][r], [t.scaleService.getScaleDefaults(l), s]) : o.merge(n[e][r], s); } } else o._merger(e, n, i, a); } }); }, o.where = function (t, e) { if (o.isArray(t) && Array.prototype.filter) return t.filter(e);var n = [];return o.each(t, function (t) { e(t) && n.push(t); }), n; }, o.findIndex = Array.prototype.findIndex ? function (t, e, n) { return t.findIndex(e, n); } : function (t, e, n) { n = void 0 === n ? t : n;for (var i = 0, a = t.length; i < a; ++i) { if (e.call(n, t[i], i, t)) return i; }return -1; }, o.findNextWhere = function (t, e, n) { o.isNullOrUndef(n) && (n = -1);for (var i = n + 1; i < t.length; i++) { var a = t[i];if (e(a)) return a; } }, o.findPreviousWhere = function (t, e, n) { o.isNullOrUndef(n) && (n = t.length);for (var i = n - 1; i >= 0; i--) { var a = t[i];if (e(a)) return a; } }, o.isNumber = function (t) { return !isNaN(parseFloat(t)) && isFinite(t); }, o.almostEquals = function (t, e, n) { return Math.abs(t - e) < n; }, o.almostWhole = function (t, e) { var n = Math.round(t);return n - e < t && n + e > t; }, o.max = function (t) { return t.reduce(function (t, e) { return isNaN(e) ? t : Math.max(t, e); }, Number.NEGATIVE_INFINITY); }, o.min = function (t) { return t.reduce(function (t, e) { return isNaN(e) ? t : Math.min(t, e); }, Number.POSITIVE_INFINITY); }, o.sign = Math.sign ? function (t) { return Math.sign(t); } : function (t) { return 0 == (t = +t) || isNaN(t) ? t : t > 0 ? 1 : -1; }, o.log10 = Math.log10 ? function (t) { return Math.log10(t); } : function (t) { return Math.log(t) / Math.LN10; }, o.toRadians = function (t) { return t * (Math.PI / 180); }, o.toDegrees = function (t) { return t * (180 / Math.PI); }, o.getAngleFromPoint = function (t, e) { var n = e.x - t.x, i = e.y - t.y, a = Math.sqrt(n * n + i * i), o = Math.atan2(i, n);return o < -.5 * Math.PI && (o += 2 * Math.PI), { angle: o, distance: a }; }, o.distanceBetweenPoints = function (t, e) { return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2)); }, o.aliasPixel = function (t) { return t % 2 == 0 ? 0 : .5; }, o.splineCurve = function (t, e, n, i) { var a = t.skip ? e : t, o = e, r = n.skip ? e : n, l = Math.sqrt(Math.pow(o.x - a.x, 2) + Math.pow(o.y - a.y, 2)), s = Math.sqrt(Math.pow(r.x - o.x, 2) + Math.pow(r.y - o.y, 2)), u = l / (l + s), d = s / (l + s), c = i * (u = isNaN(u) ? 0 : u), h = i * (d = isNaN(d) ? 0 : d);return { previous: { x: o.x - c * (r.x - a.x), y: o.y - c * (r.y - a.y) }, next: { x: o.x + h * (r.x - a.x), y: o.y + h * (r.y - a.y) } }; }, o.EPSILON = Number.EPSILON || 1e-14, o.splineCurveMonotone = function (t) { var e, n, i, a, r = (t || []).map(function (t) { return { model: t._model, deltaK: 0, mK: 0 }; }), l = r.length;for (e = 0; e < l; ++e) { if (!(i = r[e]).model.skip) { if (n = e > 0 ? r[e - 1] : null, (a = e < l - 1 ? r[e + 1] : null) && !a.model.skip) { var s = a.model.x - i.model.x;i.deltaK = 0 !== s ? (a.model.y - i.model.y) / s : 0; }!n || n.model.skip ? i.mK = i.deltaK : !a || a.model.skip ? i.mK = n.deltaK : this.sign(n.deltaK) !== this.sign(i.deltaK) ? i.mK = 0 : i.mK = (n.deltaK + i.deltaK) / 2; } }var u, d, c, h;for (e = 0; e < l - 1; ++e) { i = r[e], a = r[e + 1], i.model.skip || a.model.skip || (o.almostEquals(i.deltaK, 0, this.EPSILON) ? i.mK = a.mK = 0 : (u = i.mK / i.deltaK, d = a.mK / i.deltaK, (h = Math.pow(u, 2) + Math.pow(d, 2)) <= 9 || (c = 3 / Math.sqrt(h), i.mK = u * c * i.deltaK, a.mK = d * c * i.deltaK))); }var f;for (e = 0; e < l; ++e) { (i = r[e]).model.skip || (n = e > 0 ? r[e - 1] : null, a = e < l - 1 ? r[e + 1] : null, n && !n.model.skip && (f = (i.model.x - n.model.x) / 3, i.model.controlPointPreviousX = i.model.x - f, i.model.controlPointPreviousY = i.model.y - f * i.mK), a && !a.model.skip && (f = (a.model.x - i.model.x) / 3, i.model.controlPointNextX = i.model.x + f, i.model.controlPointNextY = i.model.y + f * i.mK)); } }, o.nextItem = function (t, e, n) { return n ? e >= t.length - 1 ? t[0] : t[e + 1] : e >= t.length - 1 ? t[t.length - 1] : t[e + 1]; }, o.previousItem = function (t, e, n) { return n ? e <= 0 ? t[t.length - 1] : t[e - 1] : e <= 0 ? t[0] : t[e - 1]; }, o.niceNum = function (t, e) { var n = Math.floor(o.log10(t)), i = t / Math.pow(10, n);return (e ? i < 1.5 ? 1 : i < 3 ? 2 : i < 7 ? 5 : 10 : i <= 1 ? 1 : i <= 2 ? 2 : i <= 5 ? 5 : 10) * Math.pow(10, n); }, o.requestAnimFrame = "undefined" == typeof window ? function (t) { t(); } : window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (t) { return window.setTimeout(t, 1e3 / 60); }, o.getRelativePosition = function (t, e) { var n, i, a = t.originalEvent || t, r = t.currentTarget || t.srcElement, l = r.getBoundingClientRect(), s = a.touches;s && s.length > 0 ? (n = s[0].clientX, i = s[0].clientY) : (n = a.clientX, i = a.clientY);var u = parseFloat(o.getStyle(r, "padding-left")), d = parseFloat(o.getStyle(r, "padding-top")), c = parseFloat(o.getStyle(r, "padding-right")), h = parseFloat(o.getStyle(r, "padding-bottom")), f = l.right - l.left - u - c, g = l.bottom - l.top - d - h;return n = Math.round((n - l.left - u) / f * r.width / e.currentDevicePixelRatio), i = Math.round((i - l.top - d) / g * r.height / e.currentDevicePixelRatio), { x: n, y: i }; }, o.getConstraintWidth = function (t) { return r(t, "max-width", "clientWidth"); }, o.getConstraintHeight = function (t) { return r(t, "max-height", "clientHeight"); }, o.getMaximumWidth = function (t) { var e = t.parentNode;if (!e) return t.clientWidth;var n = parseInt(o.getStyle(e, "padding-left"), 10), i = parseInt(o.getStyle(e, "padding-right"), 10), a = e.clientWidth - n - i, r = o.getConstraintWidth(t);return isNaN(r) ? a : Math.min(a, r); }, o.getMaximumHeight = function (t) { var e = t.parentNode;if (!e) return t.clientHeight;var n = parseInt(o.getStyle(e, "padding-top"), 10), i = parseInt(o.getStyle(e, "padding-bottom"), 10), a = e.clientHeight - n - i, r = o.getConstraintHeight(t);return isNaN(r) ? a : Math.min(a, r); }, o.getStyle = function (t, e) { return t.currentStyle ? t.currentStyle[e] : document.defaultView.getComputedStyle(t, null).getPropertyValue(e); }, o.retinaScale = function (t, e) { var n = t.currentDevicePixelRatio = e || window.devicePixelRatio || 1;if (1 !== n) { var i = t.canvas, a = t.height, o = t.width;i.height = a * n, i.width = o * n, t.ctx.scale(n, n), i.style.height = a + "px", i.style.width = o + "px"; } }, o.fontString = function (t, e, n) { return e + " " + t + "px " + n; }, o.longestText = function (t, e, n, i) { var a = (i = i || {}).data = i.data || {}, r = i.garbageCollect = i.garbageCollect || [];i.font !== e && (a = i.data = {}, r = i.garbageCollect = [], i.font = e), t.font = e;var l = 0;o.each(n, function (e) { void 0 !== e && null !== e && !0 !== o.isArray(e) ? l = o.measureText(t, a, r, l, e) : o.isArray(e) && o.each(e, function (e) { void 0 === e || null === e || o.isArray(e) || (l = o.measureText(t, a, r, l, e)); }); });var s = r.length / 2;if (s > n.length) { for (var u = 0; u < s; u++) { delete a[r[u]]; }r.splice(0, s); }return l; }, o.measureText = function (t, e, n, i, a) { var o = e[a];return o || (o = e[a] = t.measureText(a).width, n.push(a)), o > i && (i = o), i; }, o.numberOfLabelLines = function (t) { var e = 1;return o.each(t, function (t) { o.isArray(t) && t.length > e && (e = t.length); }), e; }, o.color = i ? function (t) { return t instanceof CanvasGradient && (t = a.global.defaultColor), i(t); } : function (t) { return console.error("Color.js not found!"), t; }, o.getHoverColor = function (t) { return t instanceof CanvasPattern ? t : o.color(t).saturate(.5).darken(.1).rgbString(); }; }; }, { 25: 25, 3: 3, 45: 45 }], 28: [function (t, e, n) { "use strict"; function i(t, e) { return t.native ? { x: t.x, y: t.y } : u.getRelativePosition(t, e); }function a(t, e) { var n, i, a, o, r;for (i = 0, o = t.data.datasets.length; i < o; ++i) { if (t.isDatasetVisible(i)) for (a = 0, r = (n = t.getDatasetMeta(i)).data.length; a < r; ++a) { var l = n.data[a];l._view.skip || e(l); } } }function o(t, e) { var n = [];return a(t, function (t) { t.inRange(e.x, e.y) && n.push(t); }), n; }function r(t, e, n, i) { var o = Number.POSITIVE_INFINITY, r = [];return a(t, function (t) { if (!n || t.inRange(e.x, e.y)) { var a = t.getCenterPoint(), l = i(e, a);l < o ? (r = [t], o = l) : l === o && r.push(t); } }), r; }function l(t) { var e = -1 !== t.indexOf("x"), n = -1 !== t.indexOf("y");return function (t, i) { var a = e ? Math.abs(t.x - i.x) : 0, o = n ? Math.abs(t.y - i.y) : 0;return Math.sqrt(Math.pow(a, 2) + Math.pow(o, 2)); }; }function s(t, e, n) { var a = i(e, t);n.axis = n.axis || "x";var s = l(n.axis), u = n.intersect ? o(t, a) : r(t, a, !1, s), d = [];return u.length ? (t.data.datasets.forEach(function (e, n) { if (t.isDatasetVisible(n)) { var i = t.getDatasetMeta(n).data[u[0]._index];i && !i._view.skip && d.push(i); } }), d) : []; }var u = t(45);e.exports = { modes: { single: function single(t, e) { var n = i(e, t), o = [];return a(t, function (t) { if (t.inRange(n.x, n.y)) return o.push(t), o; }), o.slice(0, 1); }, label: s, index: s, dataset: function dataset(t, e, n) { var a = i(e, t);n.axis = n.axis || "xy";var s = l(n.axis), u = n.intersect ? o(t, a) : r(t, a, !1, s);return u.length > 0 && (u = t.getDatasetMeta(u[0]._datasetIndex).data), u; }, "x-axis": function xAxis(t, e) { return s(t, e, { intersect: !1 }); }, point: function point(t, e) { return o(t, i(e, t)); }, nearest: function nearest(t, e, n) { var a = i(e, t);n.axis = n.axis || "xy";var o = l(n.axis), s = r(t, a, n.intersect, o);return s.length > 1 && s.sort(function (t, e) { var n = t.getArea() - e.getArea();return 0 === n && (n = t._datasetIndex - e._datasetIndex), n; }), s.slice(0, 1); }, x: function x(t, e, n) { var o = i(e, t), r = [], l = !1;return a(t, function (t) { t.inXRange(o.x) && r.push(t), t.inRange(o.x, o.y) && (l = !0); }), n.intersect && !l && (r = []), r; }, y: function y(t, e, n) { var o = i(e, t), r = [], l = !1;return a(t, function (t) { t.inYRange(o.y) && r.push(t), t.inRange(o.x, o.y) && (l = !0); }), n.intersect && !l && (r = []), r; } } }; }, { 45: 45 }], 29: [function (t, e, n) { "use strict"; t(25)._set("global", { responsive: !0, responsiveAnimationDuration: 0, maintainAspectRatio: !0, events: ["mousemove", "mouseout", "click", "touchstart", "touchmove"], hover: { onHover: null, mode: "nearest", intersect: !0, animationDuration: 400 }, onClick: null, defaultColor: "rgba(0,0,0,0.1)", defaultFontColor: "#666", defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", defaultFontSize: 12, defaultFontStyle: "normal", showLines: !0, elements: {}, layout: { padding: { top: 0, right: 0, bottom: 0, left: 0 } } }), e.exports = function () { var t = function t(_t, e) { return this.construct(_t, e), this; };return t.Chart = t, t; }; }, { 25: 25 }], 30: [function (t, e, n) { "use strict"; var i = t(45);e.exports = function (t) { function e(t, e) { return i.where(t, function (t) { return t.position === e; }); }function n(t, e) { t.forEach(function (t, e) { return t._tmpIndex_ = e, t; }), t.sort(function (t, n) { var i = e ? n : t, a = e ? t : n;return i.weight === a.weight ? i._tmpIndex_ - a._tmpIndex_ : i.weight - a.weight; }), t.forEach(function (t) { delete t._tmpIndex_; }); }t.layoutService = { defaults: {}, addBox: function addBox(t, e) { t.boxes || (t.boxes = []), e.fullWidth = e.fullWidth || !1, e.position = e.position || "top", e.weight = e.weight || 0, t.boxes.push(e); }, removeBox: function removeBox(t, e) { var n = t.boxes ? t.boxes.indexOf(e) : -1;-1 !== n && t.boxes.splice(n, 1); }, configure: function configure(t, e, n) { for (var i, a = ["fullWidth", "position", "weight"], o = a.length, r = 0; r < o; ++r) { i = a[r], n.hasOwnProperty(i) && (e[i] = n[i]); } }, update: function update(t, a, o) { function r(t) { var e = i.findNextWhere(_, function (e) { return e.box === t; });if (e) if (t.isHorizontal()) { var n = { left: Math.max(T, D), right: Math.max(F, I), top: 0, bottom: 0 };t.update(t.fullWidth ? x : S, y / 2, n); } else t.update(e.minSize.width, C); }function l(t) { t.isHorizontal() ? (t.left = t.fullWidth ? d : T, t.right = t.fullWidth ? a - c : T + S, t.top = V, t.bottom = V + t.height, V = t.bottom) : (t.left = N, t.right = N + t.width, t.top = O, t.bottom = O + C, N = t.right); }if (t) { var s = t.options.layout || {}, u = i.options.toPadding(s.padding), d = u.left, c = u.right, h = u.top, f = u.bottom, g = e(t.boxes, "left"), p = e(t.boxes, "right"), v = e(t.boxes, "top"), m = e(t.boxes, "bottom"), b = e(t.boxes, "chartArea");n(g, !0), n(p, !1), n(v, !0), n(m, !1);var x = a - d - c, y = o - h - f, k = y / 2, w = (a - x / 2) / (g.length + p.length), M = (o - k) / (v.length + m.length), S = x, C = y, _ = [];i.each(g.concat(p, v, m), function (t) { var e, n = t.isHorizontal();n ? (e = t.update(t.fullWidth ? x : S, M), C -= e.height) : (e = t.update(w, k), S -= e.width), _.push({ horizontal: n, minSize: e, box: t }); });var D = 0, I = 0, P = 0, A = 0;i.each(v.concat(m), function (t) { if (t.getPadding) { var e = t.getPadding();D = Math.max(D, e.left), I = Math.max(I, e.right); } }), i.each(g.concat(p), function (t) { if (t.getPadding) { var e = t.getPadding();P = Math.max(P, e.top), A = Math.max(A, e.bottom); } });var T = d, F = c, O = h, R = f;i.each(g.concat(p), r), i.each(g, function (t) { T += t.width; }), i.each(p, function (t) { F += t.width; }), i.each(v.concat(m), r), i.each(v, function (t) { O += t.height; }), i.each(m, function (t) { R += t.height; }), i.each(g.concat(p), function (t) { var e = i.findNextWhere(_, function (e) { return e.box === t; }), n = { left: 0, right: 0, top: O, bottom: R };e && t.update(e.minSize.width, C, n); }), T = d, F = c, O = h, R = f, i.each(g, function (t) { T += t.width; }), i.each(p, function (t) { F += t.width; }), i.each(v, function (t) { O += t.height; }), i.each(m, function (t) { R += t.height; });var L = Math.max(D - T, 0);T += L, F += Math.max(I - F, 0);var z = Math.max(P - O, 0);O += z, R += Math.max(A - R, 0);var B = o - O - R, W = a - T - F;W === S && B === C || (i.each(g, function (t) { t.height = B; }), i.each(p, function (t) { t.height = B; }), i.each(v, function (t) { t.fullWidth || (t.width = W); }), i.each(m, function (t) { t.fullWidth || (t.width = W); }), C = B, S = W);var N = d + L, V = h + z;i.each(g.concat(v), l), N += S, V += C, i.each(p, l), i.each(m, l), t.chartArea = { left: T, top: O, right: T + S, bottom: O + C }, i.each(b, function (e) { e.left = t.chartArea.left, e.top = t.chartArea.top, e.right = t.chartArea.right, e.bottom = t.chartArea.bottom, e.update(S, C); }); } } }; }; }, { 45: 45 }], 31: [function (t, e, n) { "use strict"; var i = t(25), a = t(26), o = t(45);i._set("global", { plugins: {} }), e.exports = function (t) { t.plugins = { _plugins: [], _cacheId: 0, register: function register(t) { var e = this._plugins;[].concat(t).forEach(function (t) { -1 === e.indexOf(t) && e.push(t); }), this._cacheId++; }, unregister: function unregister(t) { var e = this._plugins;[].concat(t).forEach(function (t) { var n = e.indexOf(t);-1 !== n && e.splice(n, 1); }), this._cacheId++; }, clear: function clear() { this._plugins = [], this._cacheId++; }, count: function count() { return this._plugins.length; }, getAll: function getAll() { return this._plugins; }, notify: function notify(t, e, n) { var i, a, o, r, l, s = this.descriptors(t), u = s.length;for (i = 0; i < u; ++i) { if (a = s[i], o = a.plugin, "function" == typeof (l = o[e]) && ((r = [t].concat(n || [])).push(a.options), !1 === l.apply(o, r))) return !1; }return !0; }, descriptors: function descriptors(t) { var e = t._plugins || (t._plugins = {});if (e.id === this._cacheId) return e.descriptors;var n = [], a = [], r = t && t.config || {}, l = r.options && r.options.plugins || {};return this._plugins.concat(r.plugins || []).forEach(function (t) { if (-1 === n.indexOf(t)) { var e = t.id, r = l[e];!1 !== r && (!0 === r && (r = o.clone(i.global.plugins[e])), n.push(t), a.push({ plugin: t, options: r || {} })); } }), e.descriptors = a, e.id = this._cacheId, a; } }, t.pluginService = t.plugins, t.PluginBase = a.extend({}); }; }, { 25: 25, 26: 26, 45: 45 }], 32: [function (t, e, n) { "use strict"; function i(t) { var e, n, i = [];for (e = 0, n = t.length; e < n; ++e) { i.push(t[e].label); }return i; }function a(t, e, n) { var i = t.getPixelForTick(e);return n && (i -= 0 === e ? (t.getPixelForTick(1) - i) / 2 : (i - t.getPixelForTick(e - 1)) / 2), i; }var o = t(25), r = t(26), l = t(45), s = t(34);o._set("scale", { display: !0, position: "left", offset: !1, gridLines: { display: !0, color: "rgba(0, 0, 0, 0.1)", lineWidth: 1, drawBorder: !0, drawOnChartArea: !0, drawTicks: !0, tickMarkLength: 10, zeroLineWidth: 1, zeroLineColor: "rgba(0,0,0,0.25)", zeroLineBorderDash: [], zeroLineBorderDashOffset: 0, offsetGridLines: !1, borderDash: [], borderDashOffset: 0 }, scaleLabel: { display: !1, labelString: "", lineHeight: 1.2, padding: { top: 4, bottom: 4 } }, ticks: { beginAtZero: !1, minRotation: 0, maxRotation: 50, mirror: !1, padding: 0, reverse: !1, display: !0, autoSkip: !0, autoSkipPadding: 0, labelOffset: 0, callback: s.formatters.values, minor: {}, major: {} } }), e.exports = function (t) { function e(t, e, n) { return l.isArray(e) ? l.longestText(t, n, e) : t.measureText(e).width; }function n(t) { var e = l.valueOrDefault, n = o.global, i = e(t.fontSize, n.defaultFontSize), a = e(t.fontStyle, n.defaultFontStyle), r = e(t.fontFamily, n.defaultFontFamily);return { size: i, style: a, family: r, font: l.fontString(i, a, r) }; }function s(t) { return l.options.toLineHeight(l.valueOrDefault(t.lineHeight, 1.2), l.valueOrDefault(t.fontSize, o.global.defaultFontSize)); }t.Scale = r.extend({ getPadding: function getPadding() { var t = this;return { left: t.paddingLeft || 0, top: t.paddingTop || 0, right: t.paddingRight || 0, bottom: t.paddingBottom || 0 }; }, getTicks: function getTicks() { return this._ticks; }, mergeTicksOptions: function mergeTicksOptions() { var t = this.options.ticks;!1 === t.minor && (t.minor = { display: !1 }), !1 === t.major && (t.major = { display: !1 });for (var e in t) { "major" !== e && "minor" !== e && (void 0 === t.minor[e] && (t.minor[e] = t[e]), void 0 === t.major[e] && (t.major[e] = t[e])); } }, beforeUpdate: function beforeUpdate() { l.callback(this.options.beforeUpdate, [this]); }, update: function update(t, e, n) { var i, a, o, r, s, u, d = this;for (d.beforeUpdate(), d.maxWidth = t, d.maxHeight = e, d.margins = l.extend({ left: 0, right: 0, top: 0, bottom: 0 }, n), d.longestTextCache = d.longestTextCache || {}, d.beforeSetDimensions(), d.setDimensions(), d.afterSetDimensions(), d.beforeDataLimits(), d.determineDataLimits(), d.afterDataLimits(), d.beforeBuildTicks(), s = d.buildTicks() || [], d.afterBuildTicks(), d.beforeTickToLabelConversion(), o = d.convertTicksToLabels(s) || d.ticks, d.afterTickToLabelConversion(), d.ticks = o, i = 0, a = o.length; i < a; ++i) { r = o[i], (u = s[i]) ? u.label = r : s.push(u = { label: r, major: !1 }); }return d._ticks = s, d.beforeCalculateTickRotation(), d.calculateTickRotation(), d.afterCalculateTickRotation(), d.beforeFit(), d.fit(), d.afterFit(), d.afterUpdate(), d.minSize; }, afterUpdate: function afterUpdate() { l.callback(this.options.afterUpdate, [this]); }, beforeSetDimensions: function beforeSetDimensions() { l.callback(this.options.beforeSetDimensions, [this]); }, setDimensions: function setDimensions() { var t = this;t.isHorizontal() ? (t.width = t.maxWidth, t.left = 0, t.right = t.width) : (t.height = t.maxHeight, t.top = 0, t.bottom = t.height), t.paddingLeft = 0, t.paddingTop = 0, t.paddingRight = 0, t.paddingBottom = 0; }, afterSetDimensions: function afterSetDimensions() { l.callback(this.options.afterSetDimensions, [this]); }, beforeDataLimits: function beforeDataLimits() { l.callback(this.options.beforeDataLimits, [this]); }, determineDataLimits: l.noop, afterDataLimits: function afterDataLimits() { l.callback(this.options.afterDataLimits, [this]); }, beforeBuildTicks: function beforeBuildTicks() { l.callback(this.options.beforeBuildTicks, [this]); }, buildTicks: l.noop, afterBuildTicks: function afterBuildTicks() { l.callback(this.options.afterBuildTicks, [this]); }, beforeTickToLabelConversion: function beforeTickToLabelConversion() { l.callback(this.options.beforeTickToLabelConversion, [this]); }, convertTicksToLabels: function convertTicksToLabels() { var t = this, e = t.options.ticks;t.ticks = t.ticks.map(e.userCallback || e.callback, this); }, afterTickToLabelConversion: function afterTickToLabelConversion() { l.callback(this.options.afterTickToLabelConversion, [this]); }, beforeCalculateTickRotation: function beforeCalculateTickRotation() { l.callback(this.options.beforeCalculateTickRotation, [this]); }, calculateTickRotation: function calculateTickRotation() { var t = this, e = t.ctx, a = t.options.ticks, o = i(t._ticks), r = n(a);e.font = r.font;var s = a.minRotation || 0;if (o.length && t.options.display && t.isHorizontal()) for (var u, d = l.longestText(e, r.font, o, t.longestTextCache), c = d, h = t.getPixelForTick(1) - t.getPixelForTick(0) - 6; c > h && s < a.maxRotation;) { var f = l.toRadians(s);if (u = Math.cos(f), Math.sin(f) * d > t.maxHeight) { s--;break; }s++, c = u * d; }t.labelRotation = s; }, afterCalculateTickRotation: function afterCalculateTickRotation() { l.callback(this.options.afterCalculateTickRotation, [this]); }, beforeFit: function beforeFit() { l.callback(this.options.beforeFit, [this]); }, fit: function fit() { var t = this, a = t.minSize = { width: 0, height: 0 }, o = i(t._ticks), r = t.options, u = r.ticks, d = r.scaleLabel, c = r.gridLines, h = r.display, f = t.isHorizontal(), g = n(u), p = r.gridLines.tickMarkLength;if (a.width = f ? t.isFullWidth() ? t.maxWidth - t.margins.left - t.margins.right : t.maxWidth : h && c.drawTicks ? p : 0, a.height = f ? h && c.drawTicks ? p : 0 : t.maxHeight, d.display && h) { var v = s(d) + l.options.toPadding(d.padding).height;f ? a.height += v : a.width += v; }if (u.display && h) { var m = l.longestText(t.ctx, g.font, o, t.longestTextCache), b = l.numberOfLabelLines(o), x = .5 * g.size, y = t.options.ticks.padding;if (f) { t.longestLabelWidth = m;var k = l.toRadians(t.labelRotation), w = Math.cos(k), M = Math.sin(k) * m + g.size * b + x * (b - 1) + x;a.height = Math.min(t.maxHeight, a.height + M + y), t.ctx.font = g.font;var S = e(t.ctx, o[0], g.font), C = e(t.ctx, o[o.length - 1], g.font);0 !== t.labelRotation ? (t.paddingLeft = "bottom" === r.position ? w * S + 3 : w * x + 3, t.paddingRight = "bottom" === r.position ? w * x + 3 : w * C + 3) : (t.paddingLeft = S / 2 + 3, t.paddingRight = C / 2 + 3); } else u.mirror ? m = 0 : m += y + x, a.width = Math.min(t.maxWidth, a.width + m), t.paddingTop = g.size / 2, t.paddingBottom = g.size / 2; }t.handleMargins(), t.width = a.width, t.height = a.height; }, handleMargins: function handleMargins() { var t = this;t.margins && (t.paddingLeft = Math.max(t.paddingLeft - t.margins.left, 0), t.paddingTop = Math.max(t.paddingTop - t.margins.top, 0), t.paddingRight = Math.max(t.paddingRight - t.margins.right, 0), t.paddingBottom = Math.max(t.paddingBottom - t.margins.bottom, 0)); }, afterFit: function afterFit() { l.callback(this.options.afterFit, [this]); }, isHorizontal: function isHorizontal() { return "top" === this.options.position || "bottom" === this.options.position; }, isFullWidth: function isFullWidth() { return this.options.fullWidth; }, getRightValue: function getRightValue(t) { if (l.isNullOrUndef(t)) return NaN;if ("number" == typeof t && !isFinite(t)) return NaN;if (t) if (this.isHorizontal()) { if (void 0 !== t.x) return this.getRightValue(t.x); } else if (void 0 !== t.y) return this.getRightValue(t.y);return t; }, getLabelForIndex: l.noop, getPixelForValue: l.noop, getValueForPixel: l.noop, getPixelForTick: function getPixelForTick(t) { var e = this, n = e.options.offset;if (e.isHorizontal()) { var i = (e.width - (e.paddingLeft + e.paddingRight)) / Math.max(e._ticks.length - (n ? 0 : 1), 1), a = i * t + e.paddingLeft;n && (a += i / 2);var o = e.left + Math.round(a);return o += e.isFullWidth() ? e.margins.left : 0; }var r = e.height - (e.paddingTop + e.paddingBottom);return e.top + t * (r / (e._ticks.length - 1)); }, getPixelForDecimal: function getPixelForDecimal(t) { var e = this;if (e.isHorizontal()) { var n = (e.width - (e.paddingLeft + e.paddingRight)) * t + e.paddingLeft, i = e.left + Math.round(n);return i += e.isFullWidth() ? e.margins.left : 0; }return e.top + t * e.height; }, getBasePixel: function getBasePixel() { return this.getPixelForValue(this.getBaseValue()); }, getBaseValue: function getBaseValue() { var t = this, e = t.min, n = t.max;return t.beginAtZero ? 0 : e < 0 && n < 0 ? n : e > 0 && n > 0 ? e : 0; }, _autoSkip: function _autoSkip(t) { var e, n, i, a, o = this, r = o.isHorizontal(), s = o.options.ticks.minor, u = t.length, d = l.toRadians(o.labelRotation), c = Math.cos(d), h = o.longestLabelWidth * c, f = [];for (s.maxTicksLimit && (a = s.maxTicksLimit), r && (e = !1, (h + s.autoSkipPadding) * u > o.width - (o.paddingLeft + o.paddingRight) && (e = 1 + Math.floor((h + s.autoSkipPadding) * u / (o.width - (o.paddingLeft + o.paddingRight)))), a && u > a && (e = Math.max(e, Math.floor(u / a)))), n = 0; n < u; n++) { i = t[n], (e > 1 && n % e > 0 || n % e == 0 && n + e >= u) && n !== u - 1 && delete i.label, f.push(i); }return f; }, draw: function draw(t) { var e = this, i = e.options;if (i.display) { var r = e.ctx, u = o.global, d = i.ticks.minor, c = i.ticks.major || d, h = i.gridLines, f = i.scaleLabel, g = 0 !== e.labelRotation, p = e.isHorizontal(), v = d.autoSkip ? e._autoSkip(e.getTicks()) : e.getTicks(), m = l.valueOrDefault(d.fontColor, u.defaultFontColor), b = n(d), x = l.valueOrDefault(c.fontColor, u.defaultFontColor), y = n(c), k = h.drawTicks ? h.tickMarkLength : 0, w = l.valueOrDefault(f.fontColor, u.defaultFontColor), M = n(f), S = l.options.toPadding(f.padding), C = l.toRadians(e.labelRotation), _ = [], D = "right" === i.position ? e.left : e.right - k, I = "right" === i.position ? e.left + k : e.right, P = "bottom" === i.position ? e.top : e.bottom - k, A = "bottom" === i.position ? e.top + k : e.bottom;if (l.each(v, function (n, o) { if (!l.isNullOrUndef(n.label)) { var r, s, c, f, m = n.label;o === e.zeroLineIndex && i.offset === h.offsetGridLines ? (r = h.zeroLineWidth, s = h.zeroLineColor, c = h.zeroLineBorderDash, f = h.zeroLineBorderDashOffset) : (r = l.valueAtIndexOrDefault(h.lineWidth, o), s = l.valueAtIndexOrDefault(h.color, o), c = l.valueOrDefault(h.borderDash, u.borderDash), f = l.valueOrDefault(h.borderDashOffset, u.borderDashOffset));var b, x, y, w, M, S, T, F, O, R, L = "middle", z = "middle", B = d.padding;if (p) { var W = k + B;"bottom" === i.position ? (z = g ? "middle" : "top", L = g ? "right" : "center", R = e.top + W) : (z = g ? "middle" : "bottom", L = g ? "left" : "center", R = e.bottom - W);var N = a(e, o, h.offsetGridLines && v.length > 1);N < e.left && (s = "rgba(0,0,0,0)"), N += l.aliasPixel(r), O = e.getPixelForTick(o) + d.labelOffset, b = y = M = T = N, x = P, w = A, S = t.top, F = t.bottom; } else { var V, E = "left" === i.position;d.mirror ? (L = E ? "left" : "right", V = B) : (L = E ? "right" : "left", V = k + B), O = E ? e.right - V : e.left + V;var H = a(e, o, h.offsetGridLines && v.length > 1);H < e.top && (s = "rgba(0,0,0,0)"), H += l.aliasPixel(r), R = e.getPixelForTick(o) + d.labelOffset, b = D, y = I, M = t.left, T = t.right, x = w = S = F = H; }_.push({ tx1: b, ty1: x, tx2: y, ty2: w, x1: M, y1: S, x2: T, y2: F, labelX: O, labelY: R, glWidth: r, glColor: s, glBorderDash: c, glBorderDashOffset: f, rotation: -1 * C, label: m, major: n.major, textBaseline: z, textAlign: L }); } }), l.each(_, function (t) { if (h.display && (r.save(), r.lineWidth = t.glWidth, r.strokeStyle = t.glColor, r.setLineDash && (r.setLineDash(t.glBorderDash), r.lineDashOffset = t.glBorderDashOffset), r.beginPath(), h.drawTicks && (r.moveTo(t.tx1, t.ty1), r.lineTo(t.tx2, t.ty2)), h.drawOnChartArea && (r.moveTo(t.x1, t.y1), r.lineTo(t.x2, t.y2)), r.stroke(), r.restore()), d.display) { r.save(), r.translate(t.labelX, t.labelY), r.rotate(t.rotation), r.font = t.major ? y.font : b.font, r.fillStyle = t.major ? x : m, r.textBaseline = t.textBaseline, r.textAlign = t.textAlign;var e = t.label;if (l.isArray(e)) for (var n = 0, i = 0; n < e.length; ++n) { r.fillText("" + e[n], 0, i), i += 1.5 * b.size; } else r.fillText(e, 0, 0);r.restore(); } }), f.display) { var T, F, O = 0, R = s(f) / 2;if (p) T = e.left + (e.right - e.left) / 2, F = "bottom" === i.position ? e.bottom - R - S.bottom : e.top + R + S.top;else { var L = "left" === i.position;T = L ? e.left + R + S.top : e.right - R - S.top, F = e.top + (e.bottom - e.top) / 2, O = L ? -.5 * Math.PI : .5 * Math.PI; }r.save(), r.translate(T, F), r.rotate(O), r.textAlign = "center", r.textBaseline = "middle", r.fillStyle = w, r.font = M.font, r.fillText(f.labelString, 0, 0), r.restore(); }if (h.drawBorder) { r.lineWidth = l.valueAtIndexOrDefault(h.lineWidth, 0), r.strokeStyle = l.valueAtIndexOrDefault(h.color, 0);var z = e.left, B = e.right, W = e.top, N = e.bottom, V = l.aliasPixel(r.lineWidth);p ? (W = N = "top" === i.position ? e.bottom : e.top, W += V, N += V) : (z = B = "left" === i.position ? e.right : e.left, z += V, B += V), r.beginPath(), r.moveTo(z, W), r.lineTo(B, N), r.stroke(); } } } }); }; }, { 25: 25, 26: 26, 34: 34, 45: 45 }], 33: [function (t, e, n) { "use strict"; var i = t(25), a = t(45);e.exports = function (t) { t.scaleService = { constructors: {}, defaults: {}, registerScaleType: function registerScaleType(t, e, n) { this.constructors[t] = e, this.defaults[t] = a.clone(n); }, getScaleConstructor: function getScaleConstructor(t) { return this.constructors.hasOwnProperty(t) ? this.constructors[t] : void 0; }, getScaleDefaults: function getScaleDefaults(t) { return this.defaults.hasOwnProperty(t) ? a.merge({}, [i.scale, this.defaults[t]]) : {}; }, updateScaleDefaults: function updateScaleDefaults(t, e) { var n = this;n.defaults.hasOwnProperty(t) && (n.defaults[t] = a.extend(n.defaults[t], e)); }, addScalesToLayout: function addScalesToLayout(e) { a.each(e.scales, function (n) { n.fullWidth = n.options.fullWidth, n.position = n.options.position, n.weight = n.options.weight, t.layoutService.addBox(e, n); }); } }; }; }, { 25: 25, 45: 45 }], 34: [function (t, e, n) { "use strict"; var i = t(45);e.exports = { generators: { linear: function linear(t, e) { var n, a = [];if (t.stepSize && t.stepSize > 0) n = t.stepSize;else { var o = i.niceNum(e.max - e.min, !1);n = i.niceNum(o / (t.maxTicks - 1), !0); }var r = Math.floor(e.min / n) * n, l = Math.ceil(e.max / n) * n;t.min && t.max && t.stepSize && i.almostWhole((t.max - t.min) / t.stepSize, n / 1e3) && (r = t.min, l = t.max);var s = (l - r) / n;s = i.almostEquals(s, Math.round(s), n / 1e3) ? Math.round(s) : Math.ceil(s), a.push(void 0 !== t.min ? t.min : r);for (var u = 1; u < s; ++u) { a.push(r + u * n); }return a.push(void 0 !== t.max ? t.max : l), a; }, logarithmic: function logarithmic(t, e) { var n, a, o = [], r = i.valueOrDefault, l = r(t.min, Math.pow(10, Math.floor(i.log10(e.min)))), s = Math.floor(i.log10(e.max)), u = Math.ceil(e.max / Math.pow(10, s));0 === l ? (n = Math.floor(i.log10(e.minNotZero)), a = Math.floor(e.minNotZero / Math.pow(10, n)), o.push(l), l = a * Math.pow(10, n)) : (n = Math.floor(i.log10(l)), a = Math.floor(l / Math.pow(10, n)));do { o.push(l), 10 === ++a && (a = 1, ++n), l = a * Math.pow(10, n); } while (n < s || n === s && a < u);var d = r(t.max, l);return o.push(d), o; } }, formatters: { values: function values(t) { return i.isArray(t) ? t : "" + t; }, linear: function linear(t, e, n) { var a = n.length > 3 ? n[2] - n[1] : n[1] - n[0];Math.abs(a) > 1 && t !== Math.floor(t) && (a = t - Math.floor(t));var o = i.log10(Math.abs(a)), r = "";if (0 !== t) { var l = -1 * Math.floor(o);l = Math.max(Math.min(l, 20), 0), r = t.toFixed(l); } else r = "0";return r; }, logarithmic: function logarithmic(t, e, n) { var a = t / Math.pow(10, Math.floor(i.log10(t)));return 0 === t ? "0" : 1 === a || 2 === a || 5 === a || 0 === e || e === n.length - 1 ? t.toExponential() : ""; } } }; }, { 45: 45 }], 35: [function (t, e, n) { "use strict"; var i = t(25), a = t(26), o = t(45);i._set("global", { tooltips: { enabled: !0, custom: null, mode: "nearest", position: "average", intersect: !0, backgroundColor: "rgba(0,0,0,0.8)", titleFontStyle: "bold", titleSpacing: 2, titleMarginBottom: 6, titleFontColor: "#fff", titleAlign: "left", bodySpacing: 2, bodyFontColor: "#fff", bodyAlign: "left", footerFontStyle: "bold", footerSpacing: 2, footerMarginTop: 6, footerFontColor: "#fff", footerAlign: "left", yPadding: 6, xPadding: 6, caretPadding: 2, caretSize: 5, cornerRadius: 6, multiKeyBackground: "#fff", displayColors: !0, borderColor: "rgba(0,0,0,0)", borderWidth: 0, callbacks: { beforeTitle: o.noop, title: function title(t, e) { var n = "", i = e.labels, a = i ? i.length : 0;if (t.length > 0) { var o = t[0];o.xLabel ? n = o.xLabel : a > 0 && o.index < a && (n = i[o.index]); }return n; }, afterTitle: o.noop, beforeBody: o.noop, beforeLabel: o.noop, label: function label(t, e) { var n = e.datasets[t.datasetIndex].label || "";return n && (n += ": "), n += t.yLabel; }, labelColor: function labelColor(t, e) { var n = e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return { borderColor: n.borderColor, backgroundColor: n.backgroundColor }; }, labelTextColor: function labelTextColor() { return this._options.bodyFontColor; }, afterLabel: o.noop, afterBody: o.noop, beforeFooter: o.noop, footer: o.noop, afterFooter: o.noop } } }), e.exports = function (t) { function e(t, e) { var n = o.color(t);return n.alpha(e * n.alpha()).rgbaString(); }function n(t, e) { return e && (o.isArray(e) ? Array.prototype.push.apply(t, e) : t.push(e)), t; }function r(t) { var e = t._xScale, n = t._yScale || t._scale, i = t._index, a = t._datasetIndex;return { xLabel: e ? e.getLabelForIndex(i, a) : "", yLabel: n ? n.getLabelForIndex(i, a) : "", index: i, datasetIndex: a, x: t._model.x, y: t._model.y }; }function l(t) { var e = i.global, n = o.valueOrDefault;return { xPadding: t.xPadding, yPadding: t.yPadding, xAlign: t.xAlign, yAlign: t.yAlign, bodyFontColor: t.bodyFontColor, _bodyFontFamily: n(t.bodyFontFamily, e.defaultFontFamily), _bodyFontStyle: n(t.bodyFontStyle, e.defaultFontStyle), _bodyAlign: t.bodyAlign, bodyFontSize: n(t.bodyFontSize, e.defaultFontSize), bodySpacing: t.bodySpacing, titleFontColor: t.titleFontColor, _titleFontFamily: n(t.titleFontFamily, e.defaultFontFamily), _titleFontStyle: n(t.titleFontStyle, e.defaultFontStyle), titleFontSize: n(t.titleFontSize, e.defaultFontSize), _titleAlign: t.titleAlign, titleSpacing: t.titleSpacing, titleMarginBottom: t.titleMarginBottom, footerFontColor: t.footerFontColor, _footerFontFamily: n(t.footerFontFamily, e.defaultFontFamily), _footerFontStyle: n(t.footerFontStyle, e.defaultFontStyle), footerFontSize: n(t.footerFontSize, e.defaultFontSize), _footerAlign: t.footerAlign, footerSpacing: t.footerSpacing, footerMarginTop: t.footerMarginTop, caretSize: t.caretSize, cornerRadius: t.cornerRadius, backgroundColor: t.backgroundColor, opacity: 0, legendColorBackground: t.multiKeyBackground, displayColors: t.displayColors, borderColor: t.borderColor, borderWidth: t.borderWidth }; }function s(t, e) { var n = t._chart.ctx, i = 2 * e.yPadding, a = 0, r = e.body, l = r.reduce(function (t, e) { return t + e.before.length + e.lines.length + e.after.length; }, 0);l += e.beforeBody.length + e.afterBody.length;var s = e.title.length, u = e.footer.length, d = e.titleFontSize, c = e.bodyFontSize, h = e.footerFontSize;i += s * d, i += s ? (s - 1) * e.titleSpacing : 0, i += s ? e.titleMarginBottom : 0, i += l * c, i += l ? (l - 1) * e.bodySpacing : 0, i += u ? e.footerMarginTop : 0, i += u * h, i += u ? (u - 1) * e.footerSpacing : 0;var f = 0, g = function g(t) { a = Math.max(a, n.measureText(t).width + f); };return n.font = o.fontString(d, e._titleFontStyle, e._titleFontFamily), o.each(e.title, g), n.font = o.fontString(c, e._bodyFontStyle, e._bodyFontFamily), o.each(e.beforeBody.concat(e.afterBody), g), f = e.displayColors ? c + 2 : 0, o.each(r, function (t) { o.each(t.before, g), o.each(t.lines, g), o.each(t.after, g); }), f = 0, n.font = o.fontString(h, e._footerFontStyle, e._footerFontFamily), o.each(e.footer, g), a += 2 * e.xPadding, { width: a, height: i }; }function u(t, e) { var n = t._model, i = t._chart, a = t._chart.chartArea, o = "center", r = "center";n.y < e.height ? r = "top" : n.y > i.height - e.height && (r = "bottom");var l, s, u, d, c, h = (a.left + a.right) / 2, f = (a.top + a.bottom) / 2;"center" === r ? (l = function l(t) { return t <= h; }, s = function s(t) { return t > h; }) : (l = function l(t) { return t <= e.width / 2; }, s = function s(t) { return t >= i.width - e.width / 2; }), u = function u(t) { return t + e.width > i.width; }, d = function d(t) { return t - e.width < 0; }, c = function c(t) { return t <= f ? "top" : "bottom"; }, l(n.x) ? (o = "left", u(n.x) && (o = "center", r = c(n.y))) : s(n.x) && (o = "right", d(n.x) && (o = "center", r = c(n.y)));var g = t._options;return { xAlign: g.xAlign ? g.xAlign : o, yAlign: g.yAlign ? g.yAlign : r }; }function d(t, e, n) { var i = t.x, a = t.y, o = t.caretSize, r = t.caretPadding, l = t.cornerRadius, s = n.xAlign, u = n.yAlign, d = o + r, c = l + r;return "right" === s ? i -= e.width : "center" === s && (i -= e.width / 2), "top" === u ? a += d : a -= "bottom" === u ? e.height + d : e.height / 2, "center" === u ? "left" === s ? i += d : "right" === s && (i -= d) : "left" === s ? i -= c : "right" === s && (i += c), { x: i, y: a }; }t.Tooltip = a.extend({ initialize: function initialize() { this._model = l(this._options), this._lastActive = []; }, getTitle: function getTitle() { var t = this, e = t._options.callbacks, i = e.beforeTitle.apply(t, arguments), a = e.title.apply(t, arguments), o = e.afterTitle.apply(t, arguments), r = [];return r = n(r, i), r = n(r, a), r = n(r, o); }, getBeforeBody: function getBeforeBody() { var t = this._options.callbacks.beforeBody.apply(this, arguments);return o.isArray(t) ? t : void 0 !== t ? [t] : []; }, getBody: function getBody(t, e) { var i = this, a = i._options.callbacks, r = [];return o.each(t, function (t) { var o = { before: [], lines: [], after: [] };n(o.before, a.beforeLabel.call(i, t, e)), n(o.lines, a.label.call(i, t, e)), n(o.after, a.afterLabel.call(i, t, e)), r.push(o); }), r; }, getAfterBody: function getAfterBody() { var t = this._options.callbacks.afterBody.apply(this, arguments);return o.isArray(t) ? t : void 0 !== t ? [t] : []; }, getFooter: function getFooter() { var t = this, e = t._options.callbacks, i = e.beforeFooter.apply(t, arguments), a = e.footer.apply(t, arguments), o = e.afterFooter.apply(t, arguments), r = [];return r = n(r, i), r = n(r, a), r = n(r, o); }, update: function update(e) { var n, i, a = this, c = a._options, h = a._model, f = a._model = l(c), g = a._active, p = a._data, v = { xAlign: h.xAlign, yAlign: h.yAlign }, m = { x: h.x, y: h.y }, b = { width: h.width, height: h.height }, x = { x: h.caretX, y: h.caretY };if (g.length) { f.opacity = 1;var y = [], k = [];x = t.Tooltip.positioners[c.position].call(a, g, a._eventPosition);var w = [];for (n = 0, i = g.length; n < i; ++n) { w.push(r(g[n])); }c.filter && (w = w.filter(function (t) { return c.filter(t, p); })), c.itemSort && (w = w.sort(function (t, e) { return c.itemSort(t, e, p); })), o.each(w, function (t) { y.push(c.callbacks.labelColor.call(a, t, a._chart)), k.push(c.callbacks.labelTextColor.call(a, t, a._chart)); }), f.title = a.getTitle(w, p), f.beforeBody = a.getBeforeBody(w, p), f.body = a.getBody(w, p), f.afterBody = a.getAfterBody(w, p), f.footer = a.getFooter(w, p), f.x = Math.round(x.x), f.y = Math.round(x.y), f.caretPadding = c.caretPadding, f.labelColors = y, f.labelTextColors = k, f.dataPoints = w, m = d(f, b = s(this, f), v = u(this, b)); } else f.opacity = 0;return f.xAlign = v.xAlign, f.yAlign = v.yAlign, f.x = m.x, f.y = m.y, f.width = b.width, f.height = b.height, f.caretX = x.x, f.caretY = x.y, a._model = f, e && c.custom && c.custom.call(a, f), a; }, drawCaret: function drawCaret(t, e) { var n = this._chart.ctx, i = this._view, a = this.getCaretPosition(t, e, i);n.lineTo(a.x1, a.y1), n.lineTo(a.x2, a.y2), n.lineTo(a.x3, a.y3); }, getCaretPosition: function getCaretPosition(t, e, n) { var i, a, o, r, l, s, u = n.caretSize, d = n.cornerRadius, c = n.xAlign, h = n.yAlign, f = t.x, g = t.y, p = e.width, v = e.height;if ("center" === h) l = g + v / 2, "left" === c ? (a = (i = f) - u, o = i, r = l + u, s = l - u) : (a = (i = f + p) + u, o = i, r = l - u, s = l + u);else if ("left" === c ? (i = (a = f + d + u) - u, o = a + u) : "right" === c ? (i = (a = f + p - d - u) - u, o = a + u) : (i = (a = f + p / 2) - u, o = a + u), "top" === h) l = (r = g) - u, s = r;else { l = (r = g + v) + u, s = r;var m = o;o = i, i = m; }return { x1: i, x2: a, x3: o, y1: r, y2: l, y3: s }; }, drawTitle: function drawTitle(t, n, i, a) { var r = n.title;if (r.length) { i.textAlign = n._titleAlign, i.textBaseline = "top";var l = n.titleFontSize, s = n.titleSpacing;i.fillStyle = e(n.titleFontColor, a), i.font = o.fontString(l, n._titleFontStyle, n._titleFontFamily);var u, d;for (u = 0, d = r.length; u < d; ++u) { i.fillText(r[u], t.x, t.y), t.y += l + s, u + 1 === r.length && (t.y += n.titleMarginBottom - s); } } }, drawBody: function drawBody(t, n, i, a) { var r = n.bodyFontSize, l = n.bodySpacing, s = n.body;i.textAlign = n._bodyAlign, i.textBaseline = "top", i.font = o.fontString(r, n._bodyFontStyle, n._bodyFontFamily);var u = 0, d = function d(e) { i.fillText(e, t.x + u, t.y), t.y += r + l; };i.fillStyle = e(n.bodyFontColor, a), o.each(n.beforeBody, d);var c = n.displayColors;u = c ? r + 2 : 0, o.each(s, function (l, s) { var u = e(n.labelTextColors[s], a);i.fillStyle = u, o.each(l.before, d), o.each(l.lines, function (o) { c && (i.fillStyle = e(n.legendColorBackground, a), i.fillRect(t.x, t.y, r, r), i.lineWidth = 1, i.strokeStyle = e(n.labelColors[s].borderColor, a), i.strokeRect(t.x, t.y, r, r), i.fillStyle = e(n.labelColors[s].backgroundColor, a), i.fillRect(t.x + 1, t.y + 1, r - 2, r - 2), i.fillStyle = u), d(o); }), o.each(l.after, d); }), u = 0, o.each(n.afterBody, d), t.y -= l; }, drawFooter: function drawFooter(t, n, i, a) { var r = n.footer;r.length && (t.y += n.footerMarginTop, i.textAlign = n._footerAlign, i.textBaseline = "top", i.fillStyle = e(n.footerFontColor, a), i.font = o.fontString(n.footerFontSize, n._footerFontStyle, n._footerFontFamily), o.each(r, function (e) { i.fillText(e, t.x, t.y), t.y += n.footerFontSize + n.footerSpacing; })); }, drawBackground: function drawBackground(t, n, i, a, o) { i.fillStyle = e(n.backgroundColor, o), i.strokeStyle = e(n.borderColor, o), i.lineWidth = n.borderWidth;var r = n.xAlign, l = n.yAlign, s = t.x, u = t.y, d = a.width, c = a.height, h = n.cornerRadius;i.beginPath(), i.moveTo(s + h, u), "top" === l && this.drawCaret(t, a), i.lineTo(s + d - h, u), i.quadraticCurveTo(s + d, u, s + d, u + h), "center" === l && "right" === r && this.drawCaret(t, a), i.lineTo(s + d, u + c - h), i.quadraticCurveTo(s + d, u + c, s + d - h, u + c), "bottom" === l && this.drawCaret(t, a), i.lineTo(s + h, u + c), i.quadraticCurveTo(s, u + c, s, u + c - h), "center" === l && "left" === r && this.drawCaret(t, a), i.lineTo(s, u + h), i.quadraticCurveTo(s, u, s + h, u), i.closePath(), i.fill(), n.borderWidth > 0 && i.stroke(); }, draw: function draw() { var t = this._chart.ctx, e = this._view;if (0 !== e.opacity) { var n = { width: e.width, height: e.height }, i = { x: e.x, y: e.y }, a = Math.abs(e.opacity < .001) ? 0 : e.opacity, o = e.title.length || e.beforeBody.length || e.body.length || e.afterBody.length || e.footer.length;this._options.enabled && o && (this.drawBackground(i, e, t, n, a), i.x += e.xPadding, i.y += e.yPadding, this.drawTitle(i, e, t, a), this.drawBody(i, e, t, a), this.drawFooter(i, e, t, a)); } }, handleEvent: function handleEvent(t) { var e = this, n = e._options, i = !1;if (e._lastActive = e._lastActive || [], "mouseout" === t.type ? e._active = [] : e._active = e._chart.getElementsAtEventForMode(t, n.mode, n), !(i = !o.arrayEquals(e._active, e._lastActive))) return !1;if (e._lastActive = e._active, n.enabled || n.custom) { e._eventPosition = { x: t.x, y: t.y };var a = e._model;e.update(!0), e.pivot(), i |= a.x !== e._model.x || a.y !== e._model.y; }return i; } }), t.Tooltip.positioners = { average: function average(t) { if (!t.length) return !1;var e, n, i = 0, a = 0, o = 0;for (e = 0, n = t.length; e < n; ++e) { var r = t[e];if (r && r.hasValue()) { var l = r.tooltipPosition();i += l.x, a += l.y, ++o; } }return { x: Math.round(i / o), y: Math.round(a / o) }; }, nearest: function nearest(t, e) { var n, i, a, r = e.x, l = e.y, s = Number.POSITIVE_INFINITY;for (n = 0, i = t.length; n < i; ++n) { var u = t[n];if (u && u.hasValue()) { var d = u.getCenterPoint(), c = o.distanceBetweenPoints(e, d);c < s && (s = c, a = u); } }if (a) { var h = a.tooltipPosition();r = h.x, l = h.y; }return { x: r, y: l }; } }; }; }, { 25: 25, 26: 26, 45: 45 }], 36: [function (t, e, n) { "use strict"; var i = t(25), a = t(26), o = t(45);i._set("global", { elements: { arc: { backgroundColor: i.global.defaultColor, borderColor: "#fff", borderWidth: 2 } } }), e.exports = a.extend({ inLabelRange: function inLabelRange(t) { var e = this._view;return !!e && Math.pow(t - e.x, 2) < Math.pow(e.radius + e.hoverRadius, 2); }, inRange: function inRange(t, e) { var n = this._view;if (n) { for (var i = o.getAngleFromPoint(n, { x: t, y: e }), a = i.angle, r = i.distance, l = n.startAngle, s = n.endAngle; s < l;) { s += 2 * Math.PI; }for (; a > s;) { a -= 2 * Math.PI; }for (; a < l;) { a += 2 * Math.PI; }var u = a >= l && a <= s, d = r >= n.innerRadius && r <= n.outerRadius;return u && d; }return !1; }, getCenterPoint: function getCenterPoint() { var t = this._view, e = (t.startAngle + t.endAngle) / 2, n = (t.innerRadius + t.outerRadius) / 2;return { x: t.x + Math.cos(e) * n, y: t.y + Math.sin(e) * n }; }, getArea: function getArea() { var t = this._view;return Math.PI * ((t.endAngle - t.startAngle) / (2 * Math.PI)) * (Math.pow(t.outerRadius, 2) - Math.pow(t.innerRadius, 2)); }, tooltipPosition: function tooltipPosition() { var t = this._view, e = t.startAngle + (t.endAngle - t.startAngle) / 2, n = (t.outerRadius - t.innerRadius) / 2 + t.innerRadius;return { x: t.x + Math.cos(e) * n, y: t.y + Math.sin(e) * n }; }, draw: function draw() { var t = this._chart.ctx, e = this._view, n = e.startAngle, i = e.endAngle;t.beginPath(), t.arc(e.x, e.y, e.outerRadius, n, i), t.arc(e.x, e.y, e.innerRadius, i, n, !0), t.closePath(), t.strokeStyle = e.borderColor, t.lineWidth = e.borderWidth, t.fillStyle = e.backgroundColor, t.fill(), t.lineJoin = "bevel", e.borderWidth && t.stroke(); } }); }, { 25: 25, 26: 26, 45: 45 }], 37: [function (t, e, n) { "use strict"; var i = t(25), a = t(26), o = t(45), r = i.global;i._set("global", { elements: { line: { tension: .4, backgroundColor: r.defaultColor, borderWidth: 3, borderColor: r.defaultColor, borderCapStyle: "butt", borderDash: [], borderDashOffset: 0, borderJoinStyle: "miter", capBezierPoints: !0, fill: !0 } } }), e.exports = a.extend({ draw: function draw() { var t, e, n, i, a = this, l = a._view, s = a._chart.ctx, u = l.spanGaps, d = a._children.slice(), c = r.elements.line, h = -1;for (a._loop && d.length && d.push(d[0]), s.save(), s.lineCap = l.borderCapStyle || c.borderCapStyle, s.setLineDash && s.setLineDash(l.borderDash || c.borderDash), s.lineDashOffset = l.borderDashOffset || c.borderDashOffset, s.lineJoin = l.borderJoinStyle || c.borderJoinStyle, s.lineWidth = l.borderWidth || c.borderWidth, s.strokeStyle = l.borderColor || r.defaultColor, s.beginPath(), h = -1, t = 0; t < d.length; ++t) { e = d[t], n = o.previousItem(d, t), i = e._view, 0 === t ? i.skip || (s.moveTo(i.x, i.y), h = t) : (n = -1 === h ? n : d[h], i.skip || (h !== t - 1 && !u || -1 === h ? s.moveTo(i.x, i.y) : o.canvas.lineTo(s, n._view, e._view), h = t)); }s.stroke(), s.restore(); } }); }, { 25: 25, 26: 26, 45: 45 }], 38: [function (t, e, n) { "use strict"; function i(t) { var e = this._view;return !!e && Math.pow(t - e.x, 2) < Math.pow(e.radius + e.hitRadius, 2); }var a = t(25), o = t(26), r = t(45), l = a.global.defaultColor;a._set("global", { elements: { point: { radius: 3, pointStyle: "circle", backgroundColor: l, borderColor: l, borderWidth: 1, hitRadius: 1, hoverRadius: 4, hoverBorderWidth: 1 } } }), e.exports = o.extend({ inRange: function inRange(t, e) { var n = this._view;return !!n && Math.pow(t - n.x, 2) + Math.pow(e - n.y, 2) < Math.pow(n.hitRadius + n.radius, 2); }, inLabelRange: i, inXRange: i, inYRange: function inYRange(t) { var e = this._view;return !!e && Math.pow(t - e.y, 2) < Math.pow(e.radius + e.hitRadius, 2); }, getCenterPoint: function getCenterPoint() { var t = this._view;return { x: t.x, y: t.y }; }, getArea: function getArea() { return Math.PI * Math.pow(this._view.radius, 2); }, tooltipPosition: function tooltipPosition() { var t = this._view;return { x: t.x, y: t.y, padding: t.radius + t.borderWidth }; }, draw: function draw(t) { var e = this._view, n = this._model, i = this._chart.ctx, o = e.pointStyle, s = e.radius, u = e.x, d = e.y, c = r.color, h = 0;e.skip || (i.strokeStyle = e.borderColor || l, i.lineWidth = r.valueOrDefault(e.borderWidth, a.global.elements.point.borderWidth), i.fillStyle = e.backgroundColor || l, void 0 !== t && (n.x < t.left || 1.01 * t.right < n.x || n.y < t.top || 1.01 * t.bottom < n.y) && (n.x < t.left ? h = (u - n.x) / (t.left - n.x) : 1.01 * t.right < n.x ? h = (n.x - u) / (n.x - t.right) : n.y < t.top ? h = (d - n.y) / (t.top - n.y) : 1.01 * t.bottom < n.y && (h = (n.y - d) / (n.y - t.bottom)), h = Math.round(100 * h) / 100, i.strokeStyle = c(i.strokeStyle).alpha(h).rgbString(), i.fillStyle = c(i.fillStyle).alpha(h).rgbString()), r.canvas.drawPoint(i, o, s, u, d)); } }); }, { 25: 25, 26: 26, 45: 45 }], 39: [function (t, e, n) { "use strict"; function i(t) { return void 0 !== t._view.width; }function a(t) { var e, n, a, o, r = t._view;if (i(t)) { var l = r.width / 2;e = r.x - l, n = r.x + l, a = Math.min(r.y, r.base), o = Math.max(r.y, r.base); } else { var s = r.height / 2;e = Math.min(r.x, r.base), n = Math.max(r.x, r.base), a = r.y - s, o = r.y + s; }return { left: e, top: a, right: n, bottom: o }; }var o = t(25), r = t(26);o._set("global", { elements: { rectangle: { backgroundColor: o.global.defaultColor, borderColor: o.global.defaultColor, borderSkipped: "bottom", borderWidth: 0 } } }), e.exports = r.extend({ draw: function draw() { function t(t) { return m[(b + t) % 4]; }var e, n, i, a, o, r, l, s = this._chart.ctx, u = this._view, d = u.borderWidth;if (u.horizontal ? (e = u.base, n = u.x, i = u.y - u.height / 2, a = u.y + u.height / 2, o = n > e ? 1 : -1, r = 1, l = u.borderSkipped || "left") : (e = u.x - u.width / 2, n = u.x + u.width / 2, i = u.y, o = 1, r = (a = u.base) > i ? 1 : -1, l = u.borderSkipped || "bottom"), d) { var c = Math.min(Math.abs(e - n), Math.abs(i - a)), h = (d = d > c ? c : d) / 2, f = e + ("left" !== l ? h * o : 0), g = n + ("right" !== l ? -h * o : 0), p = i + ("top" !== l ? h * r : 0), v = a + ("bottom" !== l ? -h * r : 0);f !== g && (i = p, a = v), p !== v && (e = f, n = g); }s.beginPath(), s.fillStyle = u.backgroundColor, s.strokeStyle = u.borderColor, s.lineWidth = d;var m = [[e, a], [e, i], [n, i], [n, a]], b = ["bottom", "left", "top", "right"].indexOf(l, 0);-1 === b && (b = 0);var x = t(0);s.moveTo(x[0], x[1]);for (var y = 1; y < 4; y++) { x = t(y), s.lineTo(x[0], x[1]); }s.fill(), d && s.stroke(); }, height: function height() { var t = this._view;return t.base - t.y; }, inRange: function inRange(t, e) { var n = !1;if (this._view) { var i = a(this);n = t >= i.left && t <= i.right && e >= i.top && e <= i.bottom; }return n; }, inLabelRange: function inLabelRange(t, e) { var n = this;if (!n._view) return !1;var o = a(n);return i(n) ? t >= o.left && t <= o.right : e >= o.top && e <= o.bottom; }, inXRange: function inXRange(t) { var e = a(this);return t >= e.left && t <= e.right; }, inYRange: function inYRange(t) { var e = a(this);return t >= e.top && t <= e.bottom; }, getCenterPoint: function getCenterPoint() { var t, e, n = this._view;return i(this) ? (t = n.x, e = (n.y + n.base) / 2) : (t = (n.x + n.base) / 2, e = n.y), { x: t, y: e }; }, getArea: function getArea() { var t = this._view;return t.width * Math.abs(t.y - t.base); }, tooltipPosition: function tooltipPosition() { var t = this._view;return { x: t.x, y: t.y }; } }); }, { 25: 25, 26: 26 }], 40: [function (t, e, n) { "use strict"; e.exports = {}, e.exports.Arc = t(36), e.exports.Line = t(37), e.exports.Point = t(38), e.exports.Rectangle = t(39); }, { 36: 36, 37: 37, 38: 38, 39: 39 }], 41: [function (t, e, n) { "use strict"; var i = t(42), n = e.exports = { clear: function clear(t) { t.ctx.clearRect(0, 0, t.width, t.height); }, roundedRect: function roundedRect(t, e, n, i, a, o) { if (o) { var r = Math.min(o, i / 2), l = Math.min(o, a / 2);t.moveTo(e + r, n), t.lineTo(e + i - r, n), t.quadraticCurveTo(e + i, n, e + i, n + l), t.lineTo(e + i, n + a - l), t.quadraticCurveTo(e + i, n + a, e + i - r, n + a), t.lineTo(e + r, n + a), t.quadraticCurveTo(e, n + a, e, n + a - l), t.lineTo(e, n + l), t.quadraticCurveTo(e, n, e + r, n); } else t.rect(e, n, i, a); }, drawPoint: function drawPoint(t, e, n, i, a) { var o, r, l, s, u, d;if (!e || "object" != (typeof e === "undefined" ? "undefined" : _typeof(e)) || "[object HTMLImageElement]" !== (o = e.toString()) && "[object HTMLCanvasElement]" !== o) { if (!(isNaN(n) || n <= 0)) { switch (e) {default: t.beginPath(), t.arc(i, a, n, 0, 2 * Math.PI), t.closePath(), t.fill();break;case "triangle": t.beginPath(), u = (r = 3 * n / Math.sqrt(3)) * Math.sqrt(3) / 2, t.moveTo(i - r / 2, a + u / 3), t.lineTo(i + r / 2, a + u / 3), t.lineTo(i, a - 2 * u / 3), t.closePath(), t.fill();break;case "rect": d = 1 / Math.SQRT2 * n, t.beginPath(), t.fillRect(i - d, a - d, 2 * d, 2 * d), t.strokeRect(i - d, a - d, 2 * d, 2 * d);break;case "rectRounded": var c = n / Math.SQRT2, h = i - c, f = a - c, g = Math.SQRT2 * n;t.beginPath(), this.roundedRect(t, h, f, g, g, n / 2), t.closePath(), t.fill();break;case "rectRot": d = 1 / Math.SQRT2 * n, t.beginPath(), t.moveTo(i - d, a), t.lineTo(i, a + d), t.lineTo(i + d, a), t.lineTo(i, a - d), t.closePath(), t.fill();break;case "cross": t.beginPath(), t.moveTo(i, a + n), t.lineTo(i, a - n), t.moveTo(i - n, a), t.lineTo(i + n, a), t.closePath();break;case "crossRot": t.beginPath(), l = Math.cos(Math.PI / 4) * n, s = Math.sin(Math.PI / 4) * n, t.moveTo(i - l, a - s), t.lineTo(i + l, a + s), t.moveTo(i - l, a + s), t.lineTo(i + l, a - s), t.closePath();break;case "star": t.beginPath(), t.moveTo(i, a + n), t.lineTo(i, a - n), t.moveTo(i - n, a), t.lineTo(i + n, a), l = Math.cos(Math.PI / 4) * n, s = Math.sin(Math.PI / 4) * n, t.moveTo(i - l, a - s), t.lineTo(i + l, a + s), t.moveTo(i - l, a + s), t.lineTo(i + l, a - s), t.closePath();break;case "line": t.beginPath(), t.moveTo(i - n, a), t.lineTo(i + n, a), t.closePath();break;case "dash": t.beginPath(), t.moveTo(i, a), t.lineTo(i + n, a), t.closePath();}t.stroke(); } } else t.drawImage(e, i - e.width / 2, a - e.height / 2, e.width, e.height); }, clipArea: function clipArea(t, e) { t.save(), t.beginPath(), t.rect(e.left, e.top, e.right - e.left, e.bottom - e.top), t.clip(); }, unclipArea: function unclipArea(t) { t.restore(); }, lineTo: function lineTo(t, e, n, i) { if (n.steppedLine) return "after" === n.steppedLine && !i || "after" !== n.steppedLine && i ? t.lineTo(e.x, n.y) : t.lineTo(n.x, e.y), void t.lineTo(n.x, n.y);n.tension ? t.bezierCurveTo(i ? e.controlPointPreviousX : e.controlPointNextX, i ? e.controlPointPreviousY : e.controlPointNextY, i ? n.controlPointNextX : n.controlPointPreviousX, i ? n.controlPointNextY : n.controlPointPreviousY, n.x, n.y) : t.lineTo(n.x, n.y); } };i.clear = n.clear, i.drawRoundedRectangle = function (t) { t.beginPath(), n.roundedRect.apply(n, arguments), t.closePath(); }; }, { 42: 42 }], 42: [function (t, e, n) { "use strict"; var i = { noop: function noop() {}, uid: function () { var t = 0;return function () { return t++; }; }(), isNullOrUndef: function isNullOrUndef(t) { return null === t || void 0 === t; }, isArray: Array.isArray ? Array.isArray : function (t) { return "[object Array]" === Object.prototype.toString.call(t); }, isObject: function isObject(t) { return null !== t && "[object Object]" === Object.prototype.toString.call(t); }, valueOrDefault: function valueOrDefault(t, e) { return void 0 === t ? e : t; }, valueAtIndexOrDefault: function valueAtIndexOrDefault(t, e, n) { return i.valueOrDefault(i.isArray(t) ? t[e] : t, n); }, callback: function callback(t, e, n) { if (t && "function" == typeof t.call) return t.apply(n, e); }, each: function each(t, e, n, a) { var o, r, l;if (i.isArray(t)) { if (r = t.length, a) for (o = r - 1; o >= 0; o--) { e.call(n, t[o], o); } else for (o = 0; o < r; o++) { e.call(n, t[o], o); } } else if (i.isObject(t)) for (r = (l = Object.keys(t)).length, o = 0; o < r; o++) { e.call(n, t[l[o]], l[o]); } }, arrayEquals: function arrayEquals(t, e) { var n, a, o, r;if (!t || !e || t.length !== e.length) return !1;for (n = 0, a = t.length; n < a; ++n) { if (o = t[n], r = e[n], o instanceof Array && r instanceof Array) { if (!i.arrayEquals(o, r)) return !1; } else if (o !== r) return !1; }return !0; }, clone: function clone(t) { if (i.isArray(t)) return t.map(i.clone);if (i.isObject(t)) { for (var e = {}, n = Object.keys(t), a = n.length, o = 0; o < a; ++o) { e[n[o]] = i.clone(t[n[o]]); }return e; }return t; }, _merger: function _merger(t, e, n, a) { var o = e[t], r = n[t];i.isObject(o) && i.isObject(r) ? i.merge(o, r, a) : e[t] = i.clone(r); }, _mergerIf: function _mergerIf(t, e, n) { var a = e[t], o = n[t];i.isObject(a) && i.isObject(o) ? i.mergeIf(a, o) : e.hasOwnProperty(t) || (e[t] = i.clone(o)); }, merge: function merge(t, e, n) { var a, o, r, l, s, u = i.isArray(e) ? e : [e], d = u.length;if (!i.isObject(t)) return t;for (a = (n = n || {}).merger || i._merger, o = 0; o < d; ++o) { if (e = u[o], i.isObject(e)) for (s = 0, l = (r = Object.keys(e)).length; s < l; ++s) { a(r[s], t, e, n); } }return t; }, mergeIf: function mergeIf(t, e) { return i.merge(t, e, { merger: i._mergerIf }); }, extend: function extend(t) { for (var e = 1, n = arguments.length; e < n; ++e) { i.each(arguments[e], function (e, n) { t[n] = e; }); }return t; }, inherits: function inherits(t) { var e = this, n = t && t.hasOwnProperty("constructor") ? t.constructor : function () { return e.apply(this, arguments); }, a = function a() { this.constructor = n; };return a.prototype = e.prototype, n.prototype = new a(), n.extend = i.inherits, t && i.extend(n.prototype, t), n.__super__ = e.prototype, n; } };e.exports = i, i.callCallback = i.callback, i.indexOf = function (t, e, n) { return Array.prototype.indexOf.call(t, e, n); }, i.getValueOrDefault = i.valueOrDefault, i.getValueAtIndexOrDefault = i.valueAtIndexOrDefault; }, {}], 43: [function (t, e, n) { "use strict"; var i = t(42), a = { linear: function linear(t) { return t; }, easeInQuad: function easeInQuad(t) { return t * t; }, easeOutQuad: function easeOutQuad(t) { return -t * (t - 2); }, easeInOutQuad: function easeInOutQuad(t) { return (t /= .5) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1); }, easeInCubic: function easeInCubic(t) { return t * t * t; }, easeOutCubic: function easeOutCubic(t) { return (t -= 1) * t * t + 1; }, easeInOutCubic: function easeInOutCubic(t) { return (t /= .5) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2); }, easeInQuart: function easeInQuart(t) { return t * t * t * t; }, easeOutQuart: function easeOutQuart(t) { return -((t -= 1) * t * t * t - 1); }, easeInOutQuart: function easeInOutQuart(t) { return (t /= .5) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2); }, easeInQuint: function easeInQuint(t) { return t * t * t * t * t; }, easeOutQuint: function easeOutQuint(t) { return (t -= 1) * t * t * t * t + 1; }, easeInOutQuint: function easeInOutQuint(t) { return (t /= .5) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2); }, easeInSine: function easeInSine(t) { return 1 - Math.cos(t * (Math.PI / 2)); }, easeOutSine: function easeOutSine(t) { return Math.sin(t * (Math.PI / 2)); }, easeInOutSine: function easeInOutSine(t) { return -.5 * (Math.cos(Math.PI * t) - 1); }, easeInExpo: function easeInExpo(t) { return 0 === t ? 0 : Math.pow(2, 10 * (t - 1)); }, easeOutExpo: function easeOutExpo(t) { return 1 === t ? 1 : 1 - Math.pow(2, -10 * t); }, easeInOutExpo: function easeInOutExpo(t) { return 0 === t ? 0 : 1 === t ? 1 : (t /= .5) < 1 ? .5 * Math.pow(2, 10 * (t - 1)) : .5 * (2 - Math.pow(2, -10 * --t)); }, easeInCirc: function easeInCirc(t) { return t >= 1 ? t : -(Math.sqrt(1 - t * t) - 1); }, easeOutCirc: function easeOutCirc(t) { return Math.sqrt(1 - (t -= 1) * t); }, easeInOutCirc: function easeInOutCirc(t) { return (t /= .5) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1); }, easeInElastic: function easeInElastic(t) { var e = 1.70158, n = 0, i = 1;return 0 === t ? 0 : 1 === t ? 1 : (n || (n = .3), i < 1 ? (i = 1, e = n / 4) : e = n / (2 * Math.PI) * Math.asin(1 / i), -i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / n)); }, easeOutElastic: function easeOutElastic(t) { var e = 1.70158, n = 0, i = 1;return 0 === t ? 0 : 1 === t ? 1 : (n || (n = .3), i < 1 ? (i = 1, e = n / 4) : e = n / (2 * Math.PI) * Math.asin(1 / i), i * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / n) + 1); }, easeInOutElastic: function easeInOutElastic(t) { var e = 1.70158, n = 0, i = 1;return 0 === t ? 0 : 2 == (t /= .5) ? 1 : (n || (n = .45), i < 1 ? (i = 1, e = n / 4) : e = n / (2 * Math.PI) * Math.asin(1 / i), t < 1 ? i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / n) * -.5 : i * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / n) * .5 + 1); }, easeInBack: function easeInBack(t) { var e = 1.70158;return t * t * ((e + 1) * t - e); }, easeOutBack: function easeOutBack(t) { var e = 1.70158;return (t -= 1) * t * ((e + 1) * t + e) + 1; }, easeInOutBack: function easeInOutBack(t) { var e = 1.70158;return (t /= .5) < 1 ? t * t * ((1 + (e *= 1.525)) * t - e) * .5 : .5 * ((t -= 2) * t * ((1 + (e *= 1.525)) * t + e) + 2); }, easeInBounce: function easeInBounce(t) { return 1 - a.easeOutBounce(1 - t); }, easeOutBounce: function easeOutBounce(t) { return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375; }, easeInOutBounce: function easeInOutBounce(t) { return t < .5 ? .5 * a.easeInBounce(2 * t) : .5 * a.easeOutBounce(2 * t - 1) + .5; } };e.exports = { effects: a }, i.easingEffects = a; }, { 42: 42 }], 44: [function (t, e, n) { "use strict"; var i = t(42);e.exports = { toLineHeight: function toLineHeight(t, e) { var n = ("" + t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if (!n || "normal" === n[1]) return 1.2 * e;switch (t = +n[2], n[3]) {case "px": return t;case "%": t /= 100;}return e * t; }, toPadding: function toPadding(t) { var e, n, a, o;return i.isObject(t) ? (e = +t.top || 0, n = +t.right || 0, a = +t.bottom || 0, o = +t.left || 0) : e = n = a = o = +t || 0, { top: e, right: n, bottom: a, left: o, height: e + a, width: o + n }; }, resolve: function resolve(t, e, n) { var a, o, r;for (a = 0, o = t.length; a < o; ++a) { if (void 0 !== (r = t[a]) && (void 0 !== e && "function" == typeof r && (r = r(e)), void 0 !== n && i.isArray(r) && (r = r[n]), void 0 !== r)) return r; } } }; }, { 42: 42 }], 45: [function (t, e, n) { "use strict"; e.exports = t(42), e.exports.easing = t(43), e.exports.canvas = t(41), e.exports.options = t(44); }, { 41: 41, 42: 42, 43: 43, 44: 44 }], 46: [function (t, e, n) { e.exports = { acquireContext: function acquireContext(t) { return t && t.canvas && (t = t.canvas), t && t.getContext("2d") || null; } }; }, {}], 47: [function (t, e, n) { "use strict"; function i(t, e) { var n = v.getStyle(t, e), i = n && n.match(/^(\d+)(\.\d+)?px$/);return i ? Number(i[1]) : void 0; }function a(t, e) { var n = t.style, a = t.getAttribute("height"), o = t.getAttribute("width");if (t[m] = { initial: { height: a, width: o, style: { display: n.display, height: n.height, width: n.width } } }, n.display = n.display || "block", null === o || "" === o) { var r = i(t, "width");void 0 !== r && (t.width = r); }if (null === a || "" === a) if ("" === t.style.height) t.height = t.width / (e.options.aspectRatio || 2);else { var l = i(t, "height");void 0 !== r && (t.height = l); }return t; }function o(t, e, n) { t.addEventListener(e, n, M); }function r(t, e, n) { t.removeEventListener(e, n, M); }function l(t, e, n, i, a) { return { type: t, chart: e, native: a || null, x: void 0 !== n ? n : null, y: void 0 !== i ? i : null }; }function s(t, e) { var n = w[t.type] || t.type, i = v.getRelativePosition(t, e);return l(n, e, i.x, i.y, t); }function u(t, e) { var n = !1, i = [];return function () { i = Array.prototype.slice.call(arguments), e = e || this, n || (n = !0, v.requestAnimFrame.call(window, function () { n = !1, t.apply(e, i); })); }; }function d(t) { var e = document.createElement("div"), n = b + "size-monitor", i = "position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText = i, e.className = n, e.innerHTML = '<div class="' + n + '-expand" style="' + i + '"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="' + n + '-shrink" style="' + i + '"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var a = e.childNodes[0], r = e.childNodes[1];e._reset = function () { a.scrollLeft = 1e6, a.scrollTop = 1e6, r.scrollLeft = 1e6, r.scrollTop = 1e6; };var l = function l() { e._reset(), t(); };return o(a, "scroll", l.bind(a, "expand")), o(r, "scroll", l.bind(r, "shrink")), e; }function c(t, e) { var n = t[m] || (t[m] = {}), i = n.renderProxy = function (t) { t.animationName === y && e(); };v.each(k, function (e) { o(t, e, i); }), n.reflow = !!t.offsetParent, t.classList.add(x); }function h(t) { var e = t[m] || {}, n = e.renderProxy;n && (v.each(k, function (e) { r(t, e, n); }), delete e.renderProxy), t.classList.remove(x); }function f(t, e, n) { var i = t[m] || (t[m] = {}), a = i.resizer = d(u(function () { if (i.resizer) return e(l("resize", n)); }));c(t, function () { if (i.resizer) { var e = t.parentNode;e && e !== a.parentNode && e.insertBefore(a, e.firstChild), a._reset(); } }); }function g(t) { var e = t[m] || {}, n = e.resizer;delete e.resizer, h(t), n && n.parentNode && n.parentNode.removeChild(n); }function p(t, e) { var n = t._style || document.createElement("style");t._style || (t._style = n, e = "/* Chart.js */\n" + e, n.setAttribute("type", "text/css"), document.getElementsByTagName("head")[0].appendChild(n)), n.appendChild(document.createTextNode(e)); }var v = t(45), m = "$chartjs", b = "chartjs-", x = b + "render-monitor", y = b + "render-animation", k = ["animationstart", "webkitAnimationStart"], w = { touchstart: "mousedown", touchmove: "mousemove", touchend: "mouseup", pointerenter: "mouseenter", pointerdown: "mousedown", pointermove: "mousemove", pointerup: "mouseup", pointerleave: "mouseout", pointerout: "mouseout" }, M = !!function () { var t = !1;try { var e = Object.defineProperty({}, "passive", { get: function get() { t = !0; } });window.addEventListener("e", null, e); } catch (t) {}return t; }() && { passive: !0 };e.exports = { _enabled: "undefined" != typeof window && "undefined" != typeof document, initialize: function initialize() { var t = "from{opacity:0.99}to{opacity:1}";p(this, "@-webkit-keyframes " + y + "{" + t + "}@keyframes " + y + "{" + t + "}." + x + "{-webkit-animation:" + y + " 0.001s;animation:" + y + " 0.001s;}"); }, acquireContext: function acquireContext(t, e) { "string" == typeof t ? t = document.getElementById(t) : t.length && (t = t[0]), t && t.canvas && (t = t.canvas);var n = t && t.getContext && t.getContext("2d");return n && n.canvas === t ? (a(t, e), n) : null; }, releaseContext: function releaseContext(t) { var e = t.canvas;if (e[m]) { var n = e[m].initial;["height", "width"].forEach(function (t) { var i = n[t];v.isNullOrUndef(i) ? e.removeAttribute(t) : e.setAttribute(t, i); }), v.each(n.style || {}, function (t, n) { e.style[n] = t; }), e.width = e.width, delete e[m]; } }, addEventListener: function addEventListener(t, e, n) { var i = t.canvas;if ("resize" !== e) { var a = n[m] || (n[m] = {});o(i, e, (a.proxies || (a.proxies = {}))[t.id + "_" + e] = function (e) { n(s(e, t)); }); } else f(i, n, t); }, removeEventListener: function removeEventListener(t, e, n) { var i = t.canvas;if ("resize" !== e) { var a = ((n[m] || {}).proxies || {})[t.id + "_" + e];a && r(i, e, a); } else g(i); } }, v.addEvent = o, v.removeEvent = r; }, { 45: 45 }], 48: [function (t, e, n) { "use strict"; var i = t(45), a = t(46), o = t(47), r = o._enabled ? o : a;e.exports = i.extend({ initialize: function initialize() {}, acquireContext: function acquireContext() {}, releaseContext: function releaseContext() {}, addEventListener: function addEventListener() {}, removeEventListener: function removeEventListener() {} }, r); }, { 45: 45, 46: 46, 47: 47 }], 49: [function (t, e, n) { "use strict"; var i = t(25), a = t(40), o = t(45);i._set("global", { plugins: { filler: { propagate: !0 } } }), e.exports = function () { function t(t, e, n) { var i, a = t._model || {}, o = a.fill;if (void 0 === o && (o = !!a.backgroundColor), !1 === o || null === o) return !1;if (!0 === o) return "origin";if (i = parseFloat(o, 10), isFinite(i) && Math.floor(i) === i) return "-" !== o[0] && "+" !== o[0] || (i = e + i), !(i === e || i < 0 || i >= n) && i;switch (o) {case "bottom": return "start";case "top": return "end";case "zero": return "origin";case "origin":case "start":case "end": return o;default: return !1;} }function e(t) { var e, n = t.el._model || {}, i = t.el._scale || {}, a = t.fill, o = null;if (isFinite(a)) return null;if ("start" === a ? o = void 0 === n.scaleBottom ? i.bottom : n.scaleBottom : "end" === a ? o = void 0 === n.scaleTop ? i.top : n.scaleTop : void 0 !== n.scaleZero ? o = n.scaleZero : i.getBasePosition ? o = i.getBasePosition() : i.getBasePixel && (o = i.getBasePixel()), void 0 !== o && null !== o) { if (void 0 !== o.x && void 0 !== o.y) return o;if ("number" == typeof o && isFinite(o)) return e = i.isHorizontal(), { x: e ? o : null, y: e ? null : o }; }return null; }function n(t, e, n) { var i, a = t[e].fill, o = [e];if (!n) return a;for (; !1 !== a && -1 === o.indexOf(a);) { if (!isFinite(a)) return a;if (!(i = t[a])) return !1;if (i.visible) return a;o.push(a), a = i.fill; }return !1; }function r(t) { var e = t.fill, n = "dataset";return !1 === e ? null : (isFinite(e) || (n = "boundary"), d[n](t)); }function l(t) { return t && !t.skip; }function s(t, e, n, i, a) { var r;if (i && a) { for (t.moveTo(e[0].x, e[0].y), r = 1; r < i; ++r) { o.canvas.lineTo(t, e[r - 1], e[r]); }for (t.lineTo(n[a - 1].x, n[a - 1].y), r = a - 1; r > 0; --r) { o.canvas.lineTo(t, n[r], n[r - 1], !0); } } }function u(t, e, n, i, a, o) { var r, u, d, c, h, f, g, p = e.length, v = i.spanGaps, m = [], b = [], x = 0, y = 0;for (t.beginPath(), r = 0, u = p + !!o; r < u; ++r) { h = n(c = e[d = r % p]._view, d, i), f = l(c), g = l(h), f && g ? (x = m.push(c), y = b.push(h)) : x && y && (v ? (f && m.push(c), g && b.push(h)) : (s(t, m, b, x, y), x = y = 0, m = [], b = [])); }s(t, m, b, x, y), t.closePath(), t.fillStyle = a, t.fill(); }var d = { dataset: function dataset(t) { var e = t.fill, n = t.chart, i = n.getDatasetMeta(e), a = i && n.isDatasetVisible(e) && i.dataset._children || [], o = a.length || 0;return o ? function (t, e) { return e < o && a[e]._view || null; } : null; }, boundary: function boundary(t) { var e = t.boundary, n = e ? e.x : null, i = e ? e.y : null;return function (t) { return { x: null === n ? t.x : n, y: null === i ? t.y : i }; }; } };return { id: "filler", afterDatasetsUpdate: function afterDatasetsUpdate(i, o) { var l, s, u, d, c = (i.data.datasets || []).length, h = o.propagate, f = [];for (s = 0; s < c; ++s) { d = null, (u = (l = i.getDatasetMeta(s)).dataset) && u._model && u instanceof a.Line && (d = { visible: i.isDatasetVisible(s), fill: t(u, s, c), chart: i, el: u }), l.$filler = d, f.push(d); }for (s = 0; s < c; ++s) { (d = f[s]) && (d.fill = n(f, s, h), d.boundary = e(d), d.mapper = r(d)); } }, beforeDatasetDraw: function beforeDatasetDraw(t, e) { var n = e.meta.$filler;if (n) { var a = t.ctx, r = n.el, l = r._view, s = r._children || [], d = n.mapper, c = l.backgroundColor || i.global.defaultColor;d && c && s.length && (o.canvas.clipArea(a, t.chartArea), u(a, s, d, l, c, r._loop), o.canvas.unclipArea(a)); } } }; }; }, { 25: 25, 40: 40, 45: 45 }], 50: [function (t, e, n) { "use strict"; var i = t(25), a = t(26), o = t(45);i._set("global", { legend: { display: !0, position: "top", fullWidth: !0, reverse: !1, weight: 1e3, onClick: function onClick(t, e) { var n = e.datasetIndex, i = this.chart, a = i.getDatasetMeta(n);a.hidden = null === a.hidden ? !i.data.datasets[n].hidden : null, i.update(); }, onHover: null, labels: { boxWidth: 40, padding: 10, generateLabels: function generateLabels(t) { var e = t.data;return o.isArray(e.datasets) ? e.datasets.map(function (e, n) { return { text: e.label, fillStyle: o.isArray(e.backgroundColor) ? e.backgroundColor[0] : e.backgroundColor, hidden: !t.isDatasetVisible(n), lineCap: e.borderCapStyle, lineDash: e.borderDash, lineDashOffset: e.borderDashOffset, lineJoin: e.borderJoinStyle, lineWidth: e.borderWidth, strokeStyle: e.borderColor, pointStyle: e.pointStyle, datasetIndex: n }; }, this) : []; } } }, legendCallback: function legendCallback(t) { var e = [];e.push('<ul class="' + t.id + '-legend">');for (var n = 0; n < t.data.datasets.length; n++) { e.push('<li><span style="background-color:' + t.data.datasets[n].backgroundColor + '"></span>'), t.data.datasets[n].label && e.push(t.data.datasets[n].label), e.push("</li>"); }return e.push("</ul>"), e.join(""); } }), e.exports = function (t) { function e(t, e) { return t.usePointStyle ? e * Math.SQRT2 : t.boxWidth; }function n(e, n) { var i = new t.Legend({ ctx: e.ctx, options: n, chart: e });r.configure(e, i, n), r.addBox(e, i), e.legend = i; }var r = t.layoutService, l = o.noop;return t.Legend = a.extend({ initialize: function initialize(t) { o.extend(this, t), this.legendHitBoxes = [], this.doughnutMode = !1; }, beforeUpdate: l, update: function update(t, e, n) { var i = this;return i.beforeUpdate(), i.maxWidth = t, i.maxHeight = e, i.margins = n, i.beforeSetDimensions(), i.setDimensions(), i.afterSetDimensions(), i.beforeBuildLabels(), i.buildLabels(), i.afterBuildLabels(), i.beforeFit(), i.fit(), i.afterFit(), i.afterUpdate(), i.minSize; }, afterUpdate: l, beforeSetDimensions: l, setDimensions: function setDimensions() { var t = this;t.isHorizontal() ? (t.width = t.maxWidth, t.left = 0, t.right = t.width) : (t.height = t.maxHeight, t.top = 0, t.bottom = t.height), t.paddingLeft = 0, t.paddingTop = 0, t.paddingRight = 0, t.paddingBottom = 0, t.minSize = { width: 0, height: 0 }; }, afterSetDimensions: l, beforeBuildLabels: l, buildLabels: function buildLabels() { var t = this, e = t.options.labels || {}, n = o.callback(e.generateLabels, [t.chart], t) || [];e.filter && (n = n.filter(function (n) { return e.filter(n, t.chart.data); })), t.options.reverse && n.reverse(), t.legendItems = n; }, afterBuildLabels: l, beforeFit: l, fit: function fit() { var t = this, n = t.options, a = n.labels, r = n.display, l = t.ctx, s = i.global, u = o.valueOrDefault, d = u(a.fontSize, s.defaultFontSize), c = u(a.fontStyle, s.defaultFontStyle), h = u(a.fontFamily, s.defaultFontFamily), f = o.fontString(d, c, h), g = t.legendHitBoxes = [], p = t.minSize, v = t.isHorizontal();if (v ? (p.width = t.maxWidth, p.height = r ? 10 : 0) : (p.width = r ? 10 : 0, p.height = t.maxHeight), r) if (l.font = f, v) { var m = t.lineWidths = [0], b = t.legendItems.length ? d + a.padding : 0;l.textAlign = "left", l.textBaseline = "top", o.each(t.legendItems, function (n, i) { var o = e(a, d) + d / 2 + l.measureText(n.text).width;m[m.length - 1] + o + a.padding >= t.width && (b += d + a.padding, m[m.length] = t.left), g[i] = { left: 0, top: 0, width: o, height: d }, m[m.length - 1] += o + a.padding; }), p.height += b; } else { var x = a.padding, y = t.columnWidths = [], k = a.padding, w = 0, M = 0, S = d + x;o.each(t.legendItems, function (t, n) { var i = e(a, d) + d / 2 + l.measureText(t.text).width;M + S > p.height && (k += w + a.padding, y.push(w), w = 0, M = 0), w = Math.max(w, i), M += S, g[n] = { left: 0, top: 0, width: i, height: d }; }), k += w, y.push(w), p.width += k; }t.width = p.width, t.height = p.height; }, afterFit: l, isHorizontal: function isHorizontal() { return "top" === this.options.position || "bottom" === this.options.position; }, draw: function draw() { var t = this, n = t.options, a = n.labels, r = i.global, l = r.elements.line, s = t.width, u = t.lineWidths;if (n.display) { var d, c = t.ctx, h = o.valueOrDefault, f = h(a.fontColor, r.defaultFontColor), g = h(a.fontSize, r.defaultFontSize), p = h(a.fontStyle, r.defaultFontStyle), v = h(a.fontFamily, r.defaultFontFamily), m = o.fontString(g, p, v);c.textAlign = "left", c.textBaseline = "middle", c.lineWidth = .5, c.strokeStyle = f, c.fillStyle = f, c.font = m;var b = e(a, g), x = t.legendHitBoxes, y = function y(t, e, i) { if (!(isNaN(b) || b <= 0)) { c.save(), c.fillStyle = h(i.fillStyle, r.defaultColor), c.lineCap = h(i.lineCap, l.borderCapStyle), c.lineDashOffset = h(i.lineDashOffset, l.borderDashOffset), c.lineJoin = h(i.lineJoin, l.borderJoinStyle), c.lineWidth = h(i.lineWidth, l.borderWidth), c.strokeStyle = h(i.strokeStyle, r.defaultColor);var a = 0 === h(i.lineWidth, l.borderWidth);if (c.setLineDash && c.setLineDash(h(i.lineDash, l.borderDash)), n.labels && n.labels.usePointStyle) { var s = g * Math.SQRT2 / 2, u = s / Math.SQRT2, d = t + u, f = e + u;o.canvas.drawPoint(c, i.pointStyle, s, d, f); } else a || c.strokeRect(t, e, b, g), c.fillRect(t, e, b, g);c.restore(); } }, k = function k(t, e, n, i) { var a = g / 2, o = b + a + t, r = e + a;c.fillText(n.text, o, r), n.hidden && (c.beginPath(), c.lineWidth = 2, c.moveTo(o, r), c.lineTo(o + i, r), c.stroke()); }, w = t.isHorizontal();d = w ? { x: t.left + (s - u[0]) / 2, y: t.top + a.padding, line: 0 } : { x: t.left + a.padding, y: t.top + a.padding, line: 0 };var M = g + a.padding;o.each(t.legendItems, function (e, n) { var i = c.measureText(e.text).width, o = b + g / 2 + i, r = d.x, l = d.y;w ? r + o >= s && (l = d.y += M, d.line++, r = d.x = t.left + (s - u[d.line]) / 2) : l + M > t.bottom && (r = d.x = r + t.columnWidths[d.line] + a.padding, l = d.y = t.top + a.padding, d.line++), y(r, l, e), x[n].left = r, x[n].top = l, k(r, l, e, i), w ? d.x += o + a.padding : d.y += M; }); } }, handleEvent: function handleEvent(t) { var e = this, n = e.options, i = "mouseup" === t.type ? "click" : t.type, a = !1;if ("mousemove" === i) { if (!n.onHover) return; } else { if ("click" !== i) return;if (!n.onClick) return; }var o = t.x, r = t.y;if (o >= e.left && o <= e.right && r >= e.top && r <= e.bottom) for (var l = e.legendHitBoxes, s = 0; s < l.length; ++s) { var u = l[s];if (o >= u.left && o <= u.left + u.width && r >= u.top && r <= u.top + u.height) { if ("click" === i) { n.onClick.call(e, t.native, e.legendItems[s]), a = !0;break; }if ("mousemove" === i) { n.onHover.call(e, t.native, e.legendItems[s]), a = !0;break; } } }return a; } }), { id: "legend", beforeInit: function beforeInit(t) { var e = t.options.legend;e && n(t, e); }, beforeUpdate: function beforeUpdate(t) { var e = t.options.legend, a = t.legend;e ? (o.mergeIf(e, i.global.legend), a ? (r.configure(t, a, e), a.options = e) : n(t, e)) : a && (r.removeBox(t, a), delete t.legend); }, afterEvent: function afterEvent(t, e) { var n = t.legend;n && n.handleEvent(e); } }; }; }, { 25: 25, 26: 26, 45: 45 }], 51: [function (t, e, n) { "use strict"; var i = t(25), a = t(26), o = t(45);i._set("global", { title: { display: !1, fontStyle: "bold", fullWidth: !0, lineHeight: 1.2, padding: 10, position: "top", text: "", weight: 2e3 } }), e.exports = function (t) { function e(e, i) { var a = new t.Title({ ctx: e.ctx, options: i, chart: e });n.configure(e, a, i), n.addBox(e, a), e.titleBlock = a; }var n = t.layoutService, r = o.noop;return t.Title = a.extend({ initialize: function initialize(t) { var e = this;o.extend(e, t), e.legendHitBoxes = []; }, beforeUpdate: r, update: function update(t, e, n) { var i = this;return i.beforeUpdate(), i.maxWidth = t, i.maxHeight = e, i.margins = n, i.beforeSetDimensions(), i.setDimensions(), i.afterSetDimensions(), i.beforeBuildLabels(), i.buildLabels(), i.afterBuildLabels(), i.beforeFit(), i.fit(), i.afterFit(), i.afterUpdate(), i.minSize; }, afterUpdate: r, beforeSetDimensions: r, setDimensions: function setDimensions() { var t = this;t.isHorizontal() ? (t.width = t.maxWidth, t.left = 0, t.right = t.width) : (t.height = t.maxHeight, t.top = 0, t.bottom = t.height), t.paddingLeft = 0, t.paddingTop = 0, t.paddingRight = 0, t.paddingBottom = 0, t.minSize = { width: 0, height: 0 }; }, afterSetDimensions: r, beforeBuildLabels: r, buildLabels: r, afterBuildLabels: r, beforeFit: r, fit: function fit() { var t = this, e = o.valueOrDefault, n = t.options, a = n.display, r = e(n.fontSize, i.global.defaultFontSize), l = t.minSize, s = o.isArray(n.text) ? n.text.length : 1, u = o.options.toLineHeight(n.lineHeight, r), d = a ? s * u + 2 * n.padding : 0;t.isHorizontal() ? (l.width = t.maxWidth, l.height = d) : (l.width = d, l.height = t.maxHeight), t.width = l.width, t.height = l.height; }, afterFit: r, isHorizontal: function isHorizontal() { var t = this.options.position;return "top" === t || "bottom" === t; }, draw: function draw() { var t = this, e = t.ctx, n = o.valueOrDefault, a = t.options, r = i.global;if (a.display) { var l, s, u, d = n(a.fontSize, r.defaultFontSize), c = n(a.fontStyle, r.defaultFontStyle), h = n(a.fontFamily, r.defaultFontFamily), f = o.fontString(d, c, h), g = o.options.toLineHeight(a.lineHeight, d), p = g / 2 + a.padding, v = 0, m = t.top, b = t.left, x = t.bottom, y = t.right;e.fillStyle = n(a.fontColor, r.defaultFontColor), e.font = f, t.isHorizontal() ? (s = b + (y - b) / 2, u = m + p, l = y - b) : (s = "left" === a.position ? b + p : y - p, u = m + (x - m) / 2, l = x - m, v = Math.PI * ("left" === a.position ? -.5 : .5)), e.save(), e.translate(s, u), e.rotate(v), e.textAlign = "center", e.textBaseline = "middle";var k = a.text;if (o.isArray(k)) for (var w = 0, M = 0; M < k.length; ++M) { e.fillText(k[M], 0, w, l), w += g; } else e.fillText(k, 0, 0, l);e.restore(); } } }), { id: "title", beforeInit: function beforeInit(t) { var n = t.options.title;n && e(t, n); }, beforeUpdate: function beforeUpdate(a) { var r = a.options.title, l = a.titleBlock;r ? (o.mergeIf(r, i.global.title), l ? (n.configure(a, l, r), l.options = r) : e(a, r)) : l && (t.layoutService.removeBox(a, l), delete a.titleBlock); } }; }; }, { 25: 25, 26: 26, 45: 45 }], 52: [function (t, e, n) { "use strict"; e.exports = function (t) { var e = t.Scale.extend({ getLabels: function getLabels() { var t = this.chart.data;return this.options.labels || (this.isHorizontal() ? t.xLabels : t.yLabels) || t.labels; }, determineDataLimits: function determineDataLimits() { var t = this, e = t.getLabels();t.minIndex = 0, t.maxIndex = e.length - 1;var n;void 0 !== t.options.ticks.min && (n = e.indexOf(t.options.ticks.min), t.minIndex = -1 !== n ? n : t.minIndex), void 0 !== t.options.ticks.max && (n = e.indexOf(t.options.ticks.max), t.maxIndex = -1 !== n ? n : t.maxIndex), t.min = e[t.minIndex], t.max = e[t.maxIndex]; }, buildTicks: function buildTicks() { var t = this, e = t.getLabels();t.ticks = 0 === t.minIndex && t.maxIndex === e.length - 1 ? e : e.slice(t.minIndex, t.maxIndex + 1); }, getLabelForIndex: function getLabelForIndex(t, e) { var n = this, i = n.chart.data, a = n.isHorizontal();return i.yLabels && !a ? n.getRightValue(i.datasets[e].data[t]) : n.ticks[t - n.minIndex]; }, getPixelForValue: function getPixelForValue(t, e) { var n, i = this, a = i.options.offset, o = Math.max(i.maxIndex + 1 - i.minIndex - (a ? 0 : 1), 1);if (void 0 !== t && null !== t && (n = i.isHorizontal() ? t.x : t.y), void 0 !== n || void 0 !== t && isNaN(e)) { var r = i.getLabels();t = n || t;var l = r.indexOf(t);e = -1 !== l ? l : e; }if (i.isHorizontal()) { var s = i.width / o, u = s * (e - i.minIndex);return a && (u += s / 2), i.left + Math.round(u); }var d = i.height / o, c = d * (e - i.minIndex);return a && (c += d / 2), i.top + Math.round(c); }, getPixelForTick: function getPixelForTick(t) { return this.getPixelForValue(this.ticks[t], t + this.minIndex, null); }, getValueForPixel: function getValueForPixel(t) { var e = this, n = e.options.offset, i = Math.max(e._ticks.length - (n ? 0 : 1), 1), a = e.isHorizontal(), o = (a ? e.width : e.height) / i;return t -= a ? e.left : e.top, n && (t -= o / 2), (t <= 0 ? 0 : Math.round(t / o)) + e.minIndex; }, getBasePixel: function getBasePixel() { return this.bottom; } });t.scaleService.registerScaleType("category", e, { position: "bottom" }); }; }, {}], 53: [function (t, e, n) { "use strict"; var i = t(25), a = t(45), o = t(34);e.exports = function (t) { var e = { position: "left", ticks: { callback: o.formatters.linear } }, n = t.LinearScaleBase.extend({ determineDataLimits: function determineDataLimits() { function t(t) { return r ? t.xAxisID === e.id : t.yAxisID === e.id; }var e = this, n = e.options, i = e.chart, o = i.data.datasets, r = e.isHorizontal();e.min = null, e.max = null;var l = n.stacked;if (void 0 === l && a.each(o, function (e, n) { if (!l) { var a = i.getDatasetMeta(n);i.isDatasetVisible(n) && t(a) && void 0 !== a.stack && (l = !0); } }), n.stacked || l) { var s = {};a.each(o, function (o, r) { var l = i.getDatasetMeta(r), u = [l.type, void 0 === n.stacked && void 0 === l.stack ? r : "", l.stack].join(".");void 0 === s[u] && (s[u] = { positiveValues: [], negativeValues: [] });var d = s[u].positiveValues, c = s[u].negativeValues;i.isDatasetVisible(r) && t(l) && a.each(o.data, function (t, i) { var a = +e.getRightValue(t);isNaN(a) || l.data[i].hidden || (d[i] = d[i] || 0, c[i] = c[i] || 0, n.relativePoints ? d[i] = 100 : a < 0 ? c[i] += a : d[i] += a); }); }), a.each(s, function (t) { var n = t.positiveValues.concat(t.negativeValues), i = a.min(n), o = a.max(n);e.min = null === e.min ? i : Math.min(e.min, i), e.max = null === e.max ? o : Math.max(e.max, o); }); } else a.each(o, function (n, o) { var r = i.getDatasetMeta(o);i.isDatasetVisible(o) && t(r) && a.each(n.data, function (t, n) { var i = +e.getRightValue(t);isNaN(i) || r.data[n].hidden || (null === e.min ? e.min = i : i < e.min && (e.min = i), null === e.max ? e.max = i : i > e.max && (e.max = i)); }); });e.min = isFinite(e.min) && !isNaN(e.min) ? e.min : 0, e.max = isFinite(e.max) && !isNaN(e.max) ? e.max : 1, this.handleTickRangeOptions(); }, getTickLimit: function getTickLimit() { var t, e = this, n = e.options.ticks;if (e.isHorizontal()) t = Math.min(n.maxTicksLimit ? n.maxTicksLimit : 11, Math.ceil(e.width / 50));else { var o = a.valueOrDefault(n.fontSize, i.global.defaultFontSize);t = Math.min(n.maxTicksLimit ? n.maxTicksLimit : 11, Math.ceil(e.height / (2 * o))); }return t; }, handleDirectionalChanges: function handleDirectionalChanges() { this.isHorizontal() || this.ticks.reverse(); }, getLabelForIndex: function getLabelForIndex(t, e) { return +this.getRightValue(this.chart.data.datasets[e].data[t]); }, getPixelForValue: function getPixelForValue(t) { var e, n = this, i = n.start, a = +n.getRightValue(t), o = n.end - i;return n.isHorizontal() ? (e = n.left + n.width / o * (a - i), Math.round(e)) : (e = n.bottom - n.height / o * (a - i), Math.round(e)); }, getValueForPixel: function getValueForPixel(t) { var e = this, n = e.isHorizontal(), i = n ? e.width : e.height, a = (n ? t - e.left : e.bottom - t) / i;return e.start + (e.end - e.start) * a; }, getPixelForTick: function getPixelForTick(t) { return this.getPixelForValue(this.ticksAsNumbers[t]); } });t.scaleService.registerScaleType("linear", n, e); }; }, { 25: 25, 34: 34, 45: 45 }], 54: [function (t, e, n) { "use strict"; var i = t(45), a = t(34);e.exports = function (t) { var e = i.noop;t.LinearScaleBase = t.Scale.extend({ getRightValue: function getRightValue(e) { return "string" == typeof e ? +e : t.Scale.prototype.getRightValue.call(this, e); }, handleTickRangeOptions: function handleTickRangeOptions() { var t = this, e = t.options.ticks;if (e.beginAtZero) { var n = i.sign(t.min), a = i.sign(t.max);n < 0 && a < 0 ? t.max = 0 : n > 0 && a > 0 && (t.min = 0); }var o = void 0 !== e.min || void 0 !== e.suggestedMin, r = void 0 !== e.max || void 0 !== e.suggestedMax;void 0 !== e.min ? t.min = e.min : void 0 !== e.suggestedMin && (null === t.min ? t.min = e.suggestedMin : t.min = Math.min(t.min, e.suggestedMin)), void 0 !== e.max ? t.max = e.max : void 0 !== e.suggestedMax && (null === t.max ? t.max = e.suggestedMax : t.max = Math.max(t.max, e.suggestedMax)), o !== r && t.min >= t.max && (o ? t.max = t.min + 1 : t.min = t.max - 1), t.min === t.max && (t.max++, e.beginAtZero || t.min--); }, getTickLimit: e, handleDirectionalChanges: e, buildTicks: function buildTicks() { var t = this, e = t.options.ticks, n = t.getTickLimit(), o = { maxTicks: n = Math.max(2, n), min: e.min, max: e.max, stepSize: i.valueOrDefault(e.fixedStepSize, e.stepSize) }, r = t.ticks = a.generators.linear(o, t);t.handleDirectionalChanges(), t.max = i.max(r), t.min = i.min(r), e.reverse ? (r.reverse(), t.start = t.max, t.end = t.min) : (t.start = t.min, t.end = t.max); }, convertTicksToLabels: function convertTicksToLabels() { var e = this;e.ticksAsNumbers = e.ticks.slice(), e.zeroLineIndex = e.ticks.indexOf(0), t.Scale.prototype.convertTicksToLabels.call(e); } }); }; }, { 34: 34, 45: 45 }], 55: [function (t, e, n) { "use strict"; var i = t(45), a = t(34);e.exports = function (t) { var e = { position: "left", ticks: { callback: a.formatters.logarithmic } }, n = t.Scale.extend({ determineDataLimits: function determineDataLimits() { function t(t) { return s ? t.xAxisID === e.id : t.yAxisID === e.id; }var e = this, n = e.options, a = n.ticks, o = e.chart, r = o.data.datasets, l = i.valueOrDefault, s = e.isHorizontal();e.min = null, e.max = null, e.minNotZero = null;var u = n.stacked;if (void 0 === u && i.each(r, function (e, n) { if (!u) { var i = o.getDatasetMeta(n);o.isDatasetVisible(n) && t(i) && void 0 !== i.stack && (u = !0); } }), n.stacked || u) { var d = {};i.each(r, function (a, r) { var l = o.getDatasetMeta(r), s = [l.type, void 0 === n.stacked && void 0 === l.stack ? r : "", l.stack].join(".");o.isDatasetVisible(r) && t(l) && (void 0 === d[s] && (d[s] = []), i.each(a.data, function (t, i) { var a = d[s], o = +e.getRightValue(t);isNaN(o) || l.data[i].hidden || (a[i] = a[i] || 0, n.relativePoints ? a[i] = 100 : a[i] += o); })); }), i.each(d, function (t) { var n = i.min(t), a = i.max(t);e.min = null === e.min ? n : Math.min(e.min, n), e.max = null === e.max ? a : Math.max(e.max, a); }); } else i.each(r, function (n, a) { var r = o.getDatasetMeta(a);o.isDatasetVisible(a) && t(r) && i.each(n.data, function (t, n) { var i = +e.getRightValue(t);isNaN(i) || r.data[n].hidden || (null === e.min ? e.min = i : i < e.min && (e.min = i), null === e.max ? e.max = i : i > e.max && (e.max = i), 0 !== i && (null === e.minNotZero || i < e.minNotZero) && (e.minNotZero = i)); }); });e.min = l(a.min, e.min), e.max = l(a.max, e.max), e.min === e.max && (0 !== e.min && null !== e.min ? (e.min = Math.pow(10, Math.floor(i.log10(e.min)) - 1), e.max = Math.pow(10, Math.floor(i.log10(e.max)) + 1)) : (e.min = 1, e.max = 10)); }, buildTicks: function buildTicks() { var t = this, e = t.options.ticks, n = { min: e.min, max: e.max }, o = t.ticks = a.generators.logarithmic(n, t);t.isHorizontal() || o.reverse(), t.max = i.max(o), t.min = i.min(o), e.reverse ? (o.reverse(), t.start = t.max, t.end = t.min) : (t.start = t.min, t.end = t.max); }, convertTicksToLabels: function convertTicksToLabels() { this.tickValues = this.ticks.slice(), t.Scale.prototype.convertTicksToLabels.call(this); }, getLabelForIndex: function getLabelForIndex(t, e) { return +this.getRightValue(this.chart.data.datasets[e].data[t]); }, getPixelForTick: function getPixelForTick(t) { return this.getPixelForValue(this.tickValues[t]); }, getPixelForValue: function getPixelForValue(t) { var e, n, a, o = this, r = o.start, l = +o.getRightValue(t), s = o.options.ticks;return o.isHorizontal() ? (a = i.log10(o.end) - i.log10(r), 0 === l ? n = o.left : (e = o.width, n = o.left + e / a * (i.log10(l) - i.log10(r)))) : (e = o.height, 0 !== r || s.reverse ? 0 === o.end && s.reverse ? (a = i.log10(o.start) - i.log10(o.minNotZero), n = l === o.end ? o.top : l === o.minNotZero ? o.top + .02 * e : o.top + .02 * e + .98 * e / a * (i.log10(l) - i.log10(o.minNotZero))) : 0 === l ? n = s.reverse ? o.top : o.bottom : (a = i.log10(o.end) - i.log10(r), e = o.height, n = o.bottom - e / a * (i.log10(l) - i.log10(r))) : (a = i.log10(o.end) - i.log10(o.minNotZero), n = l === r ? o.bottom : l === o.minNotZero ? o.bottom - .02 * e : o.bottom - .02 * e - .98 * e / a * (i.log10(l) - i.log10(o.minNotZero)))), n; }, getValueForPixel: function getValueForPixel(t) { var e, n, a = this, o = i.log10(a.end) - i.log10(a.start);return a.isHorizontal() ? (n = a.width, e = a.start * Math.pow(10, (t - a.left) * o / n)) : (n = a.height, e = Math.pow(10, (a.bottom - t) * o / n) / a.start), e; } });t.scaleService.registerScaleType("logarithmic", n, e); }; }, { 34: 34, 45: 45 }], 56: [function (t, e, n) { "use strict"; var i = t(25), a = t(45), o = t(34);e.exports = function (t) { function e(t) { var e = t.options;return e.angleLines.display || e.pointLabels.display ? t.chart.data.labels.length : 0; }function n(t) { var e = t.options.pointLabels, n = a.valueOrDefault(e.fontSize, v.defaultFontSize), i = a.valueOrDefault(e.fontStyle, v.defaultFontStyle), o = a.valueOrDefault(e.fontFamily, v.defaultFontFamily);return { size: n, style: i, family: o, font: a.fontString(n, i, o) }; }function r(t, e, n) { return a.isArray(n) ? { w: a.longestText(t, t.font, n), h: n.length * e + 1.5 * (n.length - 1) * e } : { w: t.measureText(n).width, h: e }; }function l(t, e, n, i, a) { return t === i || t === a ? { start: e - n / 2, end: e + n / 2 } : t < i || t > a ? { start: e - n - 5, end: e } : { start: e, end: e + n + 5 }; }function s(t) { var i, o, s, u = n(t), d = Math.min(t.height / 2, t.width / 2), c = { r: t.width, l: 0, t: t.height, b: 0 }, h = {};t.ctx.font = u.font, t._pointLabelSizes = [];var f = e(t);for (i = 0; i < f; i++) { s = t.getPointPosition(i, d), o = r(t.ctx, u.size, t.pointLabels[i] || ""), t._pointLabelSizes[i] = o;var g = t.getIndexAngle(i), p = a.toDegrees(g) % 360, v = l(p, s.x, o.w, 0, 180), m = l(p, s.y, o.h, 90, 270);v.start < c.l && (c.l = v.start, h.l = g), v.end > c.r && (c.r = v.end, h.r = g), m.start < c.t && (c.t = m.start, h.t = g), m.end > c.b && (c.b = m.end, h.b = g); }t.setReductions(d, c, h); }function u(t) { var e = Math.min(t.height / 2, t.width / 2);t.drawingArea = Math.round(e), t.setCenterPoint(0, 0, 0, 0); }function d(t) { return 0 === t || 180 === t ? "center" : t < 180 ? "left" : "right"; }function c(t, e, n, i) { if (a.isArray(e)) for (var o = n.y, r = 1.5 * i, l = 0; l < e.length; ++l) { t.fillText(e[l], n.x, o), o += r; } else t.fillText(e, n.x, n.y); }function h(t, e, n) { 90 === t || 270 === t ? n.y -= e.h / 2 : (t > 270 || t < 90) && (n.y -= e.h); }function f(t) { var i = t.ctx, o = a.valueOrDefault, r = t.options, l = r.angleLines, s = r.pointLabels;i.lineWidth = l.lineWidth, i.strokeStyle = l.color;var u = t.getDistanceFromCenterForValue(r.ticks.reverse ? t.min : t.max), f = n(t);i.textBaseline = "top";for (var g = e(t) - 1; g >= 0; g--) { if (l.display) { var p = t.getPointPosition(g, u);i.beginPath(), i.moveTo(t.xCenter, t.yCenter), i.lineTo(p.x, p.y), i.stroke(), i.closePath(); }if (s.display) { var m = t.getPointPosition(g, u + 5), b = o(s.fontColor, v.defaultFontColor);i.font = f.font, i.fillStyle = b;var x = t.getIndexAngle(g), y = a.toDegrees(x);i.textAlign = d(y), h(y, t._pointLabelSizes[g], m), c(i, t.pointLabels[g] || "", m, f.size); } } }function g(t, n, i, o) { var r = t.ctx;if (r.strokeStyle = a.valueAtIndexOrDefault(n.color, o - 1), r.lineWidth = a.valueAtIndexOrDefault(n.lineWidth, o - 1), t.options.gridLines.circular) r.beginPath(), r.arc(t.xCenter, t.yCenter, i, 0, 2 * Math.PI), r.closePath(), r.stroke();else { var l = e(t);if (0 === l) return;r.beginPath();var s = t.getPointPosition(0, i);r.moveTo(s.x, s.y);for (var u = 1; u < l; u++) { s = t.getPointPosition(u, i), r.lineTo(s.x, s.y); }r.closePath(), r.stroke(); } }function p(t) { return a.isNumber(t) ? t : 0; }var v = i.global, m = { display: !0, animate: !0, position: "chartArea", angleLines: { display: !0, color: "rgba(0, 0, 0, 0.1)", lineWidth: 1 }, gridLines: { circular: !1 }, ticks: { showLabelBackdrop: !0, backdropColor: "rgba(255,255,255,0.75)", backdropPaddingY: 2, backdropPaddingX: 2, callback: o.formatters.linear }, pointLabels: { display: !0, fontSize: 10, callback: function callback(t) { return t; } } }, b = t.LinearScaleBase.extend({ setDimensions: function setDimensions() { var t = this, e = t.options, n = e.ticks;t.width = t.maxWidth, t.height = t.maxHeight, t.xCenter = Math.round(t.width / 2), t.yCenter = Math.round(t.height / 2);var i = a.min([t.height, t.width]), o = a.valueOrDefault(n.fontSize, v.defaultFontSize);t.drawingArea = e.display ? i / 2 - (o / 2 + n.backdropPaddingY) : i / 2; }, determineDataLimits: function determineDataLimits() { var t = this, e = t.chart, n = Number.POSITIVE_INFINITY, i = Number.NEGATIVE_INFINITY;a.each(e.data.datasets, function (o, r) { if (e.isDatasetVisible(r)) { var l = e.getDatasetMeta(r);a.each(o.data, function (e, a) { var o = +t.getRightValue(e);isNaN(o) || l.data[a].hidden || (n = Math.min(o, n), i = Math.max(o, i)); }); } }), t.min = n === Number.POSITIVE_INFINITY ? 0 : n, t.max = i === Number.NEGATIVE_INFINITY ? 0 : i, t.handleTickRangeOptions(); }, getTickLimit: function getTickLimit() { var t = this.options.ticks, e = a.valueOrDefault(t.fontSize, v.defaultFontSize);return Math.min(t.maxTicksLimit ? t.maxTicksLimit : 11, Math.ceil(this.drawingArea / (1.5 * e))); }, convertTicksToLabels: function convertTicksToLabels() { var e = this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e), e.pointLabels = e.chart.data.labels.map(e.options.pointLabels.callback, e); }, getLabelForIndex: function getLabelForIndex(t, e) { return +this.getRightValue(this.chart.data.datasets[e].data[t]); }, fit: function fit() { this.options.pointLabels.display ? s(this) : u(this); }, setReductions: function setReductions(t, e, n) { var i = this, a = e.l / Math.sin(n.l), o = Math.max(e.r - i.width, 0) / Math.sin(n.r), r = -e.t / Math.cos(n.t), l = -Math.max(e.b - i.height, 0) / Math.cos(n.b);a = p(a), o = p(o), r = p(r), l = p(l), i.drawingArea = Math.min(Math.round(t - (a + o) / 2), Math.round(t - (r + l) / 2)), i.setCenterPoint(a, o, r, l); }, setCenterPoint: function setCenterPoint(t, e, n, i) { var a = this, o = a.width - e - a.drawingArea, r = t + a.drawingArea, l = n + a.drawingArea, s = a.height - i - a.drawingArea;a.xCenter = Math.round((r + o) / 2 + a.left), a.yCenter = Math.round((l + s) / 2 + a.top); }, getIndexAngle: function getIndexAngle(t) { return t * (2 * Math.PI / e(this)) + (this.chart.options && this.chart.options.startAngle ? this.chart.options.startAngle : 0) * Math.PI * 2 / 360; }, getDistanceFromCenterForValue: function getDistanceFromCenterForValue(t) { var e = this;if (null === t) return 0;var n = e.drawingArea / (e.max - e.min);return e.options.ticks.reverse ? (e.max - t) * n : (t - e.min) * n; }, getPointPosition: function getPointPosition(t, e) { var n = this, i = n.getIndexAngle(t) - Math.PI / 2;return { x: Math.round(Math.cos(i) * e) + n.xCenter, y: Math.round(Math.sin(i) * e) + n.yCenter }; }, getPointPositionForValue: function getPointPositionForValue(t, e) { return this.getPointPosition(t, this.getDistanceFromCenterForValue(e)); }, getBasePosition: function getBasePosition() { var t = this, e = t.min, n = t.max;return t.getPointPositionForValue(0, t.beginAtZero ? 0 : e < 0 && n < 0 ? n : e > 0 && n > 0 ? e : 0); }, draw: function draw() { var t = this, e = t.options, n = e.gridLines, i = e.ticks, o = a.valueOrDefault;if (e.display) { var r = t.ctx, l = this.getIndexAngle(0), s = o(i.fontSize, v.defaultFontSize), u = o(i.fontStyle, v.defaultFontStyle), d = o(i.fontFamily, v.defaultFontFamily), c = a.fontString(s, u, d);a.each(t.ticks, function (e, a) { if (a > 0 || i.reverse) { var u = t.getDistanceFromCenterForValue(t.ticksAsNumbers[a]);if (n.display && 0 !== a && g(t, n, u, a), i.display) { var d = o(i.fontColor, v.defaultFontColor);if (r.font = c, r.save(), r.translate(t.xCenter, t.yCenter), r.rotate(l), i.showLabelBackdrop) { var h = r.measureText(e).width;r.fillStyle = i.backdropColor, r.fillRect(-h / 2 - i.backdropPaddingX, -u - s / 2 - i.backdropPaddingY, h + 2 * i.backdropPaddingX, s + 2 * i.backdropPaddingY); }r.textAlign = "center", r.textBaseline = "middle", r.fillStyle = d, r.fillText(e, 0, -u), r.restore(); } } }), (e.angleLines.display || e.pointLabels.display) && f(t); } } });t.scaleService.registerScaleType("radialLinear", b, m); }; }, { 25: 25, 34: 34, 45: 45 }], 57: [function (t, e, n) { "use strict"; function i(t, e) { return t - e; }function a(t) { var e, n, i, a = {}, o = [];for (e = 0, n = t.length; e < n; ++e) { a[i = t[e]] || (a[i] = !0, o.push(i)); }return o; }function o(t, e, n, i) { if ("linear" === i || !t.length) return [{ time: e, pos: 0 }, { time: n, pos: 1 }];var a, o, r, l, s, u = [], d = [e];for (a = 0, o = t.length; a < o; ++a) { (l = t[a]) > e && l < n && d.push(l); }for (d.push(n), a = 0, o = d.length; a < o; ++a) { s = d[a + 1], r = d[a - 1], l = d[a], void 0 !== r && void 0 !== s && Math.round((s + r) / 2) === l || u.push({ time: l, pos: a / (o - 1) }); }return u; }function r(t, e, n) { for (var i, a, o, r = 0, l = t.length - 1; r >= 0 && r <= l;) { if (i = r + l >> 1, a = t[i - 1] || null, o = t[i], !a) return { lo: null, hi: o };if (o[e] < n) r = i + 1;else { if (!(a[e] > n)) return { lo: a, hi: o };l = i - 1; } }return { lo: o, hi: null }; }function l(t, e, n, i) { var a = r(t, e, n), o = a.lo ? a.hi ? a.lo : t[t.length - 2] : t[0], l = a.lo ? a.hi ? a.hi : t[t.length - 1] : t[1], s = l[e] - o[e], u = s ? (n - o[e]) / s : 0, d = (l[i] - o[i]) * u;return o[i] + d; }function s(t, e) { var n = e.parser, i = e.parser || e.format;return "function" == typeof n ? n(t) : "string" == typeof t && "string" == typeof i ? m(t, i) : (t instanceof m || (t = m(t)), t.isValid() ? t : "function" == typeof i ? i(t) : t); }function u(t, e) { if (x.isNullOrUndef(t)) return null;var n = e.options.time, i = s(e.getRightValue(t), n);return i.isValid() ? (n.round && i.startOf(n.round), i.valueOf()) : null; }function d(t, e, n, i) { var a, o, r, l = e - t, s = w[n], u = s.size, d = s.steps;if (!d) return Math.ceil(l / ((i || 1) * u));for (a = 0, o = d.length; a < o && (r = d[a], !(Math.ceil(l / (u * r)) <= i)); ++a) {}return r; }function c(t, e, n, i) { var a, o, r, l = M.length;for (a = M.indexOf(t); a < l - 1; ++a) { if (o = w[M[a]], r = o.steps ? o.steps[o.steps.length - 1] : k, o.common && Math.ceil((n - e) / (r * o.size)) <= i) return M[a]; }return M[l - 1]; }function h(t, e, n, i) { var a, o, r = m.duration(m(i).diff(m(n)));for (a = M.length - 1; a >= M.indexOf(e); a--) { if (o = M[a], w[o].common && r.as(o) >= t.length) return o; }return M[e ? M.indexOf(e) : 0]; }function f(t) { for (var e = M.indexOf(t) + 1, n = M.length; e < n; ++e) { if (w[M[e]].common) return M[e]; } }function g(t, e, n, i) { var a, o = i.time, r = o.unit || c(o.minUnit, t, e, n), l = f(r), s = x.valueOrDefault(o.stepSize, o.unitStepSize), u = "week" === r && o.isoWeekday, h = i.ticks.major.enabled, g = w[r], p = m(t), v = m(e), b = [];for (s || (s = d(t, e, r, n)), u && (p = p.isoWeekday(u), v = v.isoWeekday(u)), p = p.startOf(u ? "day" : r), (v = v.startOf(u ? "day" : r)) < e && v.add(1, r), a = m(p), h && l && !u && !o.round && (a.startOf(l), a.add(~~((p - a) / (g.size * s)) * s, r)); a < v; a.add(s, r)) { b.push(+a); }return b.push(+a), b; }function p(t, e, n, i, a) { var o, r, s = 0, u = 0;return a.offset && e.length && (a.time.min || (o = e.length > 1 ? e[1] : i, r = e[0], s = (l(t, "time", o, "pos") - l(t, "time", r, "pos")) / 2), a.time.max || (o = e[e.length - 1], r = e.length > 1 ? e[e.length - 2] : n, u = (l(t, "time", o, "pos") - l(t, "time", r, "pos")) / 2)), { left: s, right: u }; }function v(t, e) { var n, i, a, o, r = [];for (n = 0, i = t.length; n < i; ++n) { a = t[n], o = !!e && a === +m(a).startOf(e), r.push({ value: a, major: o }); }return r; }var m = t(1);m = "function" == typeof m ? m : window.moment;var b = t(25), x = t(45), y = Number.MIN_SAFE_INTEGER || -9007199254740991, k = Number.MAX_SAFE_INTEGER || 9007199254740991, w = { millisecond: { common: !0, size: 1, steps: [1, 2, 5, 10, 20, 50, 100, 250, 500] }, second: { common: !0, size: 1e3, steps: [1, 2, 5, 10, 30] }, minute: { common: !0, size: 6e4, steps: [1, 2, 5, 10, 30] }, hour: { common: !0, size: 36e5, steps: [1, 2, 3, 6, 12] }, day: { common: !0, size: 864e5, steps: [1, 2, 5] }, week: { common: !1, size: 6048e5, steps: [1, 2, 3, 4] }, month: { common: !0, size: 2628e6, steps: [1, 2, 3] }, quarter: { common: !1, size: 7884e6, steps: [1, 2, 3, 4] }, year: { common: !0, size: 3154e7 } }, M = Object.keys(w);e.exports = function (t) { var e = t.Scale.extend({ initialize: function initialize() { if (!m) throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(), t.Scale.prototype.initialize.call(this); }, update: function update() { var e = this, n = e.options;return n.time && n.time.format && console.warn("options.time.format is deprecated and replaced by options.time.parser."), t.Scale.prototype.update.apply(e, arguments); }, getRightValue: function getRightValue(e) { return e && void 0 !== e.t && (e = e.t), t.Scale.prototype.getRightValue.call(this, e); }, determineDataLimits: function determineDataLimits() { var t, e, n, o, r, l, s = this, d = s.chart, c = s.options.time, h = k, f = y, g = [], p = [], v = [];for (t = 0, n = d.data.labels.length; t < n; ++t) { v.push(u(d.data.labels[t], s)); }for (t = 0, n = (d.data.datasets || []).length; t < n; ++t) { if (d.isDatasetVisible(t)) { if (r = d.data.datasets[t].data, x.isObject(r[0])) for (p[t] = [], e = 0, o = r.length; e < o; ++e) { l = u(r[e], s), g.push(l), p[t][e] = l; } else g.push.apply(g, v), p[t] = v.slice(0); } else p[t] = []; }v.length && (v = a(v).sort(i), h = Math.min(h, v[0]), f = Math.max(f, v[v.length - 1])), g.length && (g = a(g).sort(i), h = Math.min(h, g[0]), f = Math.max(f, g[g.length - 1])), h = u(c.min, s) || h, f = u(c.max, s) || f, h = h === k ? +m().startOf("day") : h, f = f === y ? +m().endOf("day") + 1 : f, s.min = Math.min(h, f), s.max = Math.max(h + 1, f), s._horizontal = s.isHorizontal(), s._table = [], s._timestamps = { data: g, datasets: p, labels: v }; }, buildTicks: function buildTicks() { var t, e, n, i = this, a = i.min, r = i.max, l = i.options, s = l.time, d = [], c = [];switch (l.ticks.source) {case "data": d = i._timestamps.data;break;case "labels": d = i._timestamps.labels;break;case "auto":default: d = g(a, r, i.getLabelCapacity(a), l);}for ("ticks" === l.bounds && d.length && (a = d[0], r = d[d.length - 1]), a = u(s.min, i) || a, r = u(s.max, i) || r, t = 0, e = d.length; t < e; ++t) { (n = d[t]) >= a && n <= r && c.push(n); }return i.min = a, i.max = r, i._unit = s.unit || h(c, s.minUnit, i.min, i.max), i._majorUnit = f(i._unit), i._table = o(i._timestamps.data, a, r, l.distribution), i._offsets = p(i._table, c, a, r, l), v(c, i._majorUnit); }, getLabelForIndex: function getLabelForIndex(t, e) { var n = this, i = n.chart.data, a = n.options.time, o = i.labels && t < i.labels.length ? i.labels[t] : "", r = i.datasets[e].data[t];return x.isObject(r) && (o = n.getRightValue(r)), a.tooltipFormat && (o = s(o, a).format(a.tooltipFormat)), o; }, tickFormatFunction: function tickFormatFunction(t, e, n, i) { var a = this, o = a.options, r = t.valueOf(), l = o.time.displayFormats, s = l[a._unit], u = a._majorUnit, d = l[u], c = t.clone().startOf(u).valueOf(), h = o.ticks.major, f = h.enabled && u && d && r === c, g = t.format(i || (f ? d : s)), p = f ? h : o.ticks.minor, v = x.valueOrDefault(p.callback, p.userCallback);return v ? v(g, e, n) : g; }, convertTicksToLabels: function convertTicksToLabels(t) { var e, n, i = [];for (e = 0, n = t.length; e < n; ++e) { i.push(this.tickFormatFunction(m(t[e].value), e, t)); }return i; }, getPixelForOffset: function getPixelForOffset(t) { var e = this, n = e._horizontal ? e.width : e.height, i = e._horizontal ? e.left : e.top, a = l(e._table, "time", t, "pos");return i + n * (e._offsets.left + a) / (e._offsets.left + 1 + e._offsets.right); }, getPixelForValue: function getPixelForValue(t, e, n) { var i = this, a = null;if (void 0 !== e && void 0 !== n && (a = i._timestamps.datasets[n][e]), null === a && (a = u(t, i)), null !== a) return i.getPixelForOffset(a); }, getPixelForTick: function getPixelForTick(t) { var e = this.getTicks();return t >= 0 && t < e.length ? this.getPixelForOffset(e[t].value) : null; }, getValueForPixel: function getValueForPixel(t) { var e = this, n = e._horizontal ? e.width : e.height, i = e._horizontal ? e.left : e.top, a = (n ? (t - i) / n : 0) * (e._offsets.left + 1 + e._offsets.left) - e._offsets.right, o = l(e._table, "pos", a, "time");return m(o); }, getLabelWidth: function getLabelWidth(t) { var e = this, n = e.options.ticks, i = e.ctx.measureText(t).width, a = x.toRadians(n.maxRotation), o = Math.cos(a), r = Math.sin(a);return i * o + x.valueOrDefault(n.fontSize, b.global.defaultFontSize) * r; }, getLabelCapacity: function getLabelCapacity(t) { var e = this, n = e.options.time.displayFormats.millisecond, i = e.tickFormatFunction(m(t), 0, [], n), a = e.getLabelWidth(i), o = e.isHorizontal() ? e.width : e.height;return Math.floor(o / a); } });t.scaleService.registerScaleType("time", e, { position: "bottom", distribution: "linear", bounds: "data", time: { parser: !1, format: !1, unit: !1, round: !1, displayFormat: !1, isoWeekday: !1, minUnit: "millisecond", displayFormats: { millisecond: "h:mm:ss.SSS a", second: "h:mm:ss a", minute: "h:mm a", hour: "hA", day: "MMM D", week: "ll", month: "MMM YYYY", quarter: "[Q]Q - YYYY", year: "YYYY" } }, ticks: { autoSkip: !1, source: "auto", major: { enabled: !1 } } }); }; }, { 1: 1, 25: 25, 45: 45 }] }, {}, [7])(7); }); /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { var require;var require;var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* perfect-scrollbar v0.6.13 */ !function t(e, n, r) { function o(i, s) { if (!n[i]) { if (!e[i]) { var a = "function" == typeof require && require;if (!s && a) return require(i, !0);if (l) return l(i, !0);var c = new Error("Cannot find module '" + i + "'");throw c.code = "MODULE_NOT_FOUND", c; }var u = n[i] = { exports: {} };e[i][0].call(u.exports, function (t) { var n = e[i][1][t];return o(n ? n : t); }, u, u.exports, t, e, n, r); }return n[i].exports; }for (var l = "function" == typeof require && require, i = 0; i < r.length; i++) { o(r[i]); }return o; }({ 1: [function (t, e, n) { "use strict"; function r(t) { t.fn.perfectScrollbar = function (t) { return this.each(function () { if ("object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) || "undefined" == typeof t) { var e = t;l.get(this) || o.initialize(this, e); } else { var n = t;"update" === n ? o.update(this) : "destroy" === n && o.destroy(this); } }); }; }var o = t("../main"), l = t("../plugin/instances");if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (r), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else { var i = window.jQuery ? window.jQuery : window.$;"undefined" != typeof i && r(i); }e.exports = r; }, { "../main": 7, "../plugin/instances": 18 }], 2: [function (t, e, n) { "use strict"; function r(t, e) { var n = t.className.split(" ");n.indexOf(e) < 0 && n.push(e), t.className = n.join(" "); }function o(t, e) { var n = t.className.split(" "), r = n.indexOf(e);r >= 0 && n.splice(r, 1), t.className = n.join(" "); }n.add = function (t, e) { t.classList ? t.classList.add(e) : r(t, e); }, n.remove = function (t, e) { t.classList ? t.classList.remove(e) : o(t, e); }, n.list = function (t) { return t.classList ? Array.prototype.slice.apply(t.classList) : t.className.split(" "); }; }, {}], 3: [function (t, e, n) { "use strict"; function r(t, e) { return window.getComputedStyle(t)[e]; }function o(t, e, n) { return "number" == typeof n && (n = n.toString() + "px"), t.style[e] = n, t; }function l(t, e) { for (var n in e) { var r = e[n];"number" == typeof r && (r = r.toString() + "px"), t.style[n] = r; }return t; }var i = {};i.e = function (t, e) { var n = document.createElement(t);return n.className = e, n; }, i.appendTo = function (t, e) { return e.appendChild(t), t; }, i.css = function (t, e, n) { return "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) ? l(t, e) : "undefined" == typeof n ? r(t, e) : o(t, e, n); }, i.matches = function (t, e) { return "undefined" != typeof t.matches ? t.matches(e) : "undefined" != typeof t.matchesSelector ? t.matchesSelector(e) : "undefined" != typeof t.webkitMatchesSelector ? t.webkitMatchesSelector(e) : "undefined" != typeof t.mozMatchesSelector ? t.mozMatchesSelector(e) : "undefined" != typeof t.msMatchesSelector ? t.msMatchesSelector(e) : void 0; }, i.remove = function (t) { "undefined" != typeof t.remove ? t.remove() : t.parentNode && t.parentNode.removeChild(t); }, i.queryChildren = function (t, e) { return Array.prototype.filter.call(t.childNodes, function (t) { return i.matches(t, e); }); }, e.exports = i; }, {}], 4: [function (t, e, n) { "use strict"; var r = function r(t) { this.element = t, this.events = {}; };r.prototype.bind = function (t, e) { "undefined" == typeof this.events[t] && (this.events[t] = []), this.events[t].push(e), this.element.addEventListener(t, e, !1); }, r.prototype.unbind = function (t, e) { var n = "undefined" != typeof e;this.events[t] = this.events[t].filter(function (r) { return !(!n || r === e) || (this.element.removeEventListener(t, r, !1), !1); }, this); }, r.prototype.unbindAll = function () { for (var t in this.events) { this.unbind(t); } };var o = function o() { this.eventElements = []; };o.prototype.eventElement = function (t) { var e = this.eventElements.filter(function (e) { return e.element === t; })[0];return "undefined" == typeof e && (e = new r(t), this.eventElements.push(e)), e; }, o.prototype.bind = function (t, e, n) { this.eventElement(t).bind(e, n); }, o.prototype.unbind = function (t, e, n) { this.eventElement(t).unbind(e, n); }, o.prototype.unbindAll = function () { for (var t = 0; t < this.eventElements.length; t++) { this.eventElements[t].unbindAll(); } }, o.prototype.once = function (t, e, n) { var r = this.eventElement(t), o = function o(t) { r.unbind(e, o), n(t); };r.bind(e, o); }, e.exports = o; }, {}], 5: [function (t, e, n) { "use strict"; e.exports = function () { function t() { return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1); }return function () { return t() + t() + "-" + t() + "-" + t() + "-" + t() + "-" + t() + t() + t(); }; }(); }, {}], 6: [function (t, e, n) { "use strict"; var r = t("./class"), o = t("./dom"), l = n.toInt = function (t) { return parseInt(t, 10) || 0; }, i = n.clone = function (t) { if (t) { if (t.constructor === Array) return t.map(i);if ("object" == (typeof t === "undefined" ? "undefined" : _typeof(t))) { var e = {};for (var n in t) { e[n] = i(t[n]); }return e; }return t; }return null; };n.extend = function (t, e) { var n = i(t);for (var r in e) { n[r] = i(e[r]); }return n; }, n.isEditable = function (t) { return o.matches(t, "input,[contenteditable]") || o.matches(t, "select,[contenteditable]") || o.matches(t, "textarea,[contenteditable]") || o.matches(t, "button,[contenteditable]"); }, n.removePsClasses = function (t) { for (var e = r.list(t), n = 0; n < e.length; n++) { var o = e[n];0 === o.indexOf("ps-") && r.remove(t, o); } }, n.outerWidth = function (t) { return l(o.css(t, "width")) + l(o.css(t, "paddingLeft")) + l(o.css(t, "paddingRight")) + l(o.css(t, "borderLeftWidth")) + l(o.css(t, "borderRightWidth")); }, n.startScrolling = function (t, e) { r.add(t, "ps-in-scrolling"), "undefined" != typeof e ? r.add(t, "ps-" + e) : (r.add(t, "ps-x"), r.add(t, "ps-y")); }, n.stopScrolling = function (t, e) { r.remove(t, "ps-in-scrolling"), "undefined" != typeof e ? r.remove(t, "ps-" + e) : (r.remove(t, "ps-x"), r.remove(t, "ps-y")); }, n.env = { isWebKit: "WebkitAppearance" in document.documentElement.style, supportsTouch: "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch, supportsIePointer: null !== window.navigator.msMaxTouchPoints }; }, { "./class": 2, "./dom": 3 }], 7: [function (t, e, n) { "use strict"; var r = t("./plugin/destroy"), o = t("./plugin/initialize"), l = t("./plugin/update");e.exports = { initialize: o, update: l, destroy: r }; }, { "./plugin/destroy": 9, "./plugin/initialize": 17, "./plugin/update": 21 }], 8: [function (t, e, n) { "use strict"; e.exports = { handlers: ["click-rail", "drag-scrollbar", "keyboard", "wheel", "touch"], maxScrollbarLength: null, minScrollbarLength: null, scrollXMarginOffset: 0, scrollYMarginOffset: 0, suppressScrollX: !1, suppressScrollY: !1, swipePropagation: !0, useBothWheelAxes: !1, wheelPropagation: !1, wheelSpeed: 1, theme: "default" }; }, {}], 9: [function (t, e, n) { "use strict"; var r = t("../lib/helper"), o = t("../lib/dom"), l = t("./instances");e.exports = function (t) { var e = l.get(t);e && (e.event.unbindAll(), o.remove(e.scrollbarX), o.remove(e.scrollbarY), o.remove(e.scrollbarXRail), o.remove(e.scrollbarYRail), r.removePsClasses(t), l.remove(t)); }; }, { "../lib/dom": 3, "../lib/helper": 6, "./instances": 18 }], 10: [function (t, e, n) { "use strict"; function r(t, e) { function n(t) { return t.getBoundingClientRect(); }var r = function r(t) { t.stopPropagation(); };e.event.bind(e.scrollbarY, "click", r), e.event.bind(e.scrollbarYRail, "click", function (r) { var o = r.pageY - window.pageYOffset - n(e.scrollbarYRail).top, s = o > e.scrollbarYTop ? 1 : -1;i(t, "top", t.scrollTop + s * e.containerHeight), l(t), r.stopPropagation(); }), e.event.bind(e.scrollbarX, "click", r), e.event.bind(e.scrollbarXRail, "click", function (r) { var o = r.pageX - window.pageXOffset - n(e.scrollbarXRail).left, s = o > e.scrollbarXLeft ? 1 : -1;i(t, "left", t.scrollLeft + s * e.containerWidth), l(t), r.stopPropagation(); }); }var o = t("../instances"), l = t("../update-geometry"), i = t("../update-scroll");e.exports = function (t) { var e = o.get(t);r(t, e); }; }, { "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 11: [function (t, e, n) { "use strict"; function r(t, e) { function n(n) { var o = r + n * e.railXRatio, i = Math.max(0, e.scrollbarXRail.getBoundingClientRect().left) + e.railXRatio * (e.railXWidth - e.scrollbarXWidth);o < 0 ? e.scrollbarXLeft = 0 : o > i ? e.scrollbarXLeft = i : e.scrollbarXLeft = o;var s = l.toInt(e.scrollbarXLeft * (e.contentWidth - e.containerWidth) / (e.containerWidth - e.railXRatio * e.scrollbarXWidth)) - e.negativeScrollAdjustment;c(t, "left", s); }var r = null, o = null, s = function s(e) { n(e.pageX - o), a(t), e.stopPropagation(), e.preventDefault(); }, u = function u() { l.stopScrolling(t, "x"), e.event.unbind(e.ownerDocument, "mousemove", s); };e.event.bind(e.scrollbarX, "mousedown", function (n) { o = n.pageX, r = l.toInt(i.css(e.scrollbarX, "left")) * e.railXRatio, l.startScrolling(t, "x"), e.event.bind(e.ownerDocument, "mousemove", s), e.event.once(e.ownerDocument, "mouseup", u), n.stopPropagation(), n.preventDefault(); }); }function o(t, e) { function n(n) { var o = r + n * e.railYRatio, i = Math.max(0, e.scrollbarYRail.getBoundingClientRect().top) + e.railYRatio * (e.railYHeight - e.scrollbarYHeight);o < 0 ? e.scrollbarYTop = 0 : o > i ? e.scrollbarYTop = i : e.scrollbarYTop = o;var s = l.toInt(e.scrollbarYTop * (e.contentHeight - e.containerHeight) / (e.containerHeight - e.railYRatio * e.scrollbarYHeight));c(t, "top", s); }var r = null, o = null, s = function s(e) { n(e.pageY - o), a(t), e.stopPropagation(), e.preventDefault(); }, u = function u() { l.stopScrolling(t, "y"), e.event.unbind(e.ownerDocument, "mousemove", s); };e.event.bind(e.scrollbarY, "mousedown", function (n) { o = n.pageY, r = l.toInt(i.css(e.scrollbarY, "top")) * e.railYRatio, l.startScrolling(t, "y"), e.event.bind(e.ownerDocument, "mousemove", s), e.event.once(e.ownerDocument, "mouseup", u), n.stopPropagation(), n.preventDefault(); }); }var l = t("../../lib/helper"), i = t("../../lib/dom"), s = t("../instances"), a = t("../update-geometry"), c = t("../update-scroll");e.exports = function (t) { var e = s.get(t);r(t, e), o(t, e); }; }, { "../../lib/dom": 3, "../../lib/helper": 6, "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 12: [function (t, e, n) { "use strict"; function r(t, e) { function n(n, r) { var o = t.scrollTop;if (0 === n) { if (!e.scrollbarYActive) return !1;if (0 === o && r > 0 || o >= e.contentHeight - e.containerHeight && r < 0) return !e.settings.wheelPropagation; }var l = t.scrollLeft;if (0 === r) { if (!e.scrollbarXActive) return !1;if (0 === l && n < 0 || l >= e.contentWidth - e.containerWidth && n > 0) return !e.settings.wheelPropagation; }return !0; }var r = !1;e.event.bind(t, "mouseenter", function () { r = !0; }), e.event.bind(t, "mouseleave", function () { r = !1; });var i = !1;e.event.bind(e.ownerDocument, "keydown", function (c) { if (!(c.isDefaultPrevented && c.isDefaultPrevented() || c.defaultPrevented)) { var u = l.matches(e.scrollbarX, ":focus") || l.matches(e.scrollbarY, ":focus");if (r || u) { var d = document.activeElement ? document.activeElement : e.ownerDocument.activeElement;if (d) { if ("IFRAME" === d.tagName) d = d.contentDocument.activeElement;else for (; d.shadowRoot;) { d = d.shadowRoot.activeElement; }if (o.isEditable(d)) return; }var p = 0, f = 0;switch (c.which) {case 37: p = c.metaKey ? -e.contentWidth : c.altKey ? -e.containerWidth : -30;break;case 38: f = c.metaKey ? e.contentHeight : c.altKey ? e.containerHeight : 30;break;case 39: p = c.metaKey ? e.contentWidth : c.altKey ? e.containerWidth : 30;break;case 40: f = c.metaKey ? -e.contentHeight : c.altKey ? -e.containerHeight : -30;break;case 33: f = 90;break;case 32: f = c.shiftKey ? 90 : -90;break;case 34: f = -90;break;case 35: f = c.ctrlKey ? -e.contentHeight : -e.containerHeight;break;case 36: f = c.ctrlKey ? t.scrollTop : e.containerHeight;break;default: return;}a(t, "top", t.scrollTop - f), a(t, "left", t.scrollLeft + p), s(t), i = n(p, f), i && c.preventDefault(); } } }); }var o = t("../../lib/helper"), l = t("../../lib/dom"), i = t("../instances"), s = t("../update-geometry"), a = t("../update-scroll");e.exports = function (t) { var e = i.get(t);r(t, e); }; }, { "../../lib/dom": 3, "../../lib/helper": 6, "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 13: [function (t, e, n) { "use strict"; function r(t, e) { function n(n, r) { var o = t.scrollTop;if (0 === n) { if (!e.scrollbarYActive) return !1;if (0 === o && r > 0 || o >= e.contentHeight - e.containerHeight && r < 0) return !e.settings.wheelPropagation; }var l = t.scrollLeft;if (0 === r) { if (!e.scrollbarXActive) return !1;if (0 === l && n < 0 || l >= e.contentWidth - e.containerWidth && n > 0) return !e.settings.wheelPropagation; }return !0; }function r(t) { var e = t.deltaX, n = -1 * t.deltaY;return "undefined" != typeof e && "undefined" != typeof n || (e = -1 * t.wheelDeltaX / 6, n = t.wheelDeltaY / 6), t.deltaMode && 1 === t.deltaMode && (e *= 10, n *= 10), e !== e && n !== n && (e = 0, n = t.wheelDelta), t.shiftKey ? [-n, -e] : [e, n]; }function o(e, n) { var r = t.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if (r) { if (!window.getComputedStyle(r).overflow.match(/(scroll|auto)/)) return !1;var o = r.scrollHeight - r.clientHeight;if (o > 0 && !(0 === r.scrollTop && n > 0 || r.scrollTop === o && n < 0)) return !0;var l = r.scrollLeft - r.clientWidth;if (l > 0 && !(0 === r.scrollLeft && e < 0 || r.scrollLeft === l && e > 0)) return !0; }return !1; }function s(s) { var c = r(s), u = c[0], d = c[1];o(u, d) || (a = !1, e.settings.useBothWheelAxes ? e.scrollbarYActive && !e.scrollbarXActive ? (d ? i(t, "top", t.scrollTop - d * e.settings.wheelSpeed) : i(t, "top", t.scrollTop + u * e.settings.wheelSpeed), a = !0) : e.scrollbarXActive && !e.scrollbarYActive && (u ? i(t, "left", t.scrollLeft + u * e.settings.wheelSpeed) : i(t, "left", t.scrollLeft - d * e.settings.wheelSpeed), a = !0) : (i(t, "top", t.scrollTop - d * e.settings.wheelSpeed), i(t, "left", t.scrollLeft + u * e.settings.wheelSpeed)), l(t), a = a || n(u, d), a && (s.stopPropagation(), s.preventDefault())); }var a = !1;"undefined" != typeof window.onwheel ? e.event.bind(t, "wheel", s) : "undefined" != typeof window.onmousewheel && e.event.bind(t, "mousewheel", s); }var o = t("../instances"), l = t("../update-geometry"), i = t("../update-scroll");e.exports = function (t) { var e = o.get(t);r(t, e); }; }, { "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 14: [function (t, e, n) { "use strict"; function r(t, e) { e.event.bind(t, "scroll", function () { l(t); }); }var o = t("../instances"), l = t("../update-geometry");e.exports = function (t) { var e = o.get(t);r(t, e); }; }, { "../instances": 18, "../update-geometry": 19 }], 15: [function (t, e, n) { "use strict"; function r(t, e) { function n() { var t = window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : "";return 0 === t.toString().length ? null : t.getRangeAt(0).commonAncestorContainer; }function r() { c || (c = setInterval(function () { return l.get(t) ? (s(t, "top", t.scrollTop + u.top), s(t, "left", t.scrollLeft + u.left), void i(t)) : void clearInterval(c); }, 50)); }function a() { c && (clearInterval(c), c = null), o.stopScrolling(t); }var c = null, u = { top: 0, left: 0 }, d = !1;e.event.bind(e.ownerDocument, "selectionchange", function () { t.contains(n()) ? d = !0 : (d = !1, a()); }), e.event.bind(window, "mouseup", function () { d && (d = !1, a()); }), e.event.bind(window, "keyup", function () { d && (d = !1, a()); }), e.event.bind(window, "mousemove", function (e) { if (d) { var n = { x: e.pageX, y: e.pageY }, l = { left: t.offsetLeft, right: t.offsetLeft + t.offsetWidth, top: t.offsetTop, bottom: t.offsetTop + t.offsetHeight };n.x < l.left + 3 ? (u.left = -5, o.startScrolling(t, "x")) : n.x > l.right - 3 ? (u.left = 5, o.startScrolling(t, "x")) : u.left = 0, n.y < l.top + 3 ? (l.top + 3 - n.y < 5 ? u.top = -5 : u.top = -20, o.startScrolling(t, "y")) : n.y > l.bottom - 3 ? (n.y - l.bottom + 3 < 5 ? u.top = 5 : u.top = 20, o.startScrolling(t, "y")) : u.top = 0, 0 === u.top && 0 === u.left ? a() : r(); } }); }var o = t("../../lib/helper"), l = t("../instances"), i = t("../update-geometry"), s = t("../update-scroll");e.exports = function (t) { var e = l.get(t);r(t, e); }; }, { "../../lib/helper": 6, "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 16: [function (t, e, n) { "use strict"; function r(t, e, n, r) { function o(n, r) { var o = t.scrollTop, l = t.scrollLeft, i = Math.abs(n), s = Math.abs(r);if (s > i) { if (r < 0 && o === e.contentHeight - e.containerHeight || r > 0 && 0 === o) return !e.settings.swipePropagation; } else if (i > s && (n < 0 && l === e.contentWidth - e.containerWidth || n > 0 && 0 === l)) return !e.settings.swipePropagation;return !0; }function a(e, n) { s(t, "top", t.scrollTop - n), s(t, "left", t.scrollLeft - e), i(t); }function c() { w = !0; }function u() { w = !1; }function d(t) { return t.targetTouches ? t.targetTouches[0] : t; }function p(t) { return !(!t.targetTouches || 1 !== t.targetTouches.length) || !(!t.pointerType || "mouse" === t.pointerType || t.pointerType === t.MSPOINTER_TYPE_MOUSE); }function f(t) { if (p(t)) { Y = !0;var e = d(t);g.pageX = e.pageX, g.pageY = e.pageY, v = new Date().getTime(), null !== y && clearInterval(y), t.stopPropagation(); } }function h(t) { if (!Y && e.settings.swipePropagation && f(t), !w && Y && p(t)) { var n = d(t), r = { pageX: n.pageX, pageY: n.pageY }, l = r.pageX - g.pageX, i = r.pageY - g.pageY;a(l, i), g = r;var s = new Date().getTime(), c = s - v;c > 0 && (m.x = l / c, m.y = i / c, v = s), o(l, i) && (t.stopPropagation(), t.preventDefault()); } }function b() { !w && Y && (Y = !1, clearInterval(y), y = setInterval(function () { return l.get(t) && (m.x || m.y) ? Math.abs(m.x) < .01 && Math.abs(m.y) < .01 ? void clearInterval(y) : (a(30 * m.x, 30 * m.y), m.x *= .8, void (m.y *= .8)) : void clearInterval(y); }, 10)); }var g = {}, v = 0, m = {}, y = null, w = !1, Y = !1;n && (e.event.bind(window, "touchstart", c), e.event.bind(window, "touchend", u), e.event.bind(t, "touchstart", f), e.event.bind(t, "touchmove", h), e.event.bind(t, "touchend", b)), r && (window.PointerEvent ? (e.event.bind(window, "pointerdown", c), e.event.bind(window, "pointerup", u), e.event.bind(t, "pointerdown", f), e.event.bind(t, "pointermove", h), e.event.bind(t, "pointerup", b)) : window.MSPointerEvent && (e.event.bind(window, "MSPointerDown", c), e.event.bind(window, "MSPointerUp", u), e.event.bind(t, "MSPointerDown", f), e.event.bind(t, "MSPointerMove", h), e.event.bind(t, "MSPointerUp", b))); }var o = t("../../lib/helper"), l = t("../instances"), i = t("../update-geometry"), s = t("../update-scroll");e.exports = function (t) { if (o.env.supportsTouch || o.env.supportsIePointer) { var e = l.get(t);r(t, e, o.env.supportsTouch, o.env.supportsIePointer); } }; }, { "../../lib/helper": 6, "../instances": 18, "../update-geometry": 19, "../update-scroll": 20 }], 17: [function (t, e, n) { "use strict"; var r = t("../lib/helper"), o = t("../lib/class"), l = t("./instances"), i = t("./update-geometry"), s = { "click-rail": t("./handler/click-rail"), "drag-scrollbar": t("./handler/drag-scrollbar"), keyboard: t("./handler/keyboard"), wheel: t("./handler/mouse-wheel"), touch: t("./handler/touch"), selection: t("./handler/selection") }, a = t("./handler/native-scroll");e.exports = function (t, e) { e = "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) ? e : {}, o.add(t, "ps-container");var n = l.add(t);n.settings = r.extend(n.settings, e), o.add(t, "ps-theme-" + n.settings.theme), n.settings.handlers.forEach(function (e) { s[e](t); }), a(t), i(t); }; }, { "../lib/class": 2, "../lib/helper": 6, "./handler/click-rail": 10, "./handler/drag-scrollbar": 11, "./handler/keyboard": 12, "./handler/mouse-wheel": 13, "./handler/native-scroll": 14, "./handler/selection": 15, "./handler/touch": 16, "./instances": 18, "./update-geometry": 19 }], 18: [function (t, e, n) { "use strict"; function r(t) { function e() { a.add(t, "ps-focus"); }function n() { a.remove(t, "ps-focus"); }var r = this;r.settings = s.clone(c), r.containerWidth = null, r.containerHeight = null, r.contentWidth = null, r.contentHeight = null, r.isRtl = "rtl" === u.css(t, "direction"), r.isNegativeScroll = function () { var e = t.scrollLeft, n = null;return t.scrollLeft = -1, n = t.scrollLeft < 0, t.scrollLeft = e, n; }(), r.negativeScrollAdjustment = r.isNegativeScroll ? t.scrollWidth - t.clientWidth : 0, r.event = new d(), r.ownerDocument = t.ownerDocument || document, r.scrollbarXRail = u.appendTo(u.e("div", "ps-scrollbar-x-rail"), t), r.scrollbarX = u.appendTo(u.e("div", "ps-scrollbar-x"), r.scrollbarXRail), r.scrollbarX.setAttribute("tabindex", 0), r.event.bind(r.scrollbarX, "focus", e), r.event.bind(r.scrollbarX, "blur", n), r.scrollbarXActive = null, r.scrollbarXWidth = null, r.scrollbarXLeft = null, r.scrollbarXBottom = s.toInt(u.css(r.scrollbarXRail, "bottom")), r.isScrollbarXUsingBottom = r.scrollbarXBottom === r.scrollbarXBottom, r.scrollbarXTop = r.isScrollbarXUsingBottom ? null : s.toInt(u.css(r.scrollbarXRail, "top")), r.railBorderXWidth = s.toInt(u.css(r.scrollbarXRail, "borderLeftWidth")) + s.toInt(u.css(r.scrollbarXRail, "borderRightWidth")), u.css(r.scrollbarXRail, "display", "block"), r.railXMarginWidth = s.toInt(u.css(r.scrollbarXRail, "marginLeft")) + s.toInt(u.css(r.scrollbarXRail, "marginRight")), u.css(r.scrollbarXRail, "display", ""), r.railXWidth = null, r.railXRatio = null, r.scrollbarYRail = u.appendTo(u.e("div", "ps-scrollbar-y-rail"), t), r.scrollbarY = u.appendTo(u.e("div", "ps-scrollbar-y"), r.scrollbarYRail), r.scrollbarY.setAttribute("tabindex", 0), r.event.bind(r.scrollbarY, "focus", e), r.event.bind(r.scrollbarY, "blur", n), r.scrollbarYActive = null, r.scrollbarYHeight = null, r.scrollbarYTop = null, r.scrollbarYRight = s.toInt(u.css(r.scrollbarYRail, "right")), r.isScrollbarYUsingRight = r.scrollbarYRight === r.scrollbarYRight, r.scrollbarYLeft = r.isScrollbarYUsingRight ? null : s.toInt(u.css(r.scrollbarYRail, "left")), r.scrollbarYOuterWidth = r.isRtl ? s.outerWidth(r.scrollbarY) : null, r.railBorderYWidth = s.toInt(u.css(r.scrollbarYRail, "borderTopWidth")) + s.toInt(u.css(r.scrollbarYRail, "borderBottomWidth")), u.css(r.scrollbarYRail, "display", "block"), r.railYMarginHeight = s.toInt(u.css(r.scrollbarYRail, "marginTop")) + s.toInt(u.css(r.scrollbarYRail, "marginBottom")), u.css(r.scrollbarYRail, "display", ""), r.railYHeight = null, r.railYRatio = null; }function o(t) { return t.getAttribute("data-ps-id"); }function l(t, e) { t.setAttribute("data-ps-id", e); }function i(t) { t.removeAttribute("data-ps-id"); }var s = t("../lib/helper"), a = t("../lib/class"), c = t("./default-setting"), u = t("../lib/dom"), d = t("../lib/event-manager"), p = t("../lib/guid"), f = {};n.add = function (t) { var e = p();return l(t, e), f[e] = new r(t), f[e]; }, n.remove = function (t) { delete f[o(t)], i(t); }, n.get = function (t) { return f[o(t)]; }; }, { "../lib/class": 2, "../lib/dom": 3, "../lib/event-manager": 4, "../lib/guid": 5, "../lib/helper": 6, "./default-setting": 8 }], 19: [function (t, e, n) { "use strict"; function r(t, e) { return t.settings.minScrollbarLength && (e = Math.max(e, t.settings.minScrollbarLength)), t.settings.maxScrollbarLength && (e = Math.min(e, t.settings.maxScrollbarLength)), e; }function o(t, e) { var n = { width: e.railXWidth };e.isRtl ? n.left = e.negativeScrollAdjustment + t.scrollLeft + e.containerWidth - e.contentWidth : n.left = t.scrollLeft, e.isScrollbarXUsingBottom ? n.bottom = e.scrollbarXBottom - t.scrollTop : n.top = e.scrollbarXTop + t.scrollTop, s.css(e.scrollbarXRail, n);var r = { top: t.scrollTop, height: e.railYHeight };e.isScrollbarYUsingRight ? e.isRtl ? r.right = e.contentWidth - (e.negativeScrollAdjustment + t.scrollLeft) - e.scrollbarYRight - e.scrollbarYOuterWidth : r.right = e.scrollbarYRight - t.scrollLeft : e.isRtl ? r.left = e.negativeScrollAdjustment + t.scrollLeft + 2 * e.containerWidth - e.contentWidth - e.scrollbarYLeft - e.scrollbarYOuterWidth : r.left = e.scrollbarYLeft + t.scrollLeft, s.css(e.scrollbarYRail, r), s.css(e.scrollbarX, { left: e.scrollbarXLeft, width: e.scrollbarXWidth - e.railBorderXWidth }), s.css(e.scrollbarY, { top: e.scrollbarYTop, height: e.scrollbarYHeight - e.railBorderYWidth }); }var l = t("../lib/helper"), i = t("../lib/class"), s = t("../lib/dom"), a = t("./instances"), c = t("./update-scroll");e.exports = function (t) { var e = a.get(t);e.containerWidth = t.clientWidth, e.containerHeight = t.clientHeight, e.contentWidth = t.scrollWidth, e.contentHeight = t.scrollHeight;var n;t.contains(e.scrollbarXRail) || (n = s.queryChildren(t, ".ps-scrollbar-x-rail"), n.length > 0 && n.forEach(function (t) { s.remove(t); }), s.appendTo(e.scrollbarXRail, t)), t.contains(e.scrollbarYRail) || (n = s.queryChildren(t, ".ps-scrollbar-y-rail"), n.length > 0 && n.forEach(function (t) { s.remove(t); }), s.appendTo(e.scrollbarYRail, t)), !e.settings.suppressScrollX && e.containerWidth + e.settings.scrollXMarginOffset < e.contentWidth ? (e.scrollbarXActive = !0, e.railXWidth = e.containerWidth - e.railXMarginWidth, e.railXRatio = e.containerWidth / e.railXWidth, e.scrollbarXWidth = r(e, l.toInt(e.railXWidth * e.containerWidth / e.contentWidth)), e.scrollbarXLeft = l.toInt((e.negativeScrollAdjustment + t.scrollLeft) * (e.railXWidth - e.scrollbarXWidth) / (e.contentWidth - e.containerWidth))) : e.scrollbarXActive = !1, !e.settings.suppressScrollY && e.containerHeight + e.settings.scrollYMarginOffset < e.contentHeight ? (e.scrollbarYActive = !0, e.railYHeight = e.containerHeight - e.railYMarginHeight, e.railYRatio = e.containerHeight / e.railYHeight, e.scrollbarYHeight = r(e, l.toInt(e.railYHeight * e.containerHeight / e.contentHeight)), e.scrollbarYTop = l.toInt(t.scrollTop * (e.railYHeight - e.scrollbarYHeight) / (e.contentHeight - e.containerHeight))) : e.scrollbarYActive = !1, e.scrollbarXLeft >= e.railXWidth - e.scrollbarXWidth && (e.scrollbarXLeft = e.railXWidth - e.scrollbarXWidth), e.scrollbarYTop >= e.railYHeight - e.scrollbarYHeight && (e.scrollbarYTop = e.railYHeight - e.scrollbarYHeight), o(t, e), e.scrollbarXActive ? i.add(t, "ps-active-x") : (i.remove(t, "ps-active-x"), e.scrollbarXWidth = 0, e.scrollbarXLeft = 0, c(t, "left", 0)), e.scrollbarYActive ? i.add(t, "ps-active-y") : (i.remove(t, "ps-active-y"), e.scrollbarYHeight = 0, e.scrollbarYTop = 0, c(t, "top", 0)); }; }, { "../lib/class": 2, "../lib/dom": 3, "../lib/helper": 6, "./instances": 18, "./update-scroll": 20 }], 20: [function (t, e, n) { "use strict"; var r, o, l = t("./instances"), i = function i(t) { var e = document.createEvent("Event");return e.initEvent(t, !0, !0), e; };e.exports = function (t, e, n) { if ("undefined" == typeof t) throw "You must provide an element to the update-scroll function";if ("undefined" == typeof e) throw "You must provide an axis to the update-scroll function";if ("undefined" == typeof n) throw "You must provide a value to the update-scroll function";"top" === e && n <= 0 && (t.scrollTop = n = 0, t.dispatchEvent(i("ps-y-reach-start"))), "left" === e && n <= 0 && (t.scrollLeft = n = 0, t.dispatchEvent(i("ps-x-reach-start")));var s = l.get(t);"top" === e && n >= s.contentHeight - s.containerHeight && (n = s.contentHeight - s.containerHeight, n - t.scrollTop <= 1 ? n = t.scrollTop : t.scrollTop = n, t.dispatchEvent(i("ps-y-reach-end"))), "left" === e && n >= s.contentWidth - s.containerWidth && (n = s.contentWidth - s.containerWidth, n - t.scrollLeft <= 1 ? n = t.scrollLeft : t.scrollLeft = n, t.dispatchEvent(i("ps-x-reach-end"))), r || (r = t.scrollTop), o || (o = t.scrollLeft), "top" === e && n < r && t.dispatchEvent(i("ps-scroll-up")), "top" === e && n > r && t.dispatchEvent(i("ps-scroll-down")), "left" === e && n < o && t.dispatchEvent(i("ps-scroll-left")), "left" === e && n > o && t.dispatchEvent(i("ps-scroll-right")), "top" === e && (t.scrollTop = r = n, t.dispatchEvent(i("ps-scroll-y"))), "left" === e && (t.scrollLeft = o = n, t.dispatchEvent(i("ps-scroll-x"))); }; }, { "./instances": 18 }], 21: [function (t, e, n) { "use strict"; var r = t("../lib/helper"), o = t("../lib/dom"), l = t("./instances"), i = t("./update-geometry"), s = t("./update-scroll");e.exports = function (t) { var e = l.get(t);e && (e.negativeScrollAdjustment = e.isNegativeScroll ? t.scrollWidth - t.clientWidth : 0, o.css(e.scrollbarXRail, "display", "block"), o.css(e.scrollbarYRail, "display", "block"), e.railXMarginWidth = r.toInt(o.css(e.scrollbarXRail, "marginLeft")) + r.toInt(o.css(e.scrollbarXRail, "marginRight")), e.railYMarginHeight = r.toInt(o.css(e.scrollbarYRail, "marginTop")) + r.toInt(o.css(e.scrollbarYRail, "marginBottom")), o.css(e.scrollbarXRail, "display", "none"), o.css(e.scrollbarYRail, "display", "none"), i(t), s(t, "top", t.scrollTop), s(t, "left", t.scrollLeft), o.css(e.scrollbarXRail, "display", ""), o.css(e.scrollbarYRail, "display", "")); }; }, { "../lib/dom": 3, "../lib/helper": 6, "./instances": 18, "./update-geometry": 19, "./update-scroll": 20 }] }, {}, [1]); /***/ }), /* 13 */ /***/ (function(module, exports) { /*! ========================================================= * Paper Dashboard 2 - v2.0.0 ========================================================= * Product Page: https://www.creative-tim.com/product/paper-dashboard-2 * Copyright 2018 Creative Tim (http://www.creative-tim.com) * Designed by www.invisionapp.com Coded by www.creative-tim.com ========================================================= * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ (function () { isWindows = navigator.platform.indexOf('Win') > -1 ? true : false; if (isWindows) { // if we are on windows OS we activate the perfectScrollbar function $('.sidebar .sidebar-wrapper, .main-panel').perfectScrollbar(); $('html').addClass('perfect-scrollbar-on'); } else { $('html').addClass('perfect-scrollbar-off'); } })(); transparent = true; transparentDemo = true; fixedTop = false; navbar_initialized = false; backgroundOrange = false; sidebar_mini_active = false; toggle_initialized = false; seq = 0, delays = 80, durations = 500; seq2 = 0, delays2 = 80, durations2 = 500; $(document).ready(function () { if ($('.full-screen-map').length == 0 && $('.bd-docs').length == 0) { // On click navbar-collapse the menu will be white not transparent $('.collapse').on('show.bs.collapse', function () { $(this).closest('.navbar').removeClass('navbar-transparent').addClass('bg-white'); }).on('hide.bs.collapse', function () { $(this).closest('.navbar').addClass('navbar-transparent').removeClass('bg-white'); }); } paperDashboard.initMinimizeSidebar(); $navbar = $('.navbar[color-on-scroll]'); scroll_distance = $navbar.attr('color-on-scroll') || 500; // Check if we have the class "navbar-color-on-scroll" then add the function to remove the class "navbar-transparent" so it will transform to a plain color. if ($('.navbar[color-on-scroll]').length != 0) { paperDashboard.checkScrollForTransparentNavbar(); $(window).on('scroll', paperDashboard.checkScrollForTransparentNavbar); } $('.form-control').on("focus", function () { $(this).parent('.input-group').addClass("input-group-focus"); }).on("blur", function () { $(this).parent(".input-group").removeClass("input-group-focus"); }); // Activate bootstrapSwitch $('.bootstrap-switch').each(function () { $this = $(this); data_on_label = $this.data('on-label') || ''; data_off_label = $this.data('off-label') || ''; $this.bootstrapSwitch({ onText: data_on_label, offText: data_off_label }); }); }); $(document).on('click', '.navbar-toggle', function () { $toggle = $(this); if (paperDashboard.misc.navbar_menu_visible == 1) { $('html').removeClass('nav-open'); paperDashboard.misc.navbar_menu_visible = 0; setTimeout(function () { $toggle.removeClass('toggled'); $('#bodyClick').remove(); }, 550); } else { setTimeout(function () { $toggle.addClass('toggled'); }, 580); div = '<div id="bodyClick"></div>'; $(div).appendTo('body').click(function () { $('html').removeClass('nav-open'); paperDashboard.misc.navbar_menu_visible = 0; setTimeout(function () { $toggle.removeClass('toggled'); $('#bodyClick').remove(); }, 550); }); $('html').addClass('nav-open'); paperDashboard.misc.navbar_menu_visible = 1; } }); $(window).resize(function () { // reset the seq for charts drawing animations seq = seq2 = 0; if ($('.full-screen-map').length == 0 && $('.bd-docs').length == 0) { $navbar = $('.navbar'); isExpanded = $('.navbar').find('[data-toggle="collapse"]').attr("aria-expanded"); if ($navbar.hasClass('bg-white') && $(window).width() > 991) { $navbar.removeClass('bg-white').addClass('navbar-transparent'); } else if ($navbar.hasClass('navbar-transparent') && $(window).width() < 991 && isExpanded != "false") { $navbar.addClass('bg-white').removeClass('navbar-transparent'); } } }); paperDashboard = { misc: { navbar_menu_visible: 0 }, initMinimizeSidebar: function initMinimizeSidebar() { if ($('.sidebar-mini').length != 0) { sidebar_mini_active = true; } $('#minimizeSidebar').click(function () { var $btn = $(this); if (sidebar_mini_active == true) { $('body').addClass('sidebar-mini'); sidebar_mini_active = true; paperDashboard.showSidebarMessage('Sidebar mini activated...'); } else { $('body').removeClass('sidebar-mini'); sidebar_mini_active = false; paperDashboard.showSidebarMessage('Sidebar mini deactivated...'); } // we simulate the window Resize so the charts will get updated in realtime. var simulateWindowResize = setInterval(function () { window.dispatchEvent(new Event('resize')); }, 180); // we stop the simulation of Window Resize after the animations are completed setTimeout(function () { clearInterval(simulateWindowResize); }, 1000); }); }, showSidebarMessage: function showSidebarMessage(message) { try { $.notify({ icon: "now-ui-icons ui-1_bell-53", message: message }, { type: 'info', timer: 4000, placement: { from: 'top', align: 'right' } }); } catch (e) { console.log('Notify library is missing, please make sure you have the notifications library added.'); } } }; function hexToRGB(hex, alpha) { var r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16); if (alpha) { return "rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")"; } else { return "rgb(" + r + ", " + g + ", " + b + ")"; } } /***/ }), /* 14 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }) /******/ ]);
40.70053
4,009
0.558294
9de90e8715ec8eb78ba72ba8d1fd063ae5144db9
5,648
js
JavaScript
ObisoftAngularJs/wwwroot/_references.js
MMA2017/ObisoftAngularJs
ff08a226bb310ef282d5ec84f6aada7be81479d5
[ "Apache-2.0" ]
1
2017-04-23T08:26:52.000Z
2017-04-23T08:26:52.000Z
ObisoftAngularJs/wwwroot/_references.js
MMA2017/ObisoftAngularJs
ff08a226bb310ef282d5ec84f6aada7be81479d5
[ "Apache-2.0" ]
null
null
null
ObisoftAngularJs/wwwroot/_references.js
MMA2017/ObisoftAngularJs
ff08a226bb310ef282d5ec84f6aada7be81479d5
[ "Apache-2.0" ]
null
null
null
/// <autosync enabled="true" /> /// <reference path="../app.js" /> /// <reference path="../dist/scripts/app.js" /> /// <reference path="../dist/scripts/ui.js" /> /// <reference path="../Gruntfile.js" /> /// <reference path="lib/angular/angular.js" /> /// <reference path="lib/angular-animate/angular-animate.js" /> /// <reference path="lib/angular-bootstrap/ui-bootstrap-tpls.js" /> /// <reference path="lib/angular-cookies/angular-cookies.js" /> /// <reference path="lib/angular-datatables/dist/angular-datatables.js" /> /// <reference path="lib/angular-datatables/dist/plugins/bootstrap/angular-datatables.bootstrap.js" /> /// <reference path="lib/angular-datatables/dist/plugins/colreorder/angular-datatables.colreorder.js" /> /// <reference path="lib/angular-datatables/dist/plugins/columnfilter/angular-datatables.columnfilter.js" /> /// <reference path="lib/angular-datatables/dist/plugins/colvis/angular-datatables.colvis.js" /> /// <reference path="lib/angular-datatables/dist/plugins/fixedcolumns/angular-datatables.fixedcolumns.js" /> /// <reference path="lib/angular-datatables/dist/plugins/fixedheader/angular-datatables.fixedheader.js" /> /// <reference path="lib/angular-datatables/dist/plugins/scroller/angular-datatables.scroller.js" /> /// <reference path="lib/angular-datatables/dist/plugins/tabletools/angular-datatables.tabletools.js" /> /// <reference path="lib/angular-loading-bar/build/loading-bar.js" /> /// <reference path="lib/angular-resource/angular-resource.js" /> /// <reference path="lib/angular-route/angular-route.js" /> /// <reference path="lib/angular-sanitize/angular-sanitize.js" /> /// <reference path="lib/angular-slick/dist/slick.js" /> /// <reference path="lib/angular-touch/angular-touch.js" /> /// <reference path="lib/angular-ui-tree/dist/angular-ui-tree.js" /> /// <reference path="lib/angular-xeditable/dist/js/xeditable.js" /> /// <reference path="lib/bootstrap/dist/js/bootstrap.js" /> /// <reference path="lib/bootstrap-slider/bootstrap-slider.js" /> /// <reference path="lib/bower-jvectormap-2/jquery-jvectormap-2.0.0.min.js" /> /// <reference path="lib/datatables/media/js/jquery.dataTables.js" /> /// <reference path="lib/flot.tooltip/js/jquery.flot.tooltip.js" /> /// <reference path="lib/flot/jquery.flot.js" /> /// <reference path="lib/flot-spline/js/jquery.flot.spline.js" /> /// <reference path="lib/fullcalendar/dist/fullcalendar.js" /> /// <reference path="lib/gauge.js/dist/gauge.js" /> /// <reference path="lib/jquery.easy-pie-chart/dist/jquery.easypiechart.js" /> /// <reference path="lib/jquery.slimscroll/jquery.slimscroll.js" /> /// <reference path="lib/jquery.steps/build/jquery.steps.js" /> /// <reference path="lib/jquery/dist/jquery.js" /> /// <reference path="lib/jquery-ui/jquery-ui.js" /> /// <reference path="lib/lazy-model/lazyModel.js" /> /// <reference path="lib/mocha/mocha.js" /> /// <reference path="lib/moment/moment.js" /> /// <reference path="lib/morris.js/morris.js" /> /// <reference path="lib/ngmap/build/scripts/ng-map.js" /> /// <reference path="lib/ng-table/dist/ng-table.min.js" /> /// <reference path="lib/ng-tags-input/ng-tags-input.min.js" /> /// <reference path="lib/rangy-official/rangy-classapplier.js" /> /// <reference path="lib/rangy-official/rangy-core.js" /> /// <reference path="lib/rangy-official/rangy-highlighter.js" /> /// <reference path="lib/rangy-official/rangy-selectionsaverestore.js" /> /// <reference path="lib/rangy-official/rangy-serializer.js" /> /// <reference path="lib/rangy-official/rangy-textrange.js" /> /// <reference path="lib/raphael/raphael.js" /> /// <reference path="lib/requirejs/require.js" /> /// <reference path="lib/skycons/skycons.js" /> /// <reference path="lib/slick-carousel/slick/slick.min.js" /> /// <reference path="lib/textAngular/src/textAngular.js" /> /// <reference path="lib/textAngular/src/textAngular-sanitize.js" /> /// <reference path="lib/textAngular/src/textAngularSetup.js" /> /// <reference path="lib/ui-select/dist/select.js" /> /// <reference path="lib/waves/dist/waves.min.js" /> /// <reference path="scripts/animate/animate.js" /> /// <reference path="scripts/app.js" /> /// <reference path="scripts/calender/calender.js" /> /// <reference path="scripts/chart/chartctrl.js" /> /// <reference path="scripts/chart/chartdirective.js" /> /// <reference path="scripts/dashboard/notice.js" /> /// <reference path="scripts/dashboard/team.js" /> /// <reference path="scripts/form/formctrl.js" /> /// <reference path="scripts/form/formdirective.js" /> /// <reference path="scripts/form/formvalidation.js" /> /// <reference path="scripts/form/select.js" /> /// <reference path="scripts/fullscreen/fullscreen.js" /> /// <reference path="scripts/gallery/gallery.js" /> /// <reference path="scripts/ngtable/inline-edit.js" /> /// <reference path="scripts/ngtable/ngtable.js" /> /// <reference path="scripts/pages/forgotpassword.js" /> /// <reference path="scripts/pages/profile.js" /> /// <reference path="scripts/pages/signin.js" /> /// <reference path="scripts/pages/signup.js" /> /// <reference path="scripts/shared/api.js" /> /// <reference path="scripts/shared/directives.js" /> /// <reference path="scripts/shared/localize.js" /> /// <reference path="scripts/shared/main.js" /> /// <reference path="scripts/shared/nav.js" /> /// <reference path="scripts/slick-slider/slick-slider.js" /> /// <reference path="scripts/support/article.js" /> /// <reference path="scripts/support/community.js" /> /// <reference path="scripts/table/tablectrl.js" /> /// <reference path="scripts/ui/uictrl.js" /> /// <reference path="scripts/ui/uidirective.js" /> /// <reference path="scripts/xeditable/xeditable.js" />
60.085106
108
0.707507
9de9523ece8676a424e69235fc422c595ab89a7a
661
js
JavaScript
hard/sort-positives-keep-negatives/code.spec.js
jamoum/JavaScript_Challenges_Solutions
457fdf8b5b044e7016e1607b24821cf645702971
[ "MIT" ]
12
2020-04-27T08:04:40.000Z
2022-02-16T20:01:29.000Z
hard/sort-positives-keep-negatives/code.spec.js
jamoum/JavaScript_Challenges_Solutions
457fdf8b5b044e7016e1607b24821cf645702971
[ "MIT" ]
null
null
null
hard/sort-positives-keep-negatives/code.spec.js
jamoum/JavaScript_Challenges_Solutions
457fdf8b5b044e7016e1607b24821cf645702971
[ "MIT" ]
18
2019-03-05T15:32:13.000Z
2021-06-22T19:02:18.000Z
const posNegSort = require('./code'); describe('Tests', () => { test('the tests', () => { expect(posNegSort([6, 3, -2, 5, -8, 2, -2])).toEqual([2, 3, -2, 5, -8, 6, -2]); expect(posNegSort([6, 5, 4, -1, 3, 2, -1, 1])).toEqual([1, 2, 3, -1, 4, 5, -1, 6]); expect(posNegSort([-5, -5, -5, -5, 7, -5])).toEqual([-5, -5, -5, -5, 7, -5]); expect(posNegSort([-5, -5, -5, -5, -4, -5])).toEqual([-5, -5, -5, -5, -4, -5]); expect(posNegSort([-5, 4, -8, 3, -1, 2, 1, -7])).toEqual([-5, 1, -8, 2, -1, 3, 4, -7]); expect(posNegSort([-5, 4, 3])).toEqual([-5, 3, 4]); expect(posNegSort([])).toEqual([]); }); });
47.214286
95
0.435703
9dea59bc4d330eb77a42750b8e71d198e5a7425f
477
js
JavaScript
config/settings.js
savanajs/MEG
cf0fa903d9ace4583c3154232152c703fb6d5ec9
[ "MIT" ]
2
2018-08-30T13:37:24.000Z
2018-09-10T14:52:03.000Z
config/settings.js
savanajs/MEG
cf0fa903d9ace4583c3154232152c703fb6d5ec9
[ "MIT" ]
null
null
null
config/settings.js
savanajs/MEG
cf0fa903d9ace4583c3154232152c703fb6d5ec9
[ "MIT" ]
1
2021-08-08T15:38:53.000Z
2021-08-08T15:38:53.000Z
// Enable the processing of JS files with webpack. module.exports.enableWebpack = true; // Setting for padding between the images in the sprite // https://github.com/2createStudio/postcss-sprites // https://github.com/Ensighten/spritesmith#padding module.exports.spritePadding = 4; // Autoprefixer setting for browsers to support // https://github.com/postcss/autoprefixer#browsers module.exports.supportedBrowsers = ['last 5 versions']; module.exports.projectName = "meg";
34.071429
55
0.779874
9dea9226817e97a9eef0ac8bde39e9dab152ac90
2,257
js
JavaScript
test/modules/storage/document_remove.js
Devgent/meteor-astronomy
5dfdc3c22704e822c9c07cf0e5aa7b6c218a4e0a
[ "MIT" ]
2
2021-09-12T04:16:33.000Z
2021-09-12T04:20:24.000Z
test/modules/storage/document_remove.js
Devgent/meteor-astronomy
5dfdc3c22704e822c9c07cf0e5aa7b6c218a4e0a
[ "MIT" ]
null
null
null
test/modules/storage/document_remove.js
Devgent/meteor-astronomy
5dfdc3c22704e822c9c07cf0e5aa7b6c218a4e0a
[ "MIT" ]
1
2021-09-12T06:25:23.000Z
2021-09-12T06:25:23.000Z
import { Class } from 'meteor/jagi:astronomy'; import { MongoInternals } from 'meteor/mongo'; import { Promise } from 'meteor/promise'; Tinytest.add('Modules - Storage - Document remove', function(test) { const Storage = Class.get('Storage'); const id = '6tMS79Kx6WhqTEwaC'; const storage = Storage.findOne(id); storage.remove(); test.equal(Storage.find(id).count(), 0, 'The document has not been removed properly' ); }); if (Meteor.isServer) { Tinytest.add('Modules - Storage - Document remove with Mongo Transactions', function(test) { const Storage = Class.get('PersistentStorage'); const Collection = Storage.getCollection() const expected = { string: 'Some String' } const storage = new Storage(expected); const _id = storage.save() const { client } = MongoInternals.defaultRemoteCollectionDriver().mongo session = Promise.await(client.startSession()) Promise.await(session.startTransaction()) try { storage.remove({session}) Promise.await(session.commitTransaction()) } catch (e) { Promise.await(session.abortTransaction()) } finally { Promise.await(session.endSession()) } test.equal(Storage.findOne(_id), undefined, 'The document should be removed') }); Tinytest.add('Modules - Storage - Document remove with Mongo Transactions (Rollback)', function(test) { const Storage = Class.get('PersistentStorage'); const Collection = Storage.getCollection() const _id = Collection._makeNewID() const expected = { _id, string: 'Some String' } const storage = new Storage(expected); storage.save() const { client } = MongoInternals.defaultRemoteCollectionDriver().mongo session = Promise.await(client.startSession()) Promise.await(session.startTransaction()) try { storage.remove({session}) throw new Meteor.Error(500, 'Throw error for testing purpose') Promise.await(session.commitTransaction()) } catch (e) { Promise.await(session.abortTransaction()) } finally { Promise.await(session.endSession()) } test.equal(Storage.findOne(_id, { transform: null, }), expected, 'Document does not have to be removed' ); }); }
31.347222
105
0.672574
9deabb9356388a434dfc69464689769b6b202346
170
js
JavaScript
config/environment.js
Baseventure/ember-pdfjs
eccdc70ef51ad9670e0e856faeee45f5ac1d338e
[ "MIT" ]
30
2015-01-19T13:45:53.000Z
2021-09-14T01:19:01.000Z
config/environment.js
Baseventure/ember-pdfjs
eccdc70ef51ad9670e0e856faeee45f5ac1d338e
[ "MIT" ]
17
2015-01-17T15:52:57.000Z
2017-08-30T20:29:24.000Z
config/environment.js
Baseventure/ember-pdfjs
eccdc70ef51ad9670e0e856faeee45f5ac1d338e
[ "MIT" ]
15
2016-01-12T20:24:56.000Z
2019-02-19T20:18:33.000Z
/*jshint node:true*/ 'use strict'; module.exports = function(/* environment, appConfig */) { return { emberPdfjs: { workerSrc: '/pdf.worker.js' } } };
15.454545
57
0.588235
9deb50f4dbcba7b8efb8790976883a0989feb762
1,662
js
JavaScript
web/app/themes/main_theme/js/search-header.js
kweinbergwaks1/epicure
e545854f2d168b1a88a315277ff3cdb065a75559
[ "MIT" ]
null
null
null
web/app/themes/main_theme/js/search-header.js
kweinbergwaks1/epicure
e545854f2d168b1a88a315277ff3cdb065a75559
[ "MIT" ]
null
null
null
web/app/themes/main_theme/js/search-header.js
kweinbergwaks1/epicure
e545854f2d168b1a88a315277ff3cdb065a75559
[ "MIT" ]
null
null
null
/** * Handling for search in header */ var input = document.getElementById("input-search-header"); var divContainer = document.getElementById("search-results-header"); var divData = document.getElementById("search-data-header"); var titleSearch = document.getElementById("type-results-header"); var urlAjax = document.getElementById("url-ajax").value; function searchFunction() { if (input.value !== '') { jQuery.ajax({ url: urlAjax, type: 'post', data: { action: 'search_fetch', query: input.value }, success: function(data) { displayResults(data); } }); } else { emptyInput(); } } function emptyInput() { input.value = ''; divContainer.style.display = "none"; titleSearch.style.display = "none"; } function removeAllChildsOfDivData() { var child = divData.lastElementChild; while (child) { divData.removeChild(child); child = divData.lastElementChild; } } function displayResults(data) { if (data !== null && data.length !== 0) { removeAllChildsOfDivData(); titleSearch.style.display = "block"; data.forEach(function (restaurant) { var a = document.createElement('a'); a.setAttribute('href', restaurant.url); var p = document.createElement('p'); p.textContent = restaurant.title; p.setAttribute('class', 'content-results'); a.appendChild(p); divData.appendChild(a); }); divContainer.style.display = "block"; } else { divContainer.style.display = "none"; } }
29.678571
68
0.596871
9deb59ac32d1064e950e326a1635ab15fe9e48b8
3,316
js
JavaScript
plugins/StrikeTheme/webroot/js/twitter/twitter.js
Strike7/blockbuster
45977a578c9a8057c2b75050ccb328f293054314
[ "MIT" ]
1
2015-11-17T12:33:14.000Z
2015-11-17T12:33:14.000Z
plugins/StrikeTheme/webroot/js/twitter/twitter.js
Strike7/blockbuster
45977a578c9a8057c2b75050ccb328f293054314
[ "MIT" ]
null
null
null
plugins/StrikeTheme/webroot/js/twitter/twitter.js
Strike7/blockbuster
45977a578c9a8057c2b75050ccb328f293054314
[ "MIT" ]
null
null
null
/********************************************************************* #### Twitter Post Fetcher v5.0 #### Coded by Jason Mayes 2013. A present to all the developers out there. www.jasonmayes.com *********************************************************************/ var twitterFetcher=function(){function p(d){return d.replace(/<b[^>]*>(.*?)<\/b>/gi,function(b,d){return d}).replace(/class=".*?"|data-query-source=".*?"|dir=".*?"|rel=".*?"/gi,"")}var q="",l=20,m=!0,g=[],n=!1,j=!0,k=!0;return{fetch:function(d,b,e,h,f,c){void 0===e&&(e=20);void 0===h&&(m=!0);void 0===f&&(f=!0);void 0===c&&(c=!0);n?g.push({id:d,domId:b,maxTweets:e,enableLinks:h,showUser:f,showTime:c}):(n=!0,q=b,l=e,m=h,k=f,j=c,b=document.createElement("script"),b.type="text/javascript",b.src="http://cdn.syndication.twimg.com/widgets/timelines/"+ d+"?&lang=en&callback=twitterFetcher.callback&suppress_response_codes=true&rnd="+Math.random(),document.getElementsByTagName("head")[0].appendChild(b))},callback:function(d){var b=document.createElement("div");b.innerHTML=d.body;d=b.getElementsByClassName("e-entry-title");for(var e=b.getElementsByClassName("p-author"),h=b.getElementsByClassName("dt-updated"),b=[],f=d.length,c=0;c<f;){if(m){var a="";k&&(a+='<div class="user">'+p(e[c].innerHTML)+"</div>");a+='<p class="tweet">'+p(d[c].innerHTML)+"</p>"; j&&(a+='<p class="timePosted">'+h[c].getAttribute("aria-label")+"</p>")}else d[c].innerText?(a="",k&&(a+='<p class="user">'+e[c].innerText+"</p>"),a+='<p class="tweet">'+d[c].innerText+"</p>",j&&(a+='<p class="timePosted">'+h[c].innerText+"</p>")):(a="",k&&(a+='<p class="user">'+e[c].textContent+"</p>"),a+='<p class="tweet">'+d[c].textContent+"</p>",j&&(a+='<p class="timePosted">'+h[c].textContent+"</p>"));b.push(a);c++}b.length>l&&b.splice(l);d=b.length;e=0;h=document.getElementById(q);for(f="<ul>";e< d;)f+="<li>"+b[e]+"</li>",e++;h.innerHTML=f+"</ul>";n=!1;0<g.length&&(twitterFetcher.fetch(g[0].id,g[0].domId,g[0].maxTweets,g[0].enableLinks,g[0].showUser,g[0].showTime),g.splice(0,1))}}}(); /* * ### HOW TO CREATE A VALID ID TO USE: ### * Go to www.twitter.com and sign in as normal, go to your settings page. * Go to "Widgets" on the left hand side. * Create a new widget for what you need eg "user timeline" or "search" etc. * Feel free to check "exclude replies" if you dont want replies in results. * Now go back to settings page, and then go back to widgets page, you should * see the widget you just created. Click edit. * Now look at the URL in your web browser, you will see a long number like this: * 345735908357048478 * Use this as your ID below instead! */ /** * How to use fetch function: * @param {string} id Your Twitter widget ID. * @param {string} domId The ID of the DOM element you want to write results to. * @param {int} maxNumberOfTweets Optional - the maximum number of tweets you * want returned. Must be a number between 1 and 20. * @param {boolean} parseLinks Optional - set true if you want urls and hash tags to be hyperlinked! * @param {boolean} showUser Optional - Set false if you dont want user photo / * name for tweet to show. * @param {boolean} showTime Optional - Set false if you dont want time of tweet * to show. */ // Latest tweet twitterFetcher.fetch('346548853320851456', 'twitter', 1, true, true);
82.9
550
0.633595
9dec2cdb8ee62547d4c2cd93944df41bd8616300
1,697
js
JavaScript
frontend/src/mocks/warnings/nestedReturnTypeErrorGroup.js
PuraJuniper/AHRQ-CDS-Connect-Authoring-Tool
1c70406ab0421cd1f755f519497070840f7820a4
[ "Apache-2.0" ]
30
2018-04-11T13:47:46.000Z
2021-09-14T18:12:36.000Z
frontend/src/mocks/warnings/nestedReturnTypeErrorGroup.js
PuraJuniper/AHRQ-CDS-Connect-Authoring-Tool
1c70406ab0421cd1f755f519497070840f7820a4
[ "Apache-2.0" ]
52
2018-03-04T11:26:33.000Z
2022-02-26T10:12:00.000Z
frontend/src/mocks/warnings/nestedReturnTypeErrorGroup.js
PuraJuniper/AHRQ-CDS-Connect-Authoring-Tool
1c70406ab0421cd1f755f519497070840f7820a4
[ "Apache-2.0" ]
12
2018-03-05T11:42:07.000Z
2022-02-04T19:42:41.000Z
const nestedReturnTypeErrorGroup = [ { childInstances: [ { id: 'Or', name: 'Or', conjunction: true, returnType: 'boolean', fields: [ { id: 'element_name', type: 'string', name: 'Group Name', value: 'Group 1a' } ], uniqueId: 'Or-219', childInstances: [ { modifiers: [], uniqueId: 'GenericObservation_vsac-5116', type: 'element', fields: [ { value: 'LDL Code', name: 'Element Name', type: 'string', id: 'element_name' }, { static: true, valueSets: [ { oid: '2.16.840.1.113883.3.600.872', name: 'LDL Code' } ], name: 'Observation', type: 'observation_vsac', id: 'observation' } ], suppressedModifiers: ['ConvertToMgPerdL'], template: 'GenericObservation', extends: 'Base', suppress: true, returnType: 'list_of_observations', name: 'Observation', id: 'GenericObservation_vsac' } ] } ], uniqueId: 'Or-6121', fields: [ { value: 'Group 1', name: 'Group Name', type: 'string', id: 'element_name' } ], returnType: 'boolean', conjunction: true, name: 'Or', id: 'Or' } ]; export default nestedReturnTypeErrorGroup;
23.901408
55
0.403654
9dec4e34cf16d8b6a58639a1db297d0df4119fec
10,650
js
JavaScript
Web/wwwroot/lib/hyperformula/commonjs/Config.min.js
kiratae/DemoHandsonTable
c924884077bfb05e561e883b624ca05f8bfe6c3c
[ "MIT" ]
null
null
null
Web/wwwroot/lib/hyperformula/commonjs/Config.min.js
kiratae/DemoHandsonTable
c924884077bfb05e561e883b624ca05f8bfe6c3c
[ "MIT" ]
null
null
null
Web/wwwroot/lib/hyperformula/commonjs/Config.min.js
kiratae/DemoHandsonTable
c924884077bfb05e561e883b624ca05f8bfe6c3c
[ "MIT" ]
null
null
null
/** * Minified by jsDelivr using Terser v3.14.1. * Original file: /npm/hyperformula@0.1.3/commonjs/Config.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ "use strict";require("core-js/modules/es.symbol"),require("core-js/modules/es.symbol.description"),require("core-js/modules/es.symbol.iterator"),require("core-js/modules/es.array.for-each"),require("core-js/modules/es.array.from"),require("core-js/modules/es.array.includes"),require("core-js/modules/es.array.iterator"),require("core-js/modules/es.array.join"),require("core-js/modules/es.array.map"),require("core-js/modules/es.array.slice"),require("core-js/modules/es.array.sort"),require("core-js/modules/es.function.name"),require("core-js/modules/es.map"),require("core-js/modules/es.object.assign"),require("core-js/modules/es.object.to-string"),require("core-js/modules/es.regexp.to-string"),require("core-js/modules/es.string.includes"),require("core-js/modules/es.string.iterator"),require("core-js/modules/es.weak-map"),require("core-js/modules/web.dom-collections.for-each"),require("core-js/modules/web.dom-collections.iterator"),exports.__esModule=!0,exports.Config=void 0;var _DateTimeDefault=require("./DateTimeDefault"),_DateTimeHelper=require("./DateTimeHelper"),_errors=require("./errors"),_ChooseAddressMappingPolicy=require("./DependencyGraph/AddressMapping/ChooseAddressMappingPolicy"),_format=require("./format/format"),_HyperFormula=require("./HyperFormula"),_licenseKeyValidator=require("./helpers/licenseKeyValidator");function _createForOfIteratorHelper(e,r){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n=!0,s=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return n=e.done,e},e:function(e){s=!0,o=e},f:function(){try{n||null==t.return||t.return()}finally{if(s)throw o}}}}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}var _licenseKeyValidityState,__classPrivateFieldSet=function(e,r,t){if(!r.has(e))throw new TypeError("attempted to set private field on non-instance");return r.set(e,t),t},__classPrivateFieldGet=function(e,r){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return r.get(e)},PossibleGPUModeString=["gpu","cpu","dev"],Config=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.accentSensitive,a=r.caseSensitive,i=r.caseFirst,o=r.chooseAddressMappingPolicy,n=r.dateFormats,s=r.timeFormats,l=r.functionArgSeparator,u=r.decimalSeparator,m=r.thousandSeparator,c=r.language,h=r.licenseKey,d=r.functionPlugins,f=r.gpuMode,p=r.ignorePunctuation,y=r.leapYear1900,g=r.localeLang,v=r.smartRounding,P=r.matrixDetection,b=r.matrixDetectionThreshold,F=r.nullYear,S=r.parseDateTime,T=r.stringifyDateTime,_=r.stringifyDuration,C=r.precisionEpsilon,D=r.precisionRounding,A=r.useColumnIndex,w=r.vlookupThreshold,x=r.nullDate,j=r.useStats,k=r.undoLimit,q=r.useRegularExpressions,M=r.useWildcards,E=r.matchWholeCell,L=r.maxRows,R=r.maxColumns;_classCallCheck(this,e),_licenseKeyValidityState.set(this,void 0),this.accentSensitive=this.valueFromParam(t,"boolean","accentSensitive"),this.caseSensitive=this.valueFromParam(a,"boolean","caseSensitive"),this.caseFirst=this.valueFromParam(i,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=this.valueFromParam(p,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!=o?o:e.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=this.valueFromParamCheck(n,Array.isArray,"array","dateFormats"),this.timeFormats=this.valueFromParamCheck(s,Array.isArray,"array","timeFormats"),this.functionArgSeparator=this.valueFromParam(l,"string","functionArgSeparator"),this.decimalSeparator=this.valueFromParam(u,[".",","],"decimalSeparator"),this.language=this.valueFromParam(c,"string","language"),this.licenseKey=this.valueFromParam(h,"string","licenseKey"),__classPrivateFieldSet(this,_licenseKeyValidityState,(0,_licenseKeyValidator.checkLicenseKeyValidity)(this.licenseKey)),this.thousandSeparator=this.valueFromParam(m,["",","," ","."],"thousandSeparator"),this.localeLang=this.valueFromParam(g,"string","localeLang"),this.functionPlugins=null!=d?d:e.defaultConfig.functionPlugins,this.gpuMode=this.valueFromParam(f,PossibleGPUModeString,"gpuMode"),this.smartRounding=this.valueFromParam(v,"boolean","smartRounding"),this.matrixDetection=this.valueFromParam(P,"boolean","matrixDetection"),this.matrixDetectionThreshold=this.valueFromParam(b,"number","matrixDetectionThreshold"),this.validateNumberToBeAtLeast(this.matrixDetectionThreshold,"matrixDetectionThreshold",1),this.nullYear=this.valueFromParam(F,"number","nullYear"),this.validateNumberToBeAtLeast(this.nullYear,"nullYear",0),this.validateNumberToBeAtMost(this.nullYear,"nullYear",100),this.precisionRounding=this.valueFromParam(D,"number","precisionRounding"),this.validateNumberToBeAtLeast(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=this.valueFromParam(C,"number","precisionEpsilon"),this.validateNumberToBeAtLeast(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=this.valueFromParam(A,"boolean","useColumnIndex"),this.useStats=this.valueFromParam(j,"boolean","useStats"),this.vlookupThreshold=this.valueFromParam(w,"number","vlookupThreshold"),this.validateNumberToBeAtLeast(this.vlookupThreshold,"vlookupThreshold",1),this.parseDateTime=this.valueFromParam(S,"function","parseDateTime"),this.stringifyDateTime=this.valueFromParam(T,"function","stringifyDateTime"),this.stringifyDuration=this.valueFromParam(_,"function","stringifyDuration"),this.translationPackage=_HyperFormula.HyperFormula.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=this.valueFromParamCheck(x,_DateTimeHelper.instanceOfSimpleDate,"IDate","nullDate"),this.leapYear1900=this.valueFromParam(y,"boolean","leapYear1900"),this.undoLimit=this.valueFromParam(k,"number","undoLimit"),this.useRegularExpressions=this.valueFromParam(q,"boolean","useRegularExpressions"),this.useWildcards=this.valueFromParam(M,"boolean","useWildcards"),this.matchWholeCell=this.valueFromParam(E,"boolean","matchWholeCell"),this.validateNumberToBeAtLeast(this.undoLimit,"undoLimit",0),this.maxRows=this.valueFromParam(L,"number","maxRows"),this.validateNumberToBeAtLeast(this.maxRows,"maxRows",1),this.maxColumns=this.valueFromParam(R,"number","maxColumns"),this.validateNumberToBeAtLeast(this.maxColumns,"maxColumns",1),this.checkIfParametersNotInConflict({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"})}return _createClass(e,[{key:"getConfig",value:function(){return this}},{key:"mergeConfig",value:function(r){return new e(Object.assign({},this.getConfig(),r))}},{key:"valueFromParam",value:function(r,t,a){if(void 0===r)return e.defaultConfig[a];if("string"==typeof t){if(_typeof(r)===t)return r;throw new _errors.ExpectedValueOfTypeError(t,a)}if(t.includes(r))return r;throw new _errors.ExpectedOneOfValuesError(t.map(function(e){return"'"+e+"'"}).join(" "),a)}},{key:"valueFromParamCheck",value:function(r,t,a,i){if(t(r))return r;if(void 0===r)return e.defaultConfig[i];throw new _errors.ExpectedValueOfTypeError(a,i)}},{key:"checkIfParametersNotInConflict",value:function(){for(var e=new Map,r=arguments.length,t=new Array(r),a=0;a<r;a++)t[a]=arguments[a];t.forEach(function(r){var t=e.get(r.value)||[];t.push(r.name),e.set(r.value,t)});var i,o=[],n=_createForOfIteratorHelper(e.values());try{for(n.s();!(i=n.n()).done;){var s=i.value;s.length>1&&o.push(s)}}catch(e){n.e(e)}finally{n.f()}if(o.length>0){var l=o.map(function(e){return"[".concat(e.sort(),"]")}).join("; ");throw new Error("Config initialization failed. Parameters in conflict: ".concat(l))}}},{key:"validateNumberToBeAtLeast",value:function(e,r,t){if(e<t)throw new _errors.ConfigValueTooSmallError(r,t)}},{key:"validateNumberToBeAtMost",value:function(e,r,t){if(e>t)throw new _errors.ConfigValueTooBigError(r,t)}},{key:"licenseKeyValidityState",get:function(){return __classPrivateFieldGet(this,_licenseKeyValidityState)}}]),e}();exports.Config=Config,_licenseKeyValidityState=new WeakMap,Config.defaultConfig={accentSensitive:!1,caseSensitive:!1,caseFirst:"lower",ignorePunctuation:!1,chooseAddressMappingPolicy:new _ChooseAddressMappingPolicy.AlwaysDense,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],functionArgSeparator:",",decimalSeparator:".",thousandSeparator:"",language:"enGB",licenseKey:"",functionPlugins:[],gpuMode:"gpu",leapYear1900:!1,smartRounding:!0,localeLang:"en",matrixDetection:!0,matrixDetectionThreshold:100,nullYear:30,parseDateTime:_DateTimeDefault.defaultParseToDateTime,stringifyDateTime:_format.defaultStringifyDateTime,stringifyDuration:_format.defaultStringifyDuration,precisionEpsilon:1e-13,precisionRounding:14,useColumnIndex:!1,useStats:!1,vlookupThreshold:20,nullDate:{year:1899,month:12,day:30},undoLimit:20,useRegularExpressions:!1,useWildcards:!0,matchWholeCell:!0,maxRows:4e4,maxColumns:18278}; //# sourceMappingURL=/sm/1fe0a7f052ca293f259be93f88a58967ca1ffff8e6b124bb751fa49c9e778485.map
1,331.25
10,314
0.790798
9decdc6a8205718bd0a270a192da748508ea8a3b
13,289
js
JavaScript
build/Release/plugins/keys.user.js
ifchen0/IITC_TW
43dd8304e7301b4eeab081b54ff3000094fb2160
[ "ISC" ]
18
2015-10-09T13:43:26.000Z
2018-11-22T04:41:25.000Z
build/Release/plugins/keys.user.js
ifchen0/IITC_TW
43dd8304e7301b4eeab081b54ff3000094fb2160
[ "ISC" ]
2
2016-10-09T00:32:31.000Z
2018-04-18T07:39:08.000Z
build/Release/plugins/keys.user.js
ifchen0/IITC_TW
43dd8304e7301b4eeab081b54ff3000094fb2160
[ "ISC" ]
5
2016-06-29T03:27:53.000Z
2018-06-12T10:09:37.000Z
// ==UserScript== // @id iitc-plugin-keys@xelio // @name IITC plugin: Keys // @category 鑰匙 // @version 0.3.0.20170210.164403 // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL https://raw.githubusercontent.com/ifchen0/IITC_TW/master/build/Release/plugins/keys.meta.js // @downloadURL https://raw.githubusercontent.com/ifchen0/IITC_TW/master/build/Release/plugins/keys.user.js // @description [Release-2017-02-10-164403] Allow manual entry of key counts for each portal. Use the 'keys-on-map' plugin to show the numbers on the map, and 'sync' to share between multiple browsers or desktop/mobile. // @include https://*.ingress.com/intel* // @include http://*.ingress.com/intel* // @match https://*.ingress.com/intel* // @match http://*.ingress.com/intel* // @include https://*.ingress.com/mission/* // @include http://*.ingress.com/mission/* // @match https://*.ingress.com/mission/* // @match http://*.ingress.com/mission/* // @grant none // ==/UserScript== function wrapper(plugin_info) { // ensure plugin framework is there, even if iitc is not yet loaded if(typeof window.plugin !== 'function') window.plugin = function() {}; //PLUGIN AUTHORS: writing a plugin outside of the IITC build environment? if so, delete these lines!! //(leaving them in place might break the 'About IITC' page or break update checks) plugin_info.buildName = 'Release'; plugin_info.dateTimeVersion = '20170210.164403'; plugin_info.pluginId = 'keys'; //END PLUGIN AUTHORS NOTE // PLUGIN START //////////////////////////////////////////////////////// // use own namespace for plugin window.plugin.keys = function() {}; // delay in ms window.plugin.keys.SYNC_DELAY = 5000; window.plugin.keys.LOCAL_STORAGE_KEY = 'plugin-keys-data'; window.plugin.keys.KEY = {key: 'plugin-keys-data', field: 'keys'}; window.plugin.keys.UPDATE_QUEUE = {key: 'plugin-keys-data-queue', field: 'updateQueue'}; window.plugin.keys.UPDATING_QUEUE = {key: 'plugin-keys-data-updating-queue', field: 'updatingQueue'}; window.plugin.keys.keys = {}; window.plugin.keys.updateQueue = {}; window.plugin.keys.updatingQueue = {}; window.plugin.keys.enableSync = false; window.plugin.keys.disabledMessage = null; window.plugin.keys.contentHTML = null; window.plugin.keys.addToSidebar = function() { if(typeof(Storage) === "undefined") { $('#portaldetails > .imgpreview').after(plugin.keys.disabledMessage); return; } $('#portaldetails > .imgpreview').after(plugin.keys.contentHTML); plugin.keys.updateDisplayCount(); } window.plugin.keys.updateDisplayCount = function() { var guid = window.selectedPortal; var count = plugin.keys.keys[guid] || 0; $('#keys-count').html(count); } window.plugin.keys.addKey = function(addCount, guid) { if(guid == undefined) guid = window.selectedPortal; var oldCount = plugin.keys.keys[guid]; var newCount = Math.max((oldCount || 0) + addCount, 0); if(oldCount !== newCount) { if(newCount === 0) { delete plugin.keys.keys[guid]; plugin.keys.updateQueue[guid] = null; } else { plugin.keys.keys[guid] = newCount; plugin.keys.updateQueue[guid] = newCount; } plugin.keys.storeLocal(plugin.keys.KEY); plugin.keys.storeLocal(plugin.keys.UPDATE_QUEUE); plugin.keys.updateDisplayCount(); window.runHooks('pluginKeysUpdateKey', {guid: guid, count: newCount}); plugin.keys.delaySync(); } } // Delay the syncing to group a few updates in a single request window.plugin.keys.delaySync = function() { if(!plugin.keys.enableSync) return; clearTimeout(plugin.keys.delaySync.timer); plugin.keys.delaySync.timer = setTimeout(function() { plugin.keys.delaySync.timer = null; window.plugin.keys.syncNow(); }, plugin.keys.SYNC_DELAY); } // Store the updateQueue in updatingQueue and upload window.plugin.keys.syncNow = function() { if(!plugin.keys.enableSync) return; $.extend(plugin.keys.updatingQueue, plugin.keys.updateQueue); plugin.keys.updateQueue = {}; plugin.keys.storeLocal(plugin.keys.UPDATING_QUEUE); plugin.keys.storeLocal(plugin.keys.UPDATE_QUEUE); plugin.sync.updateMap('keys', 'keys', Object.keys(plugin.keys.updatingQueue)); } // Call after IITC and all plugin loaded window.plugin.keys.registerFieldForSyncing = function() { if(!window.plugin.sync) return; window.plugin.sync.registerMapForSync('keys', 'keys', window.plugin.keys.syncCallback, window.plugin.keys.syncInitialed); } // Call after local or remote change uploaded window.plugin.keys.syncCallback = function(pluginName, fieldName, e, fullUpdated) { if(fieldName === 'keys') { plugin.keys.storeLocal(plugin.keys.KEY); // All data is replaced if other client update the data during this client offline, // fire 'pluginKeysRefreshAll' to notify a full update if(fullUpdated) { plugin.keys.updateDisplayCount(); window.runHooks('pluginKeysRefreshAll'); return; } if(!e) return; if(e.isLocal) { // Update pushed successfully, remove it from updatingQueue delete plugin.keys.updatingQueue[e.property]; } else { // Remote update delete plugin.keys.updateQueue[e.property]; plugin.keys.storeLocal(plugin.keys.UPDATE_QUEUE); plugin.keys.updateDisplayCount(); window.runHooks('pluginKeysUpdateKey', {guid: e.property, count: plugin.keys.keys[e.property]}); } } } // syncing of the field is initialed, upload all queued update window.plugin.keys.syncInitialed = function(pluginName, fieldName) { if(fieldName === 'keys') { plugin.keys.enableSync = true; if(Object.keys(plugin.keys.updateQueue).length > 0) { plugin.keys.delaySync(); } } } window.plugin.keys.storeLocal = function(mapping) { if(typeof(plugin.keys[mapping.field]) !== 'undefined' && plugin.keys[mapping.field] !== null) { localStorage[mapping.key] = JSON.stringify(plugin.keys[mapping.field]); } else { localStorage.removeItem(mapping.key); } } window.plugin.keys.loadLocal = function(mapping) { var objectJSON = localStorage[mapping.key]; if(!objectJSON) return; plugin.keys[mapping.field] = mapping.convertFunc ? mapping.convertFunc(JSON.parse(objectJSON)) : JSON.parse(objectJSON); } // For backward compatibility, will change to use loadLocal after a few version window.plugin.keys.loadKeys = function() { var keysObjectJSON = localStorage[plugin.keys.KEY.key]; if(!keysObjectJSON) return; var keysObject = JSON.parse(keysObjectJSON); // Move keys data up one level, it was {keys: keys_data} in localstorage in previous version plugin.keys.keys = keysObject.keys ? keysObject.keys : keysObject; if(keysObject.keys) plugin.keys.storeLocal(plugin.keys.KEY); } window.plugin.keys.setupCSS = function() { $("<style>") .prop("type", "text/css") .html("#keys-content-outer {\n display: table;\n width: 100%;\n height: 26px;\n text-align: center;\n}\n\n#keys-content-outer > div{\n display: inline-block;\n vertical-align: middle;\n margin: 6px 3px 1px 3px;\n}\n\n#keys-label {\n padding: 0 4px;\n cursor: help;\n}\n\n#keys-add {\n}\n\n#keys-count {\n width: 26px;\n height: 18px !important;\n border: 1px solid;\n text-align: center;\n cursor: help;\n}\n\n#keys-subtract {\n}\n\n.keys-button {\n position:relative;\n width: 16px;\n height: 16px !important;\n}\n\n.keys-button > div {\n background-color: rgb(32, 168, 177);\n position: absolute;\n}\n\n.keys-button-minus {\n width: 100%;\n height: 4px;\n top: 6px;\n}\n\n.keys-button-plus-h {\n width: 100%;\n height: 4px;\n top: 6px;\n}\n\n.keys-button-plus-v {\n width: 4px;\n height: 100%;\n left: 6px;\n}\n\n#keys-help {\n font-weight: 900;\n margin: 6px 3px 1px 20px !important;\n cursor: help;\n}\n\n.portal-list-keys button {\n font-family: monospace;\n font-size: 0.9em;\n text-align: center;\n vertical-align: middle;\n min-width: 0;\n padding: 0;\n width: 1.5em;\n margin: -6px 0 -3px;\n}\n#portalslist.mobile .portal-list-keys button {\n width: 3em;\n height: 1.5em;\n}\n.portal-list-keys .plus {\n margin-left: 0.3em;\n margin-right: -1px;\n}\n\n") .appendTo("head"); } window.plugin.keys.setupContent = function() { plugin.keys.contentHTML = '<div id="keys-content-outer">' + '<div id="keys-label" title="Problem? Point to the question mark!">Key(s):</div>' + '<div id="keys-add" class="keys-button" ' + 'onclick="window.plugin.keys.addKey(-1);">' + '<div class="keys-button-minus"></div>' + '</div>' + '<div id="keys-count" title="Problem? Point to the question mark!"></div>' + '<div id="keys-subtract" class="keys-button" ' + 'onclick="window.plugin.keys.addKey(1);">' + '<div class="keys-button-plus-v"></div>' + '<div class="keys-button-plus-h"></div>' + '</div>' + '<div id="keys-help" title="You MUST manually input your count of keys!\n' + 'This plugin CANNOT automatically get the keys from Ingress!">?</div>' + '</div>'; plugin.keys.disabledMessage = '<div id="keys-content-outer" title="Your browser do not support localStorage">Plugin Keys disabled</div>'; } window.plugin.keys.setupPortalsList = function() { if(!window.plugin.portalslist) return; window.addHook('pluginKeysUpdateKey', function(data) { $('[data-list-keycount="'+data.guid+'"]').text(data.count); }); window.addHook('pluginKeysRefreshAll', function() { $('[data-list-keycount]').each(function(i, element) { var guid = element.getAttribute("data-list-keycount"); $(element).text(plugin.keys.keys[guid] || 0); }); }); window.plugin.portalslist.fields.push({ title: "Keys", value: function(portal) { return portal.options.guid; }, // we store the guid, but implement a custom comparator so the list does sort properly without closing and reopening the dialog sort: function(guidA, guidB) { var keysA = plugin.keys.keys[guidA] || 0; var keysB = plugin.keys.keys[guidB] || 0; return keysA - keysB; }, format: function(cell, portal, guid) { $(cell) .addClass("alignR portal-list-keys ui-dialog-buttonset") // ui-dialog-buttonset for proper button styles .append($('<span>') .text(plugin.keys.keys[guid] || 0) .attr({ "class": "value", "data-list-keycount": guid })); // for some reason, jQuery removes event listeners when the list is sorted. Therefore we use DOM's addEventListener $('<button>') .text('+') .addClass("plus") .appendTo(cell) [0].addEventListener("click", function() { window.plugin.keys.addKey(1, guid); }, false); $('<button>') .text('-') .addClass("minus") .appendTo(cell) [0].addEventListener("click", function() { window.plugin.keys.addKey(-1, guid); }, false); }, }); } var setup = function() { if($.inArray('pluginKeysUpdateKey', window.VALID_HOOKS) < 0) window.VALID_HOOKS.push('pluginKeysUpdateKey'); if($.inArray('pluginKeysRefreshAll', window.VALID_HOOKS) < 0) window.VALID_HOOKS.push('pluginKeysRefreshAll'); window.plugin.keys.setupCSS(); window.plugin.keys.setupContent(); window.plugin.keys.loadLocal(plugin.keys.UPDATE_QUEUE); window.plugin.keys.loadKeys(); window.addHook('portalDetailsUpdated', window.plugin.keys.addToSidebar); window.addHook('iitcLoaded', window.plugin.keys.registerFieldForSyncing); if(window.plugin.portalslist) { window.plugin.keys.setupPortalsList(); } else { setTimeout(function() { if(window.plugin.portalslist) window.plugin.keys.setupPortalsList(); }, 500); } } // PLUGIN END ////////////////////////////////////////////////////////// setup.info = plugin_info; //add the script info data to the function as a property if(!window.bootPlugins) window.bootPlugins = []; window.bootPlugins.push(setup); // if IITC has already booted, immediately run the 'setup' function if(window.iitcLoaded && typeof setup === 'function') setup(); } // wrapper end // inject code into site context var script = document.createElement('script'); var info = {}; if (typeof GM_info !== 'undefined' && GM_info && GM_info.script) info.script = { version: GM_info.script.version, name: GM_info.script.name, description: GM_info.script.description }; script.appendChild(document.createTextNode('('+ wrapper +')('+JSON.stringify(info)+');')); (document.body || document.head || document.documentElement).appendChild(script);
44.744108
1,311
0.638423
9dee06e94cacde8291e063cc19554a6df0014f9b
1,476
js
JavaScript
daos/dao.js
always-awaken/jwt-rest-api-server
115a9a7cc4b3611df2dc868033ce64a3b3a6b91b
[ "MIT" ]
1
2019-07-19T10:20:02.000Z
2019-07-19T10:20:02.000Z
daos/dao.js
always-awaken/jwt-rest-api-server
115a9a7cc4b3611df2dc868033ce64a3b3a6b91b
[ "MIT" ]
null
null
null
daos/dao.js
always-awaken/jwt-rest-api-server
115a9a7cc4b3611df2dc868033ce64a3b3a6b91b
[ "MIT" ]
null
null
null
class Dao {} // PUT, UPDATE, DELETE Dao.prototype.create = async (model, body) => { return await model.create(body); }; Dao.prototype.updateById = async (model, body, id) => { try { return await model.update(body, { where: { id } }); } catch(err) { return err; } }; Dao.prototype.destroyById = async (model, id) => { try { return await model.destroy({ where: { id } }); } catch (err) { return err; } }; // GET Dao.prototype.findByEmail = async (model, email) => { try { return await model.findOne({ where: {email : email} }); } catch (err) { return err; } }; // GET Dao.prototype.findByPk = async (model, pk) => { try { return await model.findByPk(pk); } catch (err) { return err; } }; Dao.prototype.findAll = async (model, limit, offset, order = [ ['createdAt', 'DESC'] ], where = {}) => { try { return await model.findAll({ ...where, order, limit, offset }); } catch (err) { return err; } }; Dao.prototype.findAndCountAll = async (model, limit, offset, order = [ ['createdAt', 'DESC'] ], where = {}) => { return await model.findAndCountAll({ ...where, limit, offset, order }) }; // Dao.prototype.findOne = async (model, where = {}) => { // return await model.findOne({ where }); // } module.exports = Dao;
22.363636
112
0.518293
9dee53d4ca7f2ef60842dd6bb7a254e899195090
790
js
JavaScript
docs/fltk-1.4/structFl__Help__Font__Stack.js
Albrecht-S/Albrecht-S.github.io
a1488bd57a4aaaf49ffb0f56e5454a2b34fa6cc3
[ "MIT" ]
null
null
null
docs/fltk-1.4/structFl__Help__Font__Stack.js
Albrecht-S/Albrecht-S.github.io
a1488bd57a4aaaf49ffb0f56e5454a2b34fa6cc3
[ "MIT" ]
null
null
null
docs/fltk-1.4/structFl__Help__Font__Stack.js
Albrecht-S/Albrecht-S.github.io
a1488bd57a4aaaf49ffb0f56e5454a2b34fa6cc3
[ "MIT" ]
null
null
null
var structFl__Help__Font__Stack = [ [ "Fl_Help_Font_Stack", "structFl__Help__Font__Stack.html#a7d53bd14a9f5459d3b82f19351fbd347", null ], [ "count", "structFl__Help__Font__Stack.html#adca714aadcd0ba701747e4c26ee8ff90", null ], [ "init", "structFl__Help__Font__Stack.html#af9637a9b83ea23a618560a09827c6ee1", null ], [ "pop", "structFl__Help__Font__Stack.html#a2f654f36e75490b0bcdd71c1eddd20ea", null ], [ "push", "structFl__Help__Font__Stack.html#af931d5b3f964f60604fa418445b1fffb", null ], [ "top", "structFl__Help__Font__Stack.html#a3e595bc9d80ba29e1f10d9dfab8435e3", null ], [ "elts_", "structFl__Help__Font__Stack.html#a99bd3c48ee5b70dd6aed6507d144e2ec", null ], [ "nfonts_", "structFl__Help__Font__Stack.html#a316766f09e93398a71fc3bb4731be19c", null ] ];
71.818182
105
0.788608
9dee9aa89413351569817d8d43f8634baddf706a
175,837
js
JavaScript
js/plugins.js
banny7/Taekwondo_Trainer
80d1fb82d06dce592858c4c5a02c21ee667ed619
[ "MIT" ]
null
null
null
js/plugins.js
banny7/Taekwondo_Trainer
80d1fb82d06dce592858c4c5a02c21ee667ed619
[ "MIT" ]
1
2020-05-17T09:26:29.000Z
2020-05-17T09:26:29.000Z
js/plugins.js
banny7/Taekwondo_Trainer
80d1fb82d06dce592858c4c5a02c21ee667ed619
[ "MIT" ]
null
null
null
// Avoid `console` errors in browsers that lack a console. (function() { "use strict"; var method; var noop = function () {}; var methods = [ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' ]; var length = methods.length; var console = (window.console = window.console || {}); while (length--) { method = methods[length]; // Only stub undefined methods. if (!console[method]) { console[method] = noop; } } }()); // Place any jQuery/helper plugins in here. /*! ----- splitJS ----- */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.Splitting = factory()); }(this, (function () { 'use strict'; var root = document; var createText = root.createTextNode.bind(root); /** * # setProperty * Apply a CSS var * @param el{HTMLElement} * @param varName {string} * @param value {string|number} */ function setProperty(el, varName, value) { el.style.setProperty(varName, value); } /** * * @param {Node} el * @param {Node} child */ function appendChild(el, child) { return el.appendChild(child); } function createElement(parent, key, text, whitespace) { var el = root.createElement('span'); key && (el.className = key); if (text) { !whitespace && el.setAttribute("data-" + key, text); el.textContent = text; } return (parent && appendChild(parent, el)) || el; } function getData(el, key) { return el.getAttribute("data-" + key) } /** * * @param e {import('../types').Target} * @param parent {HTMLElement} * @returns {HTMLElement[]} */ function $(e, parent) { return !e || e.length == 0 ? // null or empty string returns empty array [] : e.nodeName ? // a single element is wrapped in an array [e] : // selector and NodeList are converted to Element[] [].slice.call(e[0].nodeName ? e : (parent || root).querySelectorAll(e)); } /** * Creates and fills an array with the value provided * @template {T} * @param {number} len * @param {() => T} valueProvider * @return {T} */ function Array2D(len) { var a = []; for (; len--; ) { a[len] = []; } return a; } function each(items, fn) { items && items.some(fn); } function selectFrom(obj) { return function (key) { return obj[key]; } } /** * # Splitting.index * Index split elements and add them to a Splitting instance. * * @param element {HTMLElement} * @param key {string} * @param items {HTMLElement[] | HTMLElement[][]} */ function index(element, key, items) { var prefix = '--' + key; var cssVar = prefix + "-index"; each(items, function (items, i) { if (Array.isArray(items)) { each(items, function(item) { setProperty(item, cssVar, i); }); } else { setProperty(items, cssVar, i); } }); setProperty(element, prefix + "-total", items.length); } /** * @type {Record<string, import('./types').ISplittingPlugin>} */ var plugins = {}; /** * @param by {string} * @param parent {string} * @param deps {string[]} * @return {string[]} */ function resolvePlugins(by, parent, deps) { // skip if already visited this dependency var index = deps.indexOf(by); if (index == -1) { // if new to dependency array, add to the beginning deps.unshift(by); // recursively call this function for all dependencies each(plugins[by].depends, function(p) { resolvePlugins(p, by, deps); }); } else { // if this dependency was added already move to the left of // the parent dependency so it gets loaded in order var indexOfParent = deps.indexOf(parent); deps.splice(index, 1); deps.splice(indexOfParent, 0, by); } return deps; } /** * Internal utility for creating plugins... essentially to reduce * the size of the library * @param {string} by * @param {string} key * @param {string[]} depends * @param {Function} split * @returns {import('./types').ISplittingPlugin} */ function createPlugin(by, depends, key, split) { return { by: by, depends: depends, key: key, split: split } } /** * * @param by {string} * @returns {import('./types').ISplittingPlugin[]} */ function resolve(by) { return resolvePlugins(by, 0, []).map(selectFrom(plugins)); } /** * Adds a new plugin to splitting * @param opts {import('./types').ISplittingPlugin} */ function add(opts) { plugins[opts.by] = opts; } /** * # Splitting.split * Split an element's textContent into individual elements * @param el {Node} Element to split * @param key {string} * @param splitOn {string} * @param includeSpace {boolean} * @returns {HTMLElement[]} */ function splitText(el, key, splitOn, includePrevious, preserveWhitespace) { // Combine any strange text nodes or empty whitespace. el.normalize(); // Use fragment to prevent unnecessary DOM thrashing. var elements = []; var F = document.createDocumentFragment(); if (includePrevious) { elements.push(el.previousSibling); } var allElements = []; $(el.childNodes).some(function(next) { if (next.tagName && !next.hasChildNodes()) { // keep elements without child nodes (no text and no children) allElements.push(next); return; } // Recursively run through child nodes if (next.childNodes && next.childNodes.length) { allElements.push(next); elements.push.apply(elements, splitText(next, key, splitOn, includePrevious, preserveWhitespace)); return; } // Get the text to split, trimming out the whitespace /** @type {string} */ var wholeText = next.wholeText || ''; var contents = wholeText.trim(); // If there's no text left after trimming whitespace, continue the loop if (contents.length) { // insert leading space if there was one if (wholeText[0] === ' ') { allElements.push(createText(' ')); } // Concatenate the split text children back into the full array each(contents.split(splitOn), function(splitText, i) { if (i && preserveWhitespace) { allElements.push(createElement(F, "whitespace", " ", preserveWhitespace)); } var splitEl = createElement(F, key, splitText); elements.push(splitEl); allElements.push(splitEl); }); // insert trailing space if there was one if (wholeText[wholeText.length - 1] === ' ') { allElements.push(createText(' ')); } } }); each(allElements, function(el) { appendChild(F, el); }); // Clear out the existing element el.innerHTML = ""; appendChild(el, F); return elements; } /** an empty value */ var _ = 0; var WORDS = 'words'; var wordPlugin = createPlugin( /*by: */ WORDS, /*depends: */ _, /*key: */ 'word', /*split: */ function(el) { return splitText(el, 'word', /\s+/, 0, 1) } ); var CHARS = "chars"; var charPlugin = createPlugin( /*by: */ CHARS, /*depends: */ [WORDS], /*key: */ "char", /*split: */ function(el, options, ctx) { var results = []; each(ctx[WORDS], function(word, i) { results.push.apply(results, splitText(word, "char", "", options.whitespace && i)); }); return results; } ); /** * # Splitting * * @param opts {import('./types').ISplittingOptions} */ function Splitting (opts) { opts = opts || {}; var key = opts.key; return $(opts.target || '[data-splitting]').map(function(el) { var ctx = { el: el }; var items = resolve(opts.by || getData(el, 'splitting') || CHARS); each(items, function(plugin) { if (plugin.split) { var pluginBy = plugin.by; var key2 = (key ? '-' + key : '') + plugin.key; var results = plugin.split(el, opts, ctx); key2 && index(el, key2, results); ctx[pluginBy] = results; el.classList.add(pluginBy); } }); el.classList.add('splitting'); return ctx; }) } /** * # Splitting.html * * @param opts {import('./types').ISplittingOptions} */ function html(opts) { opts = opts || {}; var parent = createElement(); parent.innerHTML = opts.content; var el = opts.target = parent.firstElementChild; Splitting(opts); return el.outerHTML } Splitting.html = html; Splitting.add = add; function detectGrid(el, options, side) { var items = $(options.matching || el.children, el); var c = {}; each(items, function(w) { var val = Math.round(w[side]); c[val] || (c[val] = []).push(w); }); return Object.keys(c).map(Number).sort().map(selectFrom(c)); } var linePlugin = createPlugin( /*by: */ 'lines', /*depends: */ [WORDS], /*key: */ 'line', /*split: */ function(el, options, ctx) { return detectGrid(ctx[WORDS], options, 'offsetTop') } ); var itemPlugin = createPlugin( /*by: */ 'items', /*depends: */ _, /*key: */ 'item', /*split: */ function(el, options) { return $(options.matching || el.children, el) } ); var rowPlugin = createPlugin( /*by: */ 'rows', /*depends: */ _, /*key: */ 'row', /*split: */ function(el, options) { return detectGrid(el, options, "offsetTop"); } ); var columnPlugin = createPlugin( /*by: */ 'cols', /*depends: */ _, /*key: */ "col", /*split: */ function(el, options) { return detectGrid(el, options, "offsetLeft"); } ); var gridPlugin = createPlugin( /*by: */ 'grid', /*depends: */ ['rows', 'cols'] ); var LAYOUT = "layout"; var layoutPlugin = createPlugin( /*by: */ LAYOUT, /*depends: */ _, /*key: */ _, /*split: */ function(el, opts) { // detect and set options var rows = opts.rows = +(opts.rows || getData(el, 'rows') || 1); var columns = opts.columns = +(opts.columns || getData(el, 'columns') || 1); // Seek out the first <img> if the value is true opts.image = opts.image || getData(el, 'image') || el.currentSrc || el.src; if (opts.image) { var img = $("img", el)[0]; opts.image = img && (img.currentSrc || img.src); } // add optional image to background if (opts.image) { setProperty(el, "background-image", "url(" + opts.image + ")"); } var totalCells = rows * columns; var elements = []; var container = createElement(_, "cell-grid"); while (totalCells--) { // Create a span var cell = createElement(container, "cell"); createElement(cell, "cell-inner"); elements.push(cell); } // Append elements back into the parent appendChild(el, container); return elements; } ); var cellRowPlugin = createPlugin( /*by: */ "cellRows", /*depends: */ [LAYOUT], /*key: */ "row", /*split: */ function(el, opts, ctx) { var rowCount = opts.rows; var result = Array2D(rowCount); each(ctx[LAYOUT], function(cell, i, src) { result[Math.floor(i / (src.length / rowCount))].push(cell); }); return result; } ); var cellColumnPlugin = createPlugin( /*by: */ "cellColumns", /*depends: */ [LAYOUT], /*key: */ "col", /*split: */ function(el, opts, ctx) { var columnCount = opts.columns; var result = Array2D(columnCount); each(ctx[LAYOUT], function(cell, i) { result[i % columnCount].push(cell); }); return result; } ); var cellPlugin = createPlugin( /*by: */ "cells", /*depends: */ ['cellRows', 'cellColumns'], /*key: */ "cell", /*split: */ function(el, opt, ctx) { // re-index the layout as the cells return ctx[LAYOUT]; } ); // install plugins // word/char plugins add(wordPlugin); add(charPlugin); add(linePlugin); // grid plugins add(itemPlugin); add(rowPlugin); add(columnPlugin); add(gridPlugin); // cell-layout plugins add(layoutPlugin); add(cellRowPlugin); add(cellColumnPlugin); add(cellPlugin); return Splitting; }))); /*! * Bootstrap v4.1.3 (https://getbootstrap.com/) * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,h){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function l(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,n,i;e=r,i=o[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return r}e=e&&e.hasOwnProperty("default")?e.default:e,h=h&&h.hasOwnProperty("default")?h.default:h;var r,n,o,a,c,u,f,d,g,_,m,p,v,y,E,C,T,b,S,I,A,D,w,N,O,k,P,j,H,L,R,x,W,U,q,F,K,M,Q,B,V,Y,z,J,Z,G,$,X,tt,et,nt,it,rt,ot,st,at,lt,ct,ht,ut,ft,dt,gt,_t,mt,pt,vt,yt,Et,Ct,Tt,bt,St,It,At,Dt,wt,Nt,Ot,kt,Pt,jt,Ht,Lt,Rt,xt,Wt,Ut,qt,Ft,Kt,Mt,Qt,Bt,Vt,Yt,zt,Jt,Zt,Gt,$t,Xt,te,ee,ne,ie,re,oe,se,ae,le,ce,he,ue,fe,de,ge,_e,me,pe,ve,ye,Ee,Ce,Te,be,Se,Ie,Ae,De,we,Ne,Oe,ke,Pe,je,He,Le,Re,xe,We,Ue,qe,Fe,Ke,Me,Qe,Be,Ve,Ye,ze,Je,Ze,Ge,$e,Xe,tn,en,nn,rn,on,sn,an,ln,cn,hn,un,fn,dn,gn,_n,mn,pn,vn,yn,En,Cn,Tn,bn,Sn,In,An,Dn,wn,Nn,On,kn,Pn,jn,Hn,Ln,Rn,xn,Wn,Un,qn,Fn=function(i){var e="transitionend";function t(t){var e=this,n=!1;return i(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(e)},t),this}var l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");e&&"#"!==e||(e=t.getAttribute("href")||"");try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=i(t).css("transition-duration");return parseFloat(e)?(e=e.split(",")[0],1e3*parseFloat(e)):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){i(t).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i],o=e[i],s=o&&l.isElement(o)?"element":(a=o,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(r).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+r+'".')}var a}};return i.fn.emulateTransitionEnd=t,i.event.special[l.TRANSITION_END]={bindType:e,delegateType:e,handle:function(t){if(i(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}},l}(e),Kn=(n="alert",a="."+(o="bs.alert"),c=(r=e).fn[n],u={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},f="alert",d="fade",g="show",_=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){r.removeData(this._element,o),this._element=null},t._getRootElement=function(t){var e=Fn.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=r(t).closest("."+f)[0]),n},t._triggerCloseEvent=function(t){var e=r.Event(u.CLOSE);return r(t).trigger(e),e},t._removeElement=function(e){var n=this;if(r(e).removeClass(g),r(e).hasClass(d)){var t=Fn.getTransitionDurationFromElement(e);r(e).one(Fn.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function(t){r(t).detach().trigger(u.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=r(this),e=t.data(o);e||(e=new i(this),t.data(o,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),i}(),r(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',_._handleDismiss(new _)),r.fn[n]=_._jQueryInterface,r.fn[n].Constructor=_,r.fn[n].noConflict=function(){return r.fn[n]=c,_._jQueryInterface},_),Mn=(p="button",y="."+(v="bs.button"),E=".data-api",C=(m=e).fn[p],T="active",b="btn",I='[data-toggle^="button"]',A='[data-toggle="buttons"]',D="input",w=".active",N=".btn",O={CLICK_DATA_API:"click"+y+E,FOCUS_BLUR_DATA_API:(S="focus")+y+E+" blur"+y+E},k=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=m(this._element).closest(A)[0];if(n){var i=this._element.querySelector(D);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(T))t=!1;else{var r=n.querySelector(w);r&&m(r).removeClass(T)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(T),m(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(T)),t&&m(this._element).toggleClass(T)},t.dispose=function(){m.removeData(this._element,v),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=m(this).data(v);t||(t=new n(this),m(this).data(v,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),n}(),m(document).on(O.CLICK_DATA_API,I,function(t){t.preventDefault();var e=t.target;m(e).hasClass(b)||(e=m(e).closest(N)),k._jQueryInterface.call(m(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,I,function(t){var e=m(t.target).closest(N)[0];m(e).toggleClass(S,/^focus(in)?$/.test(t.type))}),m.fn[p]=k._jQueryInterface,m.fn[p].Constructor=k,m.fn[p].noConflict=function(){return m.fn[p]=C,k._jQueryInterface},k),Qn=(j="carousel",L="."+(H="bs.carousel"),R=".data-api",x=(P=e).fn[j],W={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},U={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},q="next",F="prev",K="left",M="right",Q={SLIDE:"slide"+L,SLID:"slid"+L,KEYDOWN:"keydown"+L,MOUSEENTER:"mouseenter"+L,MOUSELEAVE:"mouseleave"+L,TOUCHEND:"touchend"+L,LOAD_DATA_API:"load"+L+R,CLICK_DATA_API:"click"+L+R},B="carousel",V="active",Y="slide",z="carousel-item-right",J="carousel-item-left",Z="carousel-item-next",G="carousel-item-prev",$=".active",X=".active.carousel-item",tt=".carousel-item",et=".carousel-item-next, .carousel-item-prev",nt=".carousel-indicators",it="[data-slide], [data-slide-to]",rt='[data-ride="carousel"]',ot=function(){function o(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(e),this._element=P(t)[0],this._indicatorsElement=this._element.querySelector(nt),this._addEventListeners()}var t=o.prototype;return t.next=function(){this._isSliding||this._slide(q)},t.nextWhenVisible=function(){!document.hidden&&P(this._element).is(":visible")&&"hidden"!==P(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(F)},t.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(et)&&(Fn.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(t){var e=this;this._activeElement=this._element.querySelector(X);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)P(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?q:F;this._slide(i,this._items[t])}},t.dispose=function(){P(this._element).off(L),P.removeData(this._element,H),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=l({},W,t),Fn.typeCheckConfig(j,t,U),t},t._addEventListeners=function(){var e=this;this._config.keyboard&&P(this._element).on(Q.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(P(this._element).on(Q.MOUSEENTER,function(t){return e.pause(t)}).on(Q.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&P(this._element).on(Q.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},t._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},t._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(tt)):[],this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===q,i=t===F,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var s=(r+(t===F?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},t._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(X)),r=P.Event(Q.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return P(this._element).trigger(r),r},t._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll($));P(e).removeClass(V);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&P(n).addClass(V)}},t._slide=function(t,e){var n,i,r,o=this,s=this._element.querySelector(X),a=this._getItemIndex(s),l=e||s&&this._getItemByDirection(t,s),c=this._getItemIndex(l),h=Boolean(this._interval);if(t===q?(n=J,i=Z,r=K):(n=z,i=G,r=M),l&&P(l).hasClass(V))this._isSliding=!1;else if(!this._triggerSlideEvent(l,r).isDefaultPrevented()&&s&&l){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(l);var u=P.Event(Q.SLID,{relatedTarget:l,direction:r,from:a,to:c});if(P(this._element).hasClass(Y)){P(l).addClass(i),Fn.reflow(l),P(s).addClass(n),P(l).addClass(n);var f=Fn.getTransitionDurationFromElement(s);P(s).one(Fn.TRANSITION_END,function(){P(l).removeClass(n+" "+i).addClass(V),P(s).removeClass(V+" "+i+" "+n),o._isSliding=!1,setTimeout(function(){return P(o._element).trigger(u)},0)}).emulateTransitionEnd(f)}else P(s).removeClass(V),P(l).addClass(V),this._isSliding=!1,P(this._element).trigger(u);h&&this.cycle()}},o._jQueryInterface=function(i){return this.each(function(){var t=P(this).data(H),e=l({},W,P(this).data());"object"==typeof i&&(e=l({},e,i));var n="string"==typeof i?i:e.slide;if(t||(t=new o(this,e),P(this).data(H,t)),"number"==typeof i)t.to(i);else if("string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}else e.interval&&(t.pause(),t.cycle())})},o._dataApiClickHandler=function(t){var e=Fn.getSelectorFromElement(this);if(e){var n=P(e)[0];if(n&&P(n).hasClass(B)){var i=l({},P(n).data(),P(this).data()),r=this.getAttribute("data-slide-to");r&&(i.interval=!1),o._jQueryInterface.call(P(n),i),r&&P(n).data(H).to(r),t.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return W}}]),o}(),P(document).on(Q.CLICK_DATA_API,it,ot._dataApiClickHandler),P(window).on(Q.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(rt)),e=0,n=t.length;e<n;e++){var i=P(t[e]);ot._jQueryInterface.call(i,i.data())}}),P.fn[j]=ot._jQueryInterface,P.fn[j].Constructor=ot,P.fn[j].noConflict=function(){return P.fn[j]=x,ot._jQueryInterface},ot),Bn=(at="collapse",ct="."+(lt="bs.collapse"),ht=(st=e).fn[at],ut={toggle:!0,parent:""},ft={toggle:"boolean",parent:"(string|element)"},dt={SHOW:"show"+ct,SHOWN:"shown"+ct,HIDE:"hide"+ct,HIDDEN:"hidden"+ct,CLICK_DATA_API:"click"+ct+".data-api"},gt="show",_t="collapse",mt="collapsing",pt="collapsed",vt="width",yt="height",Et=".show, .collapsing",Ct='[data-toggle="collapse"]',Tt=function(){function a(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=st.makeArray(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(Ct)),i=0,r=n.length;i<r;i++){var o=n[i],s=Fn.getSelectorFromElement(o),a=[].slice.call(document.querySelectorAll(s)).filter(function(t){return t===e});null!==s&&0<a.length&&(this._selector=s,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=a.prototype;return t.toggle=function(){st(this._element).hasClass(gt)?this.hide():this.show()},t.show=function(){var t,e,n=this;if(!this._isTransitioning&&!st(this._element).hasClass(gt)&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(Et)).filter(function(t){return t.getAttribute("data-parent")===n._config.parent})).length&&(t=null),!(t&&(e=st(t).not(this._selector).data(lt))&&e._isTransitioning))){var i=st.Event(dt.SHOW);if(st(this._element).trigger(i),!i.isDefaultPrevented()){t&&(a._jQueryInterface.call(st(t).not(this._selector),"hide"),e||st(t).data(lt,null));var r=this._getDimension();st(this._element).removeClass(_t).addClass(mt),this._element.style[r]=0,this._triggerArray.length&&st(this._triggerArray).removeClass(pt).attr("aria-expanded",!0),this.setTransitioning(!0);var o="scroll"+(r[0].toUpperCase()+r.slice(1)),s=Fn.getTransitionDurationFromElement(this._element);st(this._element).one(Fn.TRANSITION_END,function(){st(n._element).removeClass(mt).addClass(_t).addClass(gt),n._element.style[r]="",n.setTransitioning(!1),st(n._element).trigger(dt.SHOWN)}).emulateTransitionEnd(s),this._element.style[r]=this._element[o]+"px"}}},t.hide=function(){var t=this;if(!this._isTransitioning&&st(this._element).hasClass(gt)){var e=st.Event(dt.HIDE);if(st(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",Fn.reflow(this._element),st(this._element).addClass(mt).removeClass(_t).removeClass(gt);var i=this._triggerArray.length;if(0<i)for(var r=0;r<i;r++){var o=this._triggerArray[r],s=Fn.getSelectorFromElement(o);if(null!==s)st([].slice.call(document.querySelectorAll(s))).hasClass(gt)||st(o).addClass(pt).attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var a=Fn.getTransitionDurationFromElement(this._element);st(this._element).one(Fn.TRANSITION_END,function(){t.setTransitioning(!1),st(t._element).removeClass(mt).addClass(_t).trigger(dt.HIDDEN)}).emulateTransitionEnd(a)}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){st.removeData(this._element,lt),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=l({},ut,t)).toggle=Boolean(t.toggle),Fn.typeCheckConfig(at,t,ft),t},t._getDimension=function(){return st(this._element).hasClass(vt)?vt:yt},t._getParent=function(){var n=this,t=null;Fn.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',i=[].slice.call(t.querySelectorAll(e));return st(i).each(function(t,e){n._addAriaAndCollapsedClass(a._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){if(t){var n=st(t).hasClass(gt);e.length&&st(e).toggleClass(pt,!n).attr("aria-expanded",n)}},a._getTargetFromElement=function(t){var e=Fn.getSelectorFromElement(t);return e?document.querySelector(e):null},a._jQueryInterface=function(i){return this.each(function(){var t=st(this),e=t.data(lt),n=l({},ut,t.data(),"object"==typeof i&&i?i:{});if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new a(this,n),t.data(lt,e)),"string"==typeof i){if("undefined"==typeof e[i])throw new TypeError('No method named "'+i+'"');e[i]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ut}}]),a}(),st(document).on(dt.CLICK_DATA_API,Ct,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=st(this),e=Fn.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(e));st(i).each(function(){var t=st(this),e=t.data(lt)?"toggle":n.data();Tt._jQueryInterface.call(t,e)})}),st.fn[at]=Tt._jQueryInterface,st.fn[at].Constructor=Tt,st.fn[at].noConflict=function(){return st.fn[at]=ht,Tt._jQueryInterface},Tt),Vn=(St="dropdown",At="."+(It="bs.dropdown"),Dt=".data-api",wt=(bt=e).fn[St],Nt=new RegExp("38|40|27"),Ot={HIDE:"hide"+At,HIDDEN:"hidden"+At,SHOW:"show"+At,SHOWN:"shown"+At,CLICK:"click"+At,CLICK_DATA_API:"click"+At+Dt,KEYDOWN_DATA_API:"keydown"+At+Dt,KEYUP_DATA_API:"keyup"+At+Dt},kt="disabled",Pt="show",jt="dropup",Ht="dropright",Lt="dropleft",Rt="dropdown-menu-right",xt="position-static",Wt='[data-toggle="dropdown"]',Ut=".dropdown form",qt=".dropdown-menu",Ft=".navbar-nav",Kt=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Mt="top-start",Qt="top-end",Bt="bottom-start",Vt="bottom-end",Yt="right-start",zt="left-start",Jt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},Zt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},Gt=function(){function c(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=c.prototype;return t.toggle=function(){if(!this._element.disabled&&!bt(this._element).hasClass(kt)){var t=c._getParentFromElement(this._element),e=bt(this._menu).hasClass(Pt);if(c._clearMenus(),!e){var n={relatedTarget:this._element},i=bt.Event(Ot.SHOW,n);if(bt(t).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof h)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var r=this._element;"parent"===this._config.reference?r=t:Fn.isElement(this._config.reference)&&(r=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(r=this._config.reference[0])),"scrollParent"!==this._config.boundary&&bt(t).addClass(xt),this._popper=new h(r,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===bt(t).closest(Ft).length&&bt(document.body).children().on("mouseover",null,bt.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),bt(this._menu).toggleClass(Pt),bt(t).toggleClass(Pt).trigger(bt.Event(Ot.SHOWN,n))}}}},t.dispose=function(){bt.removeData(this._element,It),bt(this._element).off(At),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;bt(this._element).on(Ot.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=l({},this.constructor.Default,bt(this._element).data(),t),Fn.typeCheckConfig(St,t,this.constructor.DefaultType),t},t._getMenuElement=function(){if(!this._menu){var t=c._getParentFromElement(this._element);t&&(this._menu=t.querySelector(qt))}return this._menu},t._getPlacement=function(){var t=bt(this._element.parentNode),e=Bt;return t.hasClass(jt)?(e=Mt,bt(this._menu).hasClass(Rt)&&(e=Qt)):t.hasClass(Ht)?e=Yt:t.hasClass(Lt)?e=zt:bt(this._menu).hasClass(Rt)&&(e=Vt),e},t._detectNavbar=function(){return 0<bt(this._element).closest(".navbar").length},t._getPopperConfig=function(){var e=this,t={};"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e._config.offset(t.offsets)||{}),t}:t.offset=this._config.offset;var n={placement:this._getPlacement(),modifiers:{offset:t,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(n.modifiers.applyStyle={enabled:!1}),n},c._jQueryInterface=function(e){return this.each(function(){var t=bt(this).data(It);if(t||(t=new c(this,"object"==typeof e?e:null),bt(this).data(It,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},c._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var e=[].slice.call(document.querySelectorAll(Wt)),n=0,i=e.length;n<i;n++){var r=c._getParentFromElement(e[n]),o=bt(e[n]).data(It),s={relatedTarget:e[n]};if(t&&"click"===t.type&&(s.clickEvent=t),o){var a=o._menu;if(bt(r).hasClass(Pt)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&bt.contains(r,t.target))){var l=bt.Event(Ot.HIDE,s);bt(r).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&bt(document.body).children().off("mouseover",null,bt.noop),e[n].setAttribute("aria-expanded","false"),bt(a).removeClass(Pt),bt(r).removeClass(Pt).trigger(bt.Event(Ot.HIDDEN,s)))}}}},c._getParentFromElement=function(t){var e,n=Fn.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},c._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||bt(t.target).closest(qt).length)):Nt.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!bt(this).hasClass(kt))){var e=c._getParentFromElement(this),n=bt(e).hasClass(Pt);if((n||27===t.which&&32===t.which)&&(!n||27!==t.which&&32!==t.which)){var i=[].slice.call(e.querySelectorAll(Kt));if(0!==i.length){var r=i.indexOf(t.target);38===t.which&&0<r&&r--,40===t.which&&r<i.length-1&&r++,r<0&&(r=0),i[r].focus()}}else{if(27===t.which){var o=e.querySelector(Wt);bt(o).trigger("focus")}bt(this).trigger("click")}}},s(c,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Jt}},{key:"DefaultType",get:function(){return Zt}}]),c}(),bt(document).on(Ot.KEYDOWN_DATA_API,Wt,Gt._dataApiKeydownHandler).on(Ot.KEYDOWN_DATA_API,qt,Gt._dataApiKeydownHandler).on(Ot.CLICK_DATA_API+" "+Ot.KEYUP_DATA_API,Gt._clearMenus).on(Ot.CLICK_DATA_API,Wt,function(t){t.preventDefault(),t.stopPropagation(),Gt._jQueryInterface.call(bt(this),"toggle")}).on(Ot.CLICK_DATA_API,Ut,function(t){t.stopPropagation()}),bt.fn[St]=Gt._jQueryInterface,bt.fn[St].Constructor=Gt,bt.fn[St].noConflict=function(){return bt.fn[St]=wt,Gt._jQueryInterface},Gt),Yn=(Xt="modal",ee="."+(te="bs.modal"),ne=($t=e).fn[Xt],ie={backdrop:!0,keyboard:!0,focus:!0,show:!0},re={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},oe={HIDE:"hide"+ee,HIDDEN:"hidden"+ee,SHOW:"show"+ee,SHOWN:"shown"+ee,FOCUSIN:"focusin"+ee,RESIZE:"resize"+ee,CLICK_DISMISS:"click.dismiss"+ee,KEYDOWN_DISMISS:"keydown.dismiss"+ee,MOUSEUP_DISMISS:"mouseup.dismiss"+ee,MOUSEDOWN_DISMISS:"mousedown.dismiss"+ee,CLICK_DATA_API:"click"+ee+".data-api"},se="modal-scrollbar-measure",ae="modal-backdrop",le="modal-open",ce="fade",he="show",ue=".modal-dialog",fe='[data-toggle="modal"]',de='[data-dismiss="modal"]',ge=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",_e=".sticky-top",me=function(){function r(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(ue),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._scrollbarWidth=0}var t=r.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e=this;if(!this._isTransitioning&&!this._isShown){$t(this._element).hasClass(ce)&&(this._isTransitioning=!0);var n=$t.Event(oe.SHOW,{relatedTarget:t});$t(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),$t(document.body).addClass(le),this._setEscapeEvent(),this._setResizeEvent(),$t(this._element).on(oe.CLICK_DISMISS,de,function(t){return e.hide(t)}),$t(this._dialog).on(oe.MOUSEDOWN_DISMISS,function(){$t(e._element).one(oe.MOUSEUP_DISMISS,function(t){$t(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},t.hide=function(t){var e=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var n=$t.Event(oe.HIDE);if($t(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=$t(this._element).hasClass(ce);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),$t(document).off(oe.FOCUSIN),$t(this._element).removeClass(he),$t(this._element).off(oe.CLICK_DISMISS),$t(this._dialog).off(oe.MOUSEDOWN_DISMISS),i){var r=Fn.getTransitionDurationFromElement(this._element);$t(this._element).one(Fn.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(r)}else this._hideModal()}}},t.dispose=function(){$t.removeData(this._element,te),$t(window,document,this._element,this._backdrop).off(ee),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=l({},ie,t),Fn.typeCheckConfig(Xt,t,re),t},t._showElement=function(t){var e=this,n=$t(this._element).hasClass(ce);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,n&&Fn.reflow(this._element),$t(this._element).addClass(he),this._config.focus&&this._enforceFocus();var i=$t.Event(oe.SHOWN,{relatedTarget:t}),r=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,$t(e._element).trigger(i)};if(n){var o=Fn.getTransitionDurationFromElement(this._element);$t(this._dialog).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r()},t._enforceFocus=function(){var e=this;$t(document).off(oe.FOCUSIN).on(oe.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===$t(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?$t(this._element).on(oe.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||$t(this._element).off(oe.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?$t(window).on(oe.RESIZE,function(t){return e.handleUpdate(t)}):$t(window).off(oe.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){$t(document.body).removeClass(le),t._resetAdjustments(),t._resetScrollbar(),$t(t._element).trigger(oe.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&($t(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e=this,n=$t(this._element).hasClass(ce)?ce:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=ae,n&&this._backdrop.classList.add(n),$t(this._backdrop).appendTo(document.body),$t(this._element).on(oe.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),n&&Fn.reflow(this._backdrop),$t(this._backdrop).addClass(he),!t)return;if(!n)return void t();var i=Fn.getTransitionDurationFromElement(this._backdrop);$t(this._backdrop).one(Fn.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){$t(this._backdrop).removeClass(he);var r=function(){e._removeBackdrop(),t&&t()};if($t(this._element).hasClass(ce)){var o=Fn.getTransitionDurationFromElement(this._backdrop);$t(this._backdrop).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r()}else t&&t()},t._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var r=this;if(this._isBodyOverflowing){var t=[].slice.call(document.querySelectorAll(ge)),e=[].slice.call(document.querySelectorAll(_e));$t(t).each(function(t,e){var n=e.style.paddingRight,i=$t(e).css("padding-right");$t(e).data("padding-right",n).css("padding-right",parseFloat(i)+r._scrollbarWidth+"px")}),$t(e).each(function(t,e){var n=e.style.marginRight,i=$t(e).css("margin-right");$t(e).data("margin-right",n).css("margin-right",parseFloat(i)-r._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=$t(document.body).css("padding-right");$t(document.body).data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},t._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(ge));$t(t).each(function(t,e){var n=$t(e).data("padding-right");$t(e).removeData("padding-right"),e.style.paddingRight=n||""});var e=[].slice.call(document.querySelectorAll(""+_e));$t(e).each(function(t,e){var n=$t(e).data("margin-right");"undefined"!=typeof n&&$t(e).css("margin-right",n).removeData("margin-right")});var n=$t(document.body).data("padding-right");$t(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},t._getScrollbarWidth=function(){var t=document.createElement("div");t.className=se,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},r._jQueryInterface=function(n,i){return this.each(function(){var t=$t(this).data(te),e=l({},ie,$t(this).data(),"object"==typeof n&&n?n:{});if(t||(t=new r(this,e),$t(this).data(te,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n](i)}else e.show&&t.show(i)})},s(r,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ie}}]),r}(),$t(document).on(oe.CLICK_DATA_API,fe,function(t){var e,n=this,i=Fn.getSelectorFromElement(this);i&&(e=document.querySelector(i));var r=$t(e).data(te)?"toggle":l({},$t(e).data(),$t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var o=$t(e).one(oe.SHOW,function(t){t.isDefaultPrevented()||o.one(oe.HIDDEN,function(){$t(n).is(":visible")&&n.focus()})});me._jQueryInterface.call($t(e),r,this)}),$t.fn[Xt]=me._jQueryInterface,$t.fn[Xt].Constructor=me,$t.fn[Xt].noConflict=function(){return $t.fn[Xt]=ne,me._jQueryInterface},me),zn=(ve="tooltip",Ee="."+(ye="bs.tooltip"),Ce=(pe=e).fn[ve],Te="bs-tooltip",be=new RegExp("(^|\\s)"+Te+"\\S+","g"),Ae={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!(Ie={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(Se={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},we="out",Ne={HIDE:"hide"+Ee,HIDDEN:"hidden"+Ee,SHOW:(De="show")+Ee,SHOWN:"shown"+Ee,INSERTED:"inserted"+Ee,CLICK:"click"+Ee,FOCUSIN:"focusin"+Ee,FOCUSOUT:"focusout"+Ee,MOUSEENTER:"mouseenter"+Ee,MOUSELEAVE:"mouseleave"+Ee},Oe="fade",ke="show",Pe=".tooltip-inner",je=".arrow",He="hover",Le="focus",Re="click",xe="manual",We=function(){function i(t,e){if("undefined"==typeof h)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=pe(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(pe(this.getTipElement()).hasClass(ke))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),pe.removeData(this.element,this.constructor.DATA_KEY),pe(this.element).off(this.constructor.EVENT_KEY),pe(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&pe(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===pe(this.element).css("display"))throw new Error("Please use show on visible elements");var t=pe.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){pe(this.element).trigger(t);var n=pe.contains(this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!n)return;var i=this.getTipElement(),r=Fn.getUID(this.constructor.NAME);i.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&pe(i).addClass(Oe);var o="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,s=this._getAttachment(o);this.addAttachmentClass(s);var a=!1===this.config.container?document.body:pe(document).find(this.config.container);pe(i).data(this.constructor.DATA_KEY,this),pe.contains(this.element.ownerDocument.documentElement,this.tip)||pe(i).appendTo(a),pe(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new h(this.element,i,{placement:s,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:je},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),pe(i).addClass(ke),"ontouchstart"in document.documentElement&&pe(document.body).children().on("mouseover",null,pe.noop);var l=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,pe(e.element).trigger(e.constructor.Event.SHOWN),t===we&&e._leave(null,e)};if(pe(this.tip).hasClass(Oe)){var c=Fn.getTransitionDurationFromElement(this.tip);pe(this.tip).one(Fn.TRANSITION_END,l).emulateTransitionEnd(c)}else l()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=pe.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==De&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),pe(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(pe(this.element).trigger(i),!i.isDefaultPrevented()){if(pe(n).removeClass(ke),"ontouchstart"in document.documentElement&&pe(document.body).children().off("mouseover",null,pe.noop),this._activeTrigger[Re]=!1,this._activeTrigger[Le]=!1,this._activeTrigger[He]=!1,pe(this.tip).hasClass(Oe)){var o=Fn.getTransitionDurationFromElement(n);pe(n).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){pe(this.getTipElement()).addClass(Te+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||pe(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(pe(t.querySelectorAll(Pe)),this.getTitle()),pe(t).removeClass(Oe+" "+ke)},t.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?pe(e).parent().is(t)||t.empty().append(e):t.text(pe(e).text()):t[n?"html":"text"](e)},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getAttachment=function(t){return Ie[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)pe(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==xe){var e=t===He?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===He?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;pe(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}pe(i.element).closest(".modal").on("hide.bs.modal",function(){return i.hide()})}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||pe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Le:He]=!0),pe(e.getTipElement()).hasClass(ke)||e._hoverState===De?e._hoverState=De:(clearTimeout(e._timeout),e._hoverState=De,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===De&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||pe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Le:He]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=we,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===we&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=l({},this.constructor.Default,pe(this.element).data(),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),Fn.typeCheckConfig(ve,t,this.constructor.DefaultType),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=pe(this.getTipElement()),e=t.attr("class").match(be);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(pe(t).removeClass(Oe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=pe(this).data(ye),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),pe(this).data(ye,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Ae}},{key:"NAME",get:function(){return ve}},{key:"DATA_KEY",get:function(){return ye}},{key:"Event",get:function(){return Ne}},{key:"EVENT_KEY",get:function(){return Ee}},{key:"DefaultType",get:function(){return Se}}]),i}(),pe.fn[ve]=We._jQueryInterface,pe.fn[ve].Constructor=We,pe.fn[ve].noConflict=function(){return pe.fn[ve]=Ce,We._jQueryInterface},We),Jn=(qe="popover",Ke="."+(Fe="bs.popover"),Me=(Ue=e).fn[qe],Qe="bs-popover",Be=new RegExp("(^|\\s)"+Qe+"\\S+","g"),Ve=l({},zn.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ye=l({},zn.DefaultType,{content:"(string|element|function)"}),ze="fade",Ze=".popover-header",Ge=".popover-body",$e={HIDE:"hide"+Ke,HIDDEN:"hidden"+Ke,SHOW:(Je="show")+Ke,SHOWN:"shown"+Ke,INSERTED:"inserted"+Ke,CLICK:"click"+Ke,FOCUSIN:"focusin"+Ke,FOCUSOUT:"focusout"+Ke,MOUSEENTER:"mouseenter"+Ke,MOUSELEAVE:"mouseleave"+Ke},Xe=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var r=i.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){Ue(this.getTipElement()).addClass(Qe+"-"+t)},r.getTipElement=function(){return this.tip=this.tip||Ue(this.config.template)[0],this.tip},r.setContent=function(){var t=Ue(this.getTipElement());this.setElementContent(t.find(Ze),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Ge),e),t.removeClass(ze+" "+Je)},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=Ue(this.getTipElement()),e=t.attr("class").match(Be);null!==e&&0<e.length&&t.removeClass(e.join(""))},i._jQueryInterface=function(n){return this.each(function(){var t=Ue(this).data(Fe),e="object"==typeof n?n:null;if((t||!/destroy|hide/.test(n))&&(t||(t=new i(this,e),Ue(this).data(Fe,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Ve}},{key:"NAME",get:function(){return qe}},{key:"DATA_KEY",get:function(){return Fe}},{key:"Event",get:function(){return $e}},{key:"EVENT_KEY",get:function(){return Ke}},{key:"DefaultType",get:function(){return Ye}}]),i}(zn),Ue.fn[qe]=Xe._jQueryInterface,Ue.fn[qe].Constructor=Xe,Ue.fn[qe].noConflict=function(){return Ue.fn[qe]=Me,Xe._jQueryInterface},Xe),Zn=(en="scrollspy",rn="."+(nn="bs.scrollspy"),on=(tn=e).fn[en],sn={offset:10,method:"auto",target:""},an={offset:"number",method:"string",target:"(string|element)"},ln={ACTIVATE:"activate"+rn,SCROLL:"scroll"+rn,LOAD_DATA_API:"load"+rn+".data-api"},cn="dropdown-item",hn="active",un='[data-spy="scroll"]',fn=".active",dn=".nav, .list-group",gn=".nav-link",_n=".nav-item",mn=".list-group-item",pn=".dropdown",vn=".dropdown-item",yn=".dropdown-toggle",En="offset",Cn="position",Tn=function(){function n(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+gn+","+this._config.target+" "+mn+","+this._config.target+" "+vn,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,tn(this._scrollElement).on(ln.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?En:Cn,r="auto"===this._config.method?t:this._config.method,o=r===Cn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,n=Fn.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[tn(e)[r]().top+o,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){tn.removeData(this._element,nn),tn(this._scrollElement).off(rn),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(t){if("string"!=typeof(t=l({},sn,"object"==typeof t&&t?t:{})).target){var e=tn(t.target).attr("id");e||(e=Fn.getUID(en),tn(t.target).attr("id",e)),t.target="#"+e}return Fn.typeCheckConfig(en,t,an),t},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",");t=t.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var n=tn([].slice.call(document.querySelectorAll(t.join(","))));n.hasClass(cn)?(n.closest(pn).find(yn).addClass(hn),n.addClass(hn)):(n.addClass(hn),n.parents(dn).prev(gn+", "+mn).addClass(hn),n.parents(dn).prev(_n).children(gn).addClass(hn)),tn(this._scrollElement).trigger(ln.ACTIVATE,{relatedTarget:e})},t._clear=function(){var t=[].slice.call(document.querySelectorAll(this._selector));tn(t).filter(fn).removeClass(hn)},n._jQueryInterface=function(e){return this.each(function(){var t=tn(this).data(nn);if(t||(t=new n(this,"object"==typeof e&&e),tn(this).data(nn,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return sn}}]),n}(),tn(window).on(ln.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(un)),e=t.length;e--;){var n=tn(t[e]);Tn._jQueryInterface.call(n,n.data())}}),tn.fn[en]=Tn._jQueryInterface,tn.fn[en].Constructor=Tn,tn.fn[en].noConflict=function(){return tn.fn[en]=on,Tn._jQueryInterface},Tn),Gn=(In="."+(Sn="bs.tab"),An=(bn=e).fn.tab,Dn={HIDE:"hide"+In,HIDDEN:"hidden"+In,SHOW:"show"+In,SHOWN:"shown"+In,CLICK_DATA_API:"click"+In+".data-api"},wn="dropdown-menu",Nn="active",On="disabled",kn="fade",Pn="show",jn=".dropdown",Hn=".nav, .list-group",Ln=".active",Rn="> li > .active",xn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Wn=".dropdown-toggle",Un="> .dropdown-menu .active",qn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&bn(this._element).hasClass(Nn)||bn(this._element).hasClass(On))){var t,i,e=bn(this._element).closest(Hn)[0],r=Fn.getSelectorFromElement(this._element);if(e){var o="UL"===e.nodeName?Rn:Ln;i=(i=bn.makeArray(bn(e).find(o)))[i.length-1]}var s=bn.Event(Dn.HIDE,{relatedTarget:this._element}),a=bn.Event(Dn.SHOW,{relatedTarget:i});if(i&&bn(i).trigger(s),bn(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(t=document.querySelector(r)),this._activate(this._element,e);var l=function(){var t=bn.Event(Dn.HIDDEN,{relatedTarget:n._element}),e=bn.Event(Dn.SHOWN,{relatedTarget:i});bn(i).trigger(t),bn(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){bn.removeData(this._element,Sn),this._element=null},t._activate=function(t,e,n){var i=this,r=("UL"===e.nodeName?bn(e).find(Rn):bn(e).children(Ln))[0],o=n&&r&&bn(r).hasClass(kn),s=function(){return i._transitionComplete(t,r,n)};if(r&&o){var a=Fn.getTransitionDurationFromElement(r);bn(r).one(Fn.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},t._transitionComplete=function(t,e,n){if(e){bn(e).removeClass(Pn+" "+Nn);var i=bn(e.parentNode).find(Un)[0];i&&bn(i).removeClass(Nn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(bn(t).addClass(Nn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),Fn.reflow(t),bn(t).addClass(Pn),t.parentNode&&bn(t.parentNode).hasClass(wn)){var r=bn(t).closest(jn)[0];if(r){var o=[].slice.call(r.querySelectorAll(Wn));bn(o).addClass(Nn)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=bn(this),e=t.data(Sn);if(e||(e=new i(this),t.data(Sn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),i}(),bn(document).on(Dn.CLICK_DATA_API,xn,function(t){t.preventDefault(),qn._jQueryInterface.call(bn(this),"show")}),bn.fn.tab=qn._jQueryInterface,bn.fn.tab.Constructor=qn,bn.fn.tab.noConflict=function(){return bn.fn.tab=An,qn._jQueryInterface},qn);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||4<=e[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=Fn,t.Alert=Kn,t.Button=Mn,t.Carousel=Qn,t.Collapse=Bn,t.Dropdown=Vn,t.Modal=Yn,t.Popover=Jn,t.Scrollspy=Zn,t.Tab=Gn,t.Tooltip=zn,Object.defineProperty(t,"__esModule",{value:!0})}); /* * jQuery Easing v1.4.0 - http://gsgd.co.uk/sandbox/jquery/easing/ * Open source under the BSD License. * Copyright © 2008 George McGinley Smith * All rights reserved. * https://raw.github.com/gdsmith/jquery-easing/master/LICENSE */ (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],function($){return factory($)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require("jquery"))}else{factory(jQuery)}})(function($){$.easing["jswing"]=$.easing["swing"];var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x}else if(x<2/d1){return n1*(x-=1.5/d1)*x+.75}else if(x<2.5/d1){return n1*(x-=2.25/d1)*x+.9375}else{return n1*(x-=2.625/d1)*x+.984375}}$.extend($.easing,{def:"easeOutQuad",swing:function(x){return $.easing[$.easing.def](x)},easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1-cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}})}); /** * Owl Carousel v2.3.4 * Copyright 2013-2018 David Deutsch * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE */ !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn "+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1, animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document); // Generated by CoffeeScript 1.6.2 /* jQuery Waypoints - v2.0.3 Copyright (c) 2011-2013 Caleb Troughton Dual licensed under the MIT license and GPL license. https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt */ (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(this,function(n,r){var i,o,l,s,f,u,a,c,h,d,p,y,v,w,g,m;i=n(r);c=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t,e){t.each(function(){var t;t=l.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(a,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=a[n(t).data(u)])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); /*! * jquery.counterup.js 1.0 * * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal * Released under the GPL v2 License * * Date: Nov 26, 2013 */(function(e){"use strict";e.fn.counterUp=function(t){var n=e.extend({time:400,delay:10},t);return this.each(function(){var t=e(this),r=n,i=function(){var e=[],n=r.time/r.delay,i=t.text(),s=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");var o=/^[0-9]+$/.test(i),u=/^[0-9]+\.[0-9]+$/.test(i),a=u?(i.split(".")[1]||[]).length:0;for(var f=n;f>=1;f--){var l=parseInt(i/n*f);u&&(l=parseFloat(i/n*f).toFixed(a));if(s)while(/(\d+)(\d{3})/.test(l.toString()))l=l.toString().replace(/(\d+)(\d{3})/,"$1,$2");e.unshift(l)}t.data("counterup-nums",e);t.text("0");var c=function(){t.text(t.data("counterup-nums").shift());if(t.data("counterup-nums").length)setTimeout(t.data("counterup-func"),r.delay);else{delete t.data("counterup-nums");t.data("counterup-nums",null);t.data("counterup-func",null)}};t.data("counterup-func",c);setTimeout(t.data("counterup-func"),r.delay)};t.waypoint(i,{offset:"100%",triggerOnce:!0})})}})(jQuery); /*! Magnific Popup - v1.1.0 - 2016-02-20 * http://dimsemenov.com/plugins/magnific-popup/ * Copyright (c) 2016 Dmitry Semenov; */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:'<div class="work-loader">Loading...</div>',autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The Content</a> could not be loaded.<br>AJAX Content could not load in Localhost.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()}); /*! * Isotope PACKAGED v3.0.6 * Licensed GPLv3 for open source use * or Isotope Commercial License for commercial use * https://isotope.metafizzy.co * Copyright 2010-2018 Metafizzy */ !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,I=d&&r,x=t(s.width);x!==!1&&(a.width=x+(I?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(I?0:y+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+z),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?o.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){i=i||100;var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var s=i.toDashed(o),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(n&&n.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,o,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=parseFloat(o),r=parseFloat(n),a=this.layout.size;o.indexOf("%")!=-1&&(s=s/100*a.width),n.indexOf("%")!=-1&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?a.paddingLeft:a.paddingRight,r-=i?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),n&&!this.isTransitioning)return void this.layoutPosition();var s=t-i,r=e-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t); }:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
306.336237
50,758
0.717141
9def3f852ec17577b167f5c1a5732ce8e50b30f9
244
js
JavaScript
client/src/components/Footer/index.js
bokoto000/Webshop
c6c93fb716e8c09a9d554049ff61b4f2dcc3531f
[ "MIT" ]
1
2019-11-20T16:41:59.000Z
2019-11-20T16:41:59.000Z
client/src/components/Footer/index.js
bokoto000/Webshop
c6c93fb716e8c09a9d554049ff61b4f2dcc3531f
[ "MIT" ]
null
null
null
client/src/components/Footer/index.js
bokoto000/Webshop
c6c93fb716e8c09a9d554049ff61b4f2dcc3531f
[ "MIT" ]
null
null
null
import React, { Component } from "react"; import { Divider } from "semantic-ui-react"; export default class Footer extends Component { render() { return ( <div> <Divider/> <h1> Footer</h1> </div> ); } }
17.428571
47
0.557377
9df00994cb784cfb8c5f3b302e458fa03aff2953
2,306
js
JavaScript
frontend/src/actions/settingActions.js
advcha/react-doctor-appointment
62afbcb9ff01ce96ea3d7f3657ffb38fbd85db6c
[ "Apache-2.0" ]
null
null
null
frontend/src/actions/settingActions.js
advcha/react-doctor-appointment
62afbcb9ff01ce96ea3d7f3657ffb38fbd85db6c
[ "Apache-2.0" ]
null
null
null
frontend/src/actions/settingActions.js
advcha/react-doctor-appointment
62afbcb9ff01ce96ea3d7f3657ffb38fbd85db6c
[ "Apache-2.0" ]
null
null
null
import axios from 'axios'; import { SETTING_CREATE, SETTING_UPDATE, SETTING_DELETE, SETTING_DELETE_ALL, SETTING_FETCH_ALL, } from '../constants/settingConstants'; export const createSetting = (form) => async (dispatch, getState) => { try { const { userLogin: { userInfo }, } = getState(); const config = { headers: { Authorization: `Bearer ${userInfo.token}`, }, }; const { data } = await axios.post('/setting', form, config); dispatch({ type: SETTING_CREATE, payload: data }); } catch (error) { console.log(error); } }; export const fetchSettings = () => async (dispatch, getState) => { try { const { userLogin: { userInfo }, } = getState(); const token = userInfo ? userInfo.token : 'homepage'; const config = { headers: { Authorization: `Bearer ${token}`, }, }; const { data } = await axios.get('/setting', config); dispatch({ type: SETTING_FETCH_ALL, payload: data }); } catch (error) { console.log(error); } }; export const deleteSetting = (id) => async (dispatch, getState) => { try { const { userLogin: { userInfo }, } = getState(); const config = { headers: { Authorization: `Bearer ${userInfo.token}`, }, }; await axios.delete(`/setting/${id}`, config); dispatch({ type: SETTING_DELETE, payload: id }); } catch (error) { console.log(error); } }; export const deleteSettings = (idArr) => async (dispatch, getState) => { try { const { userLogin: { userInfo }, } = getState(); const config = { headers: { Authorization: `Bearer ${userInfo.token}`, }, }; await axios.post(`/setting/delete`, idArr, config); dispatch({ type: SETTING_DELETE_ALL, payload: idArr }); } catch (error) { console.log(error); } }; export const updateSetting = (id, form) => async (dispatch, getState) => { try { const { userLogin: { userInfo }, } = getState(); const config = { headers: { Authorization: `Bearer ${userInfo.token}`, }, }; const { data } = await axios.put(`/setting/${id}`, form, config); dispatch({ type: SETTING_UPDATE, payload: data }); } catch (error) { console.log(error); } };
22.173077
74
0.573287
9df00e2173fa9920c8d84972a1762a248197676a
2,392
js
JavaScript
src/data/models/index.js
maxkhog/ndo
330e6b4c80ca9c0323790f16fdf43a240b227be6
[ "MIT" ]
null
null
null
src/data/models/index.js
maxkhog/ndo
330e6b4c80ca9c0323790f16fdf43a240b227be6
[ "MIT" ]
null
null
null
src/data/models/index.js
maxkhog/ndo
330e6b4c80ca9c0323790f16fdf43a240b227be6
[ "MIT" ]
null
null
null
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import sequelize from '../sequelize'; import User from './User'; import UserLogin from './UserLogin'; import UserClaim from './UserClaim'; import UserProfile from './UserProfile'; import Course from './Course'; import Unit from './Unit'; import CourseUnit from './CourseUnit'; import UserCourse from './UserCourse'; import Answer from './Answer'; import Mark from './Mark'; import Group from './Group'; import UserGroup from './UserGroup'; import File from './File'; import FileParent from './FileParent'; User.hasMany(UserLogin, { foreignKey: 'userId', as: 'logins', onUpdate: 'cascade', onDelete: 'cascade', }); User.hasMany(UserClaim, { foreignKey: 'userId', as: 'claims', onUpdate: 'cascade', onDelete: 'cascade', }); User.hasOne(UserProfile, { foreignKey: 'userId', as: 'profile', onUpdate: 'cascade', onDelete: 'cascade', }); Course.belongsToMany(Unit, { as: 'units', through: { model: CourseUnit, }, foreignKey: 'courseId', }); Unit.belongsToMany(Course, { as: 'courses', through: { model: CourseUnit, }, foreignKey: 'unitId', }); User.belongsToMany(Course, { as: 'courses', through: { model: UserCourse, }, foreignKey: 'userId', }); User.hasMany(File, { as: 'files', }); File.hasMany(FileParent, { as: 'parents', }); Course.belongsToMany(User, { as: 'users', through: { model: UserCourse, }, foreignKey: 'courseId', }); User.belongsToMany(Group, { as: 'groups', through: { model: UserGroup, }, foreignKey: 'userId', }); Group.belongsToMany(User, { as: 'users', through: { model: UserGroup, }, foreignKey: 'groupId', }); User.hasMany(Answer); Unit.hasMany(Answer); Course.hasMany(Answer); Answer.belongsTo(User); Answer.belongsTo(Unit); Answer.belongsTo(Course); Answer.hasMany(Mark); Mark.belongsTo(Answer); Mark.belongsTo(User, { as: 'author' }); function sync(...args) { return sequelize.sync(...args); } export default { sync }; export { Answer, Course, CourseUnit, File, FileParent, Group, Mark, Unit, User, UserClaim, UserCourse, UserGroup, UserLogin, UserProfile, };
17.588235
66
0.662625
9df185f629e0f8e2f45b2cca08c24624b2a09460
22,103
js
JavaScript
umpleonline/scripts/jjs/joint.shapes.uml-state-machine.js
pouyafatol/umple
55c7d46dbc998bd51b02fd82ddb67a3d15d0ac5b
[ "MIT" ]
206
2015-08-26T15:49:05.000Z
2022-03-26T18:31:12.000Z
umpleonline/scripts/jjs/joint.shapes.uml-state-machine.js
pouyafatol/umple
55c7d46dbc998bd51b02fd82ddb67a3d15d0ac5b
[ "MIT" ]
837
2015-08-31T18:19:59.000Z
2022-03-21T16:01:27.000Z
umpleonline/scripts/jjs/joint.shapes.uml-state-machine.js
umple-ucosp/umple
08bcceb4816185108af82ba4840221c2c93f6f68
[ "MIT" ]
336
2015-08-26T17:00:41.000Z
2022-02-14T19:39:57.000Z
joint.shapes.uml_state_machine = {}; joint.shapes.uml_state_machine.StateMachine = {}; joint.shapes.uml_state_machine.CompositeState = joint.shapes.basic.Generic.extend({ markup: [ '<g class="rotatable">', '<rect class="composite-state-rect"/>', '<g class="scalable">', '<line class="composite-state-separator"/>', '</g>', '<text class="composite-state-text"/>', '</g>' ].join(''), defaults: _.defaultsDeep({ type: 'uml_state_machine.CompositeState', attrs: { // We want the state to take as little space as possible during auto-layout. rect: { 'width': 1 }, '.composite-state-rect': { 'stroke': '#000000', 'stroke-width': 2, 'fill': '#ffffff', 'fill-opacity': '0.0', 'rx': 25, 'ry': 25}, '.composite-state-text': { 'ref': '.composite-state-rect', 'ref-y': 2, 'ref-x': .5, 'text-anchor': 'middle', 'y-alignment': 'top', 'font-weight': 'bold', 'fill': 'black', 'font-size': 14, 'font-family': 'Times New Roman' } }, name: [], nestedStates: [] }, joint.shapes.basic.Generic.prototype.defaults), updateRectangles: function(paper) { var attrs = this.get('attrs'); attrs['.composite-state-text'].text = this.getCompStateName(); // Noting that this part of the update procedure should take place after the graph // has auto-layout applied, and before this cell has been added to the graph. if (paper !== undefined) { var bbox = paper.model.getBBox(this.get('nestedStates')); attrs['.composite-state-rect'].width = bbox.width + 20; attrs['.composite-state-rect'].height = bbox.height + 50; this.get('size').width = attrs['.composite-state-rect'].width; this.get('size').height = attrs['.composite-state-rect'].height; attrs['.composite-state-rect'].x = bbox.x - 10; attrs['.composite-state-rect'].y = bbox.y - 20; } }, /* * doEmbed performs the task of converting the names of cells into cell references, * then performs the embed() function with them. * Note that this must be called before updateRectangles() in order to get correct resizing. */ doEmbed: function(paper) { var nestedCells = []; this.get('nestedStates').forEach(function(name) { nestedCells.push(paper.model.getCell(name)); }); this.set({'nestedStates': nestedCells }); var nestedCells = this.get('nestedStates'); //add start state by name for(var j = 0; j < nestedCells.length; j++) { if (nestedCells[j] && nestedCells[j].get('isstart') === true) { var ps_name = "pseudo_start_" + nestedCells[j].get('name'); var startcell = paper.model.getCell(ps_name); nestedCells.push(startcell); } } this.set({'nestedStates': nestedCells }); var nestedCells = this.get('nestedStates'); for (var i = 0; i < nestedCells.length; i++) { this.embed(nestedCells[i]); } }, initialize: function() { this.on('change:name', function() { this.updateRectangles(); this.trigger('uml-update'); }, this); joint.shapes.basic.Generic.prototype.initialize.apply(this, arguments); }, getCompStateName: function() { return this.get('name'); } }); joint.shapes.uml_state_machine.BackButton = joint.shapes.basic.Generic.extend({ markup: [ '<g class="rotatable">', '<g class="scalable">', '<rect class="button-rect"/>', '</g>', '<text class="button-text"/>', '</g>' ].join(''), defaults: _.defaultsDeep({ type: 'uml_state_machine.BackButton', attrs: { rect: { 'width': 100 }, '.button-rect': { 'stroke': '#318c00', 'stroke-width': 2, 'fill': '#64e220', 'rx': 8, 'ry': 8, 'width': 110, 'height': 35 }, '.button-text': { 'ref': '.button-rect', 'ref-y': .5, 'ref-x': .5, 'text-anchor': 'middle', 'y-alignment': 'middle', 'font-weight': 'bold', 'fill': 'black', 'font-size': 14, 'font-family': 'Times New Roman' } } }), initialize: function() { this.on('change:name change:actions change:internals', function() { this.updateRectangles(); this.trigger('uml-update'); }, this); this.updateRectangles(); joint.shapes.basic.Generic.prototype.initialize.apply(this, arguments); }, updateRectangles: function() { var attrs = this.get('attrs'); attrs['.button-text'].text = '< UML class'; } }); joint.shapes.uml_state_machine.State = joint.shapes.basic.Generic.extend({ markup: [ '<g class="rotatable">', '<g class="scalable">', '<rect class="state-name-rect"/>', '</g>', '<line class="state-actions-separator"/>', '<line class="state-internals-separator"/>', '<text class="state-name-text"/>', '<text class="state-actions-text"/><text class="state-internals-text"/>', '</g>' ].join(''), defaults: _.defaultsDeep({ type: 'uml_state_machine.State', attrs: { rect: { 'width': 150 }, '.state-name-rect': { 'stroke': 'black', 'stroke-width': 2, 'fill': '#f9f9f9', 'rx': 15, 'ry': 15 }, '.state-name-text': { 'ref': '.state-name-rect', 'ref-y': 12, 'ref-x': .5, 'text-anchor': 'middle', 'y-alignment': 'middle', 'font-weight': 'bold', 'fill': 'black', 'font-size': 12, 'font-family': 'Times New Roman' }, '.state-actions-text': { 'ref': '.state-name-rect', 'ref-y': 25, 'ref-x': 10, 'fill': 'black', 'font-size': 12, 'font-family': 'Times New Roman' }, '.state-internals-text': { 'ref': '.state-name-rect', 'ref-y': 60, 'ref-x': 10, 'fill': 'black', 'font-size': 12, 'font-family': 'Times New Roman' }, '.state-actions-separator': { 'stroke': 'black', 'stroke-width': 2, 'fill': '#fff', 'x1': 0, 'y1': 20, 'x2': 150, 'y2': 20 }, '.state-internals-separator': { 'stroke': 'black', 'stroke-width': 2, 'fill': '#fff', 'x1': 0, 'y1': 0, 'x2': 150, 'y2': 0 } }, name: [], actions: [], internals: [] }, joint.shapes.basic.Generic.prototype.defaults), initialize: function() { this.on('change:name change:actions change:internals', function() { this.updateRectangles(); this.trigger('uml-update'); }, this); this.updateRectangles(); joint.shapes.basic.Generic.prototype.initialize.apply(this, arguments); }, getStateName: function() { return this.get('name'); }, updateRectangles: function() { var attrs = this.get('attrs'); var fields = [ { type: 'name', text: this.getStateName() }, { type: 'actions', text: this.get('actions') }, { type: 'internals', text: this.get('internals') } ]; var offsetY = 0, maxWidth = this.attributes.size.width, offsetInternals, lengthInternals; _.each(fields, function(field) { var lines = _.isArray(field.text) ? field.text : [field.text]; lines.forEach(function(line) { if (line !== null) { if ( 20 + line.length * 6 > maxWidth) { maxWidth = 20 + line.length * 6; } } }); var fieldHeight = lines[0] != null ? lines.length * 15 + 5 : 20; attrs['.state-' + field.type + '-text'].text = lines.join('\n'); if (field.type === 'internals') { offsetInternals = offsetY; lengthInternals = lines.length > 0 ? maxWidth : 0; } offsetY += fieldHeight; }); attrs['.state-name-rect'].height = offsetY; attrs['.state-name-rect'].width = maxWidth; attrs['.state-actions-separator'].x2 = maxWidth; this.attr( {'.state-internals-text': {'ref-y': offsetInternals + 3}, '.state-internals-separator': {'y1': offsetInternals, 'y2': offsetInternals, 'x2': lengthInternals} }); this.resize(maxWidth, offsetY); } }); joint.shapes.uml_state_machine.PseudoStart = joint.dia.Element.extend({ markup: '<g class="rotatable"><g class="scalable"><circle/></g></g>', defaults: _.defaultsDeep({ type: 'uml_state_machine.PseudoStart', size: { width: 20, height: 20 }, attrs: { circle: { transform: 'translate(10, 10)', r: 10, fill: '#000000' } } }, joint.dia.Element.prototype.defaults) }); /* * Note the arrow scoots around the text. Actually, there is a bounding box around * the composite element that defines how it connects. * Also, the addition of the text makes the arrow point to the middle of the larger * bounding rectangle, upsetting the focus on the center of the circle. */ joint.shapes.uml_state_machine.FinalState = joint.dia.Element.extend({ markup: ['<g class="rotatable">', '<g class="scalable">', '<circle class="outer"/>', '<circle class="inner"/>', '</g>', '<text class="final-state-name"/>', '</g>'].join(''), defaults: _.defaultsDeep({ type: 'fsa.EndState', size: { width: 30, height: 30 }, attrs: { '.outer': { transform: 'translate(10, 10)', r: 8, fill: '#ffffff', stroke: '#000000' }, '.inner': { transform: 'translate(10, 10)', r: 6, fill: '#000000' } ,'.final-state-name': { 'ref': '.outer', 'ref-y': 45, 'ref-x': .5, 'text-anchor': 'middle', 'y-alignment': 'middle', 'font-weight': 'bold', 'fill': 'black', 'font-size': 12, 'font-family': 'Times New Roman' } } }, joint.dia.Element.prototype.defaults) }); joint.shapes.uml_state_machine.Transition = joint.dia.Link.extend({ defaults: _.defaultsDeep({ type: 'uml_state_machine.Transition', attrs: { '.marker-target': { d: 'M 10 0 L 0 5 L 10 10 z' }}, smooth: false }, joint.dia.Link.prototype.defaults) }); joint.shapes.uml_state_machine.StateNew = joint.shapes.basic.Rect.extend({ defaults: joint.util.deepSupplement({ type: 'uml_state_machine.StateNew', attrs: { rect: { stroke: 'none', 'fill-opacity': 0 } } }, joint.shapes.basic.Rect.prototype.defaults) }); joint.shapes.uml_state_machine.StateNewView = joint.dia.ElementView.extend({ oldTimeout: null, targetInputSize: 9, template: [ '<div class="html-element html-state">', '<button class="delete">x</button>', '<input size="9" type="text" class="stateName" readonly/>', '<hr>', '<div class="stateActions">', '</div>', '<div class="stateActivities">', '</div>', '</div>' ].join(''), initialize: function () { _.bindAll(this, 'updateBox'); joint.dia.ElementView.prototype.initialize.apply(this, arguments); this.$box = jQuery(_.template(this.template)()); // Prevent paper from handling pointerdown. this.$box.find('input').on('mousedown click', function (evt) { evt.stopPropagation(); }); //bind enter key this.$box.find('.stateName').keypress(_.bind(function (e) { if (e.which === 13) { e.target.blur(); } }, this)); //this is reacting on the input change and storing the input data in the cell model this.$box.find('.stateName').on('change', _.bind(function (e) { //update name in model this.model.set('name', jQuery(e.target).val()); this.updateBox(); //should update umple code here }, this)); //remove object this.$box.find('.delete').on('click', _.bind(function () { //should update umple code here this.model.remove(); }, this)); // Update the box position whenever the underlying model changes. this.model.on('change', this.updateBox, this); // Remove the box when the model gets removed from the graph. this.model.on('remove', this.removeBox, this); this.updateBox(); }, render: function () { joint.dia.ElementView.prototype.render.apply(this, arguments); this.paper.$el.prepend(this.$box); this.updateBox(); return this; }, updateBox: function () { // Set the position and dimension of the box so that it covers the JointJS element. var bbox; //update name this.$box.find('.stateName').val(this.model.get('name')); //update box size if (this.model.get('name').length > this.targetInputSize) { this.targetInputSize = this.model.get('name').length; this.$box.find('.stateName').prop('size', this.targetInputSize); } this.rerenderEvent(); this.rerenderActivity(); this.addListeners(); this.resetBoxsize(); }, removeBox: function (e) { this.$box.remove(); }, addListeners: function (e) { //enable input box when double click this.$box.find('input').off('dblclick').on('dblclick', _.bind(function (e) { e.target.readOnly = false; }, this)); //disable when focusout this.$box.find('input').off('focusout').on('focusout', _.bind(function (e) { e.target.readOnly = true; }, this)); //focusout input when 'Enter' key pressed this.$box.find('.stateActions input').keypress(_.bind(function (e) { if (e.which === 13) { e.target.blur(); setTimeout(_.bind(function () { this.$box.find('.stateActions input:last').prop('readonly', false); this.$box.find('.stateActions input:last').focus(); }, this), 100); } }, this)); //focusout input when 'Enter' key pressed this.$box.find('.stateActivities input').keypress(_.bind(function (e) { if (e.which === 13) { e.target.blur(); setTimeout(_.bind(function () { this.$box.find('.stateActivities input:last').prop('readonly', false); this.$box.find('.stateActivities input:last').focus(); }, this), 100); } }, this)); /** * when input focusout and last input box has value do the following * - increase the index * - add an extra empty input box * - add the new data to model. * - update code */ this.$box.find('.eventInput input').off('focusout').on('focusout', _.bind(function (e) { e.target.readOnly = true; if (this.$box.find('.stateActions input:last').val()) { var tempIndex = this.$box.find('.stateActions input:last').data('eventIndex') + 1; this.addEventBox(tempIndex, "addEmptyInputBox_dw830o"); this.addListeners(); var temp = this.model.get('actions'); temp[jQuery(e.target).data('eventIndex')] = jQuery(e.target).val(); this.model.set('actions', temp); //should update umple code here } }, this)); /** * focus out activities of input box * same as the event box */ this.$box.find('.activityInput input').off('focusout').on('focusout', _.bind(function (e) { e.target.readOnly = true; if (this.$box.find('.stateActivities input:last').val()) { var tempIndex = this.$box.find('.stateActivities input:last').data('activityIndex') + 1; this.addActivityBox(tempIndex); this.addListeners(); var temp = this.model.get('activities'); temp+=" "+jQuery(e.target).val(); this.model.set('activities', temp); //should update umple code here } }, this)); this.$box.find('.stateActions .deleteEvent').off('click').on('click', _.bind(function (e) { var eventIndex = jQuery(e.target.parentNode.children[0]).data('eventIndex'); var eventValue = jQuery(e.target.parentNode.children[0]).val(); //value is empty, do nothing (might cause bug that needs to be fixed later) //value is not empty, delete the attribute from model and update box if (eventValue && eventIndex > -1) { var modelEvents = this.model.get('actions'); modelEvents.splice(eventIndex, 1); this.model.set('actions', modelEvents); this.updateBox(); //should update umple code here } }, this)); }, addEventBox: function (tempIndex, inputValue) { if(!inputValue || inputValue.trim() === "") { return; } else if(inputValue === "addEmptyInputBox_dw830o"){ inputValue = ''; } var updateFlag = false; //add input if (inputValue) { this.$box.find('.stateActions').append('<div class="eventInput"><input size="' + this.targetInputSize + '" data-event-index="' + tempIndex + '" type="text" value="' + inputValue + '" placeholder="Add More" readonly/> <img class="deleteEvent" src="scripts/delete.png" alt="Del"></div>'); } else { this.$box.find('.stateActions').append('<div class="eventInput"><input size="' + this.targetInputSize + '" data-event-index="' + tempIndex + '" type="text" value="" placeholder="Add More" readonly/> <img class="deleteEvent" src="scripts/delete.png" alt="Del"></div>'); } //updated box size for (var j = 0; j < this.$box.find('.stateActions input').length; j++) { if (this.$box.find('.stateActions input')[j].value.length > this.targetInputSize) { this.targetInputSize = this.$box.find('.stateActions input')[j].value.length; updateFlag = true; } } this.resetBoxsize(); setTimeout(_.bind(function () { if (updateFlag) { this.rerenderEvent this.addListeners(); } }, this), 200); }, addActivityBox: function (tempIndex, inputValue) { var updateFlag = false; //add input if (inputValue) { this.$box.find('.stateActivities').append('<div class="activityInput"><input size="' + this.targetInputSize + '" data-activity-index="' + tempIndex + '" type="text" value="' + inputValue + '" placeholder="Add More" readonly/></div>'); } else { this.$box.find('.stateActivities').append('<div class="activityInput"><input size="' + this.targetInputSize + '" data-activity-index="' + tempIndex + '" type="text" value="" placeholder="Add More" readonly/></div>'); } //updated box size for (var j = 0; j < this.$box.find('.stateActivities input').length; j++) { if (this.$box.find('.stateActivities input')[j].value.length > this.targetInputSize) { this.targetInputSize = this.$box.find('.stateActivities input')[j].value.length; updateFlag = true; } } this.resetBoxsize(); setTimeout(_.bind(function () { if (updateFlag) { this.rerenderActivity(); this.addListeners(); } }, this), 200); }, rerenderEvent: function(){ //clear events this.$box.find('.stateActions').empty(); //re-render events if (this.model.get('actions')) { var i = 0; for (i = 0; i < this.model.get('actions').length; i++) { this.addEventBox(i, this.model.get('actions')[i]); } //add empty one this.addEventBox(i, "addEmptyInputBox_dw830o"); } }, rerenderActivity: function(){ //clear activities this.$box.find('.stateActivities').empty(); //re-render events if(this.model.get('activities') && this.model.get('activities').length > 0) { this.$box.find('.stateActivities').append('Activities:'); var stateActivities = this.model.get('activities')[0].trim().split(" +"); var i = 0; for (; i < stateActivities.length; i++) { this.addActivityBox(i, stateActivities[i]); } } }, resetBoxsize: function(){ //set box size var boxSize = this.model.get('size'); boxSize['height'] = ( this.$box.find('.stateActions').children().length + this.$box.find('.stateActivities').children().length) * 12+ 50; boxSize['width'] = 25 + Math.floor(this.targetInputSize*6); this.model.set('size', boxSize); bbox = this.model.getBBox(); this.$box.css({ width: bbox.width, height: bbox.height, left: bbox.x+100, top: bbox.y+70, transform: 'rotate(' + (this.model.get('angle') || 0) + 'deg)' }); } });
34.004615
298
0.530154
9df1c91908d650e4d5150f60def1ffca91639e43
6,588
js
JavaScript
ViennaAdvantageWeb/ViennaAdvantageWeb/Areas/VIS/Scripts/app/arequest.js
eric-erki/ERP-CMR-DMS
2d01465e14cf456dd2288d63f7e0236ab761eabe
[ "Apache-2.0" ]
45
2017-11-07T19:54:38.000Z
2022-03-22T04:12:01.000Z
ViennaAdvantageWeb/ViennaAdvantageWeb/Areas/VIS/Scripts/app/arequest.js
dorian-gris/ERP-CMR-DMS
2d01465e14cf456dd2288d63f7e0236ab761eabe
[ "Apache-2.0" ]
null
null
null
ViennaAdvantageWeb/ViennaAdvantageWeb/Areas/VIS/Scripts/app/arequest.js
dorian-gris/ERP-CMR-DMS
2d01465e14cf456dd2288d63f7e0236ab761eabe
[ "Apache-2.0" ]
40
2017-11-07T19:56:07.000Z
2022-02-15T11:23:38.000Z
; (function (VIS, $) { function ARequest(invoker, AD_Table_ID, Record_ID, C_BPartner_ID, iBusy, container) { var AD_Window_ID = 232; var m_where = ''; var window = null; var tab = null; this.getRequests = function (item) { var sql = "SELECT COUNT(*) FROM AD_Table WHERE TableName='R_Request'"; var dr = VIS.DB.executeReader(sql, null); while (dr.read()) { if (parseInt(dr.getString(0)) == 0) { VIS.ADialog.error('VIS_NotSupported'); return; } } m_where = "(AD_Table_ID=" + AD_Table_ID + " AND Record_ID=" + Record_ID + ")"; if (AD_Table_ID == 114) {// MUser.Table_ID){ m_where += " OR AD_User_ID=" + Record_ID + " OR SalesRep_ID=" + Record_ID; } else if (AD_Table_ID == 291) {//MBPartner.Table_ID){ m_where += " OR C_BPartner_ID=" + Record_ID; } else if (AD_Table_ID == 259) {// MOrder.Table_ID){ m_where += " OR C_Order_ID=" + Record_ID; } else if (AD_Table_ID == 318) {//MInvoice.Table_ID){ m_where += " OR C_Invoice_ID=" + Record_ID; } else if (AD_Table_ID == 335) {// MPayment.Table_ID){ m_where += " OR C_Payment_ID=" + Record_ID; } else if (AD_Table_ID == 208) {//MProduct.Table_ID){ m_where += " OR M_Product_ID=" + Record_ID; } else if (AD_Table_ID == 203) {//MProject.Table_ID){ m_where += " OR C_Project_ID=" + Record_ID; } else if (AD_Table_ID == 539) {// MAsset.Table_ID){ m_where += " OR A_Asset_ID=" + Record_ID; } sql = "SELECT Processed, COUNT(*) " + "FROM R_Request WHERE " + m_where + " GROUP BY Processed " + "ORDER BY Processed DESC"; dr = VIS.DB.executeReader(sql, null); var inactiveCount = 0; var activeCount = 0; while (dr.read()) { if ("Y" == dr.getString(0)) inactiveCount = dr.getString(1); else activeCount += dr.getString(1); } var $root = $("<div>"); var ul = $('<ul class=vis-apanel-rb-ul>'); $root.append(ul); var li = $("<li data-id='RequestCreate'>"); li.append(VIS.Msg.getMsg("RequestNew")); li.on("click", function (e) { createNewRequest(e); }); ul.append(li); if (activeCount > 0) { li = $("<li data-id='RequestActive'>"); li.append(VIS.Msg.getMsg("RequestActive")); li.on("click", function (e) { activeRequest(e); }); ul.append(li); } if (inactiveCount > 0) { li = $("<li data-id='RequestActive'>"); li.append(VIS.Msg.getMsg("RequestAll")); li.on("click", function (e) { allRequest(e); }); ul.append(li); } container.w2overlay($root.clone(true), { css: { height: '200px' } }); }; var createNewRequest = function (e) { e.stopImmediatePropagation(); //var vm=new VIS.viewManager(); window = VIS.viewManager.startWindow(AD_Window_ID, null); window.onLoad = function () { var gc = window.cPanel.curGC; gc.onRowInserting = function () { window.cPanel.cmd_new(false); }; gc.onRowInserted = function () { tab = window.cPanel.curTab; tab.setValue("AD_Table_ID", AD_Table_ID); tab.setValue("Record_ID", Record_ID); if (C_BPartner_ID != null && C_BPartner_ID > 0) { tab.setValue("C_BPartner_ID", C_BPartner_ID); } if (AD_Table_ID == 291)// MBPartner.Table_ID) tab.setValue("C_BPartner_ID", Record_ID); else if (AD_Table_ID == 114)//MUser.Table_ID) tab.setValue("AD_User_ID", Record_ID); // else if (AD_Table_ID == 203)// MProject.Table_ID) tab.setValue("C_Project_ID", Record_ID); else if (AD_Table_ID == 539)// MAsset.Table_ID) tab.setValue("A_Asset_ID", Record_ID); else if (AD_Table_ID == 259) tab.setValue("C_Order_ID", Record_ID); else if (AD_Table_ID == 318)//MInvoice.Table_ID) tab.setValue("C_Invoice_ID", Record_ID); // else if (AD_Table_ID == 208)//MProduct.Table_ID) tab.setValue("M_Product_ID", Record_ID); else if (AD_Table_ID == 335)//MPayment.Table_ID) tab.setValue("C_Payment_ID", Record_ID); // else if (AD_Table_ID == 319)// MInOut.Table_ID) tab.setValue("M_InOut_ID", Record_ID); }; // window.cPanel.cmd_new(false); //tab = window.cPanel.curTab; }; var overlay = $('#w2ui-overlay'); overlay.hide(); overlay = null; //window = null; //tab = null; }; var activeRequest = function (e) { e.stopImmediatePropagation(); var zoomQuery = new VIS.Query(); zoomQuery.addRestriction("(" + m_where + ") AND Processed='N'"); VIS.viewManager.startWindow(AD_Window_ID, zoomQuery); var overlay = $('#w2ui-overlay'); overlay.hide(); overlay = null; }; var allRequest = function (e) { e.stopImmediatePropagation(); var zoomQuery = new VIS.Query(); zoomQuery.addRestriction(m_where); VIS.viewManager.startWindow(AD_Window_ID, zoomQuery); var overlay = $('#w2ui-overlay'); overlay.hide(); overlay = null; }; }; VIS.ARequest = ARequest; })(VIS, jQuery);
37.011236
90
0.459168
9df2ac1b99c02caa5be2ab478b06faaccd886143
17,225
js
JavaScript
app/routes/v8.js
dwp/pip-starting
31b087620c5d1c9cf7d0c758f4b219d53361289d
[ "MIT" ]
null
null
null
app/routes/v8.js
dwp/pip-starting
31b087620c5d1c9cf7d0c758f4b219d53361289d
[ "MIT" ]
null
null
null
app/routes/v8.js
dwp/pip-starting
31b087620c5d1c9cf7d0c758f4b219d53361289d
[ "MIT" ]
1
2021-04-10T22:13:26.000Z
2021-04-10T22:13:26.000Z
const { compile } = require("nunjucks"); module.exports = function (router) { function isEligible(req) { return !(req.session.data['over-16'] === 'Under 16' || req.session.data['overspa'] === 'No') } // function complexCase (req) { // return (req.session.data['nationality'] === 'Another nationality' || // ( // req.session.data['nationality'] === 'A nationality of the European Economic Area (EEA)' && // (req.session.data['gb'] === 'No')&& // (req.session.data['living-in-uk'] === 'No' || req.session.data['living-in-uk'] === 'Not sure') // ) || // (req.session.data['eu-question'].indexOf('Getting a pension or benefit from an EEA country') > -1 || req.session.data['eu-question'].indexOf('Paid or paying insurance to an EEA country') > -1 ) || // ( // (req.session.data['nationality'] === 'British' || req.session.data['nationality'] === 'Irish') && // (req.session.data['gb'] === 'No') // ) // ) // } // ELIGIBILITY QUESTIONS router.post('/v8/over-16', (req, res, next) => { const over16 = req.session.data['over-16']; if (over16 === 'Over State Pension age') { res.redirect('/v8/over-spa'); } else { res.redirect('/v8/health-condition'); } }); router.post('/v8/over-spa', (req, res, next) => { res.redirect('/v8/health-condition'); }); router.post('/v8/health-condition', (req, res, next) => { const healthCondition = req.session.data['condition']; if (healthCondition === 'Yes, all of the time or sometimes') { res.redirect('/v8/over-9-months') } else if (healthCondition === 'No, never') { res.redirect('/v8/not-eligible'); } else if (healthCondition === 'Not sure') { res.redirect('/v8/over-9-months'); } }); router.post('/v8/over-9-months', (req, res, next) => { const eligible = isEligible(req); const over9months = req.session.data['over-9-months']; if (over9months === 'Less than 9 months') { res.redirect('/v8/not-eligible') } else if (over9months === 'At least 9 months') { if (eligible) { res.redirect('/p5/sign-in/intro-question') } else { res.redirect('/v8/not-eligible'); } } else if (over9months === 'Not sure') { if (eligible) { res.redirect('/p5/sign-in/intro-question') } else { res.redirect('/v8/not-eligible'); } } }); // ELIGIBILITY QUESTIONS END // IDV CHECK // router.post('/v8/idv/hmrciv/idvselection', (req, res) => { // const passportConsent = req.session.data['passport-consent']; // const payslipOrP60 = req.session.data['payslipOrP60']; // const voiceID = req.session.data['tcOptions']; // const tuConsent = req.session.data['cra-consent']; // //Passport and payslip // if (passportConsent == 'true' && payslipOrP60 == 'payslip') { // res.redirect('./your-passport-details?payslip=true') // } // //Passport and P60 // else if (passportConsent == 'true' && payslipOrP60 == 'p60') { // res.redirect('./your-passport-details?p60=true') // } // //Passport and tax credits KBV // else if (passportConsent == 'true' && voiceID == 'voiceIdNo') { // res.redirect('./your-passport-details?tcKbv=true') // } // //Passport and tax credits voice ID // else if (passportConsent == 'true' && voiceID == 'voiceIdYes') { // res.redirect('./your-passport-details?voiceId=true') // } // //Passport and Transunion // else if (passportConsent == 'true' && tuConsent == 'true') { // res.redirect('./your-passport-details?tuKbv=true') // } // //Payslip and tax credits KBV // else if (payslipOrP60 == 'payslip' && voiceID == 'voiceIdNo') { // res.redirect('./payslip-question-1?tcKbv=true'); // } // //Payslip and tax credits voice ID // else if (payslipOrP60 == 'payslip' && voiceID == 'voiceIdYes') { // res.redirect('./payslip-question-1?voiceId=true') // } // //Payslip and Transunion // else if (payslipOrP60 == 'payslip' && tuConsent == 'true') { // res.redirect('./payslip-question-1?tuKbv=true'); // } // //P60 and tax credits KBV // else if (payslipOrP60 == 'p60' && voiceID == 'voiceIdNo') { // res.redirect('./p60-question-1?tcKbv=true'); // } // //P60 and tax credits voice ID // else if (payslipOrP60 == 'p60' && voiceID == 'voiceIdYes') { // res.redirect('./p60-question-1?voiceId=true') // } // //P60 and Transunion // else if (payslipOrP60 == 'p60' && tuConsent == 'true') { // res.redirect('./p60-question-1?tuKbv=true'); // } // //Tax credits KBV and Transunion // else if (voiceID == 'voiceIdNo' && tuConsent == 'true') { // res.redirect('./tax-credits-question-1?tuKbv=true'); // } // //Tax credits voice ID and Transunion // else if (voiceID == 'voiceIdYes' && tuConsent == 'true') { // res.redirect('./voice-id?tuKbv=true') // } // // Fallback // else { // res.redirect('./choose-2-items-error') // } // }) // router.post('/v8/idv/hmrciv/payslip', (req, res) => { // res.redirect('./payslip-question-1'); // }) // router.post('/v8/idv/hmrciv/p60', (req, res) => { // res.redirect('./p60-question-1'); // }) // router.post('/v8/idv/hmrciv/tcKbv', (req, res) => { // res.redirect('./tax-credits-question-1'); // }) // router.post('/v8/idv/hmrciv/tuKbv', (req, res) => { // res.redirect('./tu-question-1'); // }) // router.post('/v8/idv/hmrciv/voiceId', (req, res) => { // res.redirect("/carers/voice-id"); // }) // router.post('/v8/idv/hmrciv/success', (req, res) => { // res.redirect("/v8/address"); // }) router.post('/v8/auth/dev-ready/sign-in-2fa', (req, res) => { res.redirect("/v8/add-support-communicating"); }) // IDV CHECK END // ADDITIONAL SUPPORT QUESTIONS router.post('/v8/add-support-communicating', (req, res, next) => { res.redirect('/v8/add-support'); }); router.post('/v8/add-support', (req, res, next) => { const addSupport = req.session.data['add-support']; if (addSupport === 'Yes, all of the time or sometimes') { res.redirect('/v8/add-support-help'); } else { res.redirect('/v8/name'); } }); router.post('/v8/add-support-help', (req, res, next) => { const addsupportHelp = req.session.data['add-support-help']; if (addsupportHelp === 'Yes') { res.redirect('/v8/add-support-name'); } else { res.redirect('/v8/name'); } }); router.post('/v8/add-support-name', (req, res, next) => { res.redirect('/v8/name'); }); router.post('/v8/add-support-address', (req, res, next) => { const addsupportAddress = req.session.data['add-support-safe-address']; if (addsupportAddress === 'No') { res.redirect('/v8/add-support-address-other'); } else { res.redirect('/v8/add-support-contact-details'); } }); router.post('/v8/add-support-address-other', (req, res, next) => { res.redirect('/v8/add-support-contact-details'); }); router.post('/v8/add-support-contact-details', (req, res, next) => { res.redirect('/v8/name'); }); // ADDITIONAL SUPPORT QUESTIONS END // PERSONAL DETAILS, RES & PRES AND HEALTH QUESTIONS router.post('/v8/name', (req, res, next) => { res.redirect('/v8/nino'); }); router.post('/v8/nino', (req, res, next) => { res.redirect('/v8/date-of-birth'); }); router.post('/v8/date-of-birth', (req, res, next) => { res.redirect('/v8/address'); }); router.post('/v8/address', (req, res, next) => { const immigrationControl2 = req.session.data['safe-address']; if (immigrationControl2 === 'No') { res.redirect('/v8/address-other'); } else { res.redirect('/v8/contact-details'); } }); router.post('/v8/address-other', (req, res, next) => { res.redirect('/v8/contact-details'); }); router.post('/v8/contact-details', (req, res, next) => { const altFormat = req.session.data['format-type']; if (altFormat === 'Braille') { res.redirect('/v8/alt-format-braille'); } else if (altFormat === 'Sign Language') { res.redirect('/v8/alt-format-sign-language'); } else if (altFormat === 'Audio') { res.redirect('/v8/alt-format-audio'); } else if (altFormat === 'Other formats') { res.redirect('/v8/alt-format-paper'); } else { res.redirect('/v8/nationality'); } }); router.post('/v8/alt-format-braille', (req, res, next) => { res.redirect('/v8/nationality'); }); router.post('/v8/alt-format-sign-language', (req, res, next) => { res.redirect('/v8/nationality'); }); router.post('/v8/alt-format-audio', (req, res, next) => { res.redirect('/v8/nationality'); }); router.post('/v8/alt-format-paper', (req, res, next) => { res.redirect('/v8/nationality'); }); router.post('/v8/nationality', (req, res, next) => { const whereLive = req.session.data['nationality']; if (whereLive === 'A nationality of the European Economic Area (EEA)') { res.redirect('/v8/living-in-uk'); } else { res.redirect('/v8/living-in-gb'); } }); router.post('/v8/living-in-uk', (req, res, next) => { const livingUk = req.session.data['living-in-uk']; if (livingUk === 'No') { res.redirect('/v8/health-condition'); } else { res.redirect('/v8/living-in-gb'); } }); router.post('/v8/living-in-gb', (req, res, next) => { const nationality = req.session.data['nationality'] const gb = req.session.data['gb'] if (nationality === 'British' || nationality === 'Irish' || nationality === 'A nationality of the European Economic Area (EEA)' ) { if (gb === 'No') { res.redirect('/v8/about_your_health/condition-new-2') } if (gb === 'Yes' || gb === 'Not sure') { res.redirect('/v8/eu-question') } } else if (nationality === 'Another nationality') { res.redirect('/v8/about_your_health/condition-new-2') } }) // router.post('/v8/eu-benefits', (req, res, next) => { // res.redirect('/v8/eu-question'); // }); // router.post('/v8/eu-worked', (req, res, next) => { // const euWorked = req.session.data['eu-worked']; // if (euWorked === 'No') { // res.redirect('/v8/about_your_health/condition-new-2'); // } else { // res.redirect('/v8/eu-insurance'); // } // }); // router.post('/v8/eu-insurance', (req, res, next) => { // res.redirect('/v8/about_your_health/condition-new-2'); // }); router.post('/v8/eu-question', (req, res, next) => { res.redirect('/v8/about_your_health/condition-new-2'); }); router.post('/v8/about_your_health/condition-new-2', (req, res, next) => { res.redirect('/v8/about_your_health/hcp-question'); }); router.post('/v8/about_your_health/hcp-question', (req, res, next) => { const hcpQuestion = req.session.data['hcp']; if (hcpQuestion === 'Yes') { res.redirect('/v8/about_your_health/consent'); } else { res.redirect('/v8/in-hospital'); } }); router.post('/v8/about_your_health/consent', (req, res, next) => { const conSent = req.session.data['consent']; if (conSent === 'Yes, I agree') { res.redirect('/v8/about_your_health/hcp-1'); } else { res.redirect('/v8/in-hospital'); } }); router.post('/v8/about_your_health/hcp-1', (req, res, next) => { res.redirect('/v8/about_your_health/hcp-another'); }); router.post('/v8/about_your_health/hcp-another', (req, res, next) => { const hcpAnother1 = req.session.data['hcp-2']; if (hcpAnother1 === 'Yes') { res.redirect('/v8/about_your_health/hcp-2'); } else { res.redirect('/v8/in-hospital'); } }); router.post('/v8/about_your_health/hcp-2', (req, res, next) => { res.redirect('/v8/about_your_health/hcp-another-2'); }); router.post('/v8/about_your_health/hcp-another-2', (req, res, next) => { const hcpAnother2 = req.session.data['hcp-3']; if (hcpAnother2 === 'Yes') { res.redirect('/v8/about_your_health/hcp-3'); } else { res.redirect('/v8/in-hospital'); } }); router.post('/v8/about_your_health/hcp-3', (req, res, next) => { res.redirect('/v8/about_your_health/hcp-another-3'); }); router.post('/v8/about_your_health/hcp-another-3', (req, res, next) => { res.redirect('/v8/in-hospital'); }); router.post('/v8/in-hospital', (req, res, next) => { const inHospital = req.session.data['hospital']; if (inHospital === 'Yes') { res.redirect('/v8/hospital-admission'); } else { res.redirect('/v8/in-care-home'); } }); router.post('/v8/hospital-admission', (req, res, next) => { res.redirect('/v8/hospital-address'); }); router.post('/v8/hospital-address', (req, res, next) => { res.redirect('/v8/check-answers'); }); router.post('/v8/in-care-home', (req, res, next) => { const inCarehome = req.session.data['carehome']; if (inCarehome === 'Yes') { res.redirect('/v8/care-home-admission'); } else { res.redirect('/v8/check-answers'); } }); router.post('/v8/care-home-admission', (req, res, next) => { res.redirect('/v8/care-home-address'); }); router.post('/v8/care-home-address', (req, res, next) => { res.redirect('/v8/check-answers'); }); // PERSONAL AND HEALTH QUESTIONS END // CHECK ANSWERS START // router.post('/v8/check-answers', (req, res, next) => { // console.log(req.session.data) // const complex = complexCase(req); // if (!complex) { // res.redirect('/v8/confirmation') // } else { // res.redirect('/v8/we-need-to-get-in-touch') // }; // }); // router.post('/v8/we-need-to-get-in-touch', (req, res, next) => { // res.redirect('/v8/confirmation'); // }); router.post('/v8/check-answers', (req, res, next) => { res.redirect('/v8/confirmation'); }); // router.post('/v8/confirmation', (req, res, next) => { // res.redirect('/p5/list'); // }); // CHECK ANSWERS END // COMPLEX APPLICATION CONTACT DETAILS // router.post('/v8/we-need-to-get-in-touch', (req, res, next) => { // res.redirect('/v8/complex_contact_details/complex-contact-name'); // }); // router.post('/v8/complex_contact_details/complex-contact-name', (req, res, next) => { // res.redirect('/v8/complex_contact_details/complex-contact-nino'); // }); // router.post('/v8/complex_contact_details/complex-contact-nino', (req, res, next) => { // res.redirect('/v8/complex_contact_details/complex-contact-date-of-birth'); // }); // router.post('/v8/complex_contact_details/complex-contact-date-of-birth', (req, res, next) => { // res.redirect('/v8/complex_contact_details/complex-contact-details'); // }); // router.post('/v8/complex_contact_details/complex-contact-details', (req, res, next) => { // res.redirect('/v8/complex_contact_details/complex-contact-check-answers'); // }); // router.post('/v8/complex_contact_details/complex-contact-check-answers', (req, res, next) => { // res.redirect('/v8/complex_contact_details/complex-contact-confirmation'); // }); // COMPLEX APPLICATION CONTACT DETAILS END // RETURNING USER FLOW START router.post('/v8/save_and_return/sign-in', (req, res, next) => { res.redirect('/v8/save_and_return/sign-in-2fa'); }); router.post('/v8/save_and_return/sign-in-2fa', (req, res, next) => { res.redirect('/v8/save_and_return/signed-in'); }); router.post('v8/save_and_return/signed-in', (req, res, next) => { res.redirect('/v8/#'); }); // RETURNING USER FLOW END };
35.153061
209
0.532772
9df2bbe7f40de672aeb07c1c652ac8950ba551be
4,415
js
JavaScript
ui/app/release/release-controllers.js
jdcasey/pnc
b6ae081e99202e14fdda43a5905ea27fd7c8e865
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
ui/app/release/release-controllers.js
jdcasey/pnc
b6ae081e99202e14fdda43a5905ea27fd7c8e865
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
ui/app/release/release-controllers.js
jdcasey/pnc
b6ae081e99202e14fdda43a5905ea27fd7c8e865
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
/* * JBoss, Home of Professional Open Source. * Copyright 2014-2018 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ 'use strict'; (function() { var module = angular.module('pnc.release'); module.controller('ReleaseCreateUpdateController', [ '$scope', '$state', '$stateParams', '$log', 'ProductReleaseDAO', 'ProductMilestoneDAO', 'productDetail', 'versionDetail', 'releaseDetail', 'dateUtilConverter', function($scope, $state, $stateParams, $log, ProductReleaseDAO, ProductMilestoneDAO, productDetail, versionDetail, releaseDetail, dateUtilConverter) { var that = this; that.product = productDetail; that.productVersion = versionDetail; that.versionMilestones = []; that.usedVersionMilestoneIds = []; that.supportLevels = []; that.releaseDate = null; // date component, see also that.data.releaseDate that.isUpdating = false; that.data = new ProductReleaseDAO(); if (releaseDetail !== null) { that.isUpdating = true; that.data = releaseDetail; that.productMilestoneId = releaseDetail.productMilestoneId; // Remove the prefix that.version = that.data.version.substring(versionDetail.version.length + 1); // date component <- timestamp that.releaseDate = new Date(that.data.releaseDate); } // I need to gather the existing Releases, as Milestone can be associated with only one Release at the most ProductReleaseDAO.getAllForProductVersion({ versionId: that.productVersion.id }, {}).then( function(results) { angular.forEach(results, function(result) { that.usedVersionMilestoneIds.push(result.productMilestoneId); }); // Only Milestones that are not yet used in this Product Version will be listed ProductMilestoneDAO.getAllForProductVersion({ versionId: that.productVersion.id }, {}).then( function(results) { angular.forEach(results, function(result) { if (that.usedVersionMilestoneIds.indexOf(result.id) === -1) { that.versionMilestones.push(result); } if (that.productMilestoneId && result.id === that.productMilestoneId) { that.productMilestoneVersion = result.version; } }); } ); } ); ProductReleaseDAO.getAllSupportLevel({ versionId: that.productVersion.id }, {}).then( function(results) { that.supportLevels = results; } ); that.submit = function() { that.data.version = versionDetail.version + '.' + that.version; // add the prefix // timestamp <- date component that.data.releaseDate = dateUtilConverter.convertToTimestampNoon(that.releaseDate); that.data.productVersionId = versionDetail.id; that.data.productMilestoneId = parseInt(that.productMilestoneId); // Distinguish between release creation and update if (!that.isUpdating) { that.data.$save().then( function() { $state.go('product.detail.version', { productId: productDetail.id, versionId: versionDetail.id }, { reload: true }); } ); } else { that.data.$update().then( function() { $state.go('product.detail.version', { productId: productDetail.id, versionId: versionDetail.id }, { reload: true }); } ); } }; dateUtilConverter.initDatePicker($scope); } ]); })();
32.463235
113
0.602265
9df2bd678570a527acc9a50a55d5c68065aa376b
62
js
JavaScript
lib/utils/extend.js
chandanpasunoori/jiva-tracking.js
bae2527bd0727202016d87a3852acb94724772de
[ "MIT" ]
null
null
null
lib/utils/extend.js
chandanpasunoori/jiva-tracking.js
bae2527bd0727202016d87a3852acb94724772de
[ "MIT" ]
22
2020-02-09T00:47:31.000Z
2021-05-08T23:17:00.000Z
lib/utils/extend.js
etsrepo/jiva-tracking.js
bae2527bd0727202016d87a3852acb94724772de
[ "MIT" ]
1
2020-11-25T13:38:49.000Z
2020-11-25T13:38:49.000Z
module.exports = require('@jiva/jiva-core/lib/utils/extend');
31
61
0.741935
9df2d62770989b9ce863a523f40cbb7e3c81eb75
287
js
JavaScript
jest.config.js
ddla12/ChatBot
b544487954a8882a6b68c3762511760c447721d8
[ "MIT" ]
6
2021-10-10T00:21:12.000Z
2021-10-10T10:11:18.000Z
jest.config.js
ddla12/ChatBot
b544487954a8882a6b68c3762511760c447721d8
[ "MIT" ]
null
null
null
jest.config.js
ddla12/ChatBot
b544487954a8882a6b68c3762511760c447721d8
[ "MIT" ]
null
null
null
const { defaults } = require("jest-config"); module.exports = { testEnvironment: "jsdom", moduleFileExtensions: [...defaults.moduleFileExtensions], testMatch: ["**/*.test.ts"], coveragePathIgnorePatterns: ["/node_modules/"], verbose: true, preset: "ts-jest", };
26.090909
61
0.651568
9df30986333496313832881d0d1017acc08e2146
4,170
js
JavaScript
node_modules/stellar-sdk/lib/errors.js
ricdizio/StellarCourse
ede14d2f0bd9f2900ffdecdcf25d189e5568f9d2
[ "MIT" ]
1
2020-10-29T15:35:30.000Z
2020-10-29T15:35:30.000Z
node_modules/stellar-sdk/lib/errors.js
ricdizio/StellarCourse
ede14d2f0bd9f2900ffdecdcf25d189e5568f9d2
[ "MIT" ]
6
2019-10-12T15:49:36.000Z
2022-02-26T15:01:29.000Z
node_modules/stellar-sdk/lib/errors.js
ricdizio/StellarCourse
ede14d2f0bd9f2900ffdecdcf25d189e5568f9d2
[ "MIT" ]
1
2021-02-16T16:06:14.000Z
2021-02-16T16:06:14.000Z
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } function _extendableBuiltin(cls) { function ExtendableBuiltin() { var instance = Reflect.construct(cls, Array.from(arguments)); Object.setPrototypeOf(instance, Object.getPrototypeOf(this)); return instance; } ExtendableBuiltin.prototype = Object.create(cls.prototype, { constructor: { value: cls, enumerable: false, writable: true, configurable: true } }); if (Object.setPrototypeOf) { Object.setPrototypeOf(ExtendableBuiltin, cls); } else { ExtendableBuiltin.__proto__ = cls; } return ExtendableBuiltin; } var NetworkError = exports.NetworkError = function (_extendableBuiltin2) { _inherits(NetworkError, _extendableBuiltin2); function NetworkError(message, response) { _classCallCheck(this, NetworkError); var _this = _possibleConstructorReturn(this, (NetworkError.__proto__ || Object.getPrototypeOf(NetworkError)).call(this, message)); _this.constructor = NetworkError; _this.response = response; return _this; } _createClass(NetworkError, [{ key: "getResponse", value: function getResponse() { return this.response; } }]); return NetworkError; }(_extendableBuiltin(Error)); var NotFoundError = exports.NotFoundError = function (_NetworkError) { _inherits(NotFoundError, _NetworkError); function NotFoundError(message, response) { _classCallCheck(this, NotFoundError); var _this2 = _possibleConstructorReturn(this, (NotFoundError.__proto__ || Object.getPrototypeOf(NotFoundError)).call(this, message, response)); _this2.constructor = NotFoundError; return _this2; } return NotFoundError; }(NetworkError); var BadRequestError = exports.BadRequestError = function (_NetworkError2) { _inherits(BadRequestError, _NetworkError2); function BadRequestError(message, response) { _classCallCheck(this, BadRequestError); var _this3 = _possibleConstructorReturn(this, (BadRequestError.__proto__ || Object.getPrototypeOf(BadRequestError)).call(this, message, response)); _this3.constructor = BadRequestError; return _this3; } return BadRequestError; }(NetworkError); var BadResponseError = exports.BadResponseError = function (_NetworkError3) { _inherits(BadResponseError, _NetworkError3); function BadResponseError(message, response) { _classCallCheck(this, BadResponseError); var _this4 = _possibleConstructorReturn(this, (BadResponseError.__proto__ || Object.getPrototypeOf(BadResponseError)).call(this, message, response)); _this4.constructor = BadResponseError; return _this4; } return BadResponseError; }(NetworkError);
39.339623
564
0.742206
9df3bd00efb3e342e6d06dd78c093b06684d6a10
10,976
js
JavaScript
cloud/main.js
MariusMez/GeocachingJDS2015
47c80868981a55876d22152ac0ce54daa75e3b5e
[ "MIT" ]
4
2019-03-17T14:14:01.000Z
2019-05-25T04:57:43.000Z
cloud/main.js
MariusMez/GeocachingJDS2015
47c80868981a55876d22152ac0ce54daa75e3b5e
[ "MIT" ]
62
2018-04-07T15:41:03.000Z
2022-03-10T16:15:48.000Z
cloud/main.js
MariusMez/GeocachingJDS2015
47c80868981a55876d22152ac0ce54daa75e3b5e
[ "MIT" ]
4
2018-02-16T15:02:07.000Z
2020-11-13T17:23:51.000Z
const jds = require('../geocaching-jds'); const csv = require('csv'); const fs = require('fs'); const mailer = require('nodemailer'); const starting_jds_date = "2019-03-20"; Parse.Cloud.beforeSave("Log", async (request) => { if(request.object.isNew()) { const photo = request.object.get("Photo"); if(photo) { const maxWidth = 1000; const maxHeight = 1000; let response = await Parse.Cloud.httpRequest({ url: photo.url() }); let thumbnail = await jds.createThumbnail(response.buffer, maxWidth, maxHeight, 'jpeg'); if(thumbnail) { request.object.set("Photo", thumbnail); request.object.set("PhotoUrl", thumbnail.url({forceSecure: true})); } } } }); async function base64_encode(file) { let bitmap = fs.readFileSync(file); return new Buffer.from(bitmap).toString('base64'); } Parse.Cloud.job("Import participants 2019 from CSV file", async (request) => { request.message("I just started"); const obj = csv(); const Geocacheur = Parse.Object.extend("Geocacheur"); const Geocache = Parse.Object.extend("Geocache"); const Ranking = Parse.Object.extend("Ranking"); const spoiler_img = new Parse.File("nospoiler.png", { base64: await base64_encode(__dirname + '/../public/images/nospoiler.png') }); const photo_img = new Parse.File("logo_jds.png", { base64: await base64_encode(__dirname + '/../public/images/logo_jds.png') }); obj.from.path('Geocacheurs2019.csv').to.array(function(geocacheurs) { geocacheurs.forEach( async (geocacheur) => { const pseudo = geocacheur[0]; const companyname = geocacheur[1]; const email = geocacheur[2].toLowerCase(); let query = new Parse.Query(Geocacheur); query.equalTo('Email', email); const result = await query.first(); if(result === undefined) { let g = new Geocacheur(); g.save({ Email: email, Pseudo: pseudo, Company: companyname, Enrollment: "preload", Active: true }).then(async (user) => { const email = user.get("Email"); let query = new Parse.Query(Geocache); query.equalTo('OwnerEmail', email); const result = await query.first(); if(result === undefined) { let geocache = new Geocache(); geocache.set("Owner", pseudo); geocache.set("OwnerEmail", email); geocache.set("Active", false); geocache.set("Fav", 0); geocache.set("RatioFav", 0); geocache.set("codeId", await jds.generateCodeId()); geocache.set("adminId", await jds.generateAdminId()); geocache.set("Spoiler", spoiler_img); geocache.set("Photo", photo_img); geocache.save().then((geocache) => { console.log(`Geocache created for user ${email}`); let queryRanking = new Parse.Query(Ranking); queryRanking.equalTo('Geocacheur', user); queryRanking.first().then((res) => { if (res === undefined) { jds.saveRanking(user, true).then(function() { }, function(error) { }); } else { // Update ranking ? console.log("Update ranking"); } }, (error) => { console.error(error); }); }, (error) => { console.error(error); }); } else { console.log(`Geocache exist for user ${email}, we do nothing`); } }, (error) => { console.error(error); }); } else { console.log(`Geocacheur ${email} exist, we do nothing`); } }); }); request.message("I just finished"); }); Parse.Cloud.job("1 - Compute Fav Points", async (request) => { request.message("I just started Compute Fav Points"); const Logs = Parse.Object.extend("Log"); const Geocache = Parse.Object.extend("Geocache"); let queryGeocaches = new Parse.Query(Geocache); queryGeocaches.limit(1000); queryGeocaches.equalTo("Active", true); queryGeocaches.find().then(async (geocaches) => { geocaches.forEach(async (geocache) => { let query = new Parse.Query(Logs); query.equalTo("Active", true); query.limit(1000); query.equalTo("Geocache", geocache); query.equalTo("Fav", true); query.count().then(async (counter) => { geocache.set("Fav", counter); await geocache.save(null); }); }); }).then((result) =>{ request.message("I just finished"); }, (error) => { console.error(error); }); }); Parse.Cloud.job("2 - Compute Fav Ratio", async (request) => { request.message("I just started Compute Fav Ratio"); const Logs = Parse.Object.extend("Log"); const Geocache = Parse.Object.extend("Geocache"); let queryGeocaches = new Parse.Query(Geocache); queryGeocaches.equalTo("Active", true); queryGeocaches.find().then((geocaches) => { geocaches.forEach((geocache) => { let query = new Parse.Query(Logs); query.equalTo("Active", true); query.limit(1000); query.equalTo("Geocache", geocache); query.count().then(async (counter) => { let nbFav = geocache.get("Fav"); let ratio = Math.round((nbFav / counter) * 100); geocache.set("RatioFav", ratio); await geocache.save(null); }); }); }).then((result) => { request.message("I just finished"); }, function(error) { console.error(error); }); }); Parse.Cloud.job("NEW 2019 - Compute All Rankings", async (request) => { request.message("I just started Compute All Rankings"); const Geocacheur = Parse.Object.extend("Geocacheur"); let queryGeocacheurs = new Parse.Query(Geocacheur); queryGeocacheurs.equalTo("Active", true); queryGeocacheurs.limit(1000); queryGeocacheurs.find().then(async (geocacheurs) => { let promisesScores = []; let counter = 0; geocacheurs.forEach(async (geocacheur) => { counter = counter + 1; const email = geocacheur.get("Email"); request.message("Processing " + email + " " + counter + "/" + geocacheurs.length); console.log("Processing " + email + " " + counter + "/" + geocacheurs.length); promisesScores.push(jds.computeScoreForGeocacheur(email)); }); return await Promise.all(promisesScores); }).then(async (scores) => { console.log("in function with " + scores.length + " scores "); let promisesStore = []; let counter = 0; scores.forEach(async (score) => { counter = counter + 1; const email = score.geocacheur.get("Email"); request.message("Storing " + email + " - " + counter + "/" + scores.length); console.log("Storing " + email + " - " + counter + "/" + scores.length); promisesStore.push(jds.saveOrUpdateRanking(score)); }); return await Promise.all(promisesStore); }).then((results) => { console.log("termine with " + results.length); request.message("I just finished"); }, (error) => { console.error(error); }); }); /** * Sending 2019 launch email campaign * * You will have to deactivate some restrictions from your Google account in order to use Gmail : * - https://accounts.google.com/b/0/DisplayUnlockCaptcha * - https://myaccount.google.com/lesssecureapps * * @todo Better management of the promises / error cases */ Parse.Cloud.job("Send launch emails to participants 2019", async (request) => { request.message("I just started sending the emails"); let sTemplate = fs.readFileSync('cloud/views/mails/launch2019.html', 'utf8'); let oTransportConfig = { pool: true, host: process.env.EMAIL_HOST, port: parseInt(process.env.EMAIL_PORT, 10), secure: process.env.EMAIL_SECURE_SSL, auth: { user: process.env.EMAIL_USER, pass: process.env.EMAIL_PASS }, tls: { // do not fail on invalid certs rejectUnauthorized: false } }; let oTransporter = mailer.createTransport(oTransportConfig); console.log(oTransportConfig); const Geocache = Parse.Object.extend("Geocache"); let queryGeocaches = new Parse.Query(Geocache); queryGeocaches.notEqualTo("adminId", null); queryGeocaches.notEqualTo("adminId", ""); //queryGeocaches.equalTo("OwnerEmail", "testmail@gmail.com"); queryGeocaches.greaterThanOrEqualTo("createdAt", new Date(starting_jds_date)); queryGeocaches.limit(1000); queryGeocaches.find().then(async (geocaches) => { let counter = 0; geocaches.forEach(async (geocache) => { counter = counter + 1; const email = geocache.get("OwnerEmail"); const adminLink = "https://www.geocaching-jds.fr/create?admin_id=" + geocache.get("adminId"); request.message("Processing " + email + " " + counter + "/" + geocaches.length); console.log("Processing " + email + " (" + counter + "/" + geocaches.length + ")"); let oMailOptions = { from: process.env.EMAIL_FROM, to: email, subject: "Lancement épreuve Géocaching JDS 2019", html: sTemplate.replace(/{ADMIN_LINK}/g, adminLink) }; await oTransporter.sendMail(oMailOptions, function(error, info){ if (error) { console.log("Sending email to " + email + " FAILED !!! (retry manually)"); console.log(error); } else { console.log("Email sent to " + email + " (" + info.response + ")"); } }); }); }).then((results) => { console.log("Mailing campaign sent (returned: " + results + ")"); request.message("I just finished"); }, (error) => { console.error(error); }); });
40.205128
136
0.535259
9df3ea509969fd3be830abb6358cbf744cfd3d3c
1,161
js
JavaScript
src/api/index.js
Duwahiner/test-react
e588e2bf7c7ce2951d8a76b04ed7582362ce8f95
[ "MIT" ]
1
2021-02-22T19:27:27.000Z
2021-02-22T19:27:27.000Z
src/api/index.js
Duwahiner/test-react
e588e2bf7c7ce2951d8a76b04ed7582362ce8f95
[ "MIT" ]
null
null
null
src/api/index.js
Duwahiner/test-react
e588e2bf7c7ce2951d8a76b04ed7582362ce8f95
[ "MIT" ]
null
null
null
import fetch from 'isomorphic-fetch' export const getUser = async () => { const res = await fetch('https://jsonplaceholder.typicode.com/users/') const users = await res.json() return users } export const postUser = async (nweUser) => { const res = await fetch( 'https://jsonplaceholder.typicode.com/posts', { method: 'POST', body: JSON.stringify({ ...nweUser }), headers: { 'Content-type': 'application/json; charset=UTF-8' } } ) const users = await res.json() return users } export const putUser = async (newUser, id) => { const res = await fetch( `https://jsonplaceholder.typicode.com/posts/${id}`, { method: 'PUT', body: JSON.stringify({ ...newUser }), headers: { 'Content-type': 'application/json; charset=UTF-8' } } ) const users = await res.json() return users } export const deleteUser = async (id) => { const res = await fetch( `https://jsonplaceholder.typicode.com/posts/${id}`, { method: 'DELETE' } ) const users = await res.json() return users }
23.22
72
0.571059
9df44bad6cb9a72c766201b27ecd3410f5ac825d
949
js
JavaScript
assets/jss/nextjs-material-kit-pro/pages/presentationSections/descriptionStyle.js
tvang8394/danneckersWebRedone
76e19007172186deb009f562ffaed5891e45f6f0
[ "RSA-MD", "Info-ZIP" ]
null
null
null
assets/jss/nextjs-material-kit-pro/pages/presentationSections/descriptionStyle.js
tvang8394/danneckersWebRedone
76e19007172186deb009f562ffaed5891e45f6f0
[ "RSA-MD", "Info-ZIP" ]
null
null
null
assets/jss/nextjs-material-kit-pro/pages/presentationSections/descriptionStyle.js
tvang8394/danneckersWebRedone
76e19007172186deb009f562ffaed5891e45f6f0
[ "RSA-MD", "Info-ZIP" ]
null
null
null
import { container, title, section, grayColor, whiteColor, mainRaised, hexToRgb, } from "assets/jss/nextjs-material-kit-pro.js"; const descriptionStyle = { container, description: { color: grayColor[0], textAlign: "center", }, section: { ...section, padding: "70px 0px", "& h4$description": { fontSize: "1.5em", }, }, features: { textAlign: "center !important", paddingTop: "30px", paddingBottom: "0px", "& p": { fontSize: "16px", lineHeight: "1.6em", }, }, proBadge: { position: "relative", fontSize: "22px", textTransform: "uppercase", fontWeight: "700", right: "-10px", padding: "10px 18px", top: "-30px", background: whiteColor, borderRadius: "3px", color: grayColor[18], lineHeight: "22px", boxShadow: "0 5px 5px -2px rgba(" + hexToRgb(grayColor[25]) + ",.4)", }, }; export default descriptionStyle;
18.98
73
0.580611
9df50e054313eb06c42d853554591139df621eb8
28,427
js
JavaScript
public/assets/front/js/scripts.js
Hovog83/services
4c304ad879ad782f7cf1ad21b3a903060f62abcc
[ "MIT" ]
null
null
null
public/assets/front/js/scripts.js
Hovog83/services
4c304ad879ad782f7cf1ad21b3a903060f62abcc
[ "MIT" ]
null
null
null
public/assets/front/js/scripts.js
Hovog83/services
4c304ad879ad782f7cf1ad21b3a903060f62abcc
[ "MIT" ]
null
null
null
;(function($) { "use strict"; var $body = $('body'); var $head = $('head'); // var $mainWrapper = $('#main-wrapper'); $(document).ready(function() { /* ------------------------------------------------------------------------- USER LOGIN HOVER ------------------------------------------------------------------------- */ jQuery('#login-link').click(function() { jQuery(this).parent("li#login").addClass('active'); jQuery("#login-shadow").css('height',$("html").height()).fadeIn(500); jQuery(this).parent("li#login").find("#login-form").animate({ top: '80px' }, 500); jQuery(this).parent("li#login").find("#login-form").find("#login-form-container").fadeIn(750); }); jQuery("#login-shadow").click(function() { var loginform = jQuery("#login-form"); loginform.parent("li#login").removeClass('active'); jQuery("#login-shadow").fadeOut(500); loginform.animate({ top: '-400px' }, 500); loginform.find("#login-form-container").fadeOut(500); }); /* ------------------------------------------------------------------------- MOBILE USER LOGIN HOVER ------------------------------------------------------------------------- */ jQuery('.nav-wrapper-mobile .login-link').click(function() { jQuery(this).parent("li.login").addClass('active'); jQuery("#login-shadow").css('height',$("html").height()).fadeIn(500); jQuery(this).parent("li.login").find(".login-form").animate({ top: '-200px' }, 500); jQuery(this).parent("li.login").find(".login-form").find(".login-form-container").fadeIn(750); }); jQuery("#login-shadow").click(function() { var loginform = jQuery(".nav-wrapper-mobile .login-form"); loginform.parent("li.login").removeClass('active'); jQuery("#login-shadow").fadeOut(500); loginform.animate({ top: '-1600px' }, 500); loginform.find(".login-form-container").fadeOut(500); }); /* ------------------------------------------------------------------------- SEARCH NAV TOGGLE ------------------------------------------------------------------------- */ var advanced_button = jQuery(".search-nav .advanced-search-button"); var submenu = jQuery(".search-nav .sub-menu"); $(advanced_button).on('click', function() { jQuery(this).parent('.search-nav').find('.sub-menu').slideToggle(500); if (jQuery(this).hasClass('active')) { jQuery(this).removeClass('active'); } else { jQuery(this).addClass('active'); } }); submenu.find("li").click(function() { submenu.find("li").removeClass('active'); jQuery(this).addClass('active'); var getclass = jQuery(this).attr('class'); jQuery(this).addClass('active'); jQuery(".search-nav .advanced-search-button").val(getclass); var geticon = jQuery(this).find('i').attr('class'); advanced_button.find('i').attr('class',geticon + ' fa-lg'); advanced_button.removeClass('active'); jQuery('.search-nav').find('ul').slideUp(500); }); /* ------------------------------------------------------------------------- ADVANCED SEARCH TOGGLE ------------------------------------------------------------------------- */ var $AdvancedSearchToggle = $('.map-search .advanced-search'); var mapHeight; var wrapper = $("#map_canvas_wrapper"); var mapToggle = $(".map-control"); $AdvancedSearchToggle.hide(); $('.select-button button').on('click', function(e){ $('.search-shadow').fadeToggle("slow"); $(this).toggleClass('active'); e.preventDefault(); $AdvancedSearchToggle.slideToggle("slow"); if(mapToggle.hasClass("active")){ $(mapToggle).removeClass("active"); wrapper.animate({"height": mapHeight}, "slow"); $(mapToggle).find('.fa').removeClass("fa-chevron-circle-down"); $(mapToggle).find('.fa').addClass("fa-chevron-circle-up"); $(mapToggle).find('span').text("Hide map"); } }); /* ------------------------------------------------------------------------- MENU NAV ------------------------------------------------------------------------- */ $('.nav').each(function() { var self = $(this); // HOVER SUBMENU self.find('li.has-submenu').hover(function() { $(this).addClass('hover'); $(this).find('>.sub-menu').stop(true, true).fadeIn(200); }, function() { $(this).removeClass('hover'); $(this).find('>.sub-menu').stop(true, true).delay(10).fadeOut(200); }); }); /* ------------------------------------------------------------------------- HEADER TOGGLES ------------------------------------------------------------------------- */ // SEARCH TOGGLE $( '.search-toggle' ).click(function(){ if ( $( '.nav-wrapper-mobile' ).is( ':visible' ) ) { $( '.nav-wrapper-mobile' ).slideUp(300); } $( '.search-nav.mobile' ).slideToggle(300, function(){ }); }); // NAVBAR TOGGLE $( '.navbar-toggle' ).click(function(){ if ( $( '.search-nav.mobile' ).is( ':visible' ) ) { $( '.search-nav.mobile' ).slideUp(300); } $( '.nav-wrapper-mobile' ).slideToggle(300, function(){ }); }); /* ------------------------------------------------------------------------- HEADER MENU MOBILE ------------------------------------------------------------------------- */ $('.nav-wrapper-mobile > .main-menu').each(function() { var self = $(this); // CREATE TOGGLE BUTTONS self.find( 'li.has-submenu' ).each(function(){ $(this).append( '<button class="submenu-toggle"><i class="fa fa-chevron-down"></i></button>' ); }); // TOGGLE SUBMENU self.find('.submenu-toggle').each(function() { $(this).click(function() { $(this).parent().find('> .sub-menu').slideToggle(200); $(this).find('.fa').toggleClass('fa-chevron-up fa-chevron-down'); }); }); }); /* ------------------------------------------------------------------------- PRICE FILTER ------------------------------------------------------------------------- */ $( "#slider-distance-search" ).slider({ range: "min", value: 1500, min: 1, max: 5000, slide: function( event, ui ) { $( "#distance-search" ).val( ui.value + "km" ); } }); $( "#distance-search" ).val( $( "#slider-distance-search" ).slider( "value" ) + "km"); $( "#slider-publication-search" ).slider({ range: "min", value: 7, min: 0, max: 30, slide: function( event, ui ) { $( "#publication-search" ).val( "<" + ui.value ); } }); $( "#publication-search" ).val( "<" + $( "#slider-publication-search" ).slider ( "value" )); /* ------------------------------------------------------------------------- FLICKR ------------------------------------------------------------------------- */ $("#flickr-feed").each(function() { var flickr_id = jQuery(this).html(); jQuery(this).html('<ul></ul>'); jQuery(this).find('ul').jflickrfeed({ limit : 6, qstrings : { id: flickr_id }, itemTemplate : '<li><a class="opacity" href="{{image_b}}"><img src="{{image_s}}" alt="{{title}}" /></a></li>' }); }); /* ------------------------------------------------------------------------- HIDE/SHOW CONTACT FORM (SIDEBAR) ------------------------------------------------------------------------- */ jQuery('.claim-company .btn').click(function() { jQuery('.claim-company-form').slideToggle(500); if (jQuery(this).find('i').hasClass('fa-chevron-circle-down')) { jQuery(this).find('i').removeClass('fa-chevron-circle-down').addClass('fa-chevron-circle-up'); } else { jQuery(this).find('i').removeClass('fa-chevron-circle-up').addClass('fa-chevron-circle-down'); } }); /* ------------------------------------------------------------------------- THEME SWITCHER ------------------------------------------------------------------------- */ (function () { /*! * jQuery Cookie Plugin v1.4.0 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ (function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof exports==="object"){a(require("jquery"))}else{a(jQuery)}}}(function(f){var a=/\+/g;function d(i){return b.raw?i:encodeURIComponent(i)}function g(i){return b.raw?i:decodeURIComponent(i)}function h(i){return d(b.json?JSON.stringify(i):String(i))}function c(i){if(i.indexOf('"')===0){i=i.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{i=decodeURIComponent(i.replace(a," "));return b.json?JSON.parse(i):i}catch(j){}}function e(j,i){var k=b.raw?j:c(j);return f.isFunction(i)?i(k):k}var b=f.cookie=function(q,p,v){if(p!==undefined&&!f.isFunction(p)){v=f.extend({},b.defaults,v);if(typeof v.expires==="number"){var r=v.expires,u=v.expires=new Date();u.setTime(+u+r*86400000)}return(document.cookie=[d(q),"=",h(p),v.expires?"; expires="+v.expires.toUTCString():"",v.path?"; path="+v.path:"",v.domain?"; domain="+v.domain:"",v.secure?"; secure":""].join(""))}var w=q?undefined:{};var s=document.cookie?document.cookie.split("; "):[];for(var o=0,m=s.length;o<m;o++){var n=s[o].split("=");var j=g(n.shift());var k=n.join("=");if(q&&q===j){w=e(k,p);break}if(!q&&(k=e(k))!==undefined){w[j]=k}}return w};b.defaults={};f.removeCookie=function(j,i){if(f.cookie(j)===undefined){return false}f.cookie(j,"",f.extend({},i,{expires:-1}));return !f.cookie(j)}})); // CSS Styles var header_container = jQuery('header'); var section_container = jQuery('#main-wrapper'); var footer_container = jQuery('footer'); var body_container = jQuery('body'); var background = jQuery("#background-switcher"); var currentLayout = jQuery ('#layout-switcher > option'); var background_switcher = jQuery("#background-switcher"); jQuery('#layout-switcher').on('change', function() { currentLayout = this.value; if( currentLayout == 'boxed' ) { header_container.addClass('boxed'); section_container.addClass('boxed'); footer_container.addClass('boxed'); body_container.addClass('background-1'); background_switcher.find('li.background-1').find('i').addClass('fa').addClass('fa-check'); } else if ( currentLayout == 'fullscreen' ) { header_container.removeClass('boxed'); section_container.removeClass('boxed'); footer_container.removeClass('boxed'); body_container.removeClass('background-1'); body_container.removeClass('background-2'); body_container.removeClass('background-3'); background_switcher.find('li').find('i').removeClass('fa').removeClass('fa-check'); } }); background_switcher.find('li').click(function() { currentLayout = $('#layout-switcher').val(); if( currentLayout == 'boxed' ) { background = $(this).attr('class'); body_container.removeClass(); body_container.addClass(background); background_switcher.find('li').find('i').removeClass('fa').removeClass('fa-check'); $(this).find('i').addClass('fa').addClass('fa-check'); } else { alert('Background is visible only in boxed layout. Please select boxed layout.'); } }); })(); /* ------------------------------------------------------------------------- RATING ------------------------------------------------------------------------- */ $('.company-ratings li.single-rate').each(function() { var self = $(this); // HOVER SUBMENU self.find('.box-details').hover(function() { self.addClass('hover'); self.find('.user-values').stop(true, true).fadeIn(200); }, function() { self.removeClass('hover'); self.find('.user-values').stop(true, true).delay(10).fadeOut(200); }); }); /* ------------------------------------------------------------------------- MAPS ------------------------------------------------------------------------- */ // MAIN MAP $("#map_canvas").each(function() { $(this).goMap({ maptype: 'ROADMAP', scrollwheel: false, navigationControl: false, zoom: 5, markers: [{ latitude: 46.454889270677576, longitude: 7.45697021484375, icon: 'img/map-marker.png', html: '<div class="marker-ribbon"><div class="ribbon-banner"><div class="ribbon-text">Featured</div></div></div>' + '<div class="marker-holder">' + '<div class="marker-company-thumbnail"><img src="img/map-marker-logo.jpg" alt=""><ul class="marker-action custom-list"><li class="zoom"><a href="#"><i class="fa fa-search-plus"></i></a></li class="bookmark"><li><a href="#"><i class="fa fa-bookmark"></i></a></li><li class="share"><a href="#"><i class="fa fa-share"></i></a></li> </ul></div>' + '<div class="map-item-info">' + '<h5 class="title"><a href="#">Courier & Courier</a></h5>' + '<ul class="rating custom-list"><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li></ul>' + '<div class="describe">' + '<p class="contact-info address">Norwegia, Oslo, 15G, Torshovgata, Sagene, 0476, Oslo</p>' + '<p class="contact-info telephone">666 555 444</p>' + '<p class="contact-info email">Youremail@mail.com</p>' + '<p class="contact-info website"><a href="#">Yourwebsite.com</a></p>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' },{ latitude: 49.31079887964633, longitude: 4.361572265625, icon: 'img/map-marker2.png', html: '<div class="marker-holder">' + '<div class="marker-company-thumbnail"><img src="img/map-marker-logo2.jpg" alt=""><ul class="marker-action custom-list"><li class="zoom"><a href="#"><i class="fa fa-search-plus"></i></a></li class="bookmark"><li><a href="#"><i class="fa fa-bookmark"></i></a></li><li class="share"><a href="#"><i class="fa fa-share"></i></a></li> </ul></div>' + '<div class="map-item-info">' + '<h5 class="title"><a href="#">Courier & Courier</a></h5>' + '<ul class="rating custom-list"><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li></ul>' + '<div class="describe">' + '<p class="contact-info address">Norwegia, Oslo, 15G, Torshovgata, Sagene, 0476, Oslo</p>' + '<p class="contact-info telephone">666 555 444</p>' + '<p class="contact-info email">Youremail@mail.com</p>' + '<p class="contact-info website"><a href="#">Yourwebsite.com</a></p>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' },{ latitude: 45.69083283645816, longitude: 16.336669921875, icon: 'img/map-marker3.png', html: '<div class="marker-holder">' + '<div class="marker-company-thumbnail"><img src="img/map-marker-logo3.jpg" alt=""><ul class="marker-action custom-list"><li class="zoom"><a href="#"><i class="fa fa-search-plus"></i></a></li class="bookmark"><li><a href="#"><i class="fa fa-bookmark"></i></a></li><li class="share"><a href="#"><i class="fa fa-share"></i></a></li> </ul></div>' + '<div class="map-item-info">' + '<h5 class="title"><a href="#">Courier & Courier</a></h5>' + '<ul class="rating custom-list"><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li></ul>' + '<div class="describe">' + '<p class="contact-info address">Norwegia, Oslo, 15G, Torshovgata, Sagene, 0476, Oslo</p>' + '<p class="contact-info telephone">666 555 444</p>' + '<p class="contact-info email">Youremail@mail.com</p>' + '<p class="contact-info website"><a href="#">Yourwebsite.com</a></p>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' },{ latitude: 47.56170075451973, longitude: 14.315185546875, icon: 'img/map-marker4.png', html: '<div class="marker-ribbon"><div class="ribbon-banner"><div class="ribbon-text">Featured</div></div></div>' + '<div class="marker-holder">' + '<div class="marker-company-thumbnail"><img src="img/map-marker-logo4.jpg" alt=""><ul class="marker-action custom-list"><li class="zoom"><a href="#"><i class="fa fa-search-plus"></i></a></li class="bookmark"><li><a href="#"><i class="fa fa-bookmark"></i></a></li><li class="share"><a href="#"><i class="fa fa-share"></i></a></li> </ul></div>' + '<div class="map-item-info">' + '<h5 class="title"><a href="#">Courier & Courier</a></h5>' + '<ul class="rating custom-list"><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li><li><i class="fa fa-star"></i></li></ul>' + '<div class="describe">' + '<p class="contact-info address">Norwegia, Oslo, 15G, Torshovgata, Sagene, 0476, Oslo</p>' + '<p class="contact-info telephone">666 555 444</p>' + '<p class="contact-info email">Youremail@mail.com</p>' + '<p class="contact-info website"><a href="#">Yourwebsite.com</a></p>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' }] }); }); // MAP CONTACT $("#map_canvas_contact").each(function initialize() { $(this).goMap({ maptype: 'ROADMAP', scrollwheel: false, navigationControl: false, zoom: 5, markers: [{ latitude: 46.454889270677576, longitude: 7.45697021484375, icon: 'img/map-marker-contact.png', html: 'Metrodir' }] }); }); // MAP CONTACT $("#map_canvas_company").each(function initialize() { $(this).goMap({ maptype: 'ROADMAP', scrollwheel: false, navigationControl: false, zoom: 5, markers: [{ latitude: 46.454889270677576, longitude: 7.45697021484375, icon: 'img/map-marker3.png' }] }); }); //MAP SIDEBAR $("#map_canvas_sidebar").each(function() { $(this).goMap({ maptype: 'ROADMAP', scrollwheel: false, navigationControl: false, zoom: 6, markers: [{ latitude: 46.454889270677576, longitude: 7.45697021484375, icon: 'img/map-marker-contact.png', html: 'Metrodir' }] }); }); // STREET VIEW var fenway = new google.maps.LatLng(42.345573,-71.098326); $("#map_street_view").each(function() { $(this).gmap3({ streetviewpanorama:{ options:{ container: $("#map_street_view"), opts:{ scrollwheel: false, position: fenway, pov: { heading: 166, pitch: 1, zoom: 1 } } } } }); }); $("#main-wrapper.listing").each(function() { var map_width = $(window).width() - (60 + $("#main-wrapper").width()); $("#map_canvas_wrapper").width(map_width); }); $(window).resize(function(){ var map_width = $(window).width() - (60 + $("#main-wrapper").width()); $("#main-wrapper.listing #map_canvas_wrapper").width(map_width); }); /* ------------------------------------------------------------------------- HIDE/SHOW MAP ------------------------------------------------------------------------- */ jQuery(".map-control").click(function() { var wrapper = $("#map_canvas_wrapper"); if($(this).hasClass("active")){ $(this).removeClass("active"); wrapper.animate({"height": mapHeight}, "slow"); $(this).find('a.btn>i.fa').removeClass("fa-chevron-circle-down"); $(this).find('a.btn>i.fa').addClass("fa-chevron-circle-up"); $(this).find('a.btn>span').text("Hide map"); } else{ mapHeight = wrapper.height(); $(this).addClass("active"); wrapper.animate({"height": 62}, "slow"); $(this).find('a.btn>i.fa').removeClass("fa-chevron-circle-up"); $(this).find('a.btn>i.fa').addClass("fa-chevron-circle-down"); $(this).find('a.btn>span').text("Show map"); if($('.select-button button').hasClass('active')){ $('.search-shadow').fadeToggle("slow"); $('.select-button button').toggleClass('active'); $AdvancedSearchToggle.slideToggle("slow"); } } return false; }); /* ------------------------------------------------------------------------- MATCH HEIGHT (SECTION CATEGORIES) ------------------------------------------------------------------------- */ $(function() { $('.list .category-box, .listing-box').matchHeight(); }); /* ------------------------------------------------------------------------- REVOLUTION SLIDER ------------------------------------------------------------------------- */ $(function() { $('.tp-banner').revolution({ delay:9000, startwidth:1170, startheight:500, hideThumbs:10, navigationType:"bullet", navigationArrows:"solo", navigationStyle:"round" }); }); /* ------------------------------------------------------------------------- TABS ------------------------------------------------------------------------- */ $('.responsive-tabs').each(function() { $(this).responsiveTabs({ accordionOn: ['xs'] // xs, sm, md, lg }); }); /* ------------------------------------------------------------------------- COMPANIES ADVERTS SLIDERS ------------------------------------------------------------------------- */ $(".companies-slider.latest").owlCarousel({ paginationNumbers: true, slideSpeed : 300, autoPlay: true, paginationSpeed : 400, singleItem:true }); $(".companies-slider.featured").owlCarousel({ paginationNumbers: true, slideSpeed : 300, autoPlay: false, paginationSpeed : 400, items: 4, itemsDesktop : [1199,4], itemsDesktopSmall : [980,2], itemsTablet: [768,2], itemsMobile : [479,1], }); $(".partners-slider").owlCarousel({ pagination: true, slideSpeed : 300, autoPlay: false, paginationSpeed : 400, itemsDesktop : [1199,5], itemsDesktopSmall : [980,5], itemsTablet: [768,3], itemsMobile : [479,3], }); /* ------------------------------------------------------------------------- MEDIA QUERY BREAKPOINT ------------------------------------------------------------------------- */ var uouMediaQueryBreakpoint = function() { if ($('#media-query-breakpoint').length < 1) { $('body').append('<var id="media-query-breakpoint"><span></span></var>'); } var value = $('#media-query-breakpoint').css('content'); if (typeof value !== 'undefined') { value = value.replace("\"", "").replace("\"", "").replace("\'", "").replace("\'", ""); if (isNaN(parseInt(value, 10))) { $('#media-query-breakpoint span').each(function() { value = window.getComputedStyle(this, ':before').content; }); value = value.replace("\"", "").replace("\"", "").replace("\'", "").replace("\'", ""); } if (isNaN(parseInt(value, 10))) { value = 1199; } } else { value = 1199; } return value; }; /* ------------------------------------------------------------------------- SELECT BOX ------------------------------------------------------------------------- */ $.fn.uouSelectBox = function() { var self = $(this), select = self.find('select'); self.prepend('<ul class="select-clone custom-list"></ul>'); var placeholder = select.data('placeholder') ? select.data('placeholder') : select.find('option:eq(0)').text(), clone = self.find('.select-clone'); self.prepend('<input class="value-holder" type="text" disabled="disabled" placeholder="' + placeholder + '"><div class="advanced-select-button"><i class="fa fa-chevron-down"></i></div>'); var value_holder = self.find('.value-holder'); // INPUT PLACEHOLDER FIX FOR IE if ($.fn.placeholder) { self.find('input, textarea').placeholder(); } // CREATE CLONE LIST select.find('option').each(function() { if ($(this).attr('value')) { clone.append('<li data-value="' + $(this).val() + '">' + $(this).text() + '</li>'); } }); // CLICK TOGGLE self.click(function() { var media_query_breakpoint = uouMediaQueryBreakpoint(); if (media_query_breakpoint > 991) { clone.slideToggle(300); self.toggleClass('active'); var searchButton = self.find('.advanced-select-button'); searchButton.toggleClass('active'); if(self.hasClass("active")){ searchButton.find(".fa").removeClass("fa-chevron-down"); searchButton.find(".fa").addClass("fa-chevron-up"); } else{ searchButton.find(".fa").addClass("fa-chevron-down"); searchButton.find(".fa").removeClass("fa-chevron-up"); } } }); // CLICK clone.find('li').click(function() { value_holder.val($(this).text()); select.find('option[value="' + $(this).attr('data-value') + '"]').attr('selected', 'selected'); // IF LIST OF LINKS if (self.hasClass('links')) { window.location.href = select.val(); } }); // HIDE LIST self.bind('clickoutside', function(event) { clone.slideUp(100); }); // LIST OF LINKS if (self.hasClass('links')) { select.change(function() { window.location.href = select.val(); }); } }; /* ------------------------------------------------------------------------- RADIO INPUT ------------------------------------------------------------------------- */ $.fn.uouRadioInput = function(){ var self = $(this), input = self.find( 'input' ), group = input.attr( 'name' ); // INITIAL STATE if ( input.is( ':checked' ) ) { self.addClass( 'active' ); } // CHANGE STATE input.change(function(){ if ( group ) { $( '.radio-input input[name="' + group + '"]' ).parent().removeClass( 'active' ); } if ( input.is( ':checked' ) ) { self.addClass( 'active' ); } }); }; /* ------------------------------------------------------------------------- BACK TO TOP BUTTON ------------------------------------------------------------------------- */ $('#back-to-top').each(function () { var $this = $(this); $this.on('click', function (event) { event.preventDefault(); $('html, body').animate({ scrollTop: 0 }, 300); }); $(window).scroll(function () { if ($(this).scrollTop() > 300) { $this.fadeIn(200); } else if ($(this).scrollTop() < 250) { $this.fadeOut(200); } }); }); // GET ACTUAL MEDIA QUERY BREAKPOINT var media_query_breakpoint = uouMediaQueryBreakpoint(); // SELECT BOX $( '.select-box' ).each(function(){ $(this).uouSelectBox(); }); // RADIO INPUT $( '.radio-input' ).each(function(){ $(this).uouRadioInput(); }); $(window).resize(function(){ if ( uouMediaQueryBreakpoint() !== media_query_breakpoint ) { media_query_breakpoint = uouMediaQueryBreakpoint(); /* RESET HEADER ELEMENTS */ $( '.search-nav.mobile, .nav-wrapper-mobile' ).removeAttr( 'style' ); } }); }); // Touch // --------------------------------------------------------- var dragging = false; $body.on('touchmove', function() { dragging = true; }); $body.on('touchstart', function() { dragging = false; }); }(jQuery));
38.887825
1,346
0.489499
9df5d58f2af712a02717cef1bc9396429b8b02f4
634
js
JavaScript
packages/helper-settings/page.js
bumplzz69/OctoLinker
61f7d97bc6dddd33d84fc7576cd378fcf65f2f62
[ "MIT" ]
1
2020-09-12T09:12:25.000Z
2020-09-12T09:12:25.000Z
packages/helper-settings/page.js
casper6863/OctoLinkerCan-t-connect-to-API.-Is-Tracy-running-
17b396466c8c05c7cb4c323626234e30a24f4d9c
[ "MIT" ]
null
null
null
packages/helper-settings/page.js
casper6863/OctoLinkerCan-t-connect-to-API.-Is-Tracy-running-
17b396466c8c05c7cb4c323626234e30a24f4d9c
[ "MIT" ]
1
2019-03-19T18:35:33.000Z
2019-03-19T18:35:33.000Z
/* eslint-disable react/no-unused-state */ import { h, render } from 'preact'; import SettingsForm from './SettingsForm'; const App = () => ( <div className="d-flex flex-justify-center p-6"> <div className="Box box-shadow four-fifth column"> <div className="Box-row"> <div className="d-flex"> <img height="54" alt="" src="icon.png" /> <div className="pt-3 px-2"> <h2>OctoLinker settings</h2> </div> </div> </div> <div className="Box-row"> <SettingsForm /> </div> </div> </div> ); render(<App />, document.getElementById('app'));
25.36
54
0.555205
9df6371d882b5c8c69f89855853bc31c350339b0
906
js
JavaScript
commands/public/help.js
Abdo30004/Thx-System
9abf8573742a4d21354ba690575127f422fffe28
[ "MIT" ]
null
null
null
commands/public/help.js
Abdo30004/Thx-System
9abf8573742a4d21354ba690575127f422fffe28
[ "MIT" ]
null
null
null
commands/public/help.js
Abdo30004/Thx-System
9abf8573742a4d21354ba690575127f422fffe28
[ "MIT" ]
null
null
null
const Discord = require("discord.js") module.exports = { name: "help", cooldown: "10s", aliases: ["أوامر", "اوامر", "مساعدة"], run: async (client, message, args) => { let prefix = client.config.prefix let embed = new Discord.MessageEmbed() .setTitle(`**Commands List**`)//copyrights Abderrahmane .addField("**Public Commands|| الأوامر العامة**", client.commands.filter(cmd => cmd.category == "public").map(cmd => `\`${prefix}${cmd.name}\` **${cmd.description}**`)) .addField("**Mod Commands|| أوامر المشرفين**", client.commands.filter(cmd => cmd.category == "mod").map(cmd => `\`${prefix}${cmd.name}\` **${cmd.description}**`)) .setColor("#090909")//copyrights Abderrahmane .setFooter(`Reqested By ${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true, format: "png" }))//copyrights Abderrahmane message.lineReplyNoMention(embed) } };
50.333333
174
0.65011
9df68c9439032c93600ac95589f3e762fb1de51d
3,316
js
JavaScript
app/components/RepoDetails/tests/index.test.js
simoneferrero/sha_checker
293fd513f82dd8d6f7e826469059e1218bea0096
[ "MIT" ]
2
2018-02-28T14:25:56.000Z
2018-03-20T11:59:33.000Z
app/components/RepoDetails/tests/index.test.js
simoneferrero/sha_checker
293fd513f82dd8d6f7e826469059e1218bea0096
[ "MIT" ]
null
null
null
app/components/RepoDetails/tests/index.test.js
simoneferrero/sha_checker
293fd513f82dd8d6f7e826469059e1218bea0096
[ "MIT" ]
null
null
null
import React from 'react'; import { shallow } from 'enzyme'; import Select from 'react-select'; import RepoDetails from '../index'; const renderComponent = (props = {}) => shallow( <RepoDetails {...props} /> ); const branches = [ { name: 'testBranch1', commit: { sha: 'abcd123', url: 'testUrl1', }, }, { name: 'testBranch2', commit: { sha: 'efgh456', url: 'testUrl2', }, }, ]; const defaultBranch = 'testBranch1'; const name = 'testRepo'; const selectedBranch = { value: 'testBranch2', label: 'testBranch2', }; describe('<RepoDetails />', () => { it('renders empty div if no props are passed', () => { const renderedComponent = renderComponent(); expect(renderedComponent.contains(name)).toEqual(false); }); it('renders name of repo', () => { const renderedComponent = renderComponent({ name }); expect(renderedComponent.contains(name)).toEqual(true); }); it('doesn\'t render Select component if defaultBranch is not passed', () => { const renderedComponent = renderComponent({ branches }); expect(renderedComponent.find(Select).length).toEqual(0); }); it('renders Select component if defaultBranch and branches are passed', () => { const renderedComponent = renderComponent({ branches, defaultBranch }); expect(renderedComponent.find(Select).length).toEqual(1); }); it('calls onChangeBranch and sets selectedBranch state if Select changes', () => { const onChangeBranch = jest.fn(); const renderedComponent = renderComponent({ branches, defaultBranch, onChangeBranch }); renderedComponent.find(Select).simulate('change', selectedBranch); expect(onChangeBranch).toBeCalled(); expect(renderedComponent.state('selectedBranch')).toEqual(selectedBranch); }); it('only calls onChangeBranch if selectedBranch is not undefined', () => { const onChangeBranch = jest.fn(); const renderedComponent = renderComponent({ branches, defaultBranch, onChangeBranch }); renderedComponent.find(Select).simulate('change'); expect(onChangeBranch).not.toBeCalled(); }); it('sets selectedBranch state when it receives default Branch', () => { const renderedComponent = renderComponent({ branches, defaultBranch }); renderedComponent.setProps({ selectedBranch }); const newState = { selectedBranch: { value: defaultBranch, label: defaultBranch, }, }; expect(renderedComponent.state()).toEqual(newState); }); it('only sets selectedBranch state if previously undefined', () => { const renderedComponent = renderComponent({ branches, defaultBranch }); renderedComponent.state().selectedBranch = selectedBranch; renderedComponent.setProps({ selectedBranch }); expect(renderedComponent.state('selectedBranch')).toEqual(selectedBranch); }); it('creates an array of options from branches', () => { const renderedComponent = renderComponent(); const optionsFromBranches = renderedComponent.instance().createSelectOptions(branches); const selectOptions = [ { value: 'testBranch1', label: 'testBranch1', }, { value: 'testBranch2', label: 'testBranch2', }, ]; expect(optionsFromBranches).toEqual(selectOptions); }); });
28.101695
91
0.668878
9df6e0e1332632eff495fc753a9d67d5095f5233
1,293
js
JavaScript
eq-author/src/App/introduction/Design/IntroductionEditor/LegalBasisField.test.js
uk-gov-mirror/ONSdigital.eq-author-app
55e8159422d669417063e5e92654e99ae7e54058
[ "MIT" ]
null
null
null
eq-author/src/App/introduction/Design/IntroductionEditor/LegalBasisField.test.js
uk-gov-mirror/ONSdigital.eq-author-app
55e8159422d669417063e5e92654e99ae7e54058
[ "MIT" ]
null
null
null
eq-author/src/App/introduction/Design/IntroductionEditor/LegalBasisField.test.js
uk-gov-mirror/ONSdigital.eq-author-app
55e8159422d669417063e5e92654e99ae7e54058
[ "MIT" ]
null
null
null
import React from "react"; import { shallow } from "enzyme"; import LegalBasisField, { LegalOption } from "./LegalBasisField"; describe("LegalBasisField", () => { let props; beforeEach(() => { props = { name: "legalBasis", value: "NOTICE_1", onChange: jest.fn(), }; }); it("should render", () => { expect(shallow(<LegalBasisField {...props} />)).toMatchSnapshot(); }); it("should show the option matching the value as selected", () => { const option = shallow(<LegalBasisField {...props} />).find( "[selected=true]" ); expect(option.prop("value")).toEqual(props.value); }); it("picking the option should trigger onChange", () => { shallow(<LegalBasisField {...props} />) .find("[value='NOTICE_2']") .simulate("change", { name: props.name, value: "NOTICE_2" }); expect(props.onChange).toHaveBeenCalledWith({ name: props.name, value: "NOTICE_2", }); }); describe("LegalOption", () => { it("should render", () => { const props = { name: "legalBasis", value: "NOTICE_1", onChange: jest.fn(), selected: false, }; expect( shallow(<LegalOption {...props}>hello world</LegalOption>) ).toMatchSnapshot(); }); }); });
24.865385
70
0.566125
9df7be34b959ebd3bdf6e69a3d370d2fadcbad4d
1,975
js
JavaScript
src/vis/map-events-manager.js
nhorvath/carto.js
f0cd67a13c4c9dce161f57e952442240f09c3ecf
[ "BSD-3-Clause" ]
81
2018-04-26T15:10:57.000Z
2022-02-16T20:30:47.000Z
src/vis/map-events-manager.js
nhorvath/carto.js
f0cd67a13c4c9dce161f57e952442240f09c3ecf
[ "BSD-3-Clause" ]
205
2018-04-18T09:44:35.000Z
2022-03-17T08:14:47.000Z
src/vis/map-events-manager.js
nhorvath/carto.js
f0cd67a13c4c9dce161f57e952442240f09c3ecf
[ "BSD-3-Clause" ]
40
2018-04-18T23:44:14.000Z
2021-11-02T15:08:18.000Z
/** * Listens to feature events and "forwards" them to the map model * when map's feature interactivity is enabled. * @param {Object} deps Dependencies */ var MapModelEventsManager = function (deps) { if (!deps.mapModel) throw new Error('mapModel is required'); this._mapModel = deps.mapModel; }; MapModelEventsManager.prototype.start = function (cartoDBLayerGroupView) { this._cartoDBLayerGroupView = cartoDBLayerGroupView; this._cartoDBLayerGroupView.on('featureOver', this._onFeatureOver, this); this._cartoDBLayerGroupView.on('featureClick', this._onFeatureClick, this); this._cartoDBLayerGroupView.on('featureOut', this._onFeatureOut, this); this._cartoDBLayerGroupView.on('featureError', this._onFeatureError, this); }; MapModelEventsManager.prototype.stop = function () { if (this._cartoDBLayerGroupView) { this._cartoDBLayerGroupView.off('featureOver', this._onFeatureOver, this); this._cartoDBLayerGroupView.off('featureClick', this._onFeatureClick, this); this._cartoDBLayerGroupView.off('featureOut', this._onFeatureOut, this); this._cartoDBLayerGroupView.off('featureError', this._onFeatureError, this); delete this._cartoDBLayerGroupView; } }; MapModelEventsManager.prototype._onFeatureOver = function (event) { if (this._mapModel.isFeatureInteractivityEnabled()) { this._mapModel.trigger('featureOver', event); } }; MapModelEventsManager.prototype._onFeatureClick = function (event) { if (this._mapModel.isFeatureInteractivityEnabled()) { this._mapModel.trigger('featureClick', event); } }; MapModelEventsManager.prototype._onFeatureOver = function (event) { if (this._mapModel.isFeatureInteractivityEnabled()) { this._mapModel.trigger('featureOver', event); } }; MapModelEventsManager.prototype._onFeatureError = function (event) { if (this._mapModel.isFeatureInteractivityEnabled()) { this._mapModel.trigger('featureError', event); } }; module.exports = MapModelEventsManager;
35.909091
80
0.767089
9df8270288188360c5ab79c3cff2f5bb945c4cdc
3,336
js
JavaScript
word-add-in-sample/packages/Microsoft.Office.js.1.1.0.9/Content/Scripts/Office/1/da-dk/outlook_strings.debug.js
niebert/web-integration-samples
3dd557323f685d8acd305d8da3d5a67b426c0e94
[ "Apache-2.0" ]
53
2016-12-14T13:45:18.000Z
2021-11-19T04:49:00.000Z
word-add-in-sample/packages/Microsoft.Office.js.1.1.0.9/Content/Scripts/Office/1/da-dk/outlook_strings.debug.js
niebert/web-integration-samples
3dd557323f685d8acd305d8da3d5a67b426c0e94
[ "Apache-2.0" ]
30
2018-04-03T07:59:02.000Z
2022-03-02T09:42:56.000Z
word-add-in-sample/packages/Microsoft.Office.js.1.1.0.9/Content/Scripts/Office/1/da-dk/outlook_strings.debug.js
MULXCODE/web-integration-samples
4006b91b18b8502226f96b3ad24c5040afc0bd48
[ "Apache-2.0" ]
53
2017-01-17T18:04:15.000Z
2022-02-21T03:54:27.000Z
 Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); _u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Den vedhæftede fil kan ikke slettes, fordi den vedhæftede fil ikke kan findes med indekset for den vedhæftede fil."; _u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Forespørgslen overskrider grænsen på 1 MB. Rediger EWS-anmodningen."; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Der kræves administratorrettigheder for at kalde metoden: '{0}'."; _u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Fejl ved vedhæftet fil"; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "Slutdatoen ligger før startdatoen."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Et eller flere af de viste navne , der er angivet, er for langt."; _u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Det samlede antal modtagere i feltet må ikke overskride {0}."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML-santizationen mislykkedes."; _u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Fejl i skrivning af data"; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Der kræves administratorrettigheder for at få adgang til beskyttede medlemmer af JavaScript-API'en til Office."; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Vedhæftede filer kan ikke tilføjes, fordi meddelelsen har allerede det maksimale antal vedhæftede filer"; _u.ExtensibilityStrings.l_InternalProtocolError_Text = "Intern protokolfejl: '{0}'."; _u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Brugeren fjernede den vedhæftede fil, før overførslen er fuldført."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Der blev ikke fundet en forskydning for dette tidsstempel."; _u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Den vedhæftede fil kan ikke tilføjes, fordi den er for stor."; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "Sluttidspunktet kan ikke være før starttidspunktet."; _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "De angivne parametre svarer ikke til det forventede format."; _u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Den vedhæftede fil kan ikke føjes til elementet."; _u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Der blev ikke angivet nogen gyldige modtagere."; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Den vedhæftede fils id var ugyldigt."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Vedhæftede filer kan ikke tilføjes, mens det fulde svar eller videresendelsen hentes fra serveren."; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "En eller flere af de angivne mailadresser er for lang."; _u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Stien for den vedhæftede fil var ugyldig."; _u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Den vedhæftede fil kan ikke slettes fra elementet."; _u.ExtensibilityStrings.l_InternalFormatError_Text = "Der opstod en intern formatfejl."; _u.ExtensibilityStrings.l_InvalidDate_Text = "Inputtet fortolkes ikke som en gyldig dato."; _u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Brugeren ændrede placering af markøren, mens data blev indsat."
98.117647
180
0.833034
9df8319c2be5123c2f611d65aff04c0d037d2024
2,397
js
JavaScript
src/components/ScanScreen.js
leolana/qrcode-rn
6cc19da3a292d91a893daaac7599d632e4ac467e
[ "MIT" ]
1
2019-05-20T10:44:08.000Z
2019-05-20T10:44:08.000Z
src/components/ScanScreen.js
leolana/qrcode-rn
6cc19da3a292d91a893daaac7599d632e4ac467e
[ "MIT" ]
null
null
null
src/components/ScanScreen.js
leolana/qrcode-rn
6cc19da3a292d91a893daaac7599d632e4ac467e
[ "MIT" ]
null
null
null
import React, { Component } from 'react'; import { Text, View, StyleSheet, Alert, Dimensions, // Image, } from 'react-native'; import { BarCodeScanner, Permissions } from 'expo'; // import { Actions } from 'react-native-router-flux'; const { width } = Dimensions.get('window'); const opacity = 'rgba(0, 0, 0, .6)'; const styles = StyleSheet.create({ container: { flex: 1, flexDirection: 'column', }, layerTop: { flex: 1, backgroundColor: opacity, }, layerCenter: { flex: 2, flexDirection: 'row', }, layerLeft: { flex: 2, backgroundColor: opacity, }, focused: { flex: 10, }, layerRight: { flex: 2, backgroundColor: opacity, }, layerBottom: { flex: 1, backgroundColor: opacity, }, description: { fontSize: width * 0.05, marginTop: '5%', paddingLeft: '5%', textAlign: 'left', color: '#fdfdfd', }, }); export default class ScanScreen extends Component { state = { hasCameraPermission: null, }; componentDidMount() { this._requestCameraPermission(); } _requestCameraPermission = async () => { const { status } = await Permissions.askAsync(Permissions.CAMERA); this.setState({ hasCameraPermission: status === 'granted', }); }; _handleBarCodeRead = (data) => { Alert.alert( 'Scan com sucesso!', data.data, ); }; render() { const { hasCameraPermission } = this.state; const element = hasCameraPermission === null ? <Text>Precisamos que você dê permissão para acessarmos a sua camera</Text> : hasCameraPermission === false ? <Text>Permissão para acessar a Camera negada</Text> : ( <BarCodeScanner onBarCodeRead={this._handleBarCodeRead} style={[StyleSheet.absoluteFill, styles.container]} > <View style={styles.layerTop}> <Text style={styles.description}>Scan QR Code</Text> </View> <View style={styles.layerCenter}> <View style={styles.layerLeft} /> <View style={styles.focused} /> <View style={styles.layerRight} /> </View> <View style={styles.layerBottom} /> </BarCodeScanner> ); return ( <View style={[StyleSheet.absoluteFill, styles.container]}> {element} </View> ); } }
23.048077
82
0.581977
9df83f8106a422cdd8fea3061b301da0dd88205b
53,312
js
JavaScript
node_modules/mongodb/lib/operations/collection_ops.js
liwenye123/express-locallibrary-tutorial
98bd04914f4bf9aa67a70bf17fa61e3f0ce722ae
[ "Apache-2.0" ]
684
2018-12-21T20:08:24.000Z
2022-03-28T17:39:55.000Z
node_modules/mongodb/lib/operations/collection_ops.js
liwenye123/express-locallibrary-tutorial
98bd04914f4bf9aa67a70bf17fa61e3f0ce722ae
[ "Apache-2.0" ]
306
2018-12-18T15:03:54.000Z
2022-03-31T14:26:52.000Z
node_modules/mongoose/node_modules/mongodb/lib/operations/collection_ops.js
6menchaca/devmakeupshop
3b4ebbb74cb3414009595e98f672a574a2d75d8a
[ "MIT" ]
305
2018-12-27T18:36:52.000Z
2022-03-27T22:15:40.000Z
'use strict'; const applyWriteConcern = require('../utils').applyWriteConcern; const applyRetryableWrites = require('../utils').applyRetryableWrites; const checkCollectionName = require('../utils').checkCollectionName; const Code = require('mongodb-core').BSON.Code; const createIndexDb = require('./db_ops').createIndex; const decorateCommand = require('../utils').decorateCommand; const decorateWithCollation = require('../utils').decorateWithCollation; const decorateWithReadConcern = require('../utils').decorateWithReadConcern; const ensureIndexDb = require('./db_ops').ensureIndex; const evaluate = require('./db_ops').evaluate; const executeCommand = require('./db_ops').executeCommand; const executeDbAdminCommand = require('./db_ops').executeDbAdminCommand; const formattedOrderClause = require('../utils').formattedOrderClause; const resolveReadPreference = require('../utils').resolveReadPreference; const handleCallback = require('../utils').handleCallback; const indexInformationDb = require('./db_ops').indexInformation; const isObject = require('../utils').isObject; const Long = require('mongodb-core').BSON.Long; const MongoError = require('mongodb-core').MongoError; const ReadPreference = require('mongodb-core').ReadPreference; const toError = require('../utils').toError; let collection; function loadCollection() { if (!collection) { collection = require('../collection'); } return collection; } let db; function loadDb() { if (!db) { db = require('../db'); } return db; } /** * Group function helper * @ignore */ // var groupFunction = function () { // var c = db[ns].find(condition); // var map = new Map(); // var reduce_function = reduce; // // while (c.hasNext()) { // var obj = c.next(); // var key = {}; // // for (var i = 0, len = keys.length; i < len; ++i) { // var k = keys[i]; // key[k] = obj[k]; // } // // var aggObj = map.get(key); // // if (aggObj == null) { // var newObj = Object.extend({}, key); // aggObj = Object.extend(newObj, initial); // map.put(key, aggObj); // } // // reduce_function(obj, aggObj); // } // // return { "result": map.values() }; // }.toString(); const groupFunction = 'function () {\nvar c = db[ns].find(condition);\nvar map = new Map();\nvar reduce_function = reduce;\n\nwhile (c.hasNext()) {\nvar obj = c.next();\nvar key = {};\n\nfor (var i = 0, len = keys.length; i < len; ++i) {\nvar k = keys[i];\nkey[k] = obj[k];\n}\n\nvar aggObj = map.get(key);\n\nif (aggObj == null) {\nvar newObj = Object.extend({}, key);\naggObj = Object.extend(newObj, initial);\nmap.put(key, aggObj);\n}\n\nreduce_function(obj, aggObj);\n}\n\nreturn { "result": map.values() };\n}'; /** * Perform a bulkWrite operation. See Collection.prototype.bulkWrite for more information. * * @method * @param {Collection} a Collection instance. * @param {object[]} operations Bulk operations to perform. * @param {object} [options] Optional settings. See Collection.prototype.bulkWrite for a list of options. * @param {Collection~bulkWriteOpCallback} [callback] The command result callback */ function bulkWrite(coll, operations, options, callback) { // Add ignoreUndefined if (coll.s.options.ignoreUndefined) { options = Object.assign({}, options); options.ignoreUndefined = coll.s.options.ignoreUndefined; } // Create the bulk operation const bulk = options.ordered === true || options.ordered == null ? coll.initializeOrderedBulkOp(options) : coll.initializeUnorderedBulkOp(options); // Do we have a collation let collation = false; // for each op go through and add to the bulk try { for (let i = 0; i < operations.length; i++) { // Get the operation type const key = Object.keys(operations[i])[0]; // Check if we have a collation if (operations[i][key].collation) { collation = true; } // Pass to the raw bulk bulk.raw(operations[i]); } } catch (err) { return callback(err, null); } // Final options for retryable writes and write concern let finalOptions = Object.assign({}, options); finalOptions = applyRetryableWrites(finalOptions, coll.s.db); finalOptions = applyWriteConcern(finalOptions, { db: coll.s.db, collection: coll }, options); const writeCon = finalOptions.writeConcern ? finalOptions.writeConcern : {}; const capabilities = coll.s.topology.capabilities(); // Did the user pass in a collation, check if our write server supports it if (collation && capabilities && !capabilities.commandsTakeCollation) { return callback(new MongoError('server/primary/mongos does not support collation')); } // Execute the bulk bulk.execute(writeCon, finalOptions, (err, r) => { // We have connection level error if (!r && err) { return callback(err, null); } r.insertedCount = r.nInserted; r.matchedCount = r.nMatched; r.modifiedCount = r.nModified || 0; r.deletedCount = r.nRemoved; r.upsertedCount = r.getUpsertedIds().length; r.upsertedIds = {}; r.insertedIds = {}; // Update the n r.n = r.insertedCount; // Inserted documents const inserted = r.getInsertedIds(); // Map inserted ids for (let i = 0; i < inserted.length; i++) { r.insertedIds[inserted[i].index] = inserted[i]._id; } // Upserted documents const upserted = r.getUpsertedIds(); // Map upserted ids for (let i = 0; i < upserted.length; i++) { r.upsertedIds[upserted[i].index] = upserted[i]._id; } // Return the results callback(null, r); }); } // Check the update operation to ensure it has atomic operators. function checkForAtomicOperators(update) { const keys = Object.keys(update); // same errors as the server would give for update doc lacking atomic operators if (keys.length === 0) { return toError('The update operation document must contain at least one atomic operator.'); } if (keys[0][0] !== '$') { return toError('the update operation document must contain atomic operators.'); } } /** * Count the number of documents in the collection that match the query. * * @method * @param {Collection} a Collection instance. * @param {object} query The query for the count. * @param {object} [options] Optional settings. See Collection.prototype.count for a list of options. * @param {Collection~countCallback} [callback] The command result callback */ function count(coll, query, options, callback) { if (typeof options === 'function') (callback = options), (options = {}); options = Object.assign({}, options); options.collectionName = coll.s.name; options.readPreference = resolveReadPreference(options, { db: coll.s.db, collection: coll }); let cmd; try { cmd = buildCountCommand(coll, query, options); } catch (err) { return callback(err); } executeCommand(coll.s.db, cmd, options, (err, result) => { if (err) return handleCallback(callback, err); handleCallback(callback, null, result.n); }); } function countDocuments(coll, query, options, callback) { const skip = options.skip; const limit = options.limit; options = Object.assign({}, options); const pipeline = [{ $match: query }]; // Add skip and limit if defined if (typeof skip === 'number') { pipeline.push({ $skip: skip }); } if (typeof limit === 'number') { pipeline.push({ $limit: limit }); } pipeline.push({ $group: { _id: 1, n: { $sum: 1 } } }); delete options.limit; delete options.skip; coll.aggregate(pipeline, options).toArray((err, docs) => { if (err) return handleCallback(callback, err); handleCallback(callback, null, docs.length ? docs[0].n : 0); }); } /** * Build the count command. * * @method * @param {collectionOrCursor} an instance of a collection or cursor * @param {object} query The query for the count. * @param {object} [options] Optional settings. See Collection.prototype.count and Cursor.prototype.count for a list of options. */ function buildCountCommand(collectionOrCursor, query, options) { const skip = options.skip; const limit = options.limit; let hint = options.hint; const maxTimeMS = options.maxTimeMS; query = query || {}; // Final query const cmd = { count: options.collectionName, query: query }; // check if collectionOrCursor is a cursor by using cursor.s.numberOfRetries if (collectionOrCursor.s.numberOfRetries) { if (collectionOrCursor.s.options.hint) { hint = collectionOrCursor.s.options.hint; } else if (collectionOrCursor.s.cmd.hint) { hint = collectionOrCursor.s.cmd.hint; } decorateWithCollation(cmd, collectionOrCursor, collectionOrCursor.s.cmd); } else { decorateWithCollation(cmd, collectionOrCursor, options); } // Add limit, skip and maxTimeMS if defined if (typeof skip === 'number') cmd.skip = skip; if (typeof limit === 'number') cmd.limit = limit; if (typeof maxTimeMS === 'number') cmd.maxTimeMS = maxTimeMS; if (hint) cmd.hint = hint; // Do we have a readConcern specified decorateWithReadConcern(cmd, collectionOrCursor); return cmd; } /** * Create an index on the db and collection. * * @method * @param {Collection} a Collection instance. * @param {(string|object)} fieldOrSpec Defines the index. * @param {object} [options] Optional settings. See Collection.prototype.createIndex for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function createIndex(coll, fieldOrSpec, options, callback) { createIndexDb(coll.s.db, coll.s.name, fieldOrSpec, options, callback); } /** * Create multiple indexes in the collection. This method is only supported for * MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported * error. Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/. * * @method * @param {Collection} a Collection instance. * @param {array} indexSpecs An array of index specifications to be created * @param {Object} [options] Optional settings. See Collection.prototype.createIndexes for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function createIndexes(coll, indexSpecs, options, callback) { const capabilities = coll.s.topology.capabilities(); // Ensure we generate the correct name if the parameter is not set for (let i = 0; i < indexSpecs.length; i++) { if (indexSpecs[i].name == null) { const keys = []; // Did the user pass in a collation, check if our write server supports it if (indexSpecs[i].collation && capabilities && !capabilities.commandsTakeCollation) { return callback(new MongoError('server/primary/mongos does not support collation')); } for (let name in indexSpecs[i].key) { keys.push(`${name}_${indexSpecs[i].key[name]}`); } // Set the name indexSpecs[i].name = keys.join('_'); } } options = Object.assign({}, options, { readPreference: ReadPreference.PRIMARY }); // Execute the index executeCommand( coll.s.db, { createIndexes: coll.s.name, indexes: indexSpecs }, options, callback ); } function deleteCallback(err, r, callback) { if (callback == null) return; if (err && callback) return callback(err); if (r == null) return callback(null, { result: { ok: 1 } }); r.deletedCount = r.result.n; if (callback) callback(null, r); } /** * Delete multiple documents from the collection. * * @method * @param {Collection} a Collection instance. * @param {object} filter The Filter used to select the documents to remove * @param {object} [options] Optional settings. See Collection.prototype.deleteMany for a list of options. * @param {Collection~deleteWriteOpCallback} [callback] The command result callback */ function deleteMany(coll, filter, options, callback) { options.single = false; removeDocuments(coll, filter, options, (err, r) => deleteCallback(err, r, callback)); } /** * Delete a single document from the collection. * * @method * @param {Collection} a Collection instance. * @param {object} filter The Filter used to select the document to remove * @param {object} [options] Optional settings. See Collection.prototype.deleteOne for a list of options. * @param {Collection~deleteWriteOpCallback} [callback] The command result callback */ function deleteOne(coll, filter, options, callback) { options.single = true; removeDocuments(coll, filter, options, (err, r) => deleteCallback(err, r, callback)); } /** * Return a list of distinct values for the given key across a collection. * * @method * @param {Collection} a Collection instance. * @param {string} key Field of the document to find distinct values for. * @param {object} query The query for filtering the set of documents to which we apply the distinct filter. * @param {object} [options] Optional settings. See Collection.prototype.distinct for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function distinct(coll, key, query, options, callback) { // maxTimeMS option const maxTimeMS = options.maxTimeMS; // Distinct command const cmd = { distinct: coll.s.name, key: key, query: query }; options = Object.assign({}, options); // Ensure we have the right read preference inheritance options.readPreference = resolveReadPreference(options, { db: coll.s.db, collection: coll }); // Add maxTimeMS if defined if (typeof maxTimeMS === 'number') cmd.maxTimeMS = maxTimeMS; // Do we have a readConcern specified decorateWithReadConcern(cmd, coll, options); // Have we specified collation try { decorateWithCollation(cmd, coll, options); } catch (err) { return callback(err, null); } // Execute the command executeCommand(coll.s.db, cmd, options, (err, result) => { if (err) return handleCallback(callback, err); handleCallback(callback, null, result.values); }); } /** * Drop an index from this collection. * * @method * @param {Collection} a Collection instance. * @param {string} indexName Name of the index to drop. * @param {object} [options] Optional settings. See Collection.prototype.dropIndex for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function dropIndex(coll, indexName, options, callback) { // Delete index command const cmd = { dropIndexes: coll.s.name, index: indexName }; // Decorate command with writeConcern if supported applyWriteConcern(cmd, { db: coll.s.db, collection: coll }, options); // Execute command executeCommand(coll.s.db, cmd, options, (err, result) => { if (typeof callback !== 'function') return; if (err) return handleCallback(callback, err, null); handleCallback(callback, null, result); }); } /** * Drop all indexes from this collection. * * @method * @param {Collection} a Collection instance. * @param {Object} [options] Optional settings. See Collection.prototype.dropIndexes for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function dropIndexes(coll, options, callback) { dropIndex(coll, '*', options, err => { if (err) return handleCallback(callback, err, false); handleCallback(callback, null, true); }); } /** * Ensure that an index exists. If the index does not exist, this function creates it. * * @method * @param {Collection} a Collection instance. * @param {(string|object)} fieldOrSpec Defines the index. * @param {object} [options] Optional settings. See Collection.prototype.ensureIndex for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function ensureIndex(coll, fieldOrSpec, options, callback) { ensureIndexDb(coll.s.db, coll.s.name, fieldOrSpec, options, callback); } /** * Find and update a document. * * @method * @param {Collection} a Collection instance. * @param {object} query Query object to locate the object to modify. * @param {array} sort If multiple docs match, choose the first one in the specified sort order as the object to manipulate. * @param {object} doc The fields/vals to be updated. * @param {object} [options] Optional settings. See Collection.prototype.findAndModify for a list of options. * @param {Collection~findAndModifyCallback} [callback] The command result callback * @deprecated use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead */ function findAndModify(coll, query, sort, doc, options, callback) { // Create findAndModify command object const queryObject = { findAndModify: coll.s.name, query: query }; sort = formattedOrderClause(sort); if (sort) { queryObject.sort = sort; } queryObject.new = options.new ? true : false; queryObject.remove = options.remove ? true : false; queryObject.upsert = options.upsert ? true : false; const projection = options.projection || options.fields; if (projection) { queryObject.fields = projection; } if (options.arrayFilters) { queryObject.arrayFilters = options.arrayFilters; delete options.arrayFilters; } if (doc && !options.remove) { queryObject.update = doc; } if (options.maxTimeMS) queryObject.maxTimeMS = options.maxTimeMS; // Either use override on the function, or go back to default on either the collection // level or db options.serializeFunctions = options.serializeFunctions || coll.s.serializeFunctions; // No check on the documents options.checkKeys = false; // Final options for retryable writes and write concern let finalOptions = Object.assign({}, options); finalOptions = applyRetryableWrites(finalOptions, coll.s.db); finalOptions = applyWriteConcern(finalOptions, { db: coll.s.db, collection: coll }, options); // Decorate the findAndModify command with the write Concern if (finalOptions.writeConcern) { queryObject.writeConcern = finalOptions.writeConcern; } // Have we specified bypassDocumentValidation if (finalOptions.bypassDocumentValidation === true) { queryObject.bypassDocumentValidation = finalOptions.bypassDocumentValidation; } finalOptions.readPreference = ReadPreference.primary; // Have we specified collation try { decorateWithCollation(queryObject, coll, finalOptions); } catch (err) { return callback(err, null); } // Execute the command executeCommand(coll.s.db, queryObject, finalOptions, (err, result) => { if (err) return handleCallback(callback, err, null); return handleCallback(callback, null, result); }); } /** * Find and remove a document. * * @method * @param {Collection} a Collection instance. * @param {object} query Query object to locate the object to modify. * @param {array} sort If multiple docs match, choose the first one in the specified sort order as the object to manipulate. * @param {object} [options] Optional settings. See Collection.prototype.findAndRemove for a list of options. * @param {Collection~resultCallback} [callback] The command result callback * @deprecated use findOneAndDelete instead */ function findAndRemove(coll, query, sort, options, callback) { // Add the remove option options.remove = true; // Execute the callback findAndModify(coll, query, sort, null, options, callback); } /** * Fetch the first document that matches the query. * * @method * @param {Collection} a Collection instance. * @param {object} query Query for find Operation * @param {object} [options] Optional settings. See Collection.prototype.findOne for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function findOne(coll, query, options, callback) { const cursor = coll .find(query, options) .limit(-1) .batchSize(1); // Return the item cursor.next((err, item) => { if (err != null) return handleCallback(callback, toError(err), null); handleCallback(callback, null, item); }); } /** * Find a document and delete it in one atomic operation. This requires a write lock for the duration of the operation. * * @method * @param {Collection} a Collection instance. * @param {object} filter Document selection filter. * @param {object} [options] Optional settings. See Collection.prototype.findOneAndDelete for a list of options. * @param {Collection~findAndModifyCallback} [callback] The collection result callback */ function findOneAndDelete(coll, filter, options, callback) { // Final options const finalOptions = Object.assign({}, options); finalOptions.fields = options.projection; finalOptions.remove = true; // Execute find and Modify findAndModify(coll, filter, options.sort, null, finalOptions, callback); } /** * Find a document and replace it in one atomic operation. This requires a write lock for the duration of the operation. * * @method * @param {Collection} a Collection instance. * @param {object} filter Document selection filter. * @param {object} replacement Document replacing the matching document. * @param {object} [options] Optional settings. See Collection.prototype.findOneAndReplace for a list of options. * @param {Collection~findAndModifyCallback} [callback] The collection result callback */ function findOneAndReplace(coll, filter, replacement, options, callback) { // Final options const finalOptions = Object.assign({}, options); finalOptions.fields = options.projection; finalOptions.update = true; finalOptions.new = options.returnOriginal !== void 0 ? !options.returnOriginal : false; finalOptions.upsert = options.upsert !== void 0 ? !!options.upsert : false; // Execute findAndModify findAndModify(coll, filter, options.sort, replacement, finalOptions, callback); } /** * Find a document and update it in one atomic operation. This requires a write lock for the duration of the operation. * * @method * @param {Collection} a Collection instance. * @param {object} filter Document selection filter. * @param {object} update Update operations to be performed on the document * @param {object} [options] Optional settings. See Collection.prototype.findOneAndUpdate for a list of options. * @param {Collection~findAndModifyCallback} [callback] The collection result callback */ function findOneAndUpdate(coll, filter, update, options, callback) { // Final options const finalOptions = Object.assign({}, options); finalOptions.fields = options.projection; finalOptions.update = true; finalOptions.new = typeof options.returnOriginal === 'boolean' ? !options.returnOriginal : false; finalOptions.upsert = typeof options.upsert === 'boolean' ? options.upsert : false; // Execute findAndModify findAndModify(coll, filter, options.sort, update, finalOptions, callback); } /** * Execute a geo search using a geo haystack index on a collection. * * @method * @param {Collection} a Collection instance. * @param {number} x Point to search on the x axis, ensure the indexes are ordered in the same order. * @param {number} y Point to search on the y axis, ensure the indexes are ordered in the same order. * @param {object} [options] Optional settings. See Collection.prototype.geoHaystackSearch for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function geoHaystackSearch(coll, x, y, options, callback) { // Build command object let commandObject = { geoSearch: coll.s.name, near: [x, y] }; // Remove read preference from hash if it exists commandObject = decorateCommand(commandObject, options, ['readPreference', 'session']); options = Object.assign({}, options); // Ensure we have the right read preference inheritance options.readPreference = resolveReadPreference(options, { db: coll.s.db, collection: coll }); // Do we have a readConcern specified decorateWithReadConcern(commandObject, coll, options); // Execute the command executeCommand(coll.s.db, commandObject, options, (err, res) => { if (err) return handleCallback(callback, err); if (res.err || res.errmsg) handleCallback(callback, toError(res)); // should we only be returning res.results here? Not sure if the user // should see the other return information handleCallback(callback, null, res); }); } /** * Run a group command across a collection. * * @method * @param {Collection} a Collection instance. * @param {(object|array|function|code)} keys An object, array or function expressing the keys to group by. * @param {object} condition An optional condition that must be true for a row to be considered. * @param {object} initial Initial value of the aggregation counter object. * @param {(function|Code)} reduce The reduce function aggregates (reduces) the objects iterated * @param {(function|Code)} finalize An optional function to be run on each item in the result set just before the item is returned. * @param {boolean} command Specify if you wish to run using the internal group command or using eval, default is true. * @param {object} [options] Optional settings. See Collection.prototype.group for a list of options. * @param {Collection~resultCallback} [callback] The command result callback * @deprecated MongoDB 3.6 or higher will no longer support the group command. We recommend rewriting using the aggregation framework. */ function group(coll, keys, condition, initial, reduce, finalize, command, options, callback) { // Execute using the command if (command) { const reduceFunction = reduce && reduce._bsontype === 'Code' ? reduce : new Code(reduce); const selector = { group: { ns: coll.s.name, $reduce: reduceFunction, cond: condition, initial: initial, out: 'inline' } }; // if finalize is defined if (finalize != null) selector.group['finalize'] = finalize; // Set up group selector if ('function' === typeof keys || (keys && keys._bsontype === 'Code')) { selector.group.$keyf = keys && keys._bsontype === 'Code' ? keys : new Code(keys); } else { const hash = {}; keys.forEach(key => { hash[key] = 1; }); selector.group.key = hash; } options = Object.assign({}, options); // Ensure we have the right read preference inheritance options.readPreference = resolveReadPreference(options, { db: coll.s.db, collection: coll }); // Do we have a readConcern specified decorateWithReadConcern(selector, coll, options); // Have we specified collation try { decorateWithCollation(selector, coll, options); } catch (err) { return callback(err, null); } // Execute command executeCommand(coll.s.db, selector, options, (err, result) => { if (err) return handleCallback(callback, err, null); handleCallback(callback, null, result.retval); }); } else { // Create execution scope const scope = reduce != null && reduce._bsontype === 'Code' ? reduce.scope : {}; scope.ns = coll.s.name; scope.keys = keys; scope.condition = condition; scope.initial = initial; // Pass in the function text to execute within mongodb. const groupfn = groupFunction.replace(/ reduce;/, reduce.toString() + ';'); evaluate(coll.s.db, new Code(groupfn, scope), null, options, (err, results) => { if (err) return handleCallback(callback, err, null); handleCallback(callback, null, results.result || results); }); } } /** * Retrieve all the indexes on the collection. * * @method * @param {Collection} a Collection instance. * @param {Object} [options] Optional settings. See Collection.prototype.indexes for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function indexes(coll, options, callback) { options = Object.assign({}, { full: true }, options); indexInformationDb(coll.s.db, coll.s.name, options, callback); } /** * Check if one or more indexes exist on the collection. This fails on the first index that doesn't exist. * * @method * @param {Collection} a Collection instance. * @param {(string|array)} indexes One or more index names to check. * @param {Object} [options] Optional settings. See Collection.prototype.indexExists for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function indexExists(coll, indexes, options, callback) { indexInformation(coll, options, (err, indexInformation) => { // If we have an error return if (err != null) return handleCallback(callback, err, null); // Let's check for the index names if (!Array.isArray(indexes)) return handleCallback(callback, null, indexInformation[indexes] != null); // Check in list of indexes for (let i = 0; i < indexes.length; i++) { if (indexInformation[indexes[i]] == null) { return handleCallback(callback, null, false); } } // All keys found return true return handleCallback(callback, null, true); }); } /** * Retrieve this collection's index info. * * @method * @param {Collection} a Collection instance. * @param {object} [options] Optional settings. See Collection.prototype.indexInformation for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function indexInformation(coll, options, callback) { indexInformationDb(coll.s.db, coll.s.name, options, callback); } function insertDocuments(coll, docs, options, callback) { if (typeof options === 'function') (callback = options), (options = {}); options = options || {}; // Ensure we are operating on an array op docs docs = Array.isArray(docs) ? docs : [docs]; // Final options for retryable writes and write concern let finalOptions = Object.assign({}, options); finalOptions = applyRetryableWrites(finalOptions, coll.s.db); finalOptions = applyWriteConcern(finalOptions, { db: coll.s.db, collection: coll }, options); // If keep going set unordered if (finalOptions.keepGoing === true) finalOptions.ordered = false; finalOptions.serializeFunctions = options.serializeFunctions || coll.s.serializeFunctions; docs = prepareDocs(coll, docs, options); // File inserts coll.s.topology.insert(coll.s.namespace, docs, finalOptions, (err, result) => { if (callback == null) return; if (err) return handleCallback(callback, err); if (result == null) return handleCallback(callback, null, null); if (result.result.code) return handleCallback(callback, toError(result.result)); if (result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0])); // Add docs to the list result.ops = docs; // Return the results handleCallback(callback, null, result); }); } /** * Insert a single document into the collection. See Collection.prototype.insertOne for more information. * * @method * @param {Collection} a Collection instance. * @param {object} doc Document to insert. * @param {object} [options] Optional settings. See Collection.prototype.insertOne for a list of options. * @param {Collection~insertOneWriteOpCallback} [callback] The command result callback */ function insertOne(coll, doc, options, callback) { if (Array.isArray(doc)) { return callback( MongoError.create({ message: 'doc parameter must be an object', driver: true }) ); } insertDocuments(coll, [doc], options, (err, r) => { if (callback == null) return; if (err && callback) return callback(err); // Workaround for pre 2.6 servers if (r == null) return callback(null, { result: { ok: 1 } }); // Add values to top level to ensure crud spec compatibility r.insertedCount = r.result.n; r.insertedId = doc._id; if (callback) callback(null, r); }); } /** * Inserts an array of documents into MongoDB. If documents passed in do not contain the **_id** field, * one will be added to each of the documents missing it by the driver, mutating the document. This behavior * can be overridden by setting the **forceServerObjectId** flag. * * @method * @param {Collection} a Collection instance. * @param {object[]} docs Documents to insert. * @param {number} [options] Optional settings. See Collection.prototype.insertMany for a list of options. * @param {Collection~insertWriteOpCallback} [callback] The command result callback */ function insertMany(coll, docs, options, callback) { if (!Array.isArray(docs)) { return callback( MongoError.create({ message: 'docs parameter must be an array of documents', driver: true }) ); } // If keep going set unordered options['serializeFunctions'] = options['serializeFunctions'] || coll.s.serializeFunctions; docs = prepareDocs(coll, docs, options); // Generate the bulk write operations const operations = [ { insertMany: docs } ]; bulkWrite(coll, operations, options, (err, result) => { if (err) return callback(err, null); callback(null, mapInsertManyResults(docs, result)); }); } function mapInsertManyResults(docs, r) { const finalResult = { result: { ok: 1, n: r.insertedCount }, ops: docs, insertedCount: r.insertedCount, insertedIds: r.insertedIds }; if (r.getLastOp()) { finalResult.result.opTime = r.getLastOp(); } return finalResult; } /** * Determine whether the collection is a capped collection. * * @method * @param {Collection} a Collection instance. * @param {Object} [options] Optional settings. See Collection.prototype.isCapped for a list of options. * @param {Collection~resultCallback} [callback] The results callback */ function isCapped(coll, options, callback) { optionsOp(coll, options, (err, document) => { if (err) return handleCallback(callback, err); handleCallback(callback, null, !!(document && document.capped)); }); } /** * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection. * * @method * @param {Collection} a Collection instance. * @param {(function|string)} map The mapping function. * @param {(function|string)} reduce The reduce function. * @param {object} [options] Optional settings. See Collection.prototype.mapReduce for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function mapReduce(coll, map, reduce, options, callback) { const mapCommandHash = { mapreduce: coll.s.name, map: map, reduce: reduce }; // Exclusion list const exclusionList = ['readPreference', 'session', 'bypassDocumentValidation']; // Add any other options passed in for (let n in options) { if ('scope' === n) { mapCommandHash[n] = processScope(options[n]); } else { // Only include if not in exclusion list if (exclusionList.indexOf(n) === -1) { mapCommandHash[n] = options[n]; } } } options = Object.assign({}, options); // Ensure we have the right read preference inheritance options.readPreference = resolveReadPreference(options, { db: coll.s.db, collection: coll }); // If we have a read preference and inline is not set as output fail hard if ( options.readPreference !== false && options.readPreference !== 'primary' && options['out'] && (options['out'].inline !== 1 && options['out'] !== 'inline') ) { // Force readPreference to primary options.readPreference = 'primary'; // Decorate command with writeConcern if supported applyWriteConcern(mapCommandHash, { db: coll.s.db, collection: coll }, options); } else { decorateWithReadConcern(mapCommandHash, coll, options); } // Is bypassDocumentValidation specified if (options.bypassDocumentValidation === true) { mapCommandHash.bypassDocumentValidation = options.bypassDocumentValidation; } // Have we specified collation try { decorateWithCollation(mapCommandHash, coll, options); } catch (err) { return callback(err, null); } // Execute command executeCommand(coll.s.db, mapCommandHash, options, (err, result) => { if (err) return handleCallback(callback, err); // Check if we have an error if (1 !== result.ok || result.err || result.errmsg) { return handleCallback(callback, toError(result)); } // Create statistics value const stats = {}; if (result.timeMillis) stats['processtime'] = result.timeMillis; if (result.counts) stats['counts'] = result.counts; if (result.timing) stats['timing'] = result.timing; // invoked with inline? if (result.results) { // If we wish for no verbosity if (options['verbose'] == null || !options['verbose']) { return handleCallback(callback, null, result.results); } return handleCallback(callback, null, { results: result.results, stats: stats }); } // The returned collection let collection = null; // If we have an object it's a different db if (result.result != null && typeof result.result === 'object') { const doc = result.result; // Return a collection from another db let Db = loadDb(); collection = new Db(doc.db, coll.s.db.s.topology, coll.s.db.s.options).collection( doc.collection ); } else { // Create a collection object that wraps the result collection collection = coll.s.db.collection(result.result); } // If we wish for no verbosity if (options['verbose'] == null || !options['verbose']) { return handleCallback(callback, err, collection); } // Return stats as third set of values handleCallback(callback, err, { collection: collection, stats: stats }); }); } /** * Return the options of the collection. * * @method * @param {Collection} a Collection instance. * @param {Object} [options] Optional settings. See Collection.prototype.options for a list of options. * @param {Collection~resultCallback} [callback] The results callback */ function optionsOp(coll, opts, callback) { coll.s.db.listCollections({ name: coll.s.name }, opts).toArray((err, collections) => { if (err) return handleCallback(callback, err); if (collections.length === 0) { return handleCallback( callback, MongoError.create({ message: `collection ${coll.s.namespace} not found`, driver: true }) ); } handleCallback(callback, err, collections[0].options || null); }); } /** * Return N parallel cursors for a collection to allow parallel reading of the entire collection. There are * no ordering guarantees for returned results. * * @method * @param {Collection} a Collection instance. * @param {object} [options] Optional settings. See Collection.prototype.parallelCollectionScan for a list of options. * @param {Collection~parallelCollectionScanCallback} [callback] The command result callback */ function parallelCollectionScan(coll, options, callback) { // Create command object const commandObject = { parallelCollectionScan: coll.s.name, numCursors: options.numCursors }; // Do we have a readConcern specified decorateWithReadConcern(commandObject, coll, options); // Store the raw value const raw = options.raw; delete options['raw']; // Execute the command executeCommand(coll.s.db, commandObject, options, (err, result) => { if (err) return handleCallback(callback, err, null); if (result == null) return handleCallback( callback, new Error('no result returned for parallelCollectionScan'), null ); options = Object.assign({ explicitlyIgnoreSession: true }, options); const cursors = []; // Add the raw back to the option if (raw) options.raw = raw; // Create command cursors for each item for (let i = 0; i < result.cursors.length; i++) { const rawId = result.cursors[i].cursor.id; // Convert cursorId to Long if needed const cursorId = typeof rawId === 'number' ? Long.fromNumber(rawId) : rawId; // Add a command cursor cursors.push(coll.s.topology.cursor(coll.s.namespace, cursorId, options)); } handleCallback(callback, null, cursors); }); } // modifies documents before being inserted or updated function prepareDocs(coll, docs, options) { const forceServerObjectId = typeof options.forceServerObjectId === 'boolean' ? options.forceServerObjectId : coll.s.db.options.forceServerObjectId; // no need to modify the docs if server sets the ObjectId if (forceServerObjectId === true) { return docs; } return docs.map(doc => { if (forceServerObjectId !== true && doc._id == null) { doc._id = coll.s.pkFactory.createPk(); } return doc; }); } /** * Functions that are passed as scope args must * be converted to Code instances. * @ignore */ function processScope(scope) { if (!isObject(scope) || scope._bsontype === 'ObjectID') { return scope; } const keys = Object.keys(scope); let key; const new_scope = {}; for (let i = keys.length - 1; i >= 0; i--) { key = keys[i]; if ('function' === typeof scope[key]) { new_scope[key] = new Code(String(scope[key])); } else { new_scope[key] = processScope(scope[key]); } } return new_scope; } /** * Reindex all indexes on the collection. * * @method * @param {Collection} a Collection instance. * @param {Object} [options] Optional settings. See Collection.prototype.reIndex for a list of options. * @param {Collection~resultCallback} [callback] The command result callback */ function reIndex(coll, options, callback) { // Reindex const cmd = { reIndex: coll.s.name }; // Execute the command executeCommand(coll.s.db, cmd, options, (err, result) => { if (callback == null) return; if (err) return handleCallback(callback, err, null); handleCallback(callback, null, result.ok ? true : false); }); } function removeDocuments(coll, selector, options, callback) { if (typeof options === 'function') { (callback = options), (options = {}); } else if (typeof selector === 'function') { callback = selector; options = {}; selector = {}; } // Create an empty options object if the provided one is null options = options || {}; // Final options for retryable writes and write concern let finalOptions = Object.assign({}, options); finalOptions = applyRetryableWrites(finalOptions, coll.s.db); finalOptions = applyWriteConcern(finalOptions, { db: coll.s.db, collection: coll }, options); // If selector is null set empty if (selector == null) selector = {}; // Build the op const op = { q: selector, limit: 0 }; if (options.single) { op.limit = 1; } else if (finalOptions.retryWrites) { finalOptions.retryWrites = false; } // Have we specified collation try { decorateWithCollation(finalOptions, coll, options); } catch (err) { return callback(err, null); } // Execute the remove coll.s.topology.remove(coll.s.namespace, [op], finalOptions, (err, result) => { if (callback == null) return; if (err) return handleCallback(callback, err, null); if (result == null) return handleCallback(callback, null, null); if (result.result.code) return handleCallback(callback, toError(result.result)); if (result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0])); // Return the results handleCallback(callback, null, result); }); } /** * Rename the collection. * * @method * @param {Collection} a Collection instance. * @param {string} newName New name of of the collection. * @param {object} [options] Optional settings. See Collection.prototype.rename for a list of options. * @param {Collection~collectionResultCallback} [callback] The results callback */ function rename(coll, newName, options, callback) { let Collection = loadCollection(); // Check the collection name checkCollectionName(newName); // Build the command const renameCollection = `${coll.s.dbName}.${coll.s.name}`; const toCollection = `${coll.s.dbName}.${newName}`; const dropTarget = typeof options.dropTarget === 'boolean' ? options.dropTarget : false; const cmd = { renameCollection: renameCollection, to: toCollection, dropTarget: dropTarget }; // Decorate command with writeConcern if supported applyWriteConcern(cmd, { db: coll.s.db, collection: coll }, options); // Execute against admin executeDbAdminCommand(coll.s.db.admin().s.db, cmd, options, (err, doc) => { if (err) return handleCallback(callback, err, null); // We have an error if (doc.errmsg) return handleCallback(callback, toError(doc), null); try { return handleCallback( callback, null, new Collection( coll.s.db, coll.s.topology, coll.s.dbName, newName, coll.s.pkFactory, coll.s.options ) ); } catch (err) { return handleCallback(callback, toError(err), null); } }); } /** * Replace a document in the collection. * * @method * @param {Collection} a Collection instance. * @param {object} filter The Filter used to select the document to update * @param {object} doc The Document that replaces the matching document * @param {object} [options] Optional settings. See Collection.prototype.replaceOne for a list of options. * @param {Collection~updateWriteOpCallback} [callback] The command result callback */ function replaceOne(coll, filter, doc, options, callback) { // Set single document update options.multi = false; // Execute update updateDocuments(coll, filter, doc, options, (err, r) => { if (callback == null) return; if (err && callback) return callback(err); if (r == null) return callback(null, { result: { ok: 1 } }); r.modifiedCount = r.result.nModified != null ? r.result.nModified : r.result.n; r.upsertedId = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? r.result.upserted[0] // FIXME(major): should be `r.result.upserted[0]._id` : null; r.upsertedCount = Array.isArray(r.result.upserted) && r.result.upserted.length ? r.result.upserted.length : 0; r.matchedCount = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? 0 : r.result.n; r.ops = [doc]; if (callback) callback(null, r); }); } /** * Save a document. * * @method * @param {Collection} a Collection instance. * @param {object} doc Document to save * @param {object} [options] Optional settings. See Collection.prototype.save for a list of options. * @param {Collection~writeOpCallback} [callback] The command result callback * @deprecated use insertOne, insertMany, updateOne or updateMany */ function save(coll, doc, options, callback) { // Get the write concern options const finalOptions = applyWriteConcern( Object.assign({}, options), { db: coll.s.db, collection: coll }, options ); // Establish if we need to perform an insert or update if (doc._id != null) { finalOptions.upsert = true; return updateDocuments(coll, { _id: doc._id }, doc, finalOptions, callback); } // Insert the document insertDocuments(coll, [doc], finalOptions, (err, result) => { if (callback == null) return; if (doc == null) return handleCallback(callback, null, null); if (err) return handleCallback(callback, err, null); handleCallback(callback, null, result); }); } /** * Get all the collection statistics. * * @method * @param {Collection} a Collection instance. * @param {object} [options] Optional settings. See Collection.prototype.stats for a list of options. * @param {Collection~resultCallback} [callback] The collection result callback */ function stats(coll, options, callback) { // Build command object const commandObject = { collStats: coll.s.name }; // Check if we have the scale value if (options['scale'] != null) commandObject['scale'] = options['scale']; options = Object.assign({}, options); // Ensure we have the right read preference inheritance options.readPreference = resolveReadPreference(options, { db: coll.s.db, collection: coll }); // Execute the command executeCommand(coll.s.db, commandObject, options, callback); } function updateCallback(err, r, callback) { if (callback == null) return; if (err) return callback(err); if (r == null) return callback(null, { result: { ok: 1 } }); r.modifiedCount = r.result.nModified != null ? r.result.nModified : r.result.n; r.upsertedId = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? r.result.upserted[0] // FIXME(major): should be `r.result.upserted[0]._id` : null; r.upsertedCount = Array.isArray(r.result.upserted) && r.result.upserted.length ? r.result.upserted.length : 0; r.matchedCount = Array.isArray(r.result.upserted) && r.result.upserted.length > 0 ? 0 : r.result.n; callback(null, r); } function updateDocuments(coll, selector, document, options, callback) { if ('function' === typeof options) (callback = options), (options = null); if (options == null) options = {}; if (!('function' === typeof callback)) callback = null; // If we are not providing a selector or document throw if (selector == null || typeof selector !== 'object') return callback(toError('selector must be a valid JavaScript object')); if (document == null || typeof document !== 'object') return callback(toError('document must be a valid JavaScript object')); // Final options for retryable writes and write concern let finalOptions = Object.assign({}, options); finalOptions = applyRetryableWrites(finalOptions, coll.s.db); finalOptions = applyWriteConcern(finalOptions, { db: coll.s.db, collection: coll }, options); // Do we return the actual result document // Either use override on the function, or go back to default on either the collection // level or db finalOptions.serializeFunctions = options.serializeFunctions || coll.s.serializeFunctions; // Execute the operation const op = { q: selector, u: document }; op.upsert = options.upsert !== void 0 ? !!options.upsert : false; op.multi = options.multi !== void 0 ? !!options.multi : false; if (finalOptions.arrayFilters) { op.arrayFilters = finalOptions.arrayFilters; delete finalOptions.arrayFilters; } if (finalOptions.retryWrites && op.multi) { finalOptions.retryWrites = false; } // Have we specified collation try { decorateWithCollation(finalOptions, coll, options); } catch (err) { return callback(err, null); } // Update options coll.s.topology.update(coll.s.namespace, [op], finalOptions, (err, result) => { if (callback == null) return; if (err) return handleCallback(callback, err, null); if (result == null) return handleCallback(callback, null, null); if (result.result.code) return handleCallback(callback, toError(result.result)); if (result.result.writeErrors) return handleCallback(callback, toError(result.result.writeErrors[0])); // Return the results handleCallback(callback, null, result); }); } /** * Update multiple documents in the collection. * * @method * @param {Collection} a Collection instance. * @param {object} filter The Filter used to select the documents to update * @param {object} update The update operations to be applied to the document * @param {object} [options] Optional settings. See Collection.prototype.updateMany for a list of options. * @param {Collection~updateWriteOpCallback} [callback] The command result callback */ function updateMany(coll, filter, update, options, callback) { // Set single document update options.multi = true; // Execute update updateDocuments(coll, filter, update, options, (err, r) => updateCallback(err, r, callback)); } /** * Update a single document in the collection. * * @method * @param {Collection} a Collection instance. * @param {object} filter The Filter used to select the document to update * @param {object} update The update operations to be applied to the document * @param {object} [options] Optional settings. See Collection.prototype.updateOne for a list of options. * @param {Collection~updateWriteOpCallback} [callback] The command result callback */ function updateOne(coll, filter, update, options, callback) { // Set single document update options.multi = false; // Execute update updateDocuments(coll, filter, update, options, (err, r) => updateCallback(err, r, callback)); } module.exports = { bulkWrite, checkForAtomicOperators, count, countDocuments, buildCountCommand, createIndex, createIndexes, deleteMany, deleteOne, distinct, dropIndex, dropIndexes, ensureIndex, findAndModify, findAndRemove, findOne, findOneAndDelete, findOneAndReplace, findOneAndUpdate, geoHaystackSearch, group, indexes, indexExists, indexInformation, insertMany, insertOne, isCapped, mapReduce, optionsOp, parallelCollectionScan, prepareDocs, reIndex, removeDocuments, rename, replaceOne, save, stats, updateDocuments, updateMany, updateOne };
34.461538
496
0.691552
9df864cc0a0dc4f3c2f585d98c1c0989670df823
103
js
JavaScript
docs/firmware/docs/search/files_3.js
xsparc/iSensor-FX3-API
d0d6775c2dc88f533421ec11cfb201a61814f895
[ "MIT" ]
null
null
null
docs/firmware/docs/search/files_3.js
xsparc/iSensor-FX3-API
d0d6775c2dc88f533421ec11cfb201a61814f895
[ "MIT" ]
null
null
null
docs/firmware/docs/search/files_3.js
xsparc/iSensor-FX3-API
d0d6775c2dc88f533421ec11cfb201a61814f895
[ "MIT" ]
null
null
null
var searchData= [ ['gctlaon_5fregs_2eh_364',['gctlaon_regs.h',['../gctlaon__regs_8h.html',1,'']]] ];
20.6
81
0.669903
9df99857d8b3ecff1e77d4a591eaf01c6fa3bb7e
276
js
JavaScript
gulp-tasks/style-guide.js
nikotest9/blog_scrollytelling-sticky
217b92c5e6ea1ebd6e302f75e6c22c0c9285c128
[ "MIT" ]
36
2018-06-08T12:50:25.000Z
2021-07-15T17:25:10.000Z
gulp-tasks/style-guide.js
nikotest9/blog_scrollytelling-sticky
217b92c5e6ea1ebd6e302f75e6c22c0c9285c128
[ "MIT" ]
107
2018-10-10T18:16:11.000Z
2018-11-27T15:32:09.000Z
gulp-tasks/style-guide.js
nikotest9/blog_scrollytelling-sticky
217b92c5e6ea1ebd6e302f75e6c22c0c9285c128
[ "MIT" ]
14
2018-06-08T17:32:43.000Z
2021-05-27T14:44:58.000Z
const gulp = require('gulp') const runSequence = require('run-sequence') // run all dist tasks to deploy gulp.task('style-guide', (cb) => { runSequence( 'clean-style-guide', 'css-style-guide', 'js-style-guide', 'html-style-guide', 'assets-style-guide', cb ) })
18.4
43
0.652174
9dfae1bd6b0b780079ee5c3785184496fc73a44b
6,561
js
JavaScript
src/assets/fonts/ria-sample-icons/liga.js
Mozi92/ria_tmp
3e4295fdf79d0b42c9b88d2f16a1c2c70d20c319
[ "RSA-MD" ]
null
null
null
src/assets/fonts/ria-sample-icons/liga.js
Mozi92/ria_tmp
3e4295fdf79d0b42c9b88d2f16a1c2c70d20c319
[ "RSA-MD" ]
null
null
null
src/assets/fonts/ria-sample-icons/liga.js
Mozi92/ria_tmp
3e4295fdf79d0b42c9b88d2f16a1c2c70d20c319
[ "RSA-MD" ]
null
null
null
/* * * Copyright (c) 1999-2021 Luciad All Rights Reserved. * * Luciad grants you ("Licensee") a non-exclusive, royalty free, license to use, * modify and redistribute this software in source and binary code form, * provided that i) this copyright notice and license appear on all copies of * the software; and ii) Licensee does not utilize the software in a manner * which is disparaging to Luciad. * * This software is provided "AS IS," without a warranty of any kind. ALL * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. LUCIAD AND ITS LICENSORS SHALL NOT BE * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL LUCIAD OR ITS * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF * OR INABILITY TO USE SOFTWARE, EVEN IF LUCIAD HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. */ /* A polyfill for browsers that don't support ligatures. */ /* The script tag referring to this file must be placed before the ending body tag. */ /* To provide support for elements dynamically added, this script adds method 'icomoonLiga' to the window object. You can pass element references to this method. */ (function () { 'use strict'; function supportsProperty(p) { var prefixes = ['Webkit', 'Moz', 'O', 'ms'], i, div = document.createElement('div'), ret = p in div.style; if (!ret) { p = p.charAt(0).toUpperCase() + p.substr(1); for (i = 0; i < prefixes.length; i += 1) { ret = prefixes[i] + p in div.style; if (ret) { break; } } } return ret; } var icons; if (!supportsProperty('fontFeatureSettings')) { icons = { 'undo': '&#xe965;', 'ccw': '&#xe965;', 'redo': '&#xe966;', 'cw': '&#xe966;', 'Redo': '&#xe900;', 'Undo': '&#xe901;', 'CaretLeft': '&#xe902;', 'CaretUp': '&#xe903;', 'CaretRight': '&#xe904;', 'CaretDown': '&#xe905;', 'ArrowLeft': '&#xe906;', 'ArrowUp': '&#xe907;', 'ArrowRight': '&#xe908;', 'ArrowDown': '&#xe909;', 'MoveLeft': '&#xe90a;', 'MoveUp': '&#xe90b;', 'MoveRight': '&#xe90c;', 'MoveDown': '&#xe90d;', 'ToLeft': '&#xe90e;', 'ToTop': '&#xe90f;', 'ToRight': '&#xe910;', 'ToBottom': '&#xe911;', 'Stop': '&#xe912;', 'Pause': '&#xe913;', 'Play': '&#xe914;', 'DoubleCaretV': '&#xe915;', 'DoubleCaretVI': '&#xe916;', 'DoubleCaretH': '&#xe917;', 'DoubleCaretHI': '&#xe918;', 'Close': '&#xe919;', 'Check': '&#xe91a;', 'Plus': '&#xe91b;', 'Minus': '&#xe91c;', 'DrawPoint': '&#xe91d;', 'Forbidden': '&#xe91e;', 'OK': '&#xe91f;', 'Info': '&#xe920;', 'Error': '&#xe921;', 'Unknown': '&#xe922;', 'Warning': '&#xe923;', 'Text': '&#xe924;', 'DrawText': '&#xe925;', 'Select': '&#xe926;', 'Fit': '&#xe927;', 'Selectable': '&#xe928;', 'Cursor': '&#xe929;', 'Hand': '&#xe92a;', 'Lines': '&#xe92b;', 'LineStyles': '&#xe92c;', 'LineStroke': '&#xe92d;', 'LineWidth': '&#xe92e;', 'Upload': '&#xe92f;', 'Download': '&#xe930;', 'Grid': '&#xe931;', 'BarChart': '&#xe932;', 'LineChart': '&#xe933;', 'Height': '&#xe934;', 'HeightUp': '&#xe935;', 'HeightDown': '&#xe936;', 'Sun': '&#xe937;', 'Search': '&#xe938;', 'Edit': '&#xe939;', 'FolderClosed': '&#xe95b;', 'Folder': '&#xe93a;', 'Copy': '&#xe93b;', 'Delete': '&#xe93c;', 'Locked': '&#xe93d;', 'Unlocked': '&#xe93e;', 'Label': '&#xe93f;', 'Compare': '&#xe940;', 'Visible': '&#xe941;', 'FillColor': '&#xe942;', 'Layer': '&#xe943;', 'LayerProperties': '&#xe944;', 'LineColor': '&#xe945;', 'Location': '&#xe946;', 'Center': '&#xe947;', 'Longitude': '&#xe948;', 'Latitude': '&#xe949;', 'LongLat': '&#xe94a;', 'World': '&#xe94b;', 'Picture': '&#xe94c;', 'Raster': '&#xe94d;', 'Measure': '&#xe94e;', 'Defense': '&#xe94f;', 'Shapes': '&#xe950;', 'Route': '&#xe951;', 'Rectangle': '&#xe952;', 'Hexagon': '&#xe953;', 'RoutePim': '&#xe954;', 'Save': '&#xe955;', 'Table': '&#xe956;', 'Dots': '&#xe957;', 'LogoLuciad': '&#xe958;', 'LogoHexagon': '&#xe959;', '0': 0 }; delete icons['0']; window.icomoonLiga = function (els) { var classes, el, i, innerHTML, key; els = els || document.getElementsByTagName('*'); if (!els.length) { els = [els]; } for (i = 0; ; i += 1) { el = els[i]; if (!el) { break; } classes = el.className; if (/lcdIcon/.test(classes)) { innerHTML = el.innerHTML; if (innerHTML && innerHTML.length > 1) { for (key in icons) { if (icons.hasOwnProperty(key)) { innerHTML = innerHTML.replace(new RegExp(key, 'g'), icons[key]); } } el.innerHTML = innerHTML; } } } }; window.icomoonLiga(); } }());
36.45
96
0.442768
9dfae7a014d87394e30e416c235c4e6a950f5675
442
js
JavaScript
src/public/modules/states/State.js
adrianpomilio/beers-of-america
033b76e92964939c4359543be099d617022c5404
[ "MIT" ]
1
2015-09-26T19:42:12.000Z
2015-09-26T19:42:12.000Z
src/public/modules/states/State.js
adrianpomilio/beers-of-america
033b76e92964939c4359543be099d617022c5404
[ "MIT" ]
null
null
null
src/public/modules/states/State.js
adrianpomilio/beers-of-america
033b76e92964939c4359543be099d617022c5404
[ "MIT" ]
null
null
null
var State = (function () { function State(abbr, name, d, selected) { if (selected === void 0) { selected = false; } this.abbr = abbr; this.name = name; this.d = d; this.selected = selected; } State.prototype.selectState = function () { this.selected = true; return false; }; return State; })(); exports.State = State; //# sourceMappingURL=State.js.map
27.625
55
0.538462
9dfbd8776d55c373cd577b1a6f3b9534913e6c9f
3,995
js
JavaScript
Gruntfile.js
JinCoin/jincoin-paperwallet-OBSOLETE
064f0ce2609d4adaae6621f5e374a9685f8e4125
[ "MIT", "Unlicense" ]
null
null
null
Gruntfile.js
JinCoin/jincoin-paperwallet-OBSOLETE
064f0ce2609d4adaae6621f5e374a9685f8e4125
[ "MIT", "Unlicense" ]
null
null
null
Gruntfile.js
JinCoin/jincoin-paperwallet-OBSOLETE
064f0ce2609d4adaae6621f5e374a9685f8e4125
[ "MIT", "Unlicense" ]
null
null
null
var packageObject = require('./package.json'); module.exports = function (grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), combine: { single: { input: "./src/bitaddress-ui.html", output: "./bitaddress.org.html", tokens: [ { token: "//array.map.js", file: "./src/array.map.js" }, { token: "//biginteger.js", file: "./src/biginteger.js" }, { token: "//bitcoinjs-lib.js", file: "./src/bitcoinjs-lib.js" }, { token: "//bitcoinjs-lib.address.js", file: "./src/bitcoinjs-lib.address.js" }, { token: "//bitcoinjs-lib.base58.js", file: "./src/bitcoinjs-lib.base58.js" }, { token: "//bitcoinjs-lib.ecdsa.js", file: "./src/bitcoinjs-lib.ecdsa.js" }, { token: "//bitcoinjs-lib.eckey.js", file: "./src/bitcoinjs-lib.eckey.js" }, { token: "//bitcoinjs-lib.util.js", file: "./src/bitcoinjs-lib.util.js" }, { token: "//cryptojs.js", file: "./src/cryptojs.js" }, { token: "//cryptojs.sha256.js", file: "./src/cryptojs.sha256.js" }, { token: "//cryptojs.pbkdf2.js", file: "./src/cryptojs.pbkdf2.js" }, { token: "//cryptojs.hmac.js", file: "./src/cryptojs.hmac.js" }, { token: "//cryptojs.aes.js", file: "./src/cryptojs.aes.js" }, { token: "//cryptojs.blockmodes.js", file: "./src/cryptojs.blockmodes.js" }, { token: "//cryptojs.ripemd160.js", file: "./src/cryptojs.ripemd160.js" }, { token: "//crypto-scrypt.js", file: "./src/crypto-scrypt.js" }, { token: "//ellipticcurve.js", file: "./src/ellipticcurve.js" }, { token: "//secrets.js", file: "./src/secrets.js" }, { token: "//ninja.key.js", file: "./src/ninja.key.js" }, { token: "//ninja.misc.js", file: "./src/ninja.misc.js" }, { token: "//ninja.onload.js", file: "./src/ninja.onload.js" }, { token: "//ninja.qrcode.js", file: "./src/ninja.qrcode.js" }, { token: "//ninja.seeder.js", file: "./src/ninja.seeder.js" }, { token: "//ninja.unittests.js", file: "./src/ninja.unittests.js" }, { token: "//ninja.translator.js", file: "./src/ninja.translator.js" }, { token: "//ninja.singlewallet.js", file: "./src/ninja.singlewallet.js" }, { token: "//ninja.paperwallet.js", file: "./src/ninja.paperwallet.js" }, { token: "//ninja.bulkwallet.js", file: "./src/ninja.bulkwallet.js" }, { token: "//ninja.brainwallet.js", file: "./src/ninja.brainwallet.js" }, { token: "//ninja.vanitywallet.js", file: "./src/ninja.vanitywallet.js" }, { token: "//ninja.splitwallet.js", file: "./src/ninja.splitwallet.js" }, { token: "//ninja.detailwallet.js", file: "./src/ninja.detailwallet.js" }, { token: "//qrcode.js", file: "./src/qrcode.js" }, { token: "//securerandom.js", file: "./src/securerandom.js" }, { token: "//main.css", file: "./src/main.css" }, { token: "//version", string: packageObject.version }, // cultures { token: "//cs.js", file: "./src/culture/cs.js" }, { token: "//de.js", file: "./src/culture/de.js" }, { token: "//el.js", file: "./src/culture/el.js" }, { token: "//es.js", file: "./src/culture/es.js" }, { token: "//fr.js", file: "./src/culture/fr.js" }, { token: "//hu.js", file: "./src/culture/hu.js" }, { token: "//it.js", file: "./src/culture/it.js" }, { token: "//jp.js", file: "./src/culture/jp.js" }, { token: "//pt-br.js", file: "./src/culture/pt-br.js" }, { token: "//ru.js", file: "./src/culture/ru.js" }, { token: "//zh-cn.js", file: "./src/culture/zh-cn.js" } ] } }, lineending: { // Task dist: { // Target options: { // Target options eol: 'lf' }, files: { // Files to process './bitaddress.org.html': ['./bitaddress.org.html'] } } } }); grunt.file.defaultEncoding = 'utf-8'; grunt.loadNpmTasks("grunt-combine"); grunt.loadNpmTasks('grunt-lineending'); grunt.registerTask("default", ["combine:single", "lineending"]); };
49.320988
85
0.565457
9dfbdaef04ee11960598fec8ba728ee487f54eda
281
js
JavaScript
test/integration/i18n-support/pages/404.js
elsigh/next.js
ebee2bafa935b6474d87a45060ffeb9b7770359f
[ "MIT" ]
1
2020-10-30T07:25:07.000Z
2020-10-30T07:25:07.000Z
test/integration/i18n-support/pages/404.js
elsigh/next.js
ebee2bafa935b6474d87a45060ffeb9b7770359f
[ "MIT" ]
null
null
null
test/integration/i18n-support/pages/404.js
elsigh/next.js
ebee2bafa935b6474d87a45060ffeb9b7770359f
[ "MIT" ]
1
2021-02-09T15:32:26.000Z
2021-02-09T15:32:26.000Z
export default function NotFound(props) { return ( <> <h1 id="not-found">This page could not be found | 404</h1> <p id="prop">{JSON.stringify(props)}</p> </> ) } export const getStaticProps = () => { return { props: { is404: true, }, } }
16.529412
64
0.537367
9dfbe565c22f958fe04df11d4198b0ed97730d86
1,668
js
JavaScript
Dokumentationen/Softwaredokumentation/html/search/all_3.js
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
1
2021-12-20T20:15:26.000Z
2021-12-20T20:15:26.000Z
Dokumentationen/Softwaredokumentation/html/search/all_3.js
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
null
null
null
Dokumentationen/Softwaredokumentation/html/search/all_3.js
Sumarbrander/Stura-Mitgliederdatenbank
691dbd33683b2c2d408efe7a3eb28e083ebcd62a
[ "MIT" ]
null
null
null
var searchData= [ ['checkliste_19',['checkliste',['../classchecklisten_1_1models_1_1_checkliste_aufgabe.html#afdcfd8e63dcc160a6266709aa6e83732',1,'checklisten.models.ChecklisteAufgabe.checkliste()'],['../classchecklisten_1_1models_1_1_checkliste_recht.html#ade139a9edfeb55077f94e6ecd90f129a',1,'checklisten.models.ChecklisteRecht.checkliste()']]], ['checkliste_20',['Checkliste',['../classchecklisten_1_1models_1_1_checkliste.html',1,'checklisten::models']]], ['checklisteaufgabe_21',['ChecklisteAufgabe',['../classchecklisten_1_1models_1_1_checkliste_aufgabe.html',1,'checklisten::models']]], ['checklisterecht_22',['ChecklisteRecht',['../classchecklisten_1_1models_1_1_checkliste_recht.html',1,'checklisten::models']]], ['curr_5ffunktion_5fcount_23',['curr_funktion_count',['../classkandidaturen_1_1models_1_1_kandidatur.html#adb8376995e3671ebc7398d94998b0e61',1,'kandidaturen.models.Kandidatur.curr_funktion_count()'],['../classmitglieder_1_1models_1_1_mitglied.html#a900bacf6b49e81e5f2e4d48ffca30fc4',1,'mitglieder.models.Mitglied.curr_funktion_count()']]], ['curr_5ffunktion_5ffirst_24',['curr_funktion_first',['../classkandidaturen_1_1models_1_1_kandidatur.html#aba50eac9b0635a8ff69993e6e3d1207c',1,'kandidaturen.models.Kandidatur.curr_funktion_first()'],['../classmitglieder_1_1models_1_1_mitglied.html#afb33809c26425072eb001f807e9a6efd',1,'mitglieder.models.Mitglied.curr_funktion_first()']]], ['models_25',['models',['../namespacechecklisten_1_1models.html',1,'checklisten']]], ['urls_26',['urls',['../namespacechecklisten_1_1urls.html',1,'checklisten']]], ['views_27',['views',['../namespacechecklisten_1_1views.html',1,'checklisten']]] ];
128.307692
341
0.806954
9dfd432dca20541e200e58a0361c2372d71194ea
248
js
JavaScript
src/net/ws/api.js
FriedMicro/iot-network-relay
f26fe63fe0e15bf2e449181e263f8c2a4712ee3e
[ "MIT" ]
2
2021-08-04T16:32:15.000Z
2022-02-05T18:41:57.000Z
src/net/ws/api.js
FriedMicro/iot-network-relay
f26fe63fe0e15bf2e449181e263f8c2a4712ee3e
[ "MIT" ]
null
null
null
src/net/ws/api.js
FriedMicro/iot-network-relay
f26fe63fe0e15bf2e449181e263f8c2a4712ee3e
[ "MIT" ]
null
null
null
export const setReqType = (payload, type) => { payload.req_type = type; return payload; } export const getReqType = (payload) => { return payload.req_type; } export const cleanReqType = (payload) => { delete payload["req_type"]; }
20.666667
46
0.66129
9dfd9fb9cb85546101d7f720841864bee70c2867
2,059
js
JavaScript
mosh_hamedani/build_restful_apis/handling_and_logging_errors/vidly/index.js
supermonkeyparadise/node
faf7962b504057c95e38f7bab85283fad4dcba72
[ "MIT" ]
null
null
null
mosh_hamedani/build_restful_apis/handling_and_logging_errors/vidly/index.js
supermonkeyparadise/node
faf7962b504057c95e38f7bab85283fad4dcba72
[ "MIT" ]
null
null
null
mosh_hamedani/build_restful_apis/handling_and_logging_errors/vidly/index.js
supermonkeyparadise/node
faf7962b504057c95e38f7bab85283fad4dcba72
[ "MIT" ]
null
null
null
require('express-async-errors'); // LOG const winston = require('winston'); require('winston-mongodb'); const config = require('config'); const Joi = require('joi'); Joi.objectId = require('joi-objectid')(Joi); const mongoose = require('mongoose'); const express = require('express'); const app = express(); const error = require('./middleware/error'); const genres = require('./routes/genres'); const customers = require('./routes/customers'); const movies = require('./routes/movies'); const rentals = require('./routes/rentals'); const users = require('./routes/users'); const auth = require('./routes/auth'); // 處理非 request process 的 exception // FOR SYNC CODE process.on('uncaughtException', ex => { // winston.error(ex.message, ex); // process.exit(1); }); // FOR ASYNC CODE process.on('unhandledRejection', ex => { // winston.error(ex.message, ex); // process.exit(1); throw ex; }); winston.handleExceptions( new winston.transports.File({ filename: 'uncaughtException.log' }) ); // Write log to file winston.add(winston.transports.File, { filename: 'logfile.log' }); // Write log to MongoDB winston.add(winston.transports.MongoDB, { db: 'mongodb://localhost/vidly', level: 'info' }); // FOR TESTING EXCEPTION!! // throw new Error('Someting failed during startup'); const p2 = Promise.reject(new Error('Something failed miserably!')); p2.then(() => console.log('Done')); if (!config.get('jwtPrivateKey')) { console.error('FATAL ERROR: jwtPrivateKey is not defined.'); process.exit(1); } mongoose .connect('mongodb://localhost/vidly') .then(() => console.log('Connected to MongoDB...')) .catch(err => console.error('Could not connect to MongoDB...')); app.use(express.json()); app.use('/api/genres', genres); app.use('/api/customers', customers); app.use('/api/movies', movies); app.use('/api/rentals', rentals); app.use('/api/users', users); app.use('/api/auth', auth); // Error Middleware app.use(error); const port = process.env.PORT || 3000; app.listen(port, () => console.log(`Listening on port ${port}...`));
27.092105
68
0.681399
9dfe146e083106606b7edab665263590ad37f9e5
5,381
js
JavaScript
toolbox-BE/routes/users.js
MLousdal/Toolbox
6ccb84ede702d789e5ac19d8c3dbf8329828775b
[ "MIT" ]
null
null
null
toolbox-BE/routes/users.js
MLousdal/Toolbox
6ccb84ede702d789e5ac19d8c3dbf8329828775b
[ "MIT" ]
null
null
null
toolbox-BE/routes/users.js
MLousdal/Toolbox
6ccb84ede702d789e5ac19d8c3dbf8329828775b
[ "MIT" ]
null
null
null
const express = require('express'), router = express.Router(), User = require('../models/user'), jwt = require('jsonwebtoken'), config = require('config'), secret = config.get('jwt_secret_key'), // Middleware auth = require('../middleware/authenticate'), // Member + auth_member_plus = require('../middleware/member_plus'), memberPlus = [auth, auth_member_plus], // Admin auth_admin = require('../middleware/admin'), adminAuth = [auth, auth_admin], // Error handler { TakeError } = require('../helpers/helpError'); // --------------------------------------------------------- // ----------------- TABLE OF CONTENTS --------------------- // --------------------------------------------------------- // POST // /api/Users // /api/Users/login // GET -- Not in use, out of scope. // /api/Users // /api/Users/me // /api/Users/:UserId // --------------------------------------------------------- //------------------------ POST ------------------------------- // POST /api/Users (SIGNUP) router.post('/', async (req, res, next) => { try { // previously Login.validate(req.body) const { error } = User.validateResponse(req.body); if (error) throw new TakeError(400, "Bad Request:" + error); const // If the req.body is formatted correctly a new User will be created with that information. userObj = new User(req.body), // - That way we can use the method: create() to use the userObj to make a .query(). user = await userObj.create(); // If .create() have: // -- Checked for dublicate users // -- INSERT INTO database correctly // -- Validated the object we created with the data from the database // Then we can return the newly created user to the FE! return res.send(JSON.stringify(user)); } catch (err) { next(err); } }); // POST /api/Users/login (LOGIN) router.post('/login', async (req, res, next) => { //Allows a "custom token" to be used. res.setHeader('Access-Control-Expose-Headers', 'toolbox-token'); // Exposes a non-CORS-safelisted response (So we add toolbox-token to the list of safe headers), so we can use our custom token in the browser. Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers // CORS(Cross-Origin Resourse Sharing). Read more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS try { // Is the data from the FE login, correctly formated? const { error } = User.validate_login(req.body); if (error) throw new TakeError(400, 'Bad Request: ' + error); // create new User to check if it exist in the DB, and if there is more than 1!? const userObj = new User(req.body); // Check the format, and if the password is a match. const user = await User.checkCredentials(userObj); // If there are only 1 user and the data given are correct, we give asign a matching token, and send it with the response(user and the token) const token = await jwt.sign(user, secret); res.setHeader('toolbox-token', token); return res.send(JSON.stringify(user)); } catch (err) { next(err); } }); //------------------------ GET ------------------------------- // Disclaimer: // The scopet changed and more focus was used on our tools, so that is why we are not using these GET's in our project. // // ----- (ADMIN) GET ALL Users // router.get('/', adminAuth, async (req, res, next) => { // try { // const user = await User.readAll(); // return res.send(JSON.stringify(user)); // } catch (err) { // next(err); // } // }); // // ----- (MEMBER) OWN User // router.get('/:me', memberPlus, async (req, res, next) => { // //URL segmet is :me // try { // if (req.params.me) { // Params stores the values from URL segmets like :me as params.me // me = parseInt(req.params.me); // if (!me) throw new TakeError(400, 'Bad request: me = should refer an user id (integer)'); // const user = await User.readAll(me); // return res.send(JSON.stringify(user)); // } // } catch (err) { // next(err); // } // }); // // ----- (ADMIN) A specific User // router.get('/:userid', adminAuth, async (req, res, next) => { // //URL segmet is :userid // let userid; // try { // if (req.params.userid) { // Params stores the values from URL segmets like :me as params.me // userid = parseInt(req.params.userid); // if (!userid) throw new TakeError(400, 'Bad request: me = should refer an user id (integer)'); // const user = await User.readAll(userid); // return res.send(JSON.stringify(user)); // } // } catch (err) { // next(err); // } // }); // // ******************************************************** // // ******************** TEST ROUTE ********************** // // ******************************************************** // router.get('/test/test', [auth], async (req,res, next) => { // try { // // const user = await User.test1(); // // return res.send(JSON.stringify(user)); // console.log("Test running!") // } catch (err) { // next(err); // } // }) module.exports = router;
34.941558
246
0.535031