app.4dbe52a3.js 660 KB
Newer Older
Julien Jorry committed
1 2
/*! For license information please see app.4dbe52a3.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[143],{94180:(t,e,i)=>{var n={"./hello_controller.js":44695};function s(t){var e=o(t);return i(e)}function o(t){if(!i.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}s.keys=function(){return Object.keys(n)},s.resolve=o,t.exports=s,s.id=94180},6599:(t,e,i)=>{"use strict";i.d(e,{Mx:()=>W,Qr:()=>Q});class n{constructor(t,e,i){this.eventTarget=t,this.eventName=e,this.eventOptions=i,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){const e=function(t){if("immediatePropagationStopped"in t)return t;{const{stopImmediatePropagation:e}=t;return Object.assign(t,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}(t);for(const t of this.bindings){if(e.immediatePropagationStopped)break;t.handleEvent(e)}}get bindings(){return Array.from(this.unorderedBindings).sort(((t,e)=>{const i=t.index,n=e.index;return i<n?-1:i>n?1:0}))}}class s{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach((t=>t.connect())))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach((t=>t.disconnect())))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((t,e)=>t.concat(Array.from(e.values()))),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t){this.fetchEventListenerForBinding(t).bindingDisconnected(t)}handleError(t,e,i={}){this.application.handleError(t,`Error ${e}`,i)}fetchEventListenerForBinding(t){const{eventTarget:e,eventName:i,eventOptions:n}=t;return this.fetchEventListener(e,i,n)}fetchEventListener(t,e,i){const n=this.fetchEventListenerMapForEventTarget(t),s=this.cacheKey(e,i);let o=n.get(s);return o||(o=this.createEventListener(t,e,i),n.set(s,o)),o}createEventListener(t,e,i){const s=new n(t,e,i);return this.started&&s.connect(),s}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){const i=[t];return Object.keys(e).sort().forEach((t=>{i.push(`${e[t]?"":"!"}${t}`)})),i.join(":")}}const o=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;function r(t){return"window"==t?window:"document"==t?document:void 0}function a(t){return t.replace(/(?:[_-])([a-z0-9])/g,((t,e)=>e.toUpperCase()))}function l(t){return t.charAt(0).toUpperCase()+t.slice(1)}function h(t){return t.replace(/([A-Z])/g,((t,e)=>`-${e.toLowerCase()}`))}class c{constructor(t,e,i){this.element=t,this.index=e,this.eventTarget=i.eventTarget||t,this.eventName=i.eventName||function(t){const e=t.tagName.toLowerCase();if(e in u)return u[e](t)}(t)||d("missing event name"),this.eventOptions=i.eventOptions||{},this.identifier=i.identifier||d("missing identifier"),this.methodName=i.methodName||d("missing method name")}static forToken(t){return new this(t.element,t.index,function(t){const e=t.trim().match(o)||[];return{eventTarget:r(e[4]),eventName:e[2],eventOptions:e[9]?(i=e[9],i.split(":").reduce(((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)})),{})):{},identifier:e[5],methodName:e[7]};var i}(t.content))}toString(){const t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}->${this.identifier}#${this.methodName}`}get params(){const t={},e=new RegExp(`^data-${this.identifier}-(.+)-param$`);for(const{name:i,value:n}of Array.from(this.element.attributes)){const s=i.match(e),o=s&&s[1];o&&(t[a(o)]=p(n))}return t}get eventTargetName(){return(t=this.eventTarget)==window?"window":t==document?"document":void 0;var t}}const u={a:t=>"click",button:t=>"click",form:t=>"submit",details:t=>"toggle",input:t=>"submit"==t.getAttribute("type")?"click":"input",select:t=>"change",textarea:t=>"input"};function d(t){throw new Error(t)}function p(t){try{return JSON.parse(t)}catch(e){return t}}class f{constructor(t,e){this.context=t,this.action=e}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(t){this.willBeInvokedByEvent(t)&&this.shouldBeInvokedPerSelf(t)&&(this.processStopPropagation(t),this.processPreventDefault(t),this.invokeWithEvent(t))}get eventName(){return this.action.eventName}get method(){const t=this.controller[this.methodName];if("function"==typeof t)return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}processStopPropagation(t){this.eventOptions.stop&&t.stopPropagation()}processPreventDefault(t){this.eventOptions.prevent&&t.preventDefault()}invokeWithEvent(t){const{target:e,currentTarget:i}=t;try{const{params:n}=this.action,s=Object.assign(t,{params:n});this.method.call(this.controller,s),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:i,action:this.methodName})}catch(e){const{identifier:i,controller:n,element:s,index:o}=this,r={identifier:i,controller:n,element:s,index:o,event:t};this.context.handleError(e,`invoking action "${this.action}"`,r)}}shouldBeInvokedPerSelf(t){return!0!==this.action.eventOptions.self||this.action.element===t.target}willBeInvokedByEvent(t){const e=t.target;return this.element===e||(e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):this.scope.containsElement(this.action.element))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class m{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,this.elements=new Set,this.mutationObserver=new MutationObserver((t=>this.processMutations(t)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const t=new Set(this.matchElementsInTree());for(const e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(const e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){"attributes"==t.type?this.processAttributeChange(t.target,t.attributeName):"childList"==t.type&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){const i=t;this.elements.has(i)?this.delegate.elementAttributeChanged&&this.matchElement(i)?this.delegate.elementAttributeChanged(i,e):this.removeElement(i):this.matchElement(i)&&this.addElement(i)}processRemovedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.processTree(t,this.removeElement)}}processAddedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.elementIsActive(t)&&this.processTree(t,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(const i of this.matchElementsInTree(t))e.call(this,i)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected==this.element.isConnected&&this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}}class g{constructor(t,e,i){this.attributeName=e,this.delegate=i,this.elementObserver=new m(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],i=Array.from(t.querySelectorAll(this.selector));return e.concat(i)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}}class _{constructor(t,e){this.element=t,this.delegate=e,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((t=>this.processMutations(t)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){const e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){const i=this.delegate.getStringMapKeyForAttribute(t);if(null!=i){this.stringMap.has(t)||this.stringMapKeyAdded(i,t);const n=this.element.getAttribute(t);if(this.stringMap.get(t)!=n&&this.stringMapValueChanged(n,i,e),null==n){const e=this.stringMap.get(t);this.stringMap.delete(t),e&&this.stringMapKeyRemoved(i,t,e)}else this.stringMap.set(t,n)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,i){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,i)}stringMapKeyRemoved(t,e,i){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,i)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((t=>t.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}function v(t,e,i){b(t,e).add(i)}function y(t,e,i){b(t,e).delete(i),function(t,e){const i=t.get(e);null!=i&&0==i.size&&t.delete(e)}(t,e)}function b(t,e){let i=t.get(e);return i||(i=new Set,t.set(e,i)),i}class x{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce(((t,e)=>t.concat(Array.from(e))),[])}get size(){return Array.from(this.valuesByKey.values()).reduce(((t,e)=>t+e.size),0)}add(t,e){v(this.valuesByKey,t,e)}delete(t,e){y(this.valuesByKey,t,e)}has(t,e){const i=this.valuesByKey.get(t);return null!=i&&i.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some((e=>e.has(t)))}getValuesForKey(t){const e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter((([e,i])=>i.has(t))).map((([t,e])=>t))}}class w{constructor(t,e,i){this.attributeObserver=new g(t,e,this),this.delegate=i,this.tokensByElement=new x}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){const[e,i]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(i)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach((t=>this.tokenMatched(t)))}tokensUnmatched(t){t.forEach((t=>this.tokenUnmatched(t)))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){const e=this.tokensByElement.getValuesForKey(t),i=this.readTokensForElement(t),n=function(t,e){const i=Math.max(t.length,e.length);return Array.from({length:i},((i,n)=>[t[n],e[n]]))}(e,i).findIndex((([t,e])=>{return n=e,!((i=t)&&n&&i.index==n.index&&i.content==n.content);var i,n}));return-1==n?[[],[]]:[e.slice(n),i.slice(n)]}readTokensForElement(t){const e=this.attributeName;return function(t,e,i){return t.trim().split(/\s+/).filter((t=>t.length)).map(((t,n)=>({element:e,attributeName:i,content:t,index:n})))}(t.getAttribute(e)||"",t,e)}}class k{constructor(t,e,i){this.tokenListObserver=new w(t,e,this),this.delegate=i,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){const{element:e}=t,{value:i}=this.fetchParseResultForToken(t);i&&(this.fetchValuesByTokenForElement(e).set(t,i),this.delegate.elementMatchedValue(e,i))}tokenUnmatched(t){const{element:e}=t,{value:i}=this.fetchParseResultForToken(t);i&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,i))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(t){return{error:t}}}}class T{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new k(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(t){const e=new f(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){const e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach((t=>this.delegate.bindingDisconnected(t))),this.bindingsByAction.clear()}parseValueForToken(t){const e=c.forToken(t);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}}class C{constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new _(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){const i=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,i.writer(this.receiver[t]),i.writer(i.defaultValue))}stringMapValueChanged(t,e,i){const n=this.valueDescriptorNameMap[e];null!==t&&(null===i&&(i=n.writer(n.defaultValue)),this.invokeChangedCallback(e,t,i))}stringMapKeyRemoved(t,e,i){const n=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,n.writer(this.receiver[t]),i):this.invokeChangedCallback(t,n.writer(n.defaultValue),i)}invokeChangedCallbacksForDefaultValues(){for(const{key:t,name:e,defaultValue:i,writer:n}of this.valueDescriptors)null==i||this.controller.data.has(t)||this.invokeChangedCallback(e,n(i),void 0)}invokeChangedCallback(t,e,i){const n=`${t}Changed`,s=this.receiver[n];if("function"==typeof s){const n=this.valueDescriptorNameMap[t];try{const t=n.reader(e);let o=i;i&&(o=n.reader(i)),s.call(this.receiver,t,o)}catch(t){if(!(t instanceof TypeError))throw t;throw new TypeError(`Stimulus Value "${this.context.identifier}.${n.name}" - ${t.message}`)}}}get valueDescriptors(){const{valueDescriptorMap:t}=this;return Object.keys(t).map((e=>t[e]))}get valueDescriptorNameMap(){const t={};return Object.keys(this.valueDescriptorMap).forEach((e=>{const i=this.valueDescriptorMap[e];t[i.name]=i})),t}hasValue(t){const e=`has${l(this.valueDescriptorNameMap[t].name)}`;return this.receiver[e]}}class A{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new x}start(){this.tokenListObserver||(this.tokenListObserver=new w(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var i;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),null===(i=this.tokenListObserver)||void 0===i||i.pause((()=>this.delegate.targetConnected(t,e))))}disconnectTarget(t,e){var i;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),null===(i=this.tokenListObserver)||void 0===i||i.pause((()=>this.delegate.targetDisconnected(t,e))))}disconnectAllTargets(){for(const t of this.targetsByName.keys)for(const e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}class E{constructor(t,e){this.logDebugActivity=(t,e={})=>{const{identifier:i,controller:n,element:s}=this;e=Object.assign({identifier:i,controller:n,element:s},e),this.application.logDebugActivity(this.identifier,t,e)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new T(this,this.dispatcher),this.valueObserver=new C(this,this.controller),this.targetObserver=new A(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(t){this.handleError(t,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,i={}){const{identifier:n,controller:s,element:o}=this;i=Object.assign({identifier:n,controller:s,element:o},i),this.application.handleError(t,`Error ${e}`,i)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}invokeControllerMethod(t,...e){const i=this.controller;"function"==typeof i[t]&&i[t](...e)}}function M(t,e){const i=P(t);return Array.from(i.reduce(((t,i)=>(function(t,e){const i=t[e];return Array.isArray(i)?i:[]}(i,e).forEach((e=>t.add(e))),t)),new Set))}function L(t,e){return P(t).reduce(((t,i)=>(t.push(...function(t,e){const i=t[e];return i?Object.keys(i).map((t=>[t,i[t]])):[]}(i,e)),t)),[])}function P(t){const e=[];for(;t;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function S(t){return function(t,e){const i=D(t),n=function(t,e){return O(e).reduce(((i,n)=>{const s=function(t,e,i){const n=Object.getOwnPropertyDescriptor(t,i);if(!n||!("value"in n)){const t=Object.getOwnPropertyDescriptor(e,i).value;return n&&(t.get=n.get||t.get,t.set=n.set||t.set),t}}(t,e,n);return s&&Object.assign(i,{[n]:s}),i}),{})}(t.prototype,e);return Object.defineProperties(i.prototype,n),i}(t,function(t){return M(t,"blessings").reduce(((e,i)=>{const n=i(t);for(const t in n){const i=e[t]||{};e[t]=Object.assign(i,n[t])}return e}),{})}(t))}const O="function"==typeof Object.getOwnPropertySymbols?t=>[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)]:Object.getOwnPropertyNames,D=(()=>{function t(t){function e(){return Reflect.construct(t,arguments,new.target)}return e.prototype=Object.create(t.prototype,{constructor:{value:e}}),Reflect.setPrototypeOf(e,t),e}try{return function(){const e=t((function(){this.a.call(this)}));e.prototype.a=function(){},new e}(),t}catch(t){return t=>class extends t{}}})();class I{constructor(t,e){this.application=t,this.definition=function(t){return{identifier:t.identifier,controllerConstructor:S(t.controllerConstructor)}}(e),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(t){const e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){const e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new E(this,t),this.contextsByScope.set(t,e)),e}}class N{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){const e=this.data.get(this.getDataKey(t))||"";return e.match(/[^\s]+/g)||[]}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}}class z{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){const e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){const i=this.getAttributeNameForKey(t);return this.element.setAttribute(i,e),this.get(t)}has(t){const e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){const e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${h(t)}`}}class R{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,i){let n=this.warnedKeysByObject.get(t);n||(n=new Set,this.warnedKeysByObject.set(t,n)),n.has(e)||(n.add(e),this.logger.warn(i,t))}}function j(t,e){return`[${t}~="${e}"]`}class B{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return null!=this.find(t)}find(...t){return t.reduce(((t,e)=>t||this.findTarget(e)||this.findLegacyTarget(e)),void 0)}findAll(...t){return t.reduce(((t,e)=>[...t,...this.findAllTargets(e),...this.findAllLegacyTargets(e)]),[])}findTarget(t){const e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){const e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){return j(this.schema.targetAttributeForScope(this.identifier),t)}findLegacyTarget(t){const e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){const e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map((e=>this.deprecate(e,t)))}getLegacySelectorForTargetName(t){const e=`${this.identifier}.${t}`;return j(this.schema.targetAttribute,e)}deprecate(t,e){if(t){const{identifier:i}=this,n=this.schema.targetAttribute,s=this.schema.targetAttributeForScope(i);this.guide.warn(t,`target:${e}`,`Please replace ${n}="${i}.${e}" with ${s}="${e}". The ${n} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}}class ${constructor(t,e,i,n){this.targets=new B(this),this.classes=new N(this),this.data=new z(this),this.containsElement=t=>t.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=i,this.guide=new R(n)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return j(this.schema.controllerAttribute,this.identifier)}}class F{constructor(t,e,i){this.element=t,this.schema=e,this.delegate=i,this.valueListObserver=new k(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(t){const{element:e,content:i}=t,n=this.fetchScopesByIdentifierForElement(e);let s=n.get(i);return s||(s=this.delegate.createScopeForElementAndIdentifier(e,i),n.set(i,s)),s}elementMatchedValue(t,e){const i=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,i),1==i&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){const i=this.scopeReferenceCounts.get(e);i&&(this.scopeReferenceCounts.set(e,i-1),1==i&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}}class H{constructor(t){this.application=t,this.scopeObserver=new F(this.element,this.schema,this),this.scopesByIdentifier=new x,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((t,e)=>t.concat(e.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);const e=new I(this.application,t);this.connectModule(e)}unloadIdentifier(t){const e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){const i=this.modulesByIdentifier.get(e);if(i)return i.contexts.find((e=>e.element==t))}handleError(t,e,i){this.application.handleError(t,e,i)}createScopeForElementAndIdentifier(t,e){return new $(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t);this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((e=>t.connectContextForScope(e)))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier);this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((e=>t.disconnectContextForScope(e)))}}const V={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:t=>`data-${t}-target`};class W{constructor(t=document.documentElement,e=V){this.logger=console,this.debug=!1,this.logDebugActivity=(t,e,i={})=>{this.debug&&this.logFormattedMessage(t,e,i)},this.element=t,this.schema=e,this.dispatcher=new s(this),this.router=new H(this)}static start(t,e){const i=new W(t,e);return i.start(),i}async start(){await new Promise((t=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>t())):t()})),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(t,e){this.load({identifier:t,controllerConstructor:e})}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach((t=>{t.controllerConstructor.shouldLoad&&this.router.loadDefinition(t)}))}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach((t=>this.router.unloadIdentifier(t)))}get controllers(){return this.router.contexts.map((t=>t.controller))}getControllerForElementAndIdentifier(t,e){const i=this.router.getContextForElementAndIdentifier(t,e);return i?i.controller:null}handleError(t,e,i){var n;this.logger.error("%s\n\n%o\n\n%o",e,t,i),null===(n=window.onerror)||void 0===n||n.call(window,e,"",0,0,t)}logFormattedMessage(t,e,i={}){i=Object.assign({application:this},i),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},i)),this.logger.groupEnd()}}function q([t,e],i){return function(t){const e=`${h(t.token)}-value`,i=function(t){const e=function(t){const e=Z(t.typeObject.type);if(!e)return;const i=U(t.typeObject.default);if(e!==i){const n=t.controller?`${t.controller}.${t.token}`:t.token;throw new Error(`The specified default value for the Stimulus Value "${n}" must match the defined type "${e}". The provided default value of "${t.typeObject.default}" is of type "${i}".`)}return e}({controller:t.controller,token:t.token,typeObject:t.typeDefinition}),i=U(t.typeDefinition),n=Z(t.typeDefinition),s=e||i||n;if(s)return s;const o=t.controller?`${t.controller}.${t.typeDefinition}`:t.token;throw new Error(`Unknown value type "${o}" for "${t.token}" value`)}(t);return{type:i,key:e,name:a(e),get defaultValue(){return function(t){const e=Z(t);if(e)return Y[e];const i=t.default;return void 0!==i?i:t}(t.typeDefinition)},get hasCustomDefaultValue(){return void 0!==U(t.typeDefinition)},reader:K[i],writer:G[i]||G.default}}({controller:i,token:t,typeDefinition:e})}function Z(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function U(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(t)?"array":"[object Object]"===Object.prototype.toString.call(t)?"object":void 0}const Y={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},K={array(t){const e=JSON.parse(t);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${t}" of type "${U(e)}"`);return e},boolean:t=>!("0"==t||"false"==String(t).toLowerCase()),number:t=>Number(t),object(t){const e=JSON.parse(t);if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${t}" of type "${U(e)}"`);return e},string:t=>t},G={default:function(t){return`${t}`},array:X,object:X};function X(t){return JSON.stringify(t)}class Q{constructor(t){this.context=t}static get shouldLoad(){return!0}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:i={},prefix:n=this.identifier,bubbles:s=!0,cancelable:o=!0}={}){const r=new CustomEvent(n?`${n}:${t}`:t,{detail:i,bubbles:s,cancelable:o});return e.dispatchEvent(r),r}}Q.blessings=[function(t){return M(t,"classes").reduce(((t,e)=>{return Object.assign(t,{[`${i=e}Class`]:{get(){const{classes:t}=this;if(t.has(i))return t.get(i);{const e=t.getAttributeName(i);throw new Error(`Missing attribute "${e}"`)}}},[`${i}Classes`]:{get(){return this.classes.getAll(i)}},[`has${l(i)}Class`]:{get(){return this.classes.has(i)}}});var i}),{})},function(t){return M(t,"targets").reduce(((t,e)=>{return Object.assign(t,{[`${i=e}Target`]:{get(){const t=this.targets.find(i);if(t)return t;throw new Error(`Missing target element "${i}" for "${this.identifier}" controller`)}},[`${i}Targets`]:{get(){return this.targets.findAll(i)}},[`has${l(i)}Target`]:{get(){return this.targets.has(i)}}});var i}),{})},function(t){const e=L(t,"values"),i={valueDescriptorMap:{get(){return e.reduce(((t,e)=>{const i=q(e,this.identifier),n=this.data.getAttributeNameForKey(i.key);return Object.assign(t,{[n]:i})}),{})}}};return e.reduce(((t,e)=>Object.assign(t,function(t,e){const i=q(t,e),{key:n,name:s,reader:o,writer:r}=i;return{[s]:{get(){const t=this.data.get(n);return null!==t?o(t):i.defaultValue},set(t){void 0===t?this.data.delete(n):this.data.set(n,r(t))}},[`has${l(s)}`]:{get(){return this.data.has(n)||i.hasCustomDefaultValue}}}}(e))),i)}],Q.targets=[],Q.values={}},44695:(t,e,i)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=h(t);if(e){var s=h(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return l(this,i)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}i.r(e),i.d(e,{default:()=>c});var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}(h,t);var e,i,n,l=a(h);function h(){return o(this,h),l.apply(this,arguments)}return e=h,i&&s(e.prototype,i),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(i(6599).Qr)},71333:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>mr});var n=i(6599);function s(){}const o=function(){let t=0;return function(){return t++}}();function r(t){return null==t}function a(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function l(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const h=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function c(t,e){return h(t)?t:e}function u(t,e){return void 0===t?e:t}const d=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function p(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function f(t,e,i,n){let s,o,r;if(a(t))if(o=t.length,n)for(s=o-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<o;s++)e.call(i,t[s],s);else if(l(t))for(r=Object.keys(t),o=r.length,s=0;s<o;s++)e.call(i,t[r[s]],r[s])}function m(t,e){let i,n,s,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(s=t[i],o=e[i],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function g(t){if(a(t))return t.map(g);if(l(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let s=0;for(;s<n;++s)e[i[s]]=g(t[i[s]]);return e}return t}function _(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function v(t,e,i,n){if(!_(t))return;const s=e[t],o=i[t];l(s)&&l(o)?y(s,o,n):e[t]=g(o)}function y(t,e,i){const n=a(e)?e:[e],s=n.length;if(!l(t))return t;const o=(i=i||{}).merger||v;for(let r=0;r<s;++r){if(!l(e=n[r]))continue;const s=Object.keys(e);for(let n=0,r=s.length;n<r;++n)o(s[n],t,e,i)}return t}function b(t,e){return y(t,e,{merger:x})}function x(t,e,i){if(!_(t))return;const n=e[t],s=i[t];l(n)&&l(s)?b(n,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=g(s))}const w={"":t=>t,x:t=>t.x,y:t=>t.y};function k(t,e){const i=w[e]||(w[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function T(t){return t.charAt(0).toUpperCase()+t.slice(1)}const C=t=>void 0!==t,A=t=>"function"==typeof t,E=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const M=Math.PI,L=2*M,P=L+M,S=Number.POSITIVE_INFINITY,O=M/180,D=M/2,I=M/4,N=2*M/3,z=Math.log10,R=Math.sign;function j(t){const e=Math.round(t);t=$(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(z(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function B(t){return!isNaN(parseFloat(t))&&isFinite(t)}function $(t,e,i){return Math.abs(t-e)<i}function F(t,e,i){let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function H(t){return t*(M/180)}function V(t){return t*(180/M)}function W(t){if(!h(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function q(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*M&&(o+=L),{angle:o,distance:s}}function Z(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function U(t,e){return(t-e+P)%L-M}function Y(t){return(t%L+L)%L}function K(t,e,i,n){const s=Y(t),o=Y(e),r=Y(i),a=Y(o-s),l=Y(r-s),h=Y(s-o),c=Y(s-r);return s===o||s===r||n&&o===r||a>l&&h<c}function G(t,e,i){return Math.max(e,Math.min(i,t))}function X(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function Q(t,e,i){i=i||(i=>t[i]<e);let n,s=t.length-1,o=0;for(;s-o>1;)n=o+s>>1,i(n)?o=n:s=n;return{lo:o,hi:s}}const J=(t,e,i,n)=>Q(t,i,n?n=>t[n][e]<=i:n=>t[n][e]<i),tt=(t,e,i)=>Q(t,i,(n=>t[n][e]>=i));const et=["push","pop","shift","splice","unshift"];function it(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(et.forEach((e=>{delete t[e]})),delete t._chartjs)}function nt(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}const st="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function ot(t,e,i){const n=i||(t=>Array.prototype.slice.call(t));let s=!1,o=[];return function(...i){o=n(i),s||(s=!0,st.call(window,(()=>{s=!1,t.apply(e,o)})))}}const rt=t=>"start"===t?"left":"end"===t?"right":"center",at=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function lt(t,e,i){const n=e.length;let s=0,o=n;if(t._sorted){const{iScale:r,_parsed:a}=t,l=r.axis,{min:h,max:c,minDefined:u,maxDefined:d}=r.getUserBounds();u&&(s=G(Math.min(J(a,r.axis,h).lo,i?n:J(e,l,r.getPixelForValue(h)).lo),0,n-1)),o=d?G(Math.max(J(a,r.axis,c,!0).hi+1,i?0:J(e,l,r.getPixelForValue(c),!0).hi+1),s,n)-s:n-s}return{start:s,count:o}}function ht(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),o}const ct=t=>0===t||1===t,ut=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*L/i),dt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*L/i)+1,pt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*D),easeOutSine:t=>Math.sin(t*D),easeInOutSine:t=>-.5*(Math.cos(M*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ct(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ct(t)?t:ut(t,.075,.3),easeOutElastic:t=>ct(t)?t:dt(t,.075,.3),easeInOutElastic(t){const e=.1125;return ct(t)?t:t<.5?.5*ut(2*t,e,.45):.5+.5*dt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let 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:t=>1-pt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*pt.easeInBounce(2*t):.5*pt.easeOutBounce(2*t-1)+.5};function ft(t){return t+.5|0}const mt=(t,e,i)=>Math.max(Math.min(t,i),e);function gt(t){return mt(ft(2.55*t),0,255)}function _t(t){return mt(ft(255*t),0,255)}function vt(t){return mt(ft(t/2.55)/100,0,1)}function yt(t){return mt(ft(100*t),0,100)}const bt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},xt=[..."0123456789ABCDEF"],wt=t=>xt[15&t],kt=t=>xt[(240&t)>>4]+xt[15&t],Tt=t=>(240&t)>>4==(15&t);function Ct(t){var e=(t=>Tt(t.r)&&Tt(t.g)&&Tt(t.b)&&Tt(t.a))(t)?wt:kt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const At=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Et(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function Mt(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function Lt(t,e,i){const n=Et(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function Pt(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),o=Math.min(e,i,n),r=(s+o)/2;let a,l,h;return s!==o&&(h=s-o,l=r>.5?h/(2-s-o):h/(s+o),a=function(t,e,i,n,s){return t===s?(e-i)/n+(e<i?6:0):e===s?(i-t)/n+2:(t-e)/n+4}(e,i,n,h,s),a=60*a+.5),[0|a,l||0,r]}function St(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(_t)}function Ot(t,e,i){return St(Et,t,e,i)}function Dt(t){return(t%360+360)%360}function It(t){const e=At.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?gt(+e[5]):_t(+e[5]));const s=Dt(+e[2]),o=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return St(Lt,t,e,i)}(s,o,r):"hsv"===e[1]?function(t,e,i){return St(Mt,t,e,i)}(s,o,r):Ot(s,o,r),{r:i[0],g:i[1],b:i[2],a:n}}const Nt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},zt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Rt;function jt(t){Rt||(Rt=function(){const t={},e=Object.keys(zt),i=Object.keys(Nt);let n,s,o,r,a;for(n=0;n<e.length;n++){for(r=a=e[n],s=0;s<i.length;s++)o=i[s],a=a.replace(o,Nt[o]);o=parseInt(zt[r],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),Rt.transparent=[0,0,0,0]);const e=Rt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Bt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const $t=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Ft=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ht(t,e,i){if(t){let n=Pt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ot(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Wt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=_t(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=_t(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=Bt.exec(t);let i,n,s,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?gt(t):mt(255*t,0,255)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?gt(i):mt(i,0,255)),n=255&(e[4]?gt(n):mt(n,0,255)),s=255&(e[6]?gt(s):mt(s,0,255)),{r:i,g:n,b:s,a:o}}}(t):It(t)}class Zt{constructor(t){if(t instanceof Zt)return t;const e=typeof t;let i;var n,s,o;"object"===e?i=Wt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?s={r:255&17*bt[n[1]],g:255&17*bt[n[2]],b:255&17*bt[n[3]],a:5===o?17*bt[n[4]]:255}:7!==o&&9!==o||(s={r:bt[n[1]]<<4|bt[n[2]],g:bt[n[3]]<<4|bt[n[4]],b:bt[n[5]]<<4|bt[n[6]],a:9===o?bt[n[7]]<<4|bt[n[8]]:255})),i=s||jt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=vt(t.a)),t}set rgb(t){this._rgb=Wt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${vt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?Ct(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Pt(t),i=e[0],n=yt(e[1]),s=yt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${vt(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const o=e===s?.5:e,r=2*o-1,a=i.a-n.a,l=((r*a==-1?r:(r+a)/(1+r*a))+1)/2;s=1-l,i.r=255&l*i.r+s*n.r+.5,i.g=255&l*i.g+s*n.g+.5,i.b=255&l*i.b+s*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=Ft(vt(t.r)),s=Ft(vt(t.g)),o=Ft(vt(t.b));return{r:_t($t(n+i*(Ft(vt(e.r))-n))),g:_t($t(s+i*(Ft(vt(e.g))-s))),b:_t($t(o+i*(Ft(vt(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Zt(this.rgb)}alpha(t){return this._rgb.a=_t(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=ft(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ht(this._rgb,2,t),this}darken(t){return Ht(this._rgb,2,-t),this}saturate(t){return Ht(this._rgb,1,t),this}desaturate(t){return Ht(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Pt(t);i[0]=Dt(i[0]+e),i=Ot(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Ut(t){return new Zt(t)}function Yt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Kt(t){return Yt(t)?t:Ut(t)}function Gt(t){return Yt(t)?t:Ut(t).saturate(.5).darken(.1).hexString()}const Xt=Object.create(null),Qt=Object.create(null);function Jt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function te(t,e,i){return"string"==typeof e?y(Jt(t,e),i):y(Jt(t,""),e)}var ee=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Gt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Gt(e.borderColor),this.hoverColor=(t,e)=>Gt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return te(this,t,e)}get(t){return Jt(this,t)}describe(t,e){return te(Qt,t,e)}override(t,e){return te(Xt,t,e)}route(t,e,i,n){const s=Jt(this,t),o=Jt(this,i),r="_"+e;Object.defineProperties(s,{[r]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=o[n];return l(t)?Object.assign({},e,t):u(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ie(t,e,i,n,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,i.push(s)),o>n&&(n=o),n}function ne(t,e,i,n){let s=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const l=i.length;let h,c,u,d,p;for(h=0;h<l;h++)if(d=i[h],null!=d&&!0!==a(d))r=ie(t,s,o,r,d);else if(a(d))for(c=0,u=d.length;c<u;c++)p=d[c],null==p||a(p)||(r=ie(t,s,o,r,p));t.restore();const f=o.length/2;if(f>i.length){for(h=0;h<f;h++)delete s[o[h]];o.splice(0,f)}return r}function se(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s}function oe(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function re(t,e,i,n){ae(t,e,i,n,null)}function ae(t,e,i,n,s){let o,r,a,l,h,c;const u=e.pointStyle,d=e.rotation,p=e.radius;let f=(d||0)*O;if(u&&"object"==typeof u&&(o=u.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(f),t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),u){default:s?t.ellipse(i,n,s/2,p,0,0,L):t.arc(i,n,p,0,L),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(f)*p,n-Math.cos(f)*p),f+=N,t.lineTo(i+Math.sin(f)*p,n-Math.cos(f)*p),f+=N,t.lineTo(i+Math.sin(f)*p,n-Math.cos(f)*p),t.closePath();break;case"rectRounded":h=.516*p,l=p-h,r=Math.cos(f+I)*l,a=Math.sin(f+I)*l,t.arc(i-r,n-a,h,f-M,f-D),t.arc(i+a,n-r,h,f-D,f),t.arc(i+r,n+a,h,f,f+D),t.arc(i-a,n+r,h,f+D,f+M),t.closePath();break;case"rect":if(!d){l=Math.SQRT1_2*p,c=s?s/2:l,t.rect(i-c,n-l,2*c,2*l);break}f+=I;case"rectRot":r=Math.cos(f)*p,a=Math.sin(f)*p,t.moveTo(i-r,n-a),t.lineTo(i+a,n-r),t.lineTo(i+r,n+a),t.lineTo(i-a,n+r),t.closePath();break;case"crossRot":f+=I;case"cross":r=Math.cos(f)*p,a=Math.sin(f)*p,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r);break;case"star":r=Math.cos(f)*p,a=Math.sin(f)*p,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r),f+=I,r=Math.cos(f)*p,a=Math.sin(f)*p,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a),t.moveTo(i+a,n-r),t.lineTo(i-a,n+r);break;case"line":r=s?s/2:Math.cos(f)*p,a=Math.sin(f)*p,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(f)*p,n+Math.sin(f)*p)}t.fill(),e.borderWidth>0&&t.stroke()}}function le(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function he(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ce(t){t.restore()}function ue(t,e,i,n,s){if(!e)return t.lineTo(i.x,i.y);if("middle"===s){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===s!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function de(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function pe(t,e,i,n,s,o={}){const l=a(e)?e:[e],h=o.strokeWidth>0&&""!==o.strokeColor;let c,u;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);r(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),c=0;c<l.length;++c)u=l[c],h&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),r(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(u,i,n,o.maxWidth)),t.fillText(u,i,n,o.maxWidth),fe(t,i,n,u,o),n+=s.lineHeight;t.restore()}function fe(t,e,i,n,s){if(s.strikethrough||s.underline){const o=t.measureText(n),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,h=i+o.actualBoundingBoxDescent,c=s.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(r,c),t.lineTo(a,c),t.stroke()}}function me(t,e){const{x:i,y:n,w:s,h:o,radius:r}=e;t.arc(i+r.topLeft,n+r.topLeft,r.topLeft,-D,M,!0),t.lineTo(i,n+o-r.bottomLeft),t.arc(i+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,M,D,!0),t.lineTo(i+s-r.bottomRight,n+o),t.arc(i+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,D,0,!0),t.lineTo(i+s,n+r.topRight),t.arc(i+s-r.topRight,n+r.topRight,r.topRight,0,-D,!0),t.lineTo(i+r.topLeft,n)}const ge=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),_e=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function ve(t,e){const i=(""+t).match(ge);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function ye(t,e){const i={},n=l(e),s=n?Object.keys(e):e,o=l(t)?n?i=>u(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=+o(t)||0;return i}function be(t){return ye(t,{top:"y",right:"x",bottom:"y",left:"x"})}function xe(t){return ye(t,["topLeft","topRight","bottomLeft","bottomRight"])}function we(t){const e=be(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ke(t,e){t=t||{},e=e||ee.font;let i=u(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=u(t.style,e.style);n&&!(""+n).match(_e)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const s={family:u(t.family,e.family),lineHeight:ve(u(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:u(t.weight,e.weight),string:""};return s.string=function(t){return!t||r(t.size)||r(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function Te(t,e,i,n){let s,o,r,l=!0;for(s=0,o=t.length;s<o;++s)if(r=t[s],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),l=!1),void 0!==i&&a(r)&&(r=r[i%r.length],l=!1),void 0!==r))return n&&!l&&(n.cacheable=!1),r}function Ce(t,e){return Object.assign(Object.create(t),e)}function Ae(t,e=[""],i=t,n,s=(()=>t[0])){C(n)||(n=Re("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:s,override:s=>Ae([s,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Se(i,n,(()=>function(t,e,i,n){let s;for(const o of e)if(s=Re(Le(o,t),i),C(s))return Pe(t,s)?Ne(i,n,t,s):s}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>je(t).includes(e),ownKeys:t=>je(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function Ee(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Me(t,n),setContext:e=>Ee(t,e,i,n),override:s=>Ee(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Se(t,e,(()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=t;let h=n[e];A(h)&&r.isScriptable(e)&&(h=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,r||n),a.delete(t),Pe(t,e)&&(e=Ne(s._scopes,s,t,e));return e}(e,h,t,i));a(h)&&h.length&&(h=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=i;if(C(o.index)&&n(t))e=e[o.index%e.length];else if(l(e[0])){const i=e,n=s._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ne(n,s,t,l);e.push(Ee(i,o,r&&r[t],a))}}return e}(e,h,t,r.isIndexable));Pe(e,h)&&(h=Ee(h,s,o&&o[e],r));return h}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Me(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:A(i)?i:()=>i,isIndexable:A(n)?n:()=>n}}const Le=(t,e)=>t?t+T(e):e,Pe=(t,e)=>l(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Se(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Oe(t,e,i){return A(t)?t(e,i):t}const De=(t,e)=>!0===t?e:"string"==typeof t?k(e,t):void 0;function Ie(t,e,i,n,s){for(const o of e){const e=De(i,o);if(e){t.add(e);const o=Oe(e._fallback,i,s);if(C(o)&&o!==i&&o!==n)return o}else if(!1===e&&C(n)&&i!==n)return null}return!1}function Ne(t,e,i,n){const s=e._rootScopes,o=Oe(e._fallback,i,n),r=[...t,...s],h=new Set;h.add(n);let c=ze(h,r,i,o||i,n);return null!==c&&((!C(o)||o===i||(c=ze(h,r,o,c,n),null!==c))&&Ae(Array.from(h),[""],s,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];if(a(s)&&l(i))return i;return s}(e,i,n))))}function ze(t,e,i,n,s){for(;i;)i=Ie(t,e,i,n,s);return i}function Re(t,e){for(const i of e){if(!i)continue;const e=i[t];if(C(e))return e}}function je(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Be(t,e,i,n){const{iScale:s}=t,{key:o="r"}=this._parsing,r=new Array(n);let a,l,h,c;for(a=0,l=n;a<l;++a)h=a+i,c=e[h],r[a]={r:s.parse(k(c,o),h)};return r}const $e=Number.EPSILON||1e-14,Fe=(t,e)=>e<t.length&&!t[e].skip&&t[e],He=t=>"x"===t?"y":"x";function Ve(t,e,i,n){const s=t.skip?e:t,o=e,r=i.skip?e:i,a=Z(o,s),l=Z(r,o);let h=a/(a+l),c=l/(a+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const u=n*h,d=n*c;return{previous:{x:o.x-u*(r.x-s.x),y:o.y-u*(r.y-s.y)},next:{x:o.x+d*(r.x-s.x),y:o.y+d*(r.y-s.y)}}}function We(t,e="x"){const i=He(e),n=t.length,s=Array(n).fill(0),o=Array(n);let r,a,l,h=Fe(t,0);for(r=0;r<n;++r)if(a=l,l=h,h=Fe(t,r+1),l){if(h){const t=h[e]-l[e];s[r]=0!==t?(h[i]-l[i])/t:0}o[r]=a?h?R(s[r-1])!==R(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}!function(t,e,i){const n=t.length;let s,o,r,a,l,h=Fe(t,0);for(let c=0;c<n-1;++c)l=h,h=Fe(t,c+1),l&&h&&($(e[c],0,$e)?i[c]=i[c+1]=0:(s=i[c]/e[c],o=i[c+1]/e[c],a=Math.pow(s,2)+Math.pow(o,2),a<=9||(r=3/Math.sqrt(a),i[c]=s*r*e[c],i[c+1]=o*r*e[c])))}(t,s,o),function(t,e,i="x"){const n=He(i),s=t.length;let o,r,a,l=Fe(t,0);for(let h=0;h<s;++h){if(r=a,a=l,l=Fe(t,h+1),!a)continue;const s=a[i],c=a[n];r&&(o=(s-r[i])/3,a[`cp1${i}`]=s-o,a[`cp1${n}`]=c-o*e[h]),l&&(o=(l[i]-s)/3,a[`cp2${i}`]=s+o,a[`cp2${n}`]=c+o*e[h])}}(t,o,e)}function qe(t,e,i){return Math.max(Math.min(t,i),e)}function Ze(t,e,i,n,s){let o,r,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)We(t,s);else{let i=n?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o)a=t[o],l=Ve(i,a,t[Math.min(o+1,r-(n?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,s,o,r,a=le(t[0],e);for(i=0,n=t.length;i<n;++i)r=o,o=a,a=i<n-1&&le(t[i+1],e),o&&(s=t[i],r&&(s.cp1x=qe(s.cp1x,e.left,e.right),s.cp1y=qe(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=qe(s.cp2x,e.left,e.right),s.cp2y=qe(s.cp2y,e.top,e.bottom)))}(t,i)}function Ue(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ye(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Ke(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const Ge=t=>window.getComputedStyle(t,null);const Xe=["top","right","bottom","left"];function Qe(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const o=Xe[s];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function Je(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=Ge(i),o="border-box"===s.boxSizing,r=Qe(s,"padding"),a=Qe(s,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:o}=n;let r,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,o,t.target))r=s,a=o;else{const t=e.getBoundingClientRect();r=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,i),u=r.left+(c&&a.left),d=r.top+(c&&a.top);let{width:p,height:f}=e;return o&&(p-=r.width+a.width,f-=r.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((h-d)/f*i.height/n)}}const ti=t=>Math.round(10*t)/10;function ei(t,e,i,n){const s=Ge(t),o=Qe(s,"margin"),r=Ke(s.maxWidth,t,"clientWidth")||S,a=Ke(s.maxHeight,t,"clientHeight")||S,l=function(t,e,i){let n,s;if(void 0===e||void 0===i){const o=Ye(t);if(o){const t=o.getBoundingClientRect(),r=Ge(o),a=Qe(r,"border","width"),l=Qe(r,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ke(r.maxWidth,o,"clientWidth"),s=Ke(r.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||S,maxHeight:s||S}}(t,e,i);let{width:h,height:c}=l;if("content-box"===s.boxSizing){const t=Qe(s,"border","width"),e=Qe(s,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-o.width),c=Math.max(0,n?Math.floor(h/n):c-o.height),h=ti(Math.min(h,r,l.maxWidth)),c=ti(Math.min(c,a,l.maxHeight)),h&&!c&&(c=ti(h/2)),{width:h,height:c}}function ii(t,e,i){const n=e||1,s=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=s/n,t.width=o/n;const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||r.height!==s||r.width!==o)&&(t.currentDevicePixelRatio=n,r.height=s,r.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const ni=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function si(t,e){const i=function(t,e){return Ge(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function oi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ri(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function ai(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=oi(t,s,i),a=oi(s,o,i),l=oi(o,e,i),h=oi(r,a,i),c=oi(a,l,i);return oi(h,c,i)}const li=new Map;function hi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=li.get(i);return n||(n=new Intl.NumberFormat(t,e),li.set(i,n)),n}(e,i).format(t)}function ci(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ui(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function di(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function pi(t){return"angle"===t?{between:K,compare:U,normalize:Y}:{between:X,compare:(t,e)=>t-e,normalize:t=>t}}function fi({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function mi(t,e,i){if(!i)return[t];const{property:n,start:s,end:o}=i,r=e.length,{compare:a,between:l,normalize:h}=pi(n),{start:c,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:s,end:o}=i,{between:r,normalize:a}=pi(n),l=e.length;let h,c,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,h=0,c=l;h<c&&r(a(e[u%l][n]),s,o);++h)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:p,style:t.style}}(t,e,i),f=[];let m,g,_,v=!1,y=null;const b=()=>v||l(s,_,m)&&0!==a(s,_),x=()=>!v||0===a(o,m)||l(o,_,m);for(let t=c,i=c;t<=u;++t)g=e[t%r],g.skip||(m=h(g[n]),m!==_&&(v=l(m,s,o),null===y&&b()&&(y=0===a(m,s)?t:i),null!==y&&x()&&(f.push(fi({start:y,end:t,loop:d,count:r,style:p})),y=null),i=t,_=m));return null!==y&&f.push(fi({start:y,end:u,loop:d,count:r,style:p})),f}function gi(t,e){const i=[],n=t.segments;for(let s=0;s<n.length;s++){const o=mi(n[s],t.points,e);o.length&&i.push(...o)}return i}function _i(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),o=vi(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=i.length,h=[];let c=o,u=e[0].start,d=u;function p(t,e,n,s){const o=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=o;for(;i[e%l].skip;)e+=o;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:n,style:s}),c=s,u=e%l)}}for(const t of e){u=a?u:t.start;let e,o=i[u%l];for(d=u+1;d<=t.end;d++){const a=i[d%l];e=vi(n.setContext(Ce(s,{type:"segment",p0:o,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:r}))),yi(e,c)&&p(u,d-1,t.loop,c),o=a,c=e}u<d-1&&p(u,d-1,t.loop,c)}return h}(t,e,i,n):e}function vi(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function yi(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var bi=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const s=e.listeners[n],o=e.duration;s.forEach((n=>n({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=st.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let o,r=s.length-1,a=!1;for(;r>=0;--r)o=s[r],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(s[r]=s[s.length-1],s.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const xi="transparent",wi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Kt(t||xi),s=n.valid&&Kt(e||xi);return s&&s.valid?s.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class ki{constructor(t,e,i,n){const s=e[i];n=Te([t.to,n,s,t.from]);const o=Te([t.from,s,n]);this._active=!0,this._fn=t.fn||wi[t.type||typeof o],this._easing=pt[t.easing]||pt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Te([t.to,e,n,t.from]),this._from=Te([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,o=this._loop,r=this._to;let a;if(this._active=s!==r&&(o||e<i),!this._active)return this._target[n]=r,void this._notify(!0);e<0?this._target[n]=s:(a=e/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(s,r,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}ee.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Ti=Object.keys(ee.animation);ee.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),ee.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),ee.describe("animations",{_fallback:"animation"}),ee.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ci{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!l(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!l(n))return;const s={};for(const t of Ti)s[t]=n[t];(a(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,s)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const s=t[n[e]];s&&s.active()&&i.push(s.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=s[l];const u=i.get(l);if(c){if(u&&c.active()){c.update(u,h,r);continue}c.cancel()}u&&u.duration?(s[l]=c=new ki(u,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(bi.add(this._chart,i),!0):void 0}}function Ai(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:s,end:n?s:o}}function Ei(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=n.length;s<o;++s)i.push(n[s].index);return i}function Mi(t,e,i,n={}){const s=t.keys,o="single"===n.mode;let r,a,l,c;if(null!==e){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===i){if(n.all)continue;break}c=t.values[l],h(c)&&(o||0===e||R(e)===R(c))&&(e+=c)}return e}}function Li(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Pi(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Si(t,e,i,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const e=t[s.index];if(i&&e>0||!i&&e<0)return s.index}return null}function Oi(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,h=r.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,r,n),u=e.length;let d;for(let t=0;t<u;++t){const i=e[t],{[l]:o,[h]:u}=i;d=(i._stacks||(i._stacks={}))[h]=Pi(s,c,o),d[a]=u,d._top=Si(d,r,!0,n.type),d._bottom=Si(d,r,!1,n.type)}}function Di(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function Ii(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const Ni=t=>"reset"===t||"none"===t,zi=(t,e)=>e?t:Object.assign({},t);class Ri{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Li(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Ii(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=u(i.xAxisID,Di(t,"x")),o=e.yAxisID=u(i.yAxisID,Di(t,"y")),r=e.rAxisID=u(i.rAxisID,Di(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,s,o,r),h=e.vAxisID=n(a,o,s,r);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&it(this._data,this),t._stacked&&Ii(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(l(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,s,o;for(n=0,s=e.length;n<s;++n)o=e[n],i[n]={x:o,y:t[o]};return i}(e);else if(i!==e){if(i){it(i,this);const t=this._cachedMeta;Ii(t),t._parsed=[]}e&&Object.isExtensible(e)&&(s=this,(n=e)._chartjs?n._chartjs.listeners.push(s):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[s]}}),et.forEach((t=>{const e="_onData"+T(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),s}})})))),this._syncList=[],this._data=e}var n,s}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=Li(e.vScale,e),e.stack!==i.stack&&(n=!0,Ii(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&Oi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:o}=i,r=s.axis;let h,c,u,d=0===t&&e===n.length||i._sorted,p=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,u=n;else{u=a(n[t])?this.parseArrayData(i,n,t,e):l(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===c[r]||p&&c[r]<p[r];for(h=0;h<e;++h)i._parsed[h+t]=c=u[h],d&&(s()&&(d=!1),p=c);i._sorted=d}o&&Oi(this,u)}parsePrimitiveData(t,e,i,n){const{iScale:s,vScale:o}=t,r=s.axis,a=o.axis,l=s.getLabels(),h=s===o,c=new Array(n);let u,d,p;for(u=0,d=n;u<d;++u)p=u+i,c[u]={[r]:h||s.parse(l[p],p),[a]:o.parse(e[p],p)};return c}parseArrayData(t,e,i,n){const{xScale:s,yScale:o}=t,r=new Array(n);let a,l,h,c;for(a=0,l=n;a<l;++a)h=a+i,c=e[h],r[a]={x:s.parse(c[0],h),y:o.parse(c[1],h)};return r}parseObjectData(t,e,i,n){const{xScale:s,yScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let h,c,u,d;for(h=0,c=n;h<c;++h)u=h+i,d=e[u],l[h]={x:s.parse(k(d,r),u),y:o.parse(k(d,a),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,s=this._cachedMeta,o=e[t.axis];return Mi({keys:Ei(n,!0),values:e._stacks[t.axis]},o,s.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const s=i[e.axis];let o=null===s?NaN:s;const r=n&&i._stacks[e.axis];n&&r&&(n.values=r,o=Mi(n,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,s=i._sorted&&t===i.iScale,o=n.length,r=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Ei(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(r);let d,p;function f(){p=n[d];const e=p[r.axis];return!h(p[t.axis])||c>e||u<e}for(d=0;d<o&&(f()||(this.updateRangeFromParsed(l,t,p,a),!s));++d);if(s)for(d=o-1;d>=0;--d)if(!f()){this.updateRangeFromParsed(l,t,p,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,o;for(n=0,s=e.length;n<s;++n)o=e[n][t.axis],h(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:n?""+n.getLabelForValue(s[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,s;return l(t)?(e=t.top,i=t.right,n=t.bottom,s=t.left):e=i=n=s=t,{top:e,right:i,bottom:n,left:s,disabled:!1===t}}(u(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=Ai(t,i),s=Ai(e,i);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],s=e.chartArea,o=[],r=this._drawStart||0,a=this._drawCount||n.length-r,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,s,r,a),h=r;h<r+a;++h){const e=n[h];e.hidden||(e.active&&l?o.push(e):e.draw(t,s))}for(h=0;h<o.length;++h)o[h].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Ce(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=n.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return Ce(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=n,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,s=this._cachedDataOpts,o=t+"-"+e,r=s[o],a=this.enableOptionSharing&&C(i);if(r)return zi(r,a);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=n?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),h),d=Object.keys(ee.elements[t]),p=l.resolveNamedOptions(u,d,(()=>this.getContext(i,n)),c);return p.$shared&&(p.$shared=a,s[o]=Object.freeze(zi(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,o=`animation-${e}`,r=s[o];if(r)return r;let a;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),s);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Ci(n,a&&a.animations);return a&&a._cacheable&&(s[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ni(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:o}}updateElement(t,e,i,n){Ni(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Ni(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,o=Math.min(s,n);o&&this.parse(0,o),s>n?this._insertElements(n,s-n,t):s<n&&this._removeElements(s,n-s)}_insertElements(t,e,i=!0){const n=this._cachedMeta,s=n.data,o=t+e;let r;const a=t=>{for(t.length+=e,r=t.length-1;r>=o;r--)t[r]=t[r-e]};for(a(s),r=t;r<o;++r)s[r]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&Ii(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function ji(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,s=i.length;e<s;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=nt(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,s,o,r,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(C(r)&&(a=Math.min(a,Math.abs(o-r)||a)),r=o)};for(n=0,s=i.length;n<s;++n)o=e.getPixelForValue(i[n]),l();for(r=void 0,n=0,s=e.ticks.length;n<s;++n)o=e.getPixelForTick(n),l();return a}function Bi(t,e,i,n){return a(t)?function(t,e,i,n){const s=i.parse(t[0],n),o=i.parse(t[1],n),r=Math.min(s,o),a=Math.max(s,o);let l=r,h=a;Math.abs(r)>Math.abs(a)&&(l=a,h=r),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:s,end:o,min:r,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function $i(t,e,i,n){const s=t.iScale,o=t.vScale,r=s.getLabels(),a=s===o,l=[];let h,c,u,d;for(h=i,c=i+n;h<c;++h)d=e[h],u={},u[s.axis]=a||s.parse(r[h],h),l.push(Bi(d,u,o,h));return l}function Fi(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Hi(t,e,i,n){let s=e.borderSkipped;const o={};if(!s)return void(t.borderSkipped=o);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:l,top:h,bottom:c}=function(t){let e,i,n,s,o;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(s="end",o="start"):(s="start",o="end"),{start:i,end:n,reverse:e,top:s,bottom:o}}(t);"middle"===s&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?s=h:(i._bottom||0)===n?s=c:(o[Vi(c,r,a,l)]=!0,s=h)),o[Vi(s,r,a,l)]=!0,t.borderSkipped=o}function Vi(t,e,i,n){var s,o,r;return n?(r=i,t=Wi(t=(s=t)===(o=e)?r:s===r?o:s,i,e)):t=Wi(t,e,i),t}function Wi(t,e,i){return"start"===t?e:"end"===t?i:t}function qi(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}Ri.defaults={},Ri.prototype.datasetElementType=null,Ri.prototype.dataElementType=null;class Zi extends Ri{parsePrimitiveData(t,e,i,n){return $i(t,e,i,n)}parseArrayData(t,e,i,n){return $i(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:s,vScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l="x"===s.axis?r:a,h="x"===o.axis?r:a,c=[];let u,d,p,f;for(u=i,d=i+n;u<d;++u)f=e[u],p={},p[s.axis]=s.parse(k(f,l),u),c.push(Bi(k(f,h),p,o,u));return c}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const s=i._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,s=this.getParsed(t),o=s._custom,r=Fi(o)?"["+o.start+", "+o.end+"]":""+n.getLabelForValue(s[n.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const s="reset"===n,{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),h=a.isHorizontal(),c=this._getRuler(),{sharedOptions:u,includeOptions:d}=this._getSharedOptions(e,n);for(let p=e;p<e+i;p++){const e=this.getParsed(p),i=s||r(e[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),f=this._calculateBarIndexPixels(p,c),m=(e._stacks||{})[a.axis],g={horizontal:h,base:i.base,enableBorderRadius:!m||Fi(e._custom)||o===m._top||o===m._bottom,x:h?i.head:f.center,y:h?f.center:i.head,height:h?f.size:Math.abs(i.size),width:h?Math.abs(i.size):f.size};d&&(g.options=u||this.resolveDataElementOptions(p,t[p].active?"active":n));const _=g.options||t[p].options;Hi(g,_,m,o),qi(g,_,c.ratio),this.updateElement(t[p],p,g,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),s=i.options.stacked,o=[],a=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(r(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!a(i))&&((!1===s||-1===o.indexOf(i.stack)||void 0===s&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,o;for(s=0,o=e.data.length;s<o;++s)n.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const r=t.barThickness;return{min:r||ji(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i},options:{base:n,minBarLength:s}}=this,o=n||0,a=this.getParsed(t),l=a._custom,h=Fi(l);let c,u,d=a[e.axis],p=0,f=i?this.applyStack(e,a,i):d;f!==d&&(p=f-d,f=d),h&&(d=l.barStart,f=l.barEnd-l.barStart,0!==d&&R(d)!==R(l.barEnd)&&(p=0),p+=d);const m=r(n)||h?p:n;let g=e.getPixelForValue(m);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(p+f):g,u=c-g,Math.abs(u)<s){u=function(t,e,i){return 0!==t?R(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(u,e,o)*s,d===o&&(g-=u/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),n=Math.min(t,i),r=Math.max(t,i);g=Math.max(Math.min(g,r),n),c=g+u}if(g===e.getPixelForValue(o)){const t=R(u)*e.getLineWidthForValue(o)/2;g+=t,u-=t}return{size:u,base:g,head:c,center:c+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,o=u(n.maxBarThickness,1/0);let a,l;if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,h="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,o=s[t];let r=t>0?s[t-1]:null,a=t<s.length-1?s[t+1]:null;const l=i.categoryPercentage;null===r&&(r=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-r);const h=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:i.barPercentage,start:h}}(t,e,n,i):function(t,e,i,n){const s=i.barThickness;let o,a;return r(s)?(o=e.min*i.categoryPercentage,a=i.barPercentage):(o=s*n,a=1),{chunk:o/n,ratio:a,start:e.pixels[t]-o/2}}(t,e,n,i),c=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0);a=h.start+h.chunk*c+h.chunk/2,l=Math.min(o,h.chunk*h.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(o,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let s=0;for(;s<n;++s)null!==this.getParsed(s)[e.axis]&&i[s].draw(this._ctx)}}Zi.id="bar",Zi.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Zi.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Ui extends Ri{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const s=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+i).radius;return s}parseArrayData(t,e,i,n){const s=super.parseArrayData(t,e,i,n);for(let t=0;t<s.length;t++){const n=e[i+t];s[t]._custom=u(n[2],this.resolveDataElementOptions(t+i).radius)}return s}parseObjectData(t,e,i,n){const s=super.parseObjectData(t,e,i,n);for(let t=0;t<s.length;t++){const n=e[i+t];s[t]._custom=u(n&&n.r&&+n.r,this.resolveDataElementOptions(t+i).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),r=n.getLabelForValue(s.y),a=s._custom;return{label:e.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),h=o.axis,c=r.axis;for(let u=e;u<e+i;u++){const e=t[u],i=!s&&this.getParsed(u),d={},p=d[h]=s?o.getPixelForDecimal(.5):o.getPixelForValue(i[h]),f=d[c]=s?r.getBasePixel():r.getPixelForValue(i[c]);d.skip=isNaN(p)||isNaN(f),l&&(d.options=a||this.resolveDataElementOptions(u,e.active?"active":n),s&&(d.options.radius=0)),this.updateElement(e,u,d,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const s=n.radius;return"active"!==e&&(n.radius=0),n.radius+=u(i&&i._custom,s),n}}Ui.id="bubble",Ui.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Ui.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class Yi extends Ri{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let s,o,r=t=>+i[t];if(l(i[t])){const{key:t="value"}=this._parsing;r=e=>+k(i[e],t)}for(s=t,o=t+e;s<o;++s)n._parsed[s]=r(s)}}_getRotation(){return H(this.options.rotation-90)}_getCircumference(){return H(this.options.circumference)}_getRotationExtents(){let t=L,e=-L;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const n=this.chart.getDatasetMeta(i).controller,s=n._getRotation(),o=n._getCircumference();t=Math.min(t,s),e=Math.max(e,s+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,s=n.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-o)/2,0),a=Math.min((l=this.options.cutout,h=r,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:l/h),1);var l,h;const c=this._getRingWeight(this.index),{circumference:u,rotation:p}=this._getRotationExtents(),{ratioX:f,ratioY:m,offsetX:g,offsetY:_}=function(t,e,i){let n=1,s=1,o=0,r=0;if(e<L){const a=t,l=a+e,h=Math.cos(a),c=Math.sin(a),u=Math.cos(l),d=Math.sin(l),p=(t,e,n)=>K(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>K(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),m=p(0,h,u),g=p(D,c,d),_=f(M,h,u),v=f(M+D,c,d);n=(m-_)/2,s=(g-v)/2,o=-(m+_)/2,r=-(g+v)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}(p,u,a),v=(i.width-o)/f,y=(i.height-o)/m,b=Math.max(Math.min(v,y)/2,0),x=d(this.options.radius,b),w=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=_*x,n.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*s/L)}updateElements(t,e,i,n){const s="reset"===n,o=this.chart,r=o.chartArea,a=o.options.animation,l=(r.left+r.right)/2,h=(r.top+r.bottom)/2,c=s&&a.animateScale,u=c?0:this.innerRadius,d=c?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(e,n);let m,g=this._getRotation();for(m=0;m<e;++m)g+=this._circumference(m,s);for(m=e;m<e+i;++m){const e=this._circumference(m,s),i=t[m],o={x:l+this.offsetX,y:h+this.offsetY,startAngle:g,endAngle:g+e,circumference:e,outerRadius:d,innerRadius:u};f&&(o.options=p||this.resolveDataElementOptions(m,i.active?"active":n)),g+=e,this.updateElement(i,m,o,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const s=t._parsed[i];null===s||isNaN(s)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(s))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?L*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=hi(e._parsed[t],i.options.locale);return{label:n[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,o,r,a;if(!t)for(n=0,s=i.data.datasets.length;n<s;++n)if(i.isDatasetVisible(n)){o=i.getDatasetMeta(n),t=o.data,r=o.controller;break}if(!t)return 0;for(n=0,s=t.length;n<s;++n)a=r.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(u(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Yi.id="doughnut",Yi.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},Yi.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},Yi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const s=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return a(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Ki extends Ri{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,o=this.chart._animationsDisabled;let{start:r,count:a}=lt(e,n,o);this._drawStart=r,this._drawCount=a,ht(e)&&(r=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,r,a,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:a,_stacked:l,_dataset:h}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,n),d=o.axis,p=a.axis,{spanGaps:f,segment:m}=this.options,g=B(f)?f:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||s||"none"===n;let v=e>0&&this.getParsed(e-1);for(let f=e;f<e+i;++f){const e=t[f],i=this.getParsed(f),y=_?e:{},b=r(i[p]),x=y[d]=o.getPixelForValue(i[d],f),w=y[p]=s||b?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,i,l):i[p],f);y.skip=isNaN(x)||isNaN(w)||b,y.stop=f>0&&Math.abs(i[d]-v[d])>g,m&&(y.parsed=i,y.raw=h.data[f]),u&&(y.options=c||this.resolveDataElementOptions(f,e.active?"active":n)),_||this.updateElement(e,f,y,n),v=i}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Ki.id="line",Ki.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Ki.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Gi extends Ri{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=hi(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:s}}parseObjectData(t,e,i,n){return Be.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(n/2,0),o=(s-Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const s="reset"===n,o=this.chart,r=o.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,h=a.yCenter,c=a.getIndexAngle(0)-.5*M;let u,d=c;const p=360/this.countVisibleElements();for(u=0;u<e;++u)d+=this._computeAngle(u,n,p);for(u=e;u<e+i;u++){const e=t[u];let i=d,f=d+this._computeAngle(u,n,p),m=o.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=f,s&&(r.animateScale&&(m=0),r.animateRotate&&(i=f=c));const g={x:l,y:h,innerRadius:0,outerRadius:m,startAngle:i,endAngle:f,options:this.resolveDataElementOptions(u,e.active?"active":n)};this.updateElement(e,u,g,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?H(this.resolveDataElementOptions(t,e).angle||i):0}}Gi.id="polarArea",Gi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Gi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const s=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Xi extends Yi{}Xi.id="pie",Xi.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Qi extends Ri{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return Be.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],s=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:s.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const s=this._cachedMeta.rScale,o="reset"===n;for(let r=e;r<e+i;r++){const e=t[r],i=this.resolveDataElementOptions(r,e.active?"active":n),a=s.getPointPositionForValue(r,this.getParsed(r).r),l=o?s.xCenter:a.x,h=o?s.yCenter:a.y,c={x:l,y:h,angle:a.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,r,c,n)}}}Qi.id="radar",Qi.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Qi.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class Ji{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return B(this.x)&&B(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Ji.defaults={},Ji.defaultRoutes=void 0;const tn={values:t=>a(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const r=z(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),hi(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(z(t)));return 1===n||2===n||5===n?tn.numeric.call(this,t,e,i):""}};var en={formatters:tn};function nn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),s=t._maxLength/i;return Math.floor(Math.min(n,s))}(t),s=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],o=s.length,a=s[0],l=s[o-1],h=[];if(o>n)return function(t,e,i,n){let s,o=0,r=i[0];for(n=Math.ceil(n),s=0;s<t.length;s++)s===r&&(e.push(t[s]),o++,r=i[o*n])}(e,h,s,o/n),h;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),s=e.length/i;if(!n)return Math.max(s,1);const o=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(n);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>s)return e}return Math.max(s,1)}(s,e,n);if(o>0){let t,i;const n=o>1?Math.round((l-a)/(o-1)):null;for(sn(e,h,c,r(n)?0:a-n,a),t=0,i=o-1;t<i;t++)sn(e,h,c,s[t],s[t+1]);return sn(e,h,c,l,r(n)?e.length:l+n),h}return sn(e,h,c),h}function sn(t,e,i,n,s){const o=u(n,0),r=Math.min(u(s,t.length),t.length);let a,l,h,c=0;for(i=Math.ceil(i),s&&(a=s-n,i=a/Math.floor(a/i)),h=o;h<0;)c++,h=Math.round(o+c*i);for(l=Math.max(o,0);l<r;l++)l===h&&(e.push(t[l]),c++,h=Math.round(o+c*i))}ee.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:en.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ee.route("scale.ticks","color","","color"),ee.route("scale.grid","color","","borderColor"),ee.route("scale.grid","borderColor","","borderColor"),ee.route("scale.title","color","","color"),ee.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),ee.describe("scales",{_fallback:"scale"}),ee.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const on=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function rn(t,e){const i=[],n=t.length/e,s=t.length;let o=0;for(;o<s;o+=n)i.push(t[Math.floor(o)]);return i}function an(t,e,i){const n=t.ticks.length,s=Math.min(e,n-1),o=t._startPixel,r=t._endPixel,a=1e-6;let l,h=t.getPixelForTick(s);if(!(i&&(l=1===n?Math.max(h-o,r-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(s-1))/2,h+=s<e?l:-l,h<o-a||h>r+a)))return h}function ln(t){return t.drawTicks?t.tickLength:0}function hn(t,e){if(!t.display)return 0;const i=ke(t.font,e),n=we(t.padding);return(a(t.text)?t.text.length:1)*i.lineHeight+n.height}function cn(t,e,i){let n=rt(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class un extends Ji{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=c(t,Number.POSITIVE_INFINITY),e=c(e,Number.NEGATIVE_INFINITY),i=c(i,Number.POSITIVE_INFINITY),n=c(n,Number.NEGATIVE_INFINITY),{min:c(t,i),max:c(e,n),minDefined:h(t),maxDefined:h(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a)e=r[a].controller.getMinMax(this,t),s||(i=Math.min(i,e.min)),o||(n=Math.max(n,e.max));return i=o&&i>n?n:i,n=s&&i>n?i:n,{min:c(i,c(n,i)),max:c(n,c(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){p(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,o=d(e,(s-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(o)),max:r(s,o)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?rn(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=nn(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){p(this.options.afterUpdate,[this])}beforeSetDimensions(){p(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){p(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),p(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){p(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,s;for(i=0,n=t.length;i<n;i++)s=t[i],s.label=p(e.callback,[s.value,i,t],this)}afterTickToLabelConversion(){p(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){p(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,n=e.minRotation||0,s=e.maxRotation;let o,r,a,l=n;if(!this._isVisible()||!e.display||n>=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,d=G(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),c+6>o&&(o=d/(i-(t.offset?.5:1)),r=this.maxHeight-ln(t.grid)-e.padding-hn(t.title,this.chart.options.font),a=Math.sqrt(c*c+u*u),l=V(Math.min(Math.asin(G((h.highest.height+6)/o,-1,1)),Math.asin(G(r/a,-1,1))-Math.asin(G(u/a,-1,1)))),l=Math.max(n,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){p(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){p(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const o=hn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=ln(s)+o):(t.height=this.maxHeight,t.width=ln(s)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:o}=this._getLabelSizes(),a=2*i.padding,l=H(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(r){const e=i.mirror?0:c*s.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:h*s.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:o},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,u=0;a?l?(c=n*t.width,u=i*e.height):(c=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?c=t.width:"inner"!==s&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-r+o)*this.width/(this.width-r),0),this.paddingRight=Math.max((u-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){p(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)r(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=rn(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,s=[],o=[];let l,h,c,u,d,p,m,g,_,v,y,b=0,x=0;for(l=0;l<e;++l){if(u=t[l].label,d=this._resolveTickFontOptions(l),i.font=p=d.string,m=n[p]=n[p]||{data:{},gc:[]},g=d.lineHeight,_=v=0,r(u)||a(u)){if(a(u))for(h=0,c=u.length;h<c;++h)y=u[h],r(y)||a(y)||(_=ie(i,m.data,m.gc,_,y),v+=g)}else _=ie(i,m.data,m.gc,_,u),v=g;s.push(_),o.push(v),b=Math.max(_,b),x=Math.max(v,x)}!function(t,e){f(t,(t=>{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s<n;++s)delete t.data[i[s]];i.splice(0,n)}}))}(n,e);const w=s.indexOf(b),k=o.indexOf(x),T=t=>({width:s[t]||0,height:o[t]||0});return{first:T(0),last:T(e-1),widest:T(w),highest:T(k),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return G(this._alignToPixels?se(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Ce(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Ce(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=H(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,r=s?s.widest.width+o:0,a=s?s.highest.height+o:0;return this.isHorizontal()?a*i>r*n?r/i:a/n:a*n<r*i?a/i:r/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:o}=n,r=s.offset,a=this.isHorizontal(),h=this.ticks.length+(r?1:0),c=ln(s),d=[],p=s.setContext(this.getContext()),f=p.drawBorder?p.borderWidth:0,m=f/2,g=function(t){return se(i,t,f)};let _,v,y,b,x,w,k,T,C,A,E,M;if("top"===o)_=g(this.bottom),w=this.bottom-c,T=_-m,A=g(t.top)+m,M=t.bottom;else if("bottom"===o)_=g(this.top),A=t.top,M=g(t.bottom)-m,w=_+m,T=this.top+c;else if("left"===o)_=g(this.right),x=this.right-c,k=_-m,C=g(t.left)+m,E=t.right;else if("right"===o)_=g(this.left),C=t.left,E=g(t.right)-m,x=_+m,k=this.left+c;else if("x"===e){if("center"===o)_=g((t.top+t.bottom)/2+.5);else if(l(o)){const t=Object.keys(o)[0],e=o[t];_=g(this.chart.scales[t].getPixelForValue(e))}A=t.top,M=t.bottom,w=_+m,T=w+c}else if("y"===e){if("center"===o)_=g((t.left+t.right)/2);else if(l(o)){const t=Object.keys(o)[0],e=o[t];_=g(this.chart.scales[t].getPixelForValue(e))}x=_-m,k=x-c,C=t.left,E=t.right}const L=u(n.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/L));for(v=0;v<h;v+=P){const t=s.setContext(this.getContext(v)),e=t.lineWidth,n=t.color,o=t.borderDash||[],l=t.borderDashOffset,h=t.tickWidth,c=t.tickColor,u=t.tickBorderDash||[],p=t.tickBorderDashOffset;y=an(this,v,r),void 0!==y&&(b=se(i,y,e),a?x=k=C=E=b:w=T=A=M=b,d.push({tx1:x,ty1:w,tx2:k,ty2:T,x1:C,y1:A,x2:E,y2:M,width:e,color:n,borderDash:o,borderDashOffset:l,tickWidth:h,tickColor:c,tickBorderDash:u,tickBorderDashOffset:p}))}return this._ticksLength=h,this._borderValue=_,d}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:s}=i,o=this.isHorizontal(),r=this.ticks,{align:h,crossAlign:c,padding:u,mirror:d}=s,p=ln(i.grid),f=p+u,m=d?-u:f,g=-H(this.labelRotation),_=[];let v,y,b,x,w,k,T,C,A,E,M,L,P="middle";if("top"===n)k=this.bottom-m,T=this._getXAxisLabelAlignment();else if("bottom"===n)k=this.top+m,T=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(p);T=t.textAlign,w=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(p);T=t.textAlign,w=t.x}else if("x"===e){if("center"===n)k=(t.top+t.bottom)/2+f;else if(l(n)){const t=Object.keys(n)[0],e=n[t];k=this.chart.scales[t].getPixelForValue(e)+f}T=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)w=(t.left+t.right)/2-f;else if(l(n)){const t=Object.keys(n)[0],e=n[t];w=this.chart.scales[t].getPixelForValue(e)}T=this._getYAxisLabelAlignment(p).textAlign}"y"===e&&("start"===h?P="top":"end"===h&&(P="bottom"));const S=this._getLabelSizes();for(v=0,y=r.length;v<y;++v){b=r[v],x=b.label;const t=s.setContext(this.getContext(v));C=this.getPixelForTick(v)+s.labelOffset,A=this._resolveTickFontOptions(v),E=A.lineHeight,M=a(x)?x.length:1;const e=M/2,i=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let u,p=T;if(o?(w=C,"inner"===T&&(p=v===y-1?this.options.reverse?"left":"right":0===v?this.options.reverse?"right":"left":"center"),L="top"===n?"near"===c||0!==g?-M*E+E/2:"center"===c?-S.highest.height/2-e*E+E:-S.highest.height+E/2:"near"===c||0!==g?E/2:"center"===c?S.highest.height/2-e*E:S.highest.height-M*E,d&&(L*=-1)):(k=C,L=(1-M)*E/2),t.showLabelBackdrop){const e=we(t.backdropPadding),i=S.heights[v],n=S.widths[v];let s=k+L-e.top,o=w-e.left;switch(P){case"middle":s-=i/2;break;case"bottom":s-=i}switch(T){case"center":o-=n/2;break;case"right":o-=n}u={left:o,top:s,width:n+e.width,height:i+e.height,color:t.backdropColor}}_.push({rotation:g,label:x,font:A,color:i,strokeColor:l,strokeWidth:h,textOffset:L,textAlign:p,textBaseline:P,translation:[w,k],backdrop:u})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-H(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:s}}=this.options,o=t+s,r=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+s,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l+=r)):(l=this.right-o,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+s,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l-=r)):(l=this.left+o,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:s,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,s,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,o=n.length;s<o;++s){const t=n[s];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,n=i.setContext(this.getContext()),s=i.drawBorder?n.borderWidth:0;if(!s)return;const o=i.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let a,l,h,c;this.isHorizontal()?(a=se(t,this.left,s)-s/2,l=se(t,this.right,o)+o/2,h=c=r):(h=se(t,this.top,s)-s/2,c=se(t,this.bottom,o)+o/2,a=l=r),e.save(),e.lineWidth=n.borderWidth,e.strokeStyle=n.borderColor,e.beginPath(),e.moveTo(a,h),e.lineTo(l,c),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&he(e,i);const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));let s,o;for(s=0,o=n.length;s<o;++s){const t=n[s],i=t.font,o=t.label;t.backdrop&&(e.fillStyle=t.backdrop.color,e.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),pe(e,o,0,t.textOffset,i,t)}i&&ce(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=ke(i.font),o=we(i.padding),r=i.align;let h=s.lineHeight/2;"bottom"===e||"center"===e||l(e)?(h+=o.bottom,a(i.text)&&(h+=s.lineHeight*(i.text.length-1))):h+=o.top;const{titleX:c,titleY:u,maxWidth:d,rotation:p}=function(t,e,i,n){const{top:s,left:o,bottom:r,right:a,chart:h}=t,{chartArea:c,scales:u}=h;let d,p,f,m=0;const g=r-s,_=a-o;if(t.isHorizontal()){if(p=at(n,o,a),l(i)){const t=Object.keys(i)[0],n=i[t];f=u[t].getPixelForValue(n)+g-e}else f="center"===i?(c.bottom+c.top)/2+g-e:on(t,i,e);d=a-o}else{if(l(i)){const t=Object.keys(i)[0],n=i[t];p=u[t].getPixelForValue(n)-_+e}else p="center"===i?(c.left+c.right)/2-_+e:on(t,i,e);f=at(n,r,s),m="left"===i?-D:D}return{titleX:p,titleY:f,maxWidth:d,rotation:m}}(this,h,e,r);pe(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:p,textAlign:cn(r,e,n),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=u(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===un.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,o;for(s=0,o=e.length;s<o;++s){const o=e[s];o[i]!==this.id||t&&o.type!==t||n.push(o)}return n}_resolveTickFontOptions(t){return ke(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class dn{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in n||(n[s]=t,function(t,e,i){const n=y(Object.create(null),[i?ee.get(i):{},ee.get(e),t.defaults]);ee.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),s=n.pop(),o=[t].concat(n).join("."),r=e[i].split("."),a=r.pop(),l=r.join(".");ee.route(o,s,l,a)}))}(e,t.defaultRoutes);t.descriptors&&ee.describe(e,t.descriptors)}(t,o,i),this.override&&ee.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in ee[n]&&(delete ee[n][i],this.override&&delete Xt[i])}}var pn=new class{constructor(){this.controllers=new dn(Ri,"datasets",!0),this.elements=new dn(Ji,"elements"),this.plugins=new dn(Object,"plugins"),this.scales=new dn(un,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):f(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=T(t);p(i["before"+n],[],i),e[t](i),p(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class fn extends Ri{update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:s,count:o}=lt(e,i,n);if(this._drawStart=s,this._drawCount=o,ht(e)&&(s=0,o=i.length),this.options.showLine){const{dataset:s,_dataset:o}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=i;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:r},t)}this.updateElements(i,s,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=pn.getElement("line")),super.addElements()}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:a,_stacked:l,_dataset:h}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),u=this.getSharedOptions(c),d=this.includeOptions(n,u),p=o.axis,f=a.axis,{spanGaps:m,segment:g}=this.options,_=B(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=this.getParsed(c),m=v?e:{},b=r(i[f]),x=m[p]=o.getPixelForValue(i[p],c),w=m[f]=s||b?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,i,l):i[f],c);m.skip=isNaN(x)||isNaN(w)||b,m.stop=c>0&&Math.abs(i[p]-y[p])>_,g&&(m.parsed=i,m.raw=h.data[c]),d&&(m.options=u||this.resolveDataElementOptions(c,e.active?"active":n)),v||this.updateElement(e,c,m,n),y=i}this.updateSharedOptions(u,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const s=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,s,o)/2}}fn.id="scatter",fn.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},fn.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var mn=Object.freeze({__proto__:null,BarController:Zi,BubbleController:Ui,DoughnutController:Yi,LineController:Ki,PolarAreaController:Gi,PieController:Xi,RadarController:Qi,ScatterController:fn});function gn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class _n{constructor(t){this.options=t||{}}init(t){}formats(){return gn()}parse(t,e){return gn()}format(t,e){return gn()}add(t,e,i){return gn()}diff(t,e,i){return gn()}startOf(t,e,i){return gn()}endOf(t,e){return gn()}}_n.override=function(t){Object.assign(_n.prototype,t)};var vn={_date:_n};function yn(t,e,i,n){const{controller:s,data:o,_sorted:r}=t,a=s._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&r&&o.length){const t=a._reversePixels?tt:J;if(!n)return t(o,e,i);if(s._sharedOptions){const n=o[0],s="function"==typeof n.getRange&&n.getRange(e);if(s){const n=t(o,e,i-s),r=t(o,e,i+s);return{lo:n.lo,hi:r.hi}}}}return{lo:0,hi:o.length-1}}function bn(t,e,i,n,s){const o=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=o.length;t<i;++t){const{index:i,data:a}=o[t],{lo:l,hi:h}=yn(o[t],e,r,s);for(let t=l;t<=h;++t){const e=a[t];e.skip||n(e,i,t)}}}function xn(t,e,i,n,s){const o=[];if(!s&&!t.isPointInArea(e))return o;return bn(t,i,e,(function(i,r,a){(s||le(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&o.push({element:i,datasetIndex:r,index:a})}),!0),o}function wn(t,e,i,n,s,o){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const s=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}(i);let l=Number.POSITIVE_INFINITY;return bn(t,i,e,(function(i,h,c){const u=i.inRange(e.x,e.y,s);if(n&&!u)return;const d=i.getCenterPoint(s);if(!(!!o||t.isPointInArea(d))&&!u)return;const p=a(e,d);p<l?(r=[{element:i,datasetIndex:h,index:c}],l=p):p===l&&r.push({element:i,datasetIndex:h,index:c})})),r}function kn(t,e,i,n,s,o){return o||t.isPointInArea(e)?"r"!==i||n?wn(t,e,i,n,s,o):function(t,e,i,n){let s=[];return bn(t,i,e,(function(t,i,o){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],n),{angle:l}=q(t,{x:e.x,y:e.y});K(l,r,a)&&s.push({element:t,datasetIndex:i,index:o})})),s}(t,e,i,s):[]}function Tn(t,e,i,n,s){const o=[],r="x"===i?"inXRange":"inYRange";let a=!1;return bn(t,i,e,((t,n,l)=>{t[r](e[i],s)&&(o.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,s))})),n&&!a?[]:o}var Cn={evaluateInteractionItems:bn,modes:{index(t,e,i,n){const s=Je(e,t),o=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?xn(t,s,o,n,r):kn(t,s,o,!1,n,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,n){const s=Je(e,t),o=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?xn(t,s,o,n,r):kn(t,s,o,!1,n,r);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>xn(t,Je(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const s=Je(e,t),o=i.axis||"xy",r=i.includeInvisible||!1;return kn(t,s,o,i.intersect,n,r)},x:(t,e,i,n)=>Tn(t,Je(e,t),"x",i.intersect,n),y:(t,e,i,n)=>Tn(t,Je(e,t),"y",i.intersect,n)}};const An=["left","top","right","bottom"];function En(t,e){return t.filter((t=>t.pos===e))}function Mn(t,e){return t.filter((t=>-1===An.indexOf(t.pos)&&t.box.axis===e))}function Ln(t,e){return t.sort(((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight}))}function Pn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!An.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:r}=a.box,l=i[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*n:r&&e.availableWidth,a.height=s):(a.width=n,a.height=h?h*s:r&&e.availableHeight)}return i}function Sn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function On(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Dn(t,e,i,n){const{pos:s,box:o}=i,r=t.maxPadding;if(!l(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[s]+=i.size}o.getPadding&&On(r,o.getPadding());const a=Math.max(0,e.outerWidth-Sn(r,t,"left","right")),h=Math.max(0,e.outerHeight-Sn(r,t,"top","bottom")),c=a!==t.w,u=h!==t.h;return t.w=a,t.h=h,i.horizontal?{same:c,other:u}:{same:u,other:c}}function In(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Nn(t,e,i,n){const s=[];let o,r,a,l,h,c;for(o=0,r=t.length,h=0;o<r;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,In(a.horizontal,e));const{same:r,other:u}=Dn(e,i,a,n);h|=r&&s.length,c=c||u,l.fullSize||s.push(a)}return h&&Nn(s,e,i,n)||c}function zn(t,e,i,n,s){t.top=i,t.left=e,t.right=e+n,t.bottom=i+s,t.width=n,t.height=s}function Rn(t,e,i,n){const s=i.padding;let{x:o,y:r}=e;for(const a of t){const t=a.box,l=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/l.weight||1;if(a.horizontal){const n=e.w*h,o=l.size||t.height;C(l.start)&&(r=l.start),t.fullSize?zn(t,s.left,r,i.outerWidth-s.right-s.left,o):zn(t,e.left+l.placed,r,n,o),l.start=r,l.placed+=n,r=t.bottom}else{const n=e.h*h,r=l.size||t.width;C(l.start)&&(o=l.start),t.fullSize?zn(t,o,s.top,r,i.outerHeight-s.bottom-s.top):zn(t,o,e.top+l.placed,r,n),l.start=o,l.placed+=n,o=t.right}}e.x=o,e.y=r}ee.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var jn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const s=we(t.options.layout.padding),o=Math.max(e-s.width,0),r=Math.max(i-s.height,0),a=function(t){const e=function(t){const e=[];let i,n,s,o,r,a;for(i=0,n=(t||[]).length;i<n;++i)s=t[i],({position:o,options:{stack:r,stackWeight:a=1}}=s),e.push({index:i,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return e}(t),i=Ln(e.filter((t=>t.box.fullSize)),!0),n=Ln(En(e,"left"),!0),s=Ln(En(e,"right")),o=Ln(En(e,"top"),!0),r=Ln(En(e,"bottom")),a=Mn(e,"x"),l=Mn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:En(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}(t.boxes),l=a.vertical,h=a.horizontal;f(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/c,hBoxMaxHeight:r/2}),d=Object.assign({},s);On(d,we(n));const p=Object.assign({maxPadding:d,w:o,h:r,x:s.left,y:s.top},s),m=Pn(l.concat(h),u);Nn(a.fullSize,p,u,m),Nn(l,p,u,m),Nn(h,p,u,m)&&Nn(l,p,u,m),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),Rn(a.leftAndTop,p,u,m),p.x+=p.w,p.y+=p.h,Rn(a.rightAndBottom,p,u,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},f(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class Bn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class $n extends Bn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Fn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Hn=t=>null===t||""===t;const Vn=!!ni&&{passive:!0};function Wn(t,e,i){t.canvas.removeEventListener(e,i,Vn)}function qn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Zn(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||qn(i.addedNodes,n),e=e&&!qn(i.removedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}function Un(t,e,i){const n=t.canvas,s=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||qn(i.removedNodes,n),e=e&&!qn(i.addedNodes,n);e&&i()}));return s.observe(document,{childList:!0,subtree:!0}),s}const Yn=new Map;let Kn=0;function Gn(){const t=window.devicePixelRatio;t!==Kn&&(Kn=t,Yn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Xn(t,e,i){const n=t.canvas,s=n&&Ye(n);if(!s)return;const o=ot(((t,e)=>{const n=s.clientWidth;i(t,e),n<s.clientWidth&&i()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return r.observe(s),function(t,e){Yn.size||window.addEventListener("resize",Gn),Yn.set(t,e)}(t,o),r}function Qn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Yn.delete(t),Yn.size||window.removeEventListener("resize",Gn)}(t)}function Jn(t,e,i){const n=t.canvas,s=ot((e=>{null!==t.ctx&&i(function(t,e){const i=Fn[t.type]||t.type,{x:n,y:s}=Je(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Vn)}(n,e,s),s}class ts extends Bn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Hn(s)){const e=si(t,"width");void 0!==e&&(t.width=e)}if(Hn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=si(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];r(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:Zn,detach:Un,resize:Xn}[e]||Jn;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Qn,detach:Qn,resize:Qn}[e]||Wn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ei(t,e,i,n)}isAttached(t){const e=Ye(t);return!(!e||!e.isConnected)}}class es{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,n){n=n||{};for(const s of t){const t=s.plugin;if(!1===p(t[i],[e,n,s.options],t)&&n.cancelable)return!1}return!0}invalidate(){r(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=u(i.options&&i.options.plugins,{}),s=function(t){const e={},i=[],n=Object.keys(pn.plugins.items);for(let t=0;t<n.length;t++)i.push(pn.getPlugin(n[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const n=s[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,s){const o=[],r=t.getContext();for(const a of e){const e=a.id,l=is(n[e],s);null!==l&&o.push({plugin:a,options:ns(t.config,{plugin:a,local:i[e]},l,r)})}return o}(t,s,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function is(t,e){return e||!1!==t?!0===t?{}:t:null}function ns(t,{plugin:e,local:i},n,s){const o=t.pluginScopeKeys(e),r=t.getOptionScopes(n,o);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ss(t,e){const i=ee.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function os(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function rs(t){const e=t.options||(t.options={});e.plugins=u(e.plugins,{}),e.scales=function(t,e){const i=Xt[t.type]||{scales:{}},n=e.scales||{},s=ss(t.type,e),o=Object.create(null),r=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!l(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=os(t,e),h=function(t,e){return t===e?"_index_":"_value_"}(a,s),c=i.scales||{};o[a]=o[a]||t,r[t]=b(Object.create(null),[{axis:a},e,c[a],c[h]])})),t.data.datasets.forEach((i=>{const s=i.type||t.type,a=i.indexAxis||ss(s,e),l=(Xt[s]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),s=i[e+"AxisID"]||o[e]||e;r[s]=r[s]||Object.create(null),b(r[s],[{axis:e},n[s],l[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];b(e,[ee.scales[e.type],ee.scale])})),r}(t,e)}function as(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const ls=new Map,hs=new Set;function cs(t,e){let i=ls.get(t);return i||(i=e(),ls.set(t,i),hs.add(i)),i}const us=(t,e,i)=>{const n=k(e,i);void 0!==n&&t.add(n)};class ds{constructor(t){this._config=function(t){return(t=t||{}).data=as(t.data),rs(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=as(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),rs(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return cs(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return cs(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return cs(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return cs(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,o=this._cachedScopes(t,i),r=o.get(e);if(r)return r;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>us(a,t,e)))),e.forEach((t=>us(a,n,t))),e.forEach((t=>us(a,Xt[s]||{},t))),e.forEach((t=>us(a,ee,t))),e.forEach((t=>us(a,Qt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),hs.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Xt[e]||{},ee.datasets[e]||{},{type:e},ee,Qt]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:o,subPrefixes:r}=ps(this._resolverCache,t,n);let l=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Me(t);for(const s of e){const e=i(s),o=n(s),r=(o||e)&&t[s];if(e&&(A(r)||fs(r))||o&&a(r))return!0}return!1}(o,e)){s.$shared=!1;l=Ee(o,i=A(i)?i():i,this.createResolver(t,i,r))}for(const t of e)s[t]=l[t];return s}createResolver(t,e,i=[""],n){const{resolver:s}=ps(this._resolverCache,t,i);return l(e)?Ee(s,e,void 0,n):s}}function ps(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let o=n.get(s);if(!o){o={resolver:Ae(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(s,o)}return o}const fs=t=>l(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||A(t[i])),!1);const ms=["top","bottom","left","right","chartArea"];function gs(t,e){return"top"===t||"bottom"===t||-1===ms.indexOf(t)&&"x"===e}function _s(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function vs(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),p(i&&i.onComplete,[t],e)}function ys(t){const e=t.chart,i=e.options.animation;p(i&&i.onProgress,[t],e)}function bs(t){return Ue()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const xs={},ws=t=>{const e=bs(t);return Object.values(xs).filter((t=>t.canvas===e)).pop()};function ks(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const o=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=o)}}}class Ts{constructor(t,e){const i=this.config=new ds(e),n=bs(t),s=ws(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ue()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?$n:ts}(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,h=l&&l.height,c=l&&l.width;this.id=o(),this.ctx=a,this.canvas=l,this.width=c,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new es,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),r.resizeDelay||0),this._dataChanges=[],xs[this.id]=this,a&&l?(bi.listen(this,"complete",vs),bi.listen(this,"progress",ys),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return r(t)?e&&s?s:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ii(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return oe(this.canvas,this.ctx),this}stop(){return bi.stop(this),this}resize(t,e){bi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,s),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ii(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),p(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){f(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];e&&(s=s.concat(Object.keys(e).map((t=>{const i=e[t],n=os(t,i),s="r"===n,o="x"===n;return{options:i,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}})))),f(s,(e=>{const s=e.options,o=s.id,r=os(o,s),a=u(s.type,e.dtype);void 0!==s.position&&gs(s.position,r)===gs(e.dposition)||(s.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(pn.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(s,t)})),f(n,((t,e)=>{t||delete i[e]})),f(i,(t=>{jn.configure(this,t,t.options),jn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(_s("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let s=this.getDatasetMeta(i);const o=n.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=n.indexAxis||ss(o,this.options),s.order=n.order||0,s.index=i,s.label=""+n.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const e=pn.getController(o),{datasetElementType:n,dataElementType:r}=ee.datasets[o];Object.assign(e.prototype,{dataElementType:pn.getElement(r),datasetElementType:n&&pn.getElement(n)}),s.controller=new e(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){f(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===s.indexOf(e);e.buildOrUpdateElements(i),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),n||f(s,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(_s("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){f(this.scales,(t=>{jn.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);E(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e){ks(t,n,"_removeElements"===i?-s:s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let t=1;t<e;t++)if(!E(n,i(t)))return;return Array.from(n).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;jn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],f(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,A(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(bi.has(this)?this.attached&&!bi.running(this)&&bi.start(this):(this.draw(),vs({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,s;for(n=0,s=e.length;n<s;++n){const s=e[n];t&&!s.visible||i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,s=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&he(e,{left:!1===i.left?0:s.left-i.left,right:!1===i.right?this.width:s.right+i.right,top:!1===i.top?0:s.top-i.top,bottom:!1===i.bottom?this.height:s.bottom+i.bottom}),t.controller.draw(),n&&ce(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return le(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=Cn.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Ce(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,n);C(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),bi.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),oe(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete xs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};f(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():o()}unbindEvents(){f(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},f(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,o,r,a;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),r=0,a=t.length;r<a;++r){o=t[r];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[n+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!m(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=s(e,t),r=i?t:s(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,o=e,r=this._getActiveElements(t,n,i,o),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,p(s.onHover,[t,r,this],this),a&&p(s.onClick,[t,r,this],this));const h=!m(r,n);return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}const Cs=()=>f(Ts.instances,(t=>t._plugins.invalidate())),As=!0;function Es(t,e,i){const{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=e;let h=s/a;t.beginPath(),t.arc(o,r,a,n-h,i+h),l>s?(h=s/l,t.arc(o,r,l,i+h,n-h,!0)):t.arc(o,r,s,i+D,n-D),t.closePath(),t.clip()}function Ms(t,e,i,n){const s=ye(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,r=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return G(t,0,Math.min(o,e))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:G(s.innerStart,0,r),innerEnd:G(s.innerEnd,0,r)}}function Ls(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Ps(t,e,i,n,s,o){const{x:r,y:a,startAngle:l,pixelMargin:h,innerRadius:c}=e,u=Math.max(e.outerRadius+n+i-h,0),d=c>0?c+n+i+h:0;let p=0;const f=s-l;if(n){const t=((c>0?c-n:0)+(u>0?u-n:0))/2;p=(f-(0!==t?f*t/(t+n):f))/2}const m=(f-Math.max(.001,f*u-i/M)/u)/2,g=l+m+p,_=s-m-p,{outerStart:v,outerEnd:y,innerStart:b,innerEnd:x}=Ms(e,d,u,_-g),w=u-v,k=u-y,T=g+v/w,C=_-y/k,A=d+b,E=d+x,L=g+b/A,P=_-x/E;if(t.beginPath(),o){if(t.arc(r,a,u,T,C),y>0){const e=Ls(k,C,r,a);t.arc(e.x,e.y,y,C,_+D)}const e=Ls(E,_,r,a);if(t.lineTo(e.x,e.y),x>0){const e=Ls(E,P,r,a);t.arc(e.x,e.y,x,_+D,P+Math.PI)}if(t.arc(r,a,d,_-x/d,g+b/d,!0),b>0){const e=Ls(A,L,r,a);t.arc(e.x,e.y,b,L+Math.PI,g-D)}const i=Ls(w,g,r,a);if(t.lineTo(i.x,i.y),v>0){const e=Ls(w,T,r,a);t.arc(e.x,e.y,v,g-D,T)}}else{t.moveTo(r,a);const e=Math.cos(T)*u+r,i=Math.sin(T)*u+a;t.lineTo(e,i);const n=Math.cos(C)*u+r,s=Math.sin(C)*u+a;t.lineTo(n,s)}t.closePath()}function Ss(t,e,i,n,s,o){const{options:r}=e,{borderWidth:a,borderJoinStyle:l}=r,h="inner"===r.borderAlign;a&&(h?(t.lineWidth=2*a,t.lineJoin=l||"round"):(t.lineWidth=a,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:s,startAngle:o,pixelMargin:r,fullCircles:a}=e,l=Math.max(e.outerRadius-r,0),h=e.innerRadius+r;let c;for(i&&Es(t,e,o+L),t.beginPath(),t.arc(n,s,h,o+L,o,!0),c=0;c<a;++c)t.stroke();for(t.beginPath(),t.arc(n,s,l,o,o+L),c=0;c<a;++c)t.stroke()}(t,e,h),h&&Es(t,e,s),Ps(t,e,i,n,s,o),t.stroke())}Object.defineProperties(Ts,{defaults:{enumerable:As,value:ee},instances:{enumerable:As,value:xs},overrides:{enumerable:As,value:Xt},registry:{enumerable:As,value:pn},version:{enumerable:As,value:"3.9.1"},getChart:{enumerable:As,value:ws},register:{enumerable:As,value:(...t)=>{pn.add(...t),Cs()}},unregister:{enumerable:As,value:(...t)=>{pn.remove(...t),Cs()}}});class Os extends Ji{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:s,distance:o}=q(n,{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,p=u(c,a-r)>=L||K(s,r,a),f=X(o,l+d,h+d);return p&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,h=(n+s)/2,c=(o+r+l+a)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,s=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>L?Math.floor(i/L):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let r=0;if(n){r=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*r,Math.sin(e)*r),this.circumference>=M&&(r=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const a=function(t,e,i,n,s){const{fullCircles:o,startAngle:r,circumference:a}=e;let l=e.endAngle;if(o){Ps(t,e,i,n,r+L,s);for(let e=0;e<o;++e)t.fill();isNaN(a)||(l=r+a%L,a%L==0&&(l+=L))}return Ps(t,e,i,n,l,s),t.fill(),l}(t,this,r,s,o);Ss(t,this,r,s,a,o),t.restore()}}function Ds(t,e,i=e){t.lineCap=u(i.borderCapStyle,e.borderCapStyle),t.setLineDash(u(i.borderDash,e.borderDash)),t.lineDashOffset=u(i.borderDashOffset,e.borderDashOffset),t.lineJoin=u(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=u(i.borderWidth,e.borderWidth),t.strokeStyle=u(i.borderColor,e.borderColor)}function Is(t,e,i){t.lineTo(i.x,i.y)}function Ns(t,e,i={}){const n=t.length,{start:s=0,end:o=n-1}=i,{start:r,end:a}=e,l=Math.max(s,r),h=Math.min(o,a),c=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:e.loop,ilen:h<l&&!c?n+h-l:h-l}}function zs(t,e,i,n){const{points:s,options:o}=e,{count:r,start:a,loop:l,ilen:h}=Ns(s,i,n),c=function(t){return t.stepped?ue:t.tension||"monotone"===t.cubicInterpolationMode?de:Is}(o);let u,d,p,{move:f=!0,reverse:m}=n||{};for(u=0;u<=h;++u)d=s[(a+(m?h-u:u))%r],d.skip||(f?(t.moveTo(d.x,d.y),f=!1):c(t,p,d,m,o.stepped),p=d);return l&&(d=s[(a+(m?h:0))%r],c(t,p,d,m,o.stepped)),!!l}function Rs(t,e,i,n){const s=e.points,{count:o,start:r,ilen:a}=Ns(s,i,n),{move:l=!0,reverse:h}=n||{};let c,u,d,p,f,m,g=0,_=0;const v=t=>(r+(h?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(g,f),t.lineTo(g,p),t.lineTo(g,m))};for(l&&(u=s[v(0)],t.moveTo(u.x,u.y)),c=0;c<=a;++c){if(u=s[v(c)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(i<p?p=i:i>f&&(f=i),g=(_*g+e)/++_):(y(),t.lineTo(e,i),d=n,_=0,p=f=i),m=i}y()}function js(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Rs:zs}Os.id="arc",Os.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Os.defaultRoutes={backgroundColor:"backgroundColor"};const Bs="function"==typeof Path2D;function $s(t,e,i,n){Bs&&!e.options.segment?function(t,e,i,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,i,n)&&s.closePath()),Ds(t,e.options),t.stroke(s)}(t,e,i,n):function(t,e,i,n){const{segments:s,options:o}=e,r=js(e);for(const a of s)Ds(t,o,a.style),t.beginPath(),r(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Fs extends Ji{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ze(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const o=!!t._loop,{start:r,end:a}=function(t,e,i,n){let s=0,o=e-1;if(i&&!n)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,i&&(o+=s);o>s&&t[o%e].skip;)o--;return o%=e,{start:s,end:o}}(i,s,o,n);return _i(t,!0===n?[{start:r,end:a,loop:o}]:function(t,e,i,n){const s=t.length,o=[];let r,a=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%s];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%s,end:(r-1)%s,loop:n}),e=a=i.stop?r:null):(a=r,l.skip&&(e=r)),l=i}return null!==a&&o.push({start:e%s,end:a%s,loop:n}),o}(i,r,a<r?a+s:a,!!t._fullLoop&&0===r&&a===s-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],s=this.points,o=gi(this,{property:e,start:n,end:n});if(!o.length)return;const r=[],a=function(t){return t.stepped?ri:t.tension||"monotone"===t.cubicInterpolationMode?ai:oi}(i);let l,h;for(l=0,h=o.length;l<h;++l){const{start:h,end:c}=o[l],u=s[h],d=s[c];if(u===d){r.push(u);continue}const p=a(u,d,Math.abs((n-u[e])/(d[e]-u[e])),i.stepped);p[e]=t[e],r.push(p)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return js(this)(t,this,e,i)}path(t,e,i){const n=this.segments,s=js(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const r of n)o&=s(t,this,r,{start:e,end:e+i-1});return!!o}draw(t,e,i,n){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),$s(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Hs(t,e,i,n){const s=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)<s.radius+s.hitRadius}Fs.id="line",Fs.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Fs.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Fs.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Vs extends Ji{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-o,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Hs(this,t,"x",e)}inYRange(t,e){return Hs(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!le(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,re(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ws(t,e){const{x:i,y:n,base:s,width:o,height:r}=t.getProps(["x","y","base","width","height"],e);let a,l,h,c,u;return t.horizontal?(u=r/2,a=Math.min(i,s),l=Math.max(i,s),h=n-u,c=n+u):(u=o/2,a=i-u,l=i+u,h=Math.min(n,s),c=Math.max(n,s)),{left:a,top:h,right:l,bottom:c}}function qs(t,e,i,n){return t?0:G(e,i,n)}function Zs(t){const e=Ws(t),i=e.right-e.left,n=e.bottom-e.top,s=function(t,e,i){const n=t.options.borderWidth,s=t.borderSkipped,o=be(n);return{t:qs(s.top,o.top,0,i),r:qs(s.right,o.right,0,e),b:qs(s.bottom,o.bottom,0,i),l:qs(s.left,o.left,0,e)}}(t,i/2,n/2),o=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=xe(s),r=Math.min(e,i),a=t.borderSkipped,h=n||l(s);return{topLeft:qs(!h||a.top||a.left,o.topLeft,0,r),topRight:qs(!h||a.top||a.right,o.topRight,0,r),bottomLeft:qs(!h||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:qs(!h||a.bottom||a.right,o.bottomRight,0,r)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:i-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Us(t,e,i,n){const s=null===e,o=null===i,r=t&&!(s&&o)&&Ws(t,n);return r&&(s||X(e,r.left,r.right))&&(o||X(i,r.top,r.bottom))}function Ys(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ks(t,e,i={}){const n=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,r=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+n,y:t.y+s,w:t.w+o,h:t.h+r,radius:t.radius}}Vs.id="point",Vs.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Vs.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Gs extends Ji{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:s,outer:o}=Zs(this),r=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?me:Ys;var a;t.save(),o.w===s.w&&o.h===s.h||(t.beginPath(),r(t,Ks(o,e,s)),t.clip(),r(t,Ks(s,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,Ks(s,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Us(this,t,e,i)}inXRange(t,e){return Us(this,t,null,e)}inYRange(t,e){return Us(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Gs.id="bar",Gs.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Gs.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Xs=Object.freeze({__proto__:null,ArcElement:Os,LineElement:Fs,PointElement:Vs,BarElement:Gs});function Qs(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Js(t){t.data.datasets.forEach((t=>{Qs(t)}))}var to={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Js(t);const n=t.width;t.data.datasets.forEach(((e,s)=>{const{_data:o,indexAxis:a}=e,l=t.getDatasetMeta(s),h=o||e.data;if("y"===Te([a,t.options.indexAxis]))return;if(!l.controller.supportsDecimation)return;const c=t.scales[l.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:u,count:d}=function(t,e){const i=e.length;let n,s=0;const{iScale:o}=t,{min:r,max:a,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(s=G(J(e,o.axis,r).lo,0,i-1)),n=h?G(J(e,o.axis,a).hi+1,s,i)-s:i-s,{start:s,count:n}}(l,h);if(d<=(i.threshold||4*n))return void Qs(e);let p;switch(r(o)&&(e._data=h,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":p=function(t,e,i,n,s){const o=s.samples||n;if(o>=i)return t.slice(e,e+i);const r=[],a=(i-2)/(o-2);let l=0;const h=e+i-1;let c,u,d,p,f,m=e;for(r[l++]=t[m],c=0;c<o-2;c++){let n,s=0,o=0;const h=Math.floor((c+1)*a)+1+e,g=Math.min(Math.floor((c+2)*a)+1,i)+e,_=g-h;for(n=h;n<g;n++)s+=t[n].x,o+=t[n].y;s/=_,o/=_;const v=Math.floor(c*a)+1+e,y=Math.min(Math.floor((c+1)*a)+1,i)+e,{x:b,y:x}=t[m];for(d=p=-1,n=v;n<y;n++)p=.5*Math.abs((b-s)*(t[n].y-x)-(b-t[n].x)*(o-x)),p>d&&(d=p,u=t[n],f=n);r[l++]=u,m=f}return r[l++]=t[h],r}(h,u,d,n,i);break;case"min-max":p=function(t,e,i,n){let s,o,a,l,h,c,u,d,p,f,m=0,g=0;const _=[],v=e+i-1,y=t[e].x,b=t[v].x-y;for(s=e;s<e+i;++s){o=t[s],a=(o.x-y)/b*n,l=o.y;const e=0|a;if(e===h)l<p?(p=l,c=s):l>f&&(f=l,u=s),m=(g*m+o.x)/++g;else{const i=s-1;if(!r(c)&&!r(u)){const e=Math.min(c,u),n=Math.max(c,u);e!==d&&e!==i&&_.push({...t[e],x:m}),n!==d&&n!==i&&_.push({...t[n],x:m})}s>0&&i!==d&&_.push(t[i]),_.push(o),h=e,g=0,p=f=l,c=u=d=s}}return _}(h,u,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=p}))},destroy(t){Js(t)}};function eo(t,e,i,n){if(n)return;let s=e[t],o=i[t];return"angle"===t&&(s=Y(s),o=Y(o)),{property:t,start:s,end:o}}function io(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function no(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function so(t,e){let i=[],n=!1;return a(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},s=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=io(t,e,s);const r=s[t],a=s[e];null!==n?(o.push({x:r.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:r.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Fs({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function oo(t){return t&&!1!==t.fill}function ro(t,e,i){let n=t[e].fill;const s=[e];let o;if(!i)return n;for(;!1!==n&&-1===s.indexOf(n);){if(!h(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;s.push(n),n=o.fill}return!1}function ao(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=u(i&&i.target,i);void 0===n&&(n=!!e.backgroundColor);if(!1===n||null===n)return!1;if(!0===n)return"origin";return n}(t);if(l(n))return!isNaN(n.value)&&n;let s=parseFloat(n);return h(s)&&Math.floor(s)===s?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(n[0],e,s,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function lo(t,e,i){const n=[];for(let s=0;s<i.length;s++){const o=i[s],{first:r,last:a,point:l}=ho(o,e,"x");if(!(!l||r&&a))if(r)n.unshift(l);else if(t.push(l),!a)break}t.push(...n)}function ho(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const s=n[i],o=t.segments,r=t.points;let a=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],n=r[e.start][i],h=r[e.end][i];if(X(s,n,h)){a=s===n,l=s===h;break}}return{first:a,last:l,point:n}}class co{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:s,radius:o}=this;return e=e||{start:0,end:L},t.arc(n,s,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,s=t.angle;return{x:e+Math.cos(s)*n,y:i+Math.sin(s)*n,angle:s}}}function uo(t){const{chart:e,fill:i,line:n}=t;if(h(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,s=[],o=n.segments,r=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const s=n[t];if(s.index===e)break;s.hidden||i.unshift(s.dataset)}return i}(e,i);a.push(so({x:null,y:e.bottom},n));for(let t=0;t<o.length;t++){const e=o[t];for(let t=e.start;t<=e.end;t++)lo(s,r[t],a)}return new Fs({points:s,options:{}})}(t);if("shape"===i)return!0;const s=function(t){if((t.scale||{}).getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,n=e.options,s=e.getLabels().length,o=n.reverse?e.max:e.min,r=function(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:l(t)?t.value:e.getBaseValue(),n}(i,e,o),a=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,o);return new co({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<s;++t)a.push(e.getPointPositionForValue(t,r));return a}(t);return function(t){const{scale:e={},fill:i}=t,n=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:l(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(h(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}(t)}(t);return s instanceof co?s:so(s,n)}function po(t,e,i){const n=uo(e),{line:s,scale:o,axis:r}=e,a=s.options,l=a.fill,h=a.backgroundColor,{above:c=h,below:u=h}=l||{};n&&s.points.length&&(he(t,i),function(t,e){const{line:i,target:n,above:s,below:o,area:r,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==s&&(fo(t,n,r.top),mo(t,{line:i,target:n,color:s,scale:a,property:l}),t.restore(),t.save(),fo(t,n,r.bottom));mo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:s,target:n,above:c,below:u,area:i,scale:o,axis:r}),ce(t))}function fo(t,e,i){const{segments:n,points:s}=e;let o=!0,r=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,h=s[n],c=s[io(n,l,s)];o?(t.moveTo(h.x,h.y),o=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function mo(t,e){const{line:i,target:n,property:s,color:o,scale:r}=e,a=function(t,e,i){const n=t.segments,s=t.points,o=e.points,r=[];for(const t of n){let{start:n,end:a}=t;a=io(n,a,s);const l=eo(i,s[n],s[a],t.loop);if(!e.segments){r.push({source:t,target:l,start:s[n],end:s[a]});continue}const h=gi(e,l);for(const e of h){const n=eo(i,o[e.start],o[e.end],e.loop),a=mi(t,s,n);for(const t of a)r.push({source:t,target:e,start:{[i]:no(l,n,"start",Math.max)},end:{[i]:no(l,n,"end",Math.min)}})}}return r}(i,n,s);for(const{source:e,target:l,start:h,end:c}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,r,u&&eo(s,h,c)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():_o(t,n,c,s);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});p=d&&e,p||_o(t,n,h,s)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function go(t,e,i){const{top:n,bottom:s}=e.chart.chartArea,{property:o,start:r,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(r,n,a-r,s-n),t.clip())}function _o(t,e,i,n){const s=e.interpolate(i,n);s&&t.lineTo(s.x,s.y)}var vo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,s=[];let o,r,a,l;for(r=0;r<n;++r)o=t.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof Fs&&(l={visible:t.isDatasetVisible(r),index:r,fill:ao(a,r,n),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],l&&!1!==l.fill&&(l.fill=ro(s,r,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,s=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&i.fill&&po(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;oo(i)&&po(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;oo(n)&&"beforeDatasetDraw"===i.drawTime&&po(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const yo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class bo extends Ji{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=p(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=ke(i.font),s=n.size,o=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=yo(i,s);let l,h;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,s,r,a)+10):(h=this.maxHeight,l=this._fitCols(o,s,r,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:s,maxWidth:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+r;let c=t;s.textAlign="left",s.textBaseline="middle";let u=-1,d=-h;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+s.measureText(t.text).width;(0===p||l[l.length-1]+f+2*r>o)&&(c+=h,l[l.length-(p>0?0:1)]=0,d+=h,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+r})),c}_fitCols(t,e,i,n){const{ctx:s,maxHeight:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=r,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,o)=>{const m=i+e/2+s.measureText(t.text).width;o>0&&d+n+2*r>h&&(c+=u+r,l.push({width:u,height:d}),p+=u+r,f++,u=d=0),a[o]={left:p,top:d,col:f,width:m,height:n},u=Math.max(u,m),d+=n+r})),c+=u,l.push({width:u,height:d}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:s}}=this,o=ci(s,this.left,this.width);if(this.isHorizontal()){let s=0,r=at(i,this.left+n,this.right-this.lineWidths[s]);for(const a of e)s!==a.row&&(s=a.row,r=at(i,this.left+n,this.right-this.lineWidths[s])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(r),a.width),r+=a.width+n}else{let s=0,r=at(i,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const a of e)a.col!==s&&(s=a.col,r=at(i,this.top+t+n,this.bottom-this.columnSizes[s].height)),a.top=r,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),r+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;he(t,this),this._draw(),ce(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:s,labels:o}=t,r=ee.color,a=ci(t.rtl,this.left,this.width),l=ke(o.font),{color:h,padding:c}=o,d=l.size,p=d/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:m,boxHeight:g,itemHeight:_}=yo(o,d),v=this.isHorizontal(),y=this._computeTitleHeight();f=v?{x:at(s,this.left+c,this.right-i[0]),y:this.top+c+y,line:0}:{x:this.left+c,y:at(s,this.top+y+c,this.bottom-e[0].height),line:0},ui(this.ctx,t.textDirection);const b=_+c;this.legendItems.forEach(((x,w)=>{n.strokeStyle=x.fontColor||h,n.fillStyle=x.fontColor||h;const k=n.measureText(x.text).width,T=a.textAlign(x.textAlign||(x.textAlign=o.textAlign)),C=m+p+k;let A=f.x,E=f.y;a.setWidth(this.width),v?w>0&&A+C+c>this.right&&(E=f.y+=b,f.line++,A=f.x=at(s,this.left+c,this.right-i[f.line])):w>0&&E+b>this.bottom&&(A=f.x=A+e[f.line].width+c,f.line++,E=f.y=at(s,this.top+y+c,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;n.save();const s=u(i.lineWidth,1);if(n.fillStyle=u(i.fillStyle,r),n.lineCap=u(i.lineCap,"butt"),n.lineDashOffset=u(i.lineDashOffset,0),n.lineJoin=u(i.lineJoin,"miter"),n.lineWidth=s,n.strokeStyle=u(i.strokeStyle,r),n.setLineDash(u(i.lineDash,[])),o.usePointStyle){const r={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:s},l=a.xPlus(t,m/2);ae(n,r,l,e+p,o.pointStyleWidth&&m)}else{const o=e+Math.max((d-g)/2,0),r=a.leftForLtr(t,m),l=xe(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?me(n,{x:r,y:o,w:m,h:g,radius:l}):n.rect(r,o,m,g),n.fill(),0!==s&&n.stroke()}n.restore()}(a.x(A),E,x),A=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(T,A+m+p,v?A+C:this.right,t.rtl),function(t,e,i){pe(n,i.text,t,e+_/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(A),E,x),v?f.x+=C+c:f.y+=b})),di(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=ke(e.font),n=we(e.padding);if(!e.display)return;const s=ci(t.rtl,this.left,this.width),o=this.ctx,r=e.position,a=i.size/2,l=n.top+a;let h,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+l,c=at(t.align,c,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+at(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=at(r,c,c+u);o.textAlign=s.textAlign(rt(r)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,pe(o,e.text,d,h,i)}_computeTitleHeight(){const t=this.options.title,e=ke(t.font),i=we(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,s;if(X(t,this.left,this.right)&&X(e,this.top,this.bottom))for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(n=s[i],X(t,n.left,n.left+n.width)&&X(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,r=(s=i,null!==(n=o)&&null!==s&&n.datasetIndex===s.datasetIndex&&n.index===s.index);o&&!r&&p(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!r&&p(e.onHover,[t,i,this],this)}else i&&p(e.onClick,[t,i,this],this);var n,s}}var xo={id:"legend",_element:bo,start(t,e,i){const n=t.legend=new bo({ctx:t.ctx,options:i,chart:t});jn.configure(t,n,i),jn.addBox(t,n)},stop(t){jn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;jn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,s=i.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:s,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const r=t.controller.getStyle(i?0:void 0),a=we(r.borderWidth);return{text:e[t.index].label,fillStyle:r.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:r.borderColor,pointStyle:n||r.pointStyle,rotation:r.rotation,textAlign:s||r.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class wo extends Ji{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=a(i.text)?i.text.length:1;this._padding=we(i.padding);const s=n*ke(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:o}=this,r=o.align;let a,l,h,c=0;return this.isHorizontal()?(l=at(r,i,s),h=e+t,a=s-i):("left"===o.position?(l=i+t,h=at(r,n,e),c=-.5*M):(l=s-t,h=at(r,e,n),c=.5*M),a=n-e),{titleX:l,titleY:h,maxWidth:a,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=ke(e.font),n=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:r,rotation:a}=this._drawArgs(n);pe(t,e.text,0,0,i,{color:e.color,maxWidth:r,rotation:a,textAlign:rt(e.align),textBaseline:"middle",translation:[s,o]})}}var ko={id:"title",_element:wo,start(t,e,i){!function(t,e){const i=new wo({ctx:t.ctx,options:e,chart:t});jn.configure(t,i,e),jn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;jn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;jn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const To=new WeakMap;var Co={id:"subtitle",start(t,e,i){const n=new wo({ctx:t.ctx,options:i,chart:t});jn.configure(t,n,i),jn.addBox(t,n),To.set(t,n)},stop(t){jn.removeBox(t,To.get(t)),To.delete(t)},beforeUpdate(t,e,i){const n=To.get(t);jn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ao={average(t){if(!t.length)return!1;let e,i,n=0,s=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,s+=t.y,++o}}return{x:n/o,y:s/o}},nearest(t,e){if(!t.length)return!1;let i,n,s,o=e.x,r=e.y,a=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Z(e,n.getCenterPoint());t<a&&(a=t,s=n)}}if(s){const t=s.tooltipPosition();o=t.x,r=t.y}return{x:o,y:r}}};function Eo(t,e){return e&&(a(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Mo(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Lo(t,e){const{element:i,datasetIndex:n,index:s}=e,o=t.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:t,label:r,parsed:o.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function Po(t,e){const i=t.chart.ctx,{body:n,footer:s,title:o}=t,{boxWidth:r,boxHeight:a}=e,l=ke(e.bodyFont),h=ke(e.titleFont),c=ke(e.footerFont),u=o.length,d=s.length,p=n.length,m=we(e.padding);let g=m.height,_=0,v=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(v+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),v){g+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(v-p)*l.lineHeight+(v-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let y=0;const b=function(t){_=Math.max(_,i.measureText(t).width+y)};return i.save(),i.font=h.string,f(t.title,b),i.font=l.string,f(t.beforeBody.concat(t.afterBody),b),y=e.displayColors?r+2+e.boxPadding:0,f(n,(t=>{f(t.before,b),f(t.lines,b),f(t.after,b)})),y=0,i.font=c.string,f(t.footer,b),i.restore(),_+=m.width,{width:_,height:g}}function So(t,e,i,n){const{x:s,width:o}=i,{width:r,chartArea:{left:a,right:l}}=t;let h="center";return"center"===n?h=s<=(a+l)/2?"left":"right":s<=o/2?h="left":s>=r-o/2&&(h="right"),function(t,e,i,n){const{x:s,width:o}=n,r=i.caretSize+i.caretPadding;return"left"===t&&s+o+r>e.width||"right"===t&&s-o-r<0||void 0}(h,t,e,i)&&(h="center"),h}function Oo(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||So(t,e,i,n),yAlign:n}}function Do(t,e,i,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:l}=i,h=s+o,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:p}=xe(r);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const m=function(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}(e,l,h);return"center"===l?"left"===a?f+=h:"right"===a&&(f-=h):"left"===a?f-=Math.max(c,d)+s:"right"===a&&(f+=Math.max(u,p)+s),{x:G(f,0,n.width-e.width),y:G(m,0,n.height-e.height)}}function Io(t,e,i){const n=we(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function No(t){return Eo([],Mo(t))}function zo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Ro extends Ji{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new Ci(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Ce(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),s=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let r=[];return r=Eo(r,Mo(n)),r=Eo(r,Mo(s)),r=Eo(r,Mo(o)),r}getBeforeBody(t,e){return No(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return f(t,(t=>{const e={before:[],lines:[],after:[]},s=zo(i,t);Eo(e.before,Mo(s.beforeLabel.call(this,t))),Eo(e.lines,s.label.call(this,t)),Eo(e.after,Mo(s.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return No(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),s=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let r=[];return r=Eo(r,Mo(n)),r=Eo(r,Mo(s)),r=Eo(r,Mo(o)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],s=[],o=[];let r,a,l=[];for(r=0,a=e.length;r<a;++r)l.push(Lo(this.chart,e[r]));return t.filter&&(l=l.filter(((e,n,s)=>t.filter(e,n,s,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),f(l,(e=>{const i=zo(t.callbacks,e);n.push(i.labelColor.call(this,e)),s.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,o=[];if(n.length){const t=Ao[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Po(this,i),r=Object.assign({},t,e),a=Oo(this.chart,i,r),l=Do(i,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:s}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:l,bottomLeft:h,bottomRight:c}=xe(r),{x:u,y:d}=t,{width:p,height:f}=e;let m,g,_,v,y,b;return"center"===s?(y=d+f/2,"left"===n?(m=u,g=m-o,v=y+o,b=y-o):(m=u+p,g=m+o,v=y-o,b=y+o),_=m):(g="left"===n?u+Math.max(a,h)+o:"right"===n?u+p-Math.max(l,c)-o:this.caretX,"top"===s?(v=d,y=v-o,m=g-o,_=g+o):(v=d+f,y=v+o,m=g+o,_=g-o),b=v),{x1:m,x2:g,x3:_,y1:v,y2:y,y3:b}}drawTitle(t,e,i){const n=this.title,s=n.length;let o,r,a;if(s){const l=ci(i.rtl,this.x,this.width);for(t.x=Io(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=ke(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a<s;++a)e.fillText(n[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r,a+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,s){const o=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:a,boxWidth:h,boxPadding:c}=s,u=ke(s.bodyFont),d=Io(this,"left",s),p=n.x(d),f=a<u.lineHeight?(u.lineHeight-a)/2:0,m=e.y+f;if(s.usePointStyle){const e={radius:Math.min(h,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(p,h)+h/2,l=m+a/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,re(t,e,i,l),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,re(t,e,i,l)}else{t.lineWidth=l(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=n.leftForLtr(p,h-c),i=n.leftForLtr(n.xPlus(p,1),h-c-2),r=xe(o.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=s.multiKeyBackground,me(t,{x:e,y:m,w:h,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),me(t,{x:i,y:m+1,w:h-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,m,h,a),t.strokeRect(e,m,h,a),t.fillStyle=o.backgroundColor,t.fillRect(i,m+1,h-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:s,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:h}=i,c=ke(i.bodyFont);let u=c.lineHeight,d=0;const p=ci(i.rtl,this.x,this.width),m=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+s},g=p.textAlign(o);let _,v,y,b,x,w,k;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=Io(this,g,i),e.fillStyle=i.bodyColor,f(this.beforeBody,m),d=r&&"right"!==g?"center"===o?l/2+h:l+2+h:0,b=0,w=n.length;b<w;++b){for(_=n[b],v=this.labelTextColors[b],e.fillStyle=v,f(_.before,m),y=_.lines,r&&y.length&&(this._drawColorBox(e,t,b,p,i),u=Math.max(c.lineHeight,a)),x=0,k=y.length;x<k;++x)m(y[x]),u=c.lineHeight;f(_.after,m)}d=0,u=c.lineHeight,f(this.afterBody,m),t.y-=s}drawFooter(t,e,i){const n=this.footer,s=n.length;let o,r;if(s){const a=ci(i.rtl,this.x,this.width);for(t.x=Io(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",o=ke(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,r=0;r<s;++r)e.fillText(n[r],a.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:s,yAlign:o}=this,{x:r,y:a}=t,{width:l,height:h}=i,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:p}=xe(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+c,a),"top"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+l-u,a),e.quadraticCurveTo(r+l,a,r+l,a+u),"center"===o&&"right"===s&&this.drawCaret(t,e,i,n),e.lineTo(r+l,a+h-p),e.quadraticCurveTo(r+l,a+h,r+l-p,a+h),"bottom"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+d,a+h),e.quadraticCurveTo(r,a+h,r,a+h-d),"center"===o&&"left"===s&&this.drawCaret(t,e,i,n),e.lineTo(r,a+c),e.quadraticCurveTo(r,a,r+c,a),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=Ao[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Po(this,t),r=Object.assign({},i,this._size),a=Oo(e,t,r),l=Do(t,r,a,e);n._to===l.x&&s._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=we(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,n,e),ui(t,e.textDirection),s.y+=o.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),di(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),s=!m(i,n),o=this._positionChanged(n,e);(s||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,s=this._active||[],o=this._getActiveElements(t,s,e,i),r=this._positionChanged(o,t),a=e||!m(o,s)||r;return a&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e;const o=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,o=Ao[s.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}Ro.positioners=Ao;var jo={id:"tooltip",_element:Ro,positioners:Ao,afterInit(t,e,i){i&&(t.tooltip=new Ro({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:s,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:s,beforeBody:s,beforeLabel:s,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return r(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:s,afterBody:s,beforeFooter:s,footer:s,afterFooter:s}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Bo=Object.freeze({__proto__:null,Decimation:to,Filler:vo,Legend:xo,SubTitle:Co,Title:ko,Tooltip:jo});function $o(t,e,i,n){const s=t.indexOf(e);if(-1===s)return((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n);return s!==t.lastIndexOf(e)?i:s}class Fo extends un{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(r(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:G(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:$o(i,t,u(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ho(t,e){const i=[],{bounds:n,step:s,min:o,max:a,precision:l,count:h,maxTicks:c,maxDigits:u,includeBounds:d}=t,p=s||1,f=c-1,{min:m,max:g}=e,_=!r(o),v=!r(a),y=!r(h),b=(g-m)/(u+1);let x,w,k,T,C=j((g-m)/f/p)*p;if(C<1e-14&&!_&&!v)return[{value:m},{value:g}];T=Math.ceil(g/C)-Math.floor(m/C),T>f&&(C=j(T*C/f/p)*p),r(l)||(x=Math.pow(10,l),C=Math.ceil(C*x)/x),"ticks"===n?(w=Math.floor(m/C)*C,k=Math.ceil(g/C)*C):(w=m,k=g),_&&v&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/s,C/1e3)?(T=Math.round(Math.min((a-o)/C,c)),C=(a-o)/T,w=o,k=a):y?(w=_?o:w,k=v?a:k,T=h-1,C=(k-w)/T):(T=(k-w)/C,T=$(T,Math.round(T),C/1e3)?Math.round(T):Math.ceil(T));const A=Math.max(W(C),W(w));x=Math.pow(10,r(l)?A:l),w=Math.round(w*x)/x,k=Math.round(k*x)/x;let E=0;for(_&&(d&&w!==o?(i.push({value:o}),w<o&&E++,$(Math.round((w+E*C)*x)/x,o,Vo(o,b,t))&&E++):w<o&&E++);E<T;++E)i.push({value:Math.round((w+E*C)*x)/x});return v&&d&&k!==a?i.length&&$(i[i.length-1].value,a,Vo(a,b,t))?i[i.length-1].value=a:i.push({value:a}):v&&k!==a||i.push({value:k}),i}function Vo(t,e,{horizontal:i,minRotation:n}){const s=H(n),o=(i?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+t).length;return Math.min(e/o,r)}Fo.id="category",Fo.defaults={ticks:{callback:Fo.prototype.getLabelForValue}};class Wo extends un{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return r(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:s}=this;const o=t=>n=e?n:t,r=t=>s=i?s:t;if(t){const t=R(n),e=R(s);t<0&&e<0?r(0):t>0&&e>0&&o(0)}if(n===s){let e=1;(s>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*s)),r(s+e),t||o(n-e)}this.min=n,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Ho({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&F(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return hi(t,this.chart.options.locale,this.options.ticks.format)}}class qo extends Wo{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=h(t)?t:0,this.max=h(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=H(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Zo(t){return 1===t/Math.pow(10,Math.floor(z(t)))}qo.id="linear",qo.defaults={ticks:{callback:en.formatters.numeric}};class Uo extends un{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Wo.prototype.parse.apply(this,[t,e]);if(0!==i)return h(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=h(t)?Math.max(0,t):null,this.max=h(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const s=e=>i=t?i:e,o=t=>n=e?n:t,r=(t,e)=>Math.pow(10,Math.floor(z(t))+e);i===n&&(i<=0?(s(1),o(10)):(s(r(i,-1)),o(r(n,1)))),i<=0&&s(r(n,-1)),n<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&s(r(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(z(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),s=[];let o=c(t.min,Math.pow(10,Math.floor(z(e.min)))),r=Math.floor(z(o)),a=Math.floor(o/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{s.push({value:o,major:Zo(o)}),++a,10===a&&(a=1,++r,l=r>=0?1:l),o=Math.round(a*Math.pow(10,r)*l)/l}while(r<i||r===i&&a<n);const h=c(t.max,o);return s.push({value:h,major:Zo(o)}),s}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&F(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":hi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=z(t),this._valueRange=z(this.max)-z(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(z(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Yo(t){const e=t.ticks;if(e.display&&t.display){const t=we(e.backdropPadding);return u(e.font&&e.font.size,ee.font.size)+t.height}return 0}function Ko(t,e,i,n,s){return t===n||t===s?{start:e-i/2,end:e+i/2}:t<n||t>s?{start:e-i,end:e}:{start:e,end:e+i}}function Go(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],s=[],o=t._pointLabels.length,r=t.options.pointLabels,l=r.centerPointLabels?M/o:0;for(let d=0;d<o;d++){const o=r.setContext(t.getPointLabelContext(d));s[d]=o.padding;const p=t.getPointPosition(d,t.drawingArea+s[d],l),f=ke(o.font),m=(h=t.ctx,c=f,u=a(u=t._pointLabels[d])?u:[u],{w:ne(h,c.string,u),h:u.length*c.lineHeight});n[d]=m;const g=Y(t.getIndexAngle(d)+l),_=Math.round(V(g));Xo(i,e,g,Ko(_,p.x,m.w,0,180),Ko(_,p.y,m.h,90,270))}var h,c,u;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],s=t._pointLabels.length,o=t.options,r=Yo(o)/2,a=t.drawingArea,l=o.pointLabels.centerPointLabels?M/s:0;for(let o=0;o<s;o++){const s=t.getPointPosition(o,a+r+i[o],l),h=Math.round(V(Y(s.angle+D))),c=e[o],u=tr(s.y,c.h,h),d=Qo(h),p=Jo(s.x,c.w,d);n.push({x:s.x,y:u,textAlign:d,left:p,top:u,right:p+c.w,bottom:u+c.h})}return n}(t,n,s)}function Xo(t,e,i,n,s){const o=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/r,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function Qo(t){return 0===t||180===t?"center":t<180?"left":"right"}function Jo(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function tr(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function er(t,e,i,n){const{ctx:s}=t;if(i)s.arc(t.xCenter,t.yCenter,e,0,L);else{let i=t.getPointPosition(0,e);s.moveTo(i.x,i.y);for(let o=1;o<n;o++)i=t.getPointPosition(o,e),s.lineTo(i.x,i.y)}}Uo.id="logarithmic",Uo.defaults={ticks:{callback:en.formatters.logarithmic,major:{enabled:!0}}};class ir extends Wo{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=we(Yo(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=h(t)&&!isNaN(t)?t:0,this.max=h(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Yo(this.options))}generateTickLabels(t){Wo.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=p(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Go(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){return Y(t*(L/(this._pointLabels.length||1))+H(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(r(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(r(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return Ce(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-D+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:s}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),er(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n}=e,s=this._pointLabels.length;let o,a,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let s=e-1;s>=0;s--){const e=n.setContext(t.getPointLabelContext(s)),o=ke(e.font),{x:a,y:l,textAlign:h,left:c,top:u,right:d,bottom:p}=t._pointLabelItems[s],{backdropColor:f}=e;if(!r(f)){const t=xe(e.borderRadius),n=we(e.backdropPadding);i.fillStyle=f;const s=c-n.left,o=u-n.top,r=d-c+n.width,a=p-u+n.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),me(i,{x:s,y:o,w:r,h:a,radius:t}),i.fill()):i.fillRect(s,o,r,a)}pe(i,t._pointLabels[s],a,l+o.lineHeight/2,o,{color:e.color,textAlign:h,textBaseline:"middle"})}}(this,s),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){a=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const s=t.ctx,o=e.circular,{color:r,lineWidth:a}=e;!o&&!n||!r||!a||i<0||(s.save(),s.strokeStyle=r,s.lineWidth=a,s.setLineDash(e.borderDash),s.lineDashOffset=e.borderDashOffset,s.beginPath(),er(t,i,o,n),s.closePath(),s.stroke(),s.restore())}(this,n.setContext(this.getContext(e-1)),a,s)}})),i.display){for(t.save(),o=s-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:s,lineWidth:r}=n;r&&s&&(t.lineWidth=r,t.strokeStyle=s,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,r)=>{if(0===r&&!e.reverse)return;const a=i.setContext(this.getContext(r)),l=ke(a.font);if(s=this.getDistanceFromCenterForValue(this.ticks[r].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=we(a.backdropPadding);t.fillRect(-o/2-e.left,-s-l.size/2-e.top,o+e.width,l.size+e.height)}pe(t,n.label,0,-s,l,{color:a.color})})),t.restore()}drawTitle(){}}ir.id="radialLinear",ir.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:en.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},ir.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ir.descriptors={angleLines:{_fallback:"grid"}};const nr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},sr=Object.keys(nr);function or(t,e){return t-e}function rr(t,e){if(r(e))return null;const i=t._adapter,{parser:n,round:s,isoWeekday:o}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),h(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(s&&(a="week"!==s||!B(o)&&!0!==o?i.startOf(a,s):i.startOf(a,"isoWeek",o)),+a)}function ar(t,e,i,n){const s=sr.length;for(let o=sr.indexOf(t);o<s-1;++o){const t=nr[sr[o]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(s*t.size))<=n)return sr[o]}return sr[s-1]}function lr(t,e,i){if(i){if(i.length){const{lo:n,hi:s}=Q(i,e);t[i[n]>=e?i[n]:i[s]]=!0}}else t[e]=!0}function hr(t,e,i){const n=[],s={},o=e.length;let r,a;for(r=0;r<o;++r)a=e[r],s[a]=r,n.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,n){const s=t._adapter,o=+s.startOf(e[0].value,n),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=i[a],l>=0&&(e[l].major=!0);return e}(t,n,s,i):n}class cr extends un{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new vn._date(t.adapters.date);n.init(e),b(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:rr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:s,minDefined:o,maxDefined:r}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}o&&r||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=h(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),s=h(s)&&!isNaN(s)?s:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,s-1),this.max=Math.max(n+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const s=this.min,o=function(t,e,i){let n=0,s=t.length;for(;n<s&&t[n]<e;)n++;for(;s>n&&t[s-1]>i;)s--;return n>0||s<t.length?t.slice(n,s):t}(n,s,this.max);return this._unit=e.unit||(i.autoSkip?ar(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,i,n,s){for(let o=sr.length-1;o>=sr.indexOf(i);o--){const i=sr[o];if(nr[i].common&&t._adapter.diff(s,n,i)>=e-1)return i}return sr[i?sr.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=sr.indexOf(t)+1,i=sr.length;e<i;++e)if(nr[sr[e]].common)return sr[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&o.reverse(),hr(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t){let e,i,n=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),s=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=G(n,0,o),s=G(s,0,o),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,s=n.time,o=s.unit||ar(s.minUnit,e,i,this._getLabelCapacity(e)),r=u(s.stepSize,1),a="week"===o&&s.isoWeekday,l=B(a)||!0===a,h={};let c,d,p=e;if(l&&(p=+t.startOf(p,"isoWeek",a)),p=+t.startOf(p,l?"day":o),t.diff(i,e,o)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(c=p,d=0;c<i;c=+t.add(c,r,o),d++)lr(h,c,f);return c!==i&&"ticks"!==n.bounds&&1!==d||lr(h,c,f),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const s=this.options,o=s.time.displayFormats,r=this._unit,a=this._majorUnit,l=r&&o[r],h=a&&o[a],c=i[e],u=a&&h&&c&&c.major,d=this._adapter.format(t,n||(u?h:l)),f=s.ticks.callback;return f?p(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=H(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(n),o=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:i*s+r*o,h:i*o+r*s}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,s=this._tickFormatFunction(t,0,hr(this,[t],this._majorUnit),n),o=this._getLabelSize(s),r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(rr(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return nt(t.sort(or))}}function ur(t,e,i){let n,s,o,r,a=0,l=t.length-1;i?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=J(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:s,time:r}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=J(t,"time",e)),({time:n,pos:o}=t[a]),({time:s,pos:r}=t[l]));const h=s-n;return h?o+(r-o)*(e-n)/h:o}cr.id="time",cr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class dr extends cr{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ur(e,this.min),this._tableRange=ur(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],s=[];let o,r,a,l,h;for(o=0,r=t.length;o<r;++o)l=t[o],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,r=n.length;o<r;++o)h=n[o+1],a=n[o-1],l=n[o],Math.round((h+a)/2)!==l&&s.push({time:l,pos:o/(r-1)});return s}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(ur(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return ur(this._table,i*this._tableRange+this._minPos,!0)}}dr.id="timeseries",dr.defaults=cr.defaults;const pr=[mn,Xs,Bo,Object.freeze({__proto__:null,CategoryScale:Fo,LinearScale:qo,LogarithmicScale:Uo,RadialLinearScale:ir,TimeScale:cr,TimeSeriesScale:dr})];Ts.register(...pr);const fr=Ts;class mr extends n.Qr{connect(){if(!(this.element instanceof HTMLCanvasElement))throw new Error("Invalid element");const t=this.viewValue;Array.isArray(t.options)&&0===t.options.length&&(t.options={}),this._dispatchEvent("chartjs:pre-connect",{options:t.options});const e=this.element.getContext("2d");if(!e)throw new Error("Could not getContext() from Element");const i=new fr(e,t);this._dispatchEvent("chartjs:connect",{chart:i})}_dispatchEvent(t,e){this.element.dispatchEvent(new CustomEvent(t,{detail:e}))}}mr.values={view:Object}},28327:(t,e,i)=>{"use strict";var n=i(6599);const s={"symfony--ux-chartjs--chart":Promise.resolve().then(i.bind(i,71333))};function o(t){return t.keys().map((e=>function(t,e){const i=function(t){const e=(t.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(e)return e.replace(/_/g,"-").replace(/\//g,"--")}(e);if(i)return function(t,e){const i=t.default;if("function"==typeof i)return{identifier:e,controllerConstructor:i}}(t(e),i)}(t,e))).filter((t=>t))}!function(t){const e=n.Mx.start();t&&e.load(o(t));for(const t in s)s.hasOwnProperty(t)&&s[t].then((i=>{e.register(t,i.default)}))}(i(94180))},15177:(t,e,i)=>{"use strict";i(28327);var n=i(19755);i(74314),i(92802);var s,o=i(19755);i.g.$=i.g.jQuery=o,i(73138),i(34608),i(59858),i(41849),i(36643),i(63144),i(69300),i(49567),i(20454),i(69850),i(94662),o("#flash-messages").flashNotification("init");var r=o('<button type="button" class="btn btn-secondary add_groupe_link"><i class="fa fa-plus-circle" aria-hidden="true"></i> Ajouter AMAP / Marché</button>'),a=o('<p class="row mx-2"></p>').append(r),l=o('<button type="button" class="btn btn-secondary add_groupe_link"><i class="fa fa-plus-circle" aria-hidden="true"></i> Ajouter une adresse</button>'),h=o('<p class="row mx-2"></p>').append(l);function c(t){var e=o('<button type="button" class="col-3 btn btn-warning">Supprimer</button>');t.append(e),e.on("click",(function(e){t.remove()}))}function u(t){var e=o('<button type="button" class="btn btn-warning">Supprimer</button>');t.append(e),e.on("click",(function(e){t.remove()}))}function d(t,e,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,r=o("#confirmTransactionModal"),a=r.find(t);a.find(".montant_transaction").text(i),parseFloat(n)>0?a.find(".montant_don").text(n):a.find(".div_don").html(""),null!=s&&a.find(".nom_destinataire").text(s),r.find(t).show(),r.modal("show"),o("#confirmTransactionModal #confirmTransactionButton").off(),o("#confirmTransactionModal #confirmTransactionButton").on("click",(function(t){o(this).attr("disabled",!0),o(this).html('<span class="spinner-border spinner-border-sm ms-4 me-4" role="status" aria-hidden="true"></span>'),e.submit()}))}n(document).ready((function(){s=o(".groupeprestas"),o(".select2").select2({language:"fr",width:"100%"}),o(".select2adh").select2({minimumInputLength:3,language:"fr",width:"100%",ajax:{delay:350,cache:!0,url:"/search/adherent",dataType:"json"}}),s.find("div.form-group").each((function(){o(this).addClass("row mx-2"),c(o(this))})),s.append(a),s.data("index",s.find(":input").length),r.on("click",(function(t){!function(t,e){var i=t.data("prototype"),n=t.data("index"),s=i.replace(/__name__/g,n);t.data("index",n+1);var r=o('<p class="row mx-2"></p>').append(s);e.before(r),c(r)}(s,a)})),o(".geolocs").length&&($collectionHolderGeoloc=o(".geolocs"),$collectionHolderGeoloc.find("li").each((function(){u(o(this))})),$collectionHolderGeoloc.append(h),$collectionHolderGeoloc.data("index",$collectionHolderGeoloc.find(":input").length),l.on("click",(function(t){!function(t,e){var i=t.data("prototype"),n=t.find(".form-group").length,s=i.replace(/__name__/g,n);t.data("index",n+1);var r=o("<p></p>").append(s);e.before(r),u(r)}($collectionHolderGeoloc,h)}))),o('[data-toggle="tooltip"]').tooltip(),o("input:text[name='formAchatMonnaieAdherent[don][montant]']").change((function(){var t=parseFloat(o("span.achat_monnaie_montant_choisi").text().replace(" €",""))+parseFloat(o("input:text[name='formAchatMonnaieAdherent[don][montant]']").val().replace(",","."));o("span.achat_monnaie_montant_total").text(t+" €")})),o("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").change((function(){var t=parseFloat(o("span.achat_monnaie_montant_choisi").text().replace(" €",""))+parseFloat(o("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").val().replace(",","."));o("span.achat_monnaie_montant_total").text(t+" €")})),o("input:radio[name='formAchatMonnaieAdherent[montantradio]']").change((function(){if(o("input.achatmonnaie-montant-slider").slider().slider("setValue",this.value),o("span.achat_monnaie_montant_choisi").text(this.value+" €"),o("input:text[name='formAchatMonnaieAdherent[don][montant]']").length)var t=parseFloat(this.value)+parseFloat(o("input:text[name='formAchatMonnaieAdherent[don][montant]']").val().replace(",","."));else t=parseFloat(this.value);o("span.achat_monnaie_montant_total").text(t+" €")})),o("input:radio[name='formAchatMonnaieAConfirmerAdherent[montantradio]']").change((function(){if(o("input.achatmonnaie-montant-slider").slider().slider("setValue",this.value),o("span.achat_monnaie_montant_choisi").text(this.value+" €"),o("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").length)var t=parseFloat(this.value)+parseFloat(o("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").val().replace(",","."));else t=parseFloat(this.value);o("span.achat_monnaie_montant_total").text(t+" €")})),o("form[name='formAchatMonnaieAdherent'] input.achatmonnaie-montant-slider").slider().on("change",(function(t){var e=t.value.newValue;if(o("span.achat_monnaie_montant_choisi").text(e+" €"),o("input:text[name='formAchatMonnaieAdherent[don][montant]']").length)var i=parseFloat(e)+parseFloat(o("input:text[name='formAchatMonnaieAdherent[don][montant]']").val().replace(",","."));else i=parseFloat(e);o("span.achat_monnaie_montant_total").text(i+" €")})),o("form[name='formAchatMonnaieAConfirmerAdherent'] input.achatmonnaie-montant-slider").slider().on("change",(function(t){var e=t.value.newValue;if(o("span.achat_monnaie_montant_choisi").text(e+" €"),o("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").length)var i=parseFloat(e)+parseFloat(o("input:text[name='formAchatMonnaieAConfirmerAdherent[don][montant]']").val().replace(",","."));else i=parseFloat(e);o("span.achat_monnaie_montant_total").text(i+" €")})),o("input:text[name='formAchatMonnaiePrestataire[don][montant]']").change((function(){var t=parseFloat(o("input.achatmonnaie-montant-slider").slider().val())+parseFloat(o("input:text[name='formAchatMonnaiePrestataire[don][montant]']").val().replace(",","."));o("span.achat_monnaie_montant_total").text(t+" €")})),o("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").change((function(){var t=parseFloat(o("input.achatmonnaie-montant-slider").slider().val())+parseFloat(o("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").val().replace(",","."));o("span.achat_monnaie_montant_total").text(t+" €")})),o("input:radio[name='formAchatMonnaiePrestataire[montantradio]']").change((function(){if(o("input.achatmonnaie-montant-slider").slider().slider("setValue",this.value),o("span.achat_monnaie_montant_choisi").text(this.value+" €"),o("input:text[name='formAchatMonnaiePrestataire[don][montant]']").length)var t=parseFloat(this.value)+parseFloat(o("input:text[name='formAchatMonnaiePrestataire[don][montant]']").val().replace(",","."));else t=parseFloat(this.value);o("span.achat_monnaie_montant_total").text(t+" €")})),o("input:radio[name='formAchatMonnaieAConfirmerPrestataire[montantradio]']").change((function(){if(o("input.achatmonnaie-montant-slider").slider().slider("setValue",this.value),o("span.achat_monnaie_montant_choisi").text(this.value+" €"),o("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").length)var t=parseFloat(this.value)+parseFloat(o("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").val().replace(",","."));else t=parseFloat(this.value);o("span.achat_monnaie_montant_total").text(t+" €")})),o("form[name='formAchatMonnaiePrestataire'] input.achatmonnaie-montant-slider").slider().on("change",(function(t){var e=t.value.newValue;if(o("span.achat_monnaie_montant_choisi").text(e+" €"),o("input:text[name='formAchatMonnaiePrestataire[don][montant]']").length)var i=parseFloat(e)+parseFloat(o("input:text[name='formAchatMonnaiePrestataire[don][montant]']").val().replace(",","."));else i=parseFloat(e);o("span.achat_monnaie_montant_total").text(i+" €")})),o("form[name='formAchatMonnaieAConfirmerPrestataire'] input.achatmonnaie-montant-slider").slider().on("change",(function(t){var e=t.value.newValue;if(o("span.achat_monnaie_montant_choisi").text(e+" €"),o("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").length)var i=parseFloat(e)+parseFloat(o("input:text[name='formAchatMonnaieAConfirmerPrestataire[don][montant]']").val().replace(",","."));else i=parseFloat(e);o("span.achat_monnaie_montant_total").text(i+" €")})),o(".transactionSubmit").on("click",(function(t){t.preventDefault(),o(this).attr("disabled",!0);var e=this.closest("form");if(e.checkValidity()){if("prestataire"==o("#"+e.name+"_destinataireType")[0].value)var i=".confirmTransactionPrestataire";else i=".confirmTransactionAdherent";var n=o("#"+e.name+"_destinataire")[0];if(n.length)var s=n.options[n.selectedIndex].text;var r=o("#"+e.name+"_montant")[0].value,a=0;if(o("#"+e.name+"_don_montant").length)a=o("#"+e.name+"_don_montant")[0].value;d(i,e,r,a,s),o(this).attr("disabled",!1)}else e.submit()})),o(".fluxSubmit").on("click",(function(t){t.preventDefault(),o(this).attr("disabled",!0),this.closest("form").submit()})),o(".cotisationMLCSubmit").on("click",(function(t){t.preventDefault(),o(this).attr("disabled",!0);var e=this.closest("form");if(o("#"+e.name+"_moyen")[0].value="emlc",o("#"+e.name+"_don_moyen")[0].value="emlc",e.checkValidity()){var i=o("#"+e.name+"_montant")[0].value,n=0;if(o("#"+e.name+"_don_montant").length)n=o("#"+e.name+"_don_montant")[0].value;d(".confirmCotisation",e,i,n),o(this).attr("disabled",!1)}else e.submit()})),o(".achatCBSubmit").on("click",(function(t){var e=this.closest("form");o("#"+e.name+"_moyen")[0].value="cb",o("#"+e.name+"_don_moyen").length&&(o("#"+e.name+"_don_moyen")[0].value="cb")})),o(".achatHelloAssoSubmit").on("click",(function(t){var e=this.closest("form");o("#"+e.name+"_moyen")[0].value="helloasso",o("#"+e.name+"_don_moyen").length&&(o("#"+e.name+"_don_moyen")[0].value="helloasso")})),o(".cotisationCBSubmit").on("click",(function(t){var e=this.closest("form");o("#"+e.name+"_moyen")[0].value="cb",o("#"+e.name+"_don_moyen").length&&(o("#"+e.name+"_don_moyen")[0].value="cb")})),o(".cotisationHelloAssoSubmit").on("click",(function(t){var e=this.closest("form");o("#"+e.name+"_moyen")[0].value="helloasso",o("#"+e.name+"_don_moyen").length&&(o("#"+e.name+"_don_moyen")[0].value="helloasso")})),o("input:radio[name='formAchatMonnaieAConfirmerAdherent[moyen]']").change((function(){o("#demande_achat_text_"+this.value).length&&(o(".demande_achat_text").hide(),o("#demande_achat_text_"+this.value).show())})),o("input:radio[name='formAchatMonnaieAConfirmerPrestataire[moyen]']").change((function(){o("#demande_achat_text_"+this.value).length&&(o(".demande_achat_text").hide(),o("#demande_achat_text_"+this.value).show())})),o(".paiementDate").toggle(o("#formSolidoumeItem_isRecurrent").is(":checked")),o("#formSolidoumeItem_amount").slider(),o("#formSolidoumeItem_isRecurrent").click((function(){o(".paiementDate").toggle(this.checked)}))}))},63144:(t,e,i)=>{var n,s,o=i(19755);function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}s={init:function(t){s.settings=n.extend({},n.fn.flashNotification.defaults,t),setTimeout((function(){n(".alert").show("slow").delay(s.settings.hideDelay).hide("fast")}),500),s.listenIncomingMessages()},listenIncomingMessages:function(){n(document).ajaxComplete((function(t,e,i){try{var o=n.parseJSON(e.responseText);if(o.messages){var r,a=o.messages;if(a.error)for(r=0;r<a.error.length;r++)s.addError(a.error[r]);if(a.success)for(r=0;r<a.success.length;r++)s.addSuccess(a.success[r]);if(a.info)for(r=0;r<a.info.length;r++)s.addInfo(a.info[r])}}catch(t){return!1}}))},addSuccess:function(t){var e=s.getBasicFlash(t).addClass("alert-success");s.addToList(e),s.display(e)},addError:function(t){var e=s.getBasicFlash(t).addClass("alert-error");s.addToList(e),s.display(e)},addInfo:function(t){var e=s.getBasicFlash(t).addClass("alert-info");s.addToList(e),s.display(e)},getBasicFlash:function(t){return n("<div></div>").hide().addClass("alert").append(s.getCloseButton()).append(n("<div></div>").html(t))},getCloseButton:function(){return n("<button></button>").addClass("btn-close").attr("data-bs-dismiss","alert").attr("data-dismiss","alert").attr("aria-label","close").attr("type","button").html("&times")},addToList:function(t){t.appendTo(n("#flash-messages"))},display:function(t){setTimeout((function(){t.show("slow").delay(s.settings.hideDelay).hide("fast",(function(){n(this).remove()}))}),500)}},(n=o).fn.flashNotification=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!==r(t)&&t?void n.error("Method "+t+" does not exist on jQuery.flashNotification"):s.init.apply(this,arguments)},n.fn.flashNotification.defaults={hideDelay:1e4,autoHide:!0,animate:!0}},49567:(t,e,i)=>{var n=i(19755);i(36643),i(63144),n(document).ready((function(){var t=[];n(document).on("click",".searchLatLon",(function(e){e.preventDefault();var i=n(this);n.ajax({url:i.data("url"),type:"post",data:{adresse:n("#"+i.attr("id").replace("_geoloc_search","")+"_geoloc_adresse").val(),cpostal:n("#"+i.attr("id").replace("_geoloc_search","")+"_geoloc_cpostal").val(),ville:n("#"+i.attr("id").replace("_geoloc_search","")+"_geoloc_ville").val()},success:function(e){var s=i.attr("id").replace("_geoloc_search","");n("#"+s+"_message").remove(),n("#"+s+"_map").remove();var o=null;if("success"==e.status&&e.data&&""!=e.data.lat&&""!=e.data.lon){n("#"+s+"_geoloc_lat").val(e.data.lat),n("#"+s+"_geoloc_lon").val(e.data.lon),n("#"+s+"_geoloc_lat").addClass("inputsuccess"),n("#"+s+"_geoloc_lon").addClass("inputsuccess"),n('<p id="'+s+'_message">Cliquez sur la carte si vous voulez affiner la géolocalisation</p><div id="'+s+'_map" style="height: 250px;margin-top: 10px;"></div>').insertAfter("#"+i.attr("id"));var r=L.latLng(parseFloat(e.data.lat),parseFloat(e.data.lon)),a=L.map(s+"_map").setView(r,13);L.tileLayer("https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",{maxZoom:18,attribution:'&copy; Openstreetmap France | &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(a);o=L.marker(r).addTo(a)}else{n(this).addClass("inputerror"),n('<p id="'+s+'_message">ADRESSE INCONNUE : Cliquez sur la carte pour définir une adresse</p><div id="'+s+'_map" style="height: 250px;margin-top: 10px;"></div>').insertAfter("#"+i.attr("id"));a=L.map(s+"_map").setView(JSON.parse(n("#koh_map_center").val()),parseInt(n("#koh_map_zoom").val()));L.tileLayer("https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",{maxZoom:18,attribution:'&copy; Openstreetmap France | &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(a)}a.on("click",(function(e){null!=o&&a.removeLayer(o);for(var i=0;i<t.length;i++)a.removeLayer(t[i]);var r=new L.marker(e.latlng);r.addTo(a),t.push(r),n("#"+s+"_geoloc_lat").val(e.latlng.lat),n("#"+s+"_geoloc_lon").val(e.latlng.lng),n("#"+s+"_geoloc_lat").addClass("inputsuccess"),n("#"+s+"_geoloc_lon").addClass("inputsuccess")}))}})}))}))},69300:(t,e,i)=>{var n=i(19755);n(document).ready((function(){n("#formSolidoumeItem_amount, #formSolidoumeItem_isRecurrent").on("change",(function(t){n("#formSolidoumeItem_save").attr("disabled",!1);var e=this.closest("form"),i=n("#"+e.name+"_balance").val(),s=n("#"+e.name+"_amount").val();n("#"+e.name+"_isRecurrent").is(":checked");parseFloat(i)<parseFloat(s)?(n("#formSolidoumeItem_save").attr("disabled",!0),n("#formSolidoumeItem_error").attr("style","display:block;")):n("#formSolidoumeItem_error").attr("style","display:none;")}))}))},36643:function(t,e){var i,n,s,o;function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}o=function(t){"use strict";function e(t){var e,i,n,s;for(i=1,n=arguments.length;i<n;i++)for(e in s=arguments[i])t[e]=s[e];return t}function i(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}function n(t){return t._leaflet_id=t._leaflet_id||++Kt,t._leaflet_id}function s(t,e,i){var n,s,o,r;return r=function(){n=!1,s&&(o.apply(i,s),s=!1)},o=function(){n?s=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}}function o(t,e,i){var n=e[1],s=e[0],o=n-s;return t===n&&i?t:((t-s)%o+o)%o+s}function a(){return!1}function l(t,e){var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function c(t){return h(t).split(/\s+/)}function u(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?Yt(t.options):{}),e)t.options[i]=e[i];return t.options}function d(t,e,i){var n=[];for(var s in t)n.push(encodeURIComponent(i?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}function p(t,e){return t.replace(Gt,(function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n}))}function f(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}function m(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function g(t){var e=+new Date,i=Math.max(0,16-(e-Jt));return Jt=e+i,window.setTimeout(t,i)}function _(t,e,n){if(!n||te!==g)return te.call(window,i(t,e));t.call(e)}function v(t){t&&ee.call(window,t)}function y(){}function b(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}function x(t,e,i){return t instanceof b?t:Xt(t)?new b(t[0],t[1]):null==t?t:"object"==r(t)&&"x"in t&&"y"in t?new b(t.x,t.y):new b(t,e,i)}function w(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function k(t,e){return!t||t instanceof w?t:new w(t,e)}function T(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function C(t,e){return t instanceof T?t:new T(t,e)}function A(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function E(t,e,i){return t instanceof A?t:Xt(t)&&"object"!=r(t[0])?3===t.length?new A(t[0],t[1],t[2]):2===t.length?new A(t[0],t[1]):null:null==t?t:"object"==r(t)&&"lat"in t?new A(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new A(t,e,i)}function M(t,e,i,n){if(Xt(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function P(t,e,i,n){return new M(t,e,i,n)}function S(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function O(t,e){var i,n,s,o,r,a,l="";for(i=0,s=t.length;i<s;i++){for(n=0,o=(r=t[i]).length;n<o;n++)l+=(n?"L":"M")+(a=r[n]).x+" "+a.y;l+=e?We?"z":"x":""}return l||"M0 0"}function D(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function I(t,e,i,n){return"touchstart"===e?N(t,i,n):"touchmove"===e?function(t,e,i){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&B(t,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener(Ye,n,!1)}(t,i,n):"touchend"===e&&function(t,e,i){var n=function(t){B(t,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(Ke,n,!1),t.addEventListener(Ge,n,!1)}(t,i,n),this}function N(t,e,n){var s=i((function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Xe.indexOf(t.target.tagName)<0))return;vt(t)}B(t,e)}));t["_leaflet_touchstart"+n]=s,t.addEventListener(Ue,s,!1),Je||(document.documentElement.addEventListener(Ue,z,!0),document.documentElement.addEventListener(Ye,R,!0),document.documentElement.addEventListener(Ke,j,!0),document.documentElement.addEventListener(Ge,j,!0),Je=!0)}function z(t){Qe[t.pointerId]=t,ti++}function R(t){Qe[t.pointerId]&&(Qe[t.pointerId]=t)}function j(t){delete Qe[t.pointerId],ti--}function B(t,e){for(var i in t.touches=[],Qe)t.touches.push(Qe[i]);t.changedTouches=[t],e(t)}function $(t,e,i){function n(t){var e;if(je){if(!_e||"mouse"===t.pointerType)return;e=ti}else e=t.touches.length;if(!(e>1)){var i=Date.now(),n=i-(o||i);r=t.touches?t.touches[0]:t,a=n>0&&n<=l,o=i}}function s(t){if(a&&!r.cancelBubble){if(je){if(!_e||"mouse"===t.pointerType)return;var i,n,s={};for(n in r)i=r[n],s[n]=i&&i.bind?i.bind(r):i;r=s}r.type="dblclick",e(r),o=null}}var o,r,a=!1,l=250;return t[ni+ei+i]=n,t[ni+ii+i]=s,t[ni+"dblclick"+i]=e,t.addEventListener(ei,n,!1),t.addEventListener(ii,s,!1),t.addEventListener("dblclick",e,!1),this}function F(t,e){var i=t[ni+ei+e],n=t[ni+ii+e],s=t[ni+"dblclick"+e];return t.removeEventListener(ei,i,!1),t.removeEventListener(ii,n,!1),_e||t.removeEventListener("dblclick",s,!1),this}function H(t){return"string"==typeof t?document.getElementById(t):t}function V(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function W(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function q(t){var e=t.parentNode;e&&e.removeChild(t)}function Z(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function U(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Y(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function K(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=J(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function G(t,e){if(void 0!==t.classList)for(var i=c(e),n=0,s=i.length;n<s;n++)t.classList.add(i[n]);else if(!K(t,e)){var o=J(t);Q(t,(o?o+" ":"")+e)}}function X(t,e){void 0!==t.classList?t.classList.remove(e):Q(t,h((" "+J(t)+" ").replace(" "+e+" "," ")))}function Q(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function J(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function tt(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function et(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function it(t,e,i){var n=e||new b(0,0);t.style[si]=(Pe?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function nt(t,e){t._leaflet_pos=e,De?it(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function st(t){return t._leaflet_pos||new b(0,0)}function ot(){ut(window,"dragstart",vt)}function rt(){dt(window,"dragstart",vt)}function at(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(lt(),li=t,hi=t.style.outline,t.style.outline="none",ut(window,"keydown",lt))}function lt(){li&&(li.style.outline=hi,li=void 0,hi=void 0,dt(window,"keydown",lt))}function ht(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ct(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}function ut(t,e,i,n){if("object"==r(e))for(var s in e)pt(t,s,e[s],i);else for(var o=0,a=(e=c(e)).length;o<a;o++)pt(t,e[o],i,n);return this}function dt(t,e,i,n){if("object"==r(e))for(var s in e)ft(t,s,e[s],i);else if(e)for(var o=0,a=(e=c(e)).length;o<a;o++)ft(t,e[o],i,n);else{for(var l in t[di])ft(t,l,t[di][l]);delete t[di]}return this}function pt(t,e,i,s){var o=e+n(i)+(s?"_"+n(s):"");if(t[di]&&t[di][o])return this;var r=function(e){return i.call(s||t,e||window.event)},a=r;je&&0===e.indexOf("touch")?I(t,e,r,o):!Be||"dblclick"!==e||!$||je&&Te?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Tt(t,e)&&a(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",r,!1)):("click"===e&&ye&&(r=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=ci&&i-ci;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?yt(t):(ci=i,e(t))}(t,a)}),t.addEventListener(e,r,!1)):"attachEvent"in t&&t.attachEvent("on"+e,r):$(t,r,o),t[di]=t[di]||{},t[di][o]=r}function ft(t,e,i,s){var o=e+n(i)+(s?"_"+n(s):""),r=t[di]&&t[di][o];if(!r)return this;je&&0===e.indexOf("touch")?function(t,e,i){var n=t["_leaflet_"+e+i];"touchstart"===e?t.removeEventListener(Ue,n,!1):"touchmove"===e?t.removeEventListener(Ye,n,!1):"touchend"===e&&(t.removeEventListener(Ke,n,!1),t.removeEventListener(Ge,n,!1))}(t,e,o):!Be||"dblclick"!==e||!F||je&&Te?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r):F(t,o),t[di][o]=null}function mt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,kt(t),this}function gt(t){return pt(t,"mousewheel",mt),this}function _t(t){return ut(t,"mousedown touchstart dblclick",mt),pt(t,"click",wt),this}function vt(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function yt(t){return vt(t),mt(t),this}function bt(t,e){if(!e)return new b(t.clientX,t.clientY);var i=ct(e),n=i.boundingClientRect;return new b((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}function xt(t){return _e?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/pi:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function wt(t){fi[t.type]=!0}function kt(t){var e=fi[t.type];return fi[t.type]=!1,e}function Tt(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}function Ct(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=function(t,e){for(var i=[t[0]],n=1,s=0,o=t.length;n<o;n++)St(t[n],t[s])>e&&(i.push(t[n]),s=n);return s<o-1&&i.push(t[o-1]),i}(t,i),function(t,e){var i=t.length,n=new(("undefined"==typeof Uint8Array?"undefined":r(Uint8Array))!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,Et(t,n,e,0,i-1);var s,o=[];for(s=0;s<i;s++)n[s]&&o.push(t[s]);return o}(t,i)}function At(t,e,i){return Math.sqrt(Ot(t,e,i,!0))}function Et(t,e,i,n,s){var o,r,a,l=0;for(r=n+1;r<=s-1;r++)(a=Ot(t[r],t[n],t[s],!0))>l&&(o=r,l=a);l>i&&(e[o]=1,Et(t,e,i,n,o),Et(t,e,i,o,s))}function Mt(t,e,i,n,s){var o,r,a,l=n?Ci:Pt(t,i),h=Pt(e,i);for(Ci=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=Pt(r=Lt(t,e,o=l||h,i,s),i),o===l?(t=r,l=a):(e=r,h=a)}}function Lt(t,e,i,n,s){var o,r,a=e.x-t.x,l=e.y-t.y,h=n.min,c=n.max;return 8&i?(o=t.x+a*(c.y-t.y)/l,r=c.y):4&i?(o=t.x+a*(h.y-t.y)/l,r=h.y):2&i?(o=c.x,r=t.y+l*(c.x-t.x)/a):1&i&&(o=h.x,r=t.y+l*(h.x-t.x)/a),new b(o,r,s)}function Pt(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function St(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Ot(t,e,i,n){var s,o=e.x,r=e.y,a=i.x-o,l=i.y-r,h=a*a+l*l;return h>0&&((s=((t.x-o)*a+(t.y-r)*l)/h)>1?(o=i.x,r=i.y):s>0&&(o+=a*s,r+=l*s)),a=t.x-o,l=t.y-r,n?a*a+l*l:new b(o,r)}function Dt(t){return!Xt(t[0])||"object"!=r(t[0][0])&&void 0!==t[0][0]}function It(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Dt(t)}function Nt(t,e,i){var n,s,o,r,a,l,h,c,u,d=[1,4,2,8];for(s=0,h=t.length;s<h;s++)t[s]._code=Pt(t[s],e);for(r=0;r<4;r++){for(c=d[r],n=[],s=0,o=(h=t.length)-1;s<h;o=s++)a=t[s],l=t[o],a._code&c?l._code&c||((u=Lt(l,a,c,e,i))._code=Pt(u,e),n.push(u)):(l._code&c&&((u=Lt(l,a,c,e,i))._code=Pt(u,e),n.push(u)),n.push(a));t=n}return t}function zt(t,e){var i,n,s,o,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Rt;if(!a&&!r)return null;switch(r.type){case"Point":return i=c(a),h?h(t,i):new qi(i);case"MultiPoint":for(s=0,o=a.length;s<o;s++)i=c(a[s]),l.push(h?h(t,i):new qi(i));return new Fi(l);case"LineString":case"MultiLineString":return n=jt(a,"LineString"===r.type?0:1,c),new Ki(n,e);case"Polygon":case"MultiPolygon":return n=jt(a,"Polygon"===r.type?1:2,c),new Gi(n,e);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var u=zt({geometry:r.geometries[s],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Fi(l);default:throw new Error("Invalid GeoJSON object.")}}function Rt(t){return new A(t[1],t[0],t[2])}function jt(t,e,i){for(var n,s=[],o=0,r=t.length;o<r;o++)n=e?jt(t[o],e-1,i):(i||Rt)(t[o]),s.push(n);return s}function Bt(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[l(t.lng,e),l(t.lat,e),l(t.alt,e)]:[l(t.lng,e),l(t.lat,e)]}function $t(t,e,i,n){for(var s=[],o=0,r=t.length;o<r;o++)s.push(e?$t(t[o],e-1,i,n):Bt(t[o],n));return!e&&i&&s.push(s[0]),s}function Ft(t,i){return t.feature?e({},t.feature,{geometry:i}):Ht(i)}function Ht(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function Vt(t,e){return new Xi(t,e)}function Wt(t,e){return new ln(t,e)}function qt(t){return Ve?new un(t):null}function Zt(t){return We||qe?new mn(t):null}var Ut=Object.freeze;Object.freeze=function(t){return t};var Yt=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}(),Kt=0,Gt=/\{ *([\w_-]+) *\}/g,Xt=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Qt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",Jt=0,te=window.requestAnimationFrame||m("RequestAnimationFrame")||g,ee=window.cancelAnimationFrame||m("CancelAnimationFrame")||m("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},ie=(Object.freeze||Object)({freeze:Ut,extend:e,create:Yt,bind:i,lastId:Kt,stamp:n,throttle:s,wrapNum:o,falseFn:a,formatNum:l,trim:h,splitWords:c,setOptions:u,getParamString:d,template:p,isArray:Xt,indexOf:f,emptyImageUrl:Qt,requestFn:te,cancelFn:ee,requestAnimFrame:_,cancelAnimFrame:v});y.extend=function(t){var i=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=i.__super__=this.prototype,s=Yt(n);for(var o in s.constructor=i,i.prototype=s,this)this.hasOwnProperty(o)&&"prototype"!==o&&"__super__"!==o&&(i[o]=this[o]);return t.statics&&(e(i,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=Xt(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),e.apply(null,[s].concat(t.includes)),delete t.includes),s.options&&(t.options=e(Yt(s.options),t.options)),e(s,t),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},i},y.include=function(t){return e(this.prototype,t),this},y.mergeOptions=function(t){return e(this.prototype.options,t),this},y.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var ne={on:function(t,e,i){if("object"==r(t))for(var n in t)this._on(n,t[n],e);else for(var s=0,o=(t=c(t)).length;s<o;s++)this._on(t[s],e,i);return this},off:function(t,e,i){if(t)if("object"==r(t))for(var n in t)this._off(n,t[n],e);else for(var s=0,o=(t=c(t)).length;s<o;s++)this._off(t[s],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var s={fn:e,ctx:i},o=n,r=0,a=o.length;r<a;r++)if(o[r].fn===e&&o[r].ctx===i)return;o.push(s)},_off:function(t,e,i){var n,s,o;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(s=0,o=n.length;s<o;s++){var r=n[s];if(r.ctx===i&&r.fn===e)return r.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(s,1)}}else{for(s=0,o=n.length;s<o;s++)n[s].fn=a;delete this._events[t]}},fire:function(t,i,n){if(!this.listens(t,n))return this;var s=e({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var r=0,a=o.length;r<a;r++){var l=o[r];l.fn.call(l.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==r(t)){for(var s in t)this.once(s,t[s],e);return this}var o=i((function(){this.off(t,e,n).off(t,o,n)}),this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[n(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[n(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};ne.addEventListener=ne.on,ne.removeEventListener=ne.clearAllEventListeners=ne.off,ne.addOneTimeEventListener=ne.once,ne.fireEvent=ne.fire,ne.hasEventListeners=ne.listens;var se=y.extend(ne),oe=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};b.prototype={clone:function(){return new b(this.x,this.y)},add:function(t){return this.clone()._add(x(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(x(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new b(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new b(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=oe(this.x),this.y=oe(this.y),this},distanceTo:function(t){var e=(t=x(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=x(t)).x===this.x&&t.y===this.y},contains:function(t){return t=x(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},w.prototype={extend:function(t){return t=x(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new b((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new b(this.min.x,this.max.y)},getTopRight:function(){return new b(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof b?x(t):k(t))instanceof w?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=k(t);var e=this.min,i=this.max,n=t.min,s=t.max,o=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return o&&r},overlaps:function(t){t=k(t);var e=this.min,i=this.max,n=t.min,s=t.max,o=s.x>e.x&&n.x<i.x,r=s.y>e.y&&n.y<i.y;return o&&r},isValid:function(){return!(!this.min||!this.max)}},T.prototype={extend:function(t){var e,i,n=this._southWest,s=this._northEast;if(t instanceof A)e=t,i=t;else{if(!(t instanceof T))return t?this.extend(E(t)||C(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||s?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),s.lat=Math.max(i.lat,s.lat),s.lng=Math.max(i.lng,s.lng)):(this._southWest=new A(e.lat,e.lng),this._northEast=new A(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new T(new A(e.lat-n,e.lng-s),new A(i.lat+n,i.lng+s))},getCenter:function(){return new A((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new A(this.getNorth(),this.getWest())},getSouthEast:function(){return new A(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof A||"lat"in t?E(t):C(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof T?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=C(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return o&&r},overlaps:function(t){t=C(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>e.lat&&n.lat<i.lat,r=s.lng>e.lng&&n.lng<i.lng;return o&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=C(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},A.prototype={equals:function(t,e){return!!t&&(t=E(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return ae.distance(this,E(t))},wrap:function(){return ae.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return C([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new A(this.lat,this.lng,this.alt)}};var re={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new w(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?o(t.lng,this.wrapLng,!0):t.lng;return new A(this.wrapLat?o(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,s=e.lng-i.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),r=t.getNorthEast();return new T(new A(o.lat-n,o.lng-s),new A(r.lat-n,r.lng-s))}},ae=e({},re,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,s=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=o*o+Math.cos(n)*Math.cos(s)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),le={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=Math.sin(n*e);return new b(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new A((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return new w([-t,-t],[t,t])}()};M.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new b((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var he,ce,ue,de=e({},ae,{code:"EPSG:3857",projection:le,transformation:function(){var t=.5/(Math.PI*le.R);return P(t,.5,-t,.5)}()}),pe=e({},de,{code:"EPSG:900913"}),fe=document.documentElement.style,me="ActiveXObject"in window,ge=me&&!document.addEventListener,_e="msLaunchUri"in navigator&&!("documentMode"in document),ve=D("webkit"),ye=D("android"),be=D("android 2")||D("android 3"),xe=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),we=ye&&D("Google")&&xe<537&&!("AudioNode"in window),ke=!!window.opera,Te=D("chrome"),Ce=D("gecko")&&!ve&&!ke&&!me,Ae=!Te&&D("safari"),Ee=D("phantom"),Me="OTransition"in fe,Le=0===navigator.platform.indexOf("Win"),Pe=me&&"transition"in fe,Se="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!be,Oe="MozPerspective"in fe,De=!window.L_DISABLE_3D&&(Pe||Se||Oe)&&!Me&&!Ee,Ie="undefined"!=typeof orientation||D("mobile"),Ne=Ie&&ve,ze=Ie&&Se,Re=!window.PointerEvent&&window.MSPointerEvent,je=!(!window.PointerEvent&&!Re),Be=!window.L_NO_TOUCH&&(je||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),$e=Ie&&ke,Fe=Ie&&Ce,He=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ve=!!document.createElement("canvas").getContext,We=!(!document.createElementNS||!S("svg").createSVGRect),qe=!We&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==r(e.adj)}catch(t){return!1}}(),Ze=(Object.freeze||Object)({ie:me,ielt9:ge,edge:_e,webkit:ve,android:ye,android23:be,androidStock:we,opera:ke,chrome:Te,gecko:Ce,safari:Ae,phantom:Ee,opera12:Me,win:Le,ie3d:Pe,webkit3d:Se,gecko3d:Oe,any3d:De,mobile:Ie,mobileWebkit:Ne,mobileWebkit3d:ze,msPointer:Re,pointer:je,touch:Be,mobileOpera:$e,mobileGecko:Fe,retina:He,canvas:Ve,svg:We,vml:qe}),Ue=Re?"MSPointerDown":"pointerdown",Ye=Re?"MSPointerMove":"pointermove",Ke=Re?"MSPointerUp":"pointerup",Ge=Re?"MSPointerCancel":"pointercancel",Xe=["INPUT","SELECT","OPTION"],Qe={},Je=!1,ti=0,ei=Re?"MSPointerDown":je?"pointerdown":"touchstart",ii=Re?"MSPointerUp":je?"pointerup":"touchend",ni="_leaflet_",si=et(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),oi=et(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ri="webkitTransition"===oi||"OTransition"===oi?oi+"End":"transitionend";if("onselectstart"in document)he=function(){ut(window,"selectstart",vt)},ce=function(){dt(window,"selectstart",vt)};else{var ai=et(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);he=function(){if(ai){var t=document.documentElement.style;ue=t[ai],t[ai]="none"}},ce=function(){ai&&(document.documentElement.style[ai]=ue,ue=void 0)}}var li,hi,ci,ui=(Object.freeze||Object)({TRANSFORM:si,TRANSITION:oi,TRANSITION_END:ri,get:H,getStyle:V,create:W,remove:q,empty:Z,toFront:U,toBack:Y,hasClass:K,addClass:G,removeClass:X,setClass:Q,getClass:J,setOpacity:tt,testProp:et,setTransform:it,setPosition:nt,getPosition:st,disableTextSelection:he,enableTextSelection:ce,disableImageDrag:ot,enableImageDrag:rt,preventOutline:at,restoreOutline:lt,getSizedParentNode:ht,getScale:ct}),di="_leaflet_events",pi=Le&&Te?2*window.devicePixelRatio:Ce?window.devicePixelRatio:1,fi={},mi=(Object.freeze||Object)({on:ut,off:dt,stopPropagation:mt,disableScrollPropagation:gt,disableClickPropagation:_t,preventDefault:vt,stop:yt,getMousePosition:bt,getWheelDelta:xt,fakeStop:wt,skipped:kt,isExternalTarget:Tt,addListener:ut,removeListener:dt}),gi=se.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=st(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=_(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),nt(this._el,i),this.fire("step")},_complete:function(){v(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),_i=se.extend({options:{crs:de,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=u(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(E(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=oi&&De&&!$e&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ut(this._proxy,ri,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,n){return i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(E(t),i,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=e({animate:n.animate},n.zoom),n.pan=e({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,i),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(De?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(De?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),o=(t instanceof b?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),r=this.containerPointToLatLng(s.add(o));return this.setView(r,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():C(t);var i=x(e.paddingTopLeft||e.padding||[0,0]),n=x(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));if((s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),a=this.project(t.getNorthEast(),s);return{center:this.unproject(r.add(a).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,e){if(!(t=C(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=x(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new gi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){G(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){function n(t){var e=(d*d-u*u+(t?-1:1)*m*m*p*p)/(2*(t?d:u)*m*p),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function s(t){return(Math.exp(t)-Math.exp(-t))/2}function o(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return u*(o(g)*function(t){return s(t)/o(t)}(g+f*t)-s(g))/m}if(!1===(i=i||{}).animate||!De)return this.setView(t,e,i);this._stop();var a=this.project(this.getCenter()),l=this.project(t),h=this.getSize(),c=this._zoom;t=E(t),e=void 0===e?c:e;var u=Math.max(h.x,h.y),d=u*this.getZoomScale(c,e),p=l.distanceTo(a)||1,f=1.42,m=f*f,g=n(0),v=Date.now(),y=(n(1)-g)/f,b=i.duration?1e3*i.duration:1e3*y*.8;return this._moveStart(!0,i.noMoveStart),function i(){var n=(Date.now()-v)/b,s=function(t){return 1-Math.pow(1-t,1.5)}(n)*y;n<=1?(this._flyToFrame=_(i,this),this._move(this.unproject(a.add(l.subtract(a).multiplyBy(r(s)/p)),c),this.getScaleZoom(u/function(t){return u*(o(g)/o(g+f*t))}(s),c),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=C(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,C(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=x((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=x(e.paddingBottomRight||e.padding||[0,0]),s=this.getCenter(),o=this.project(s),r=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),h=k([a.min.add(i),a.max.subtract(n)]);if(!h.contains(r)){this._enforcingBounds=!0;var c=o.subtract(r),u=x(r.x+c.x,r.y+c.y);(r.x<h.min.x||r.x>h.max.x)&&(u.x=o.x-c.x,c.x>0?u.x+=l.x-i.x:u.x-=l.x-n.x),(r.y<h.min.y||r.y>h.max.y)&&(u.y=o.y-c.y,c.y>0?u.y+=l.y-i.y:u.y-=l.y-n.y),this.panTo(this.unproject(u),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),o=n.divideBy(2).round(),r=s.divideBy(2).round(),a=o.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=i(this._handleGeolocationResponse,this),s=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,s,t):navigator.geolocation.getCurrentPosition(n,s,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=new A(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(o[r]=t.coords[r]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),q(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(v(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)q(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=W("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new T(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=C(t),i=x(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=k(this.project(a,n),this.project(r,n)).getSize(),c=De?this.options.zoomSnap:1,u=l.x/h.x,d=l.y/h.y,p=e?Math.max(u,d):Math.min(u,d);return n=this.getScaleZoom(p,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new b(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new w(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(E(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(x(t),e)},layerPointToLatLng:function(t){var e=x(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(E(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(E(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(C(t))},distance:function(t,e){return this.options.crs.distance(E(t),E(e))},containerPointToLayerPoint:function(t){return x(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return x(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(x(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(E(t)))},mouseEventToContainerPoint:function(t){return bt(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=H(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");ut(e,"scroll",this._onScroll,this),this._containerId=n(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&De,G(t,"leaflet-container"+(Be?" leaflet-touch":"")+(He?" leaflet-retina":"")+(ge?" leaflet-oldie":"")+(Ae?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=V(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),nt(this._mapPane,new b(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(G(t.markerPane,"leaflet-zoom-hide"),G(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){nt(this._mapPane,new b(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return v(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){nt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[n(this._container)]=this;var e=t?dt:ut;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),De&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){v(this._resizeRequest),this._resizeRequest=_((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,s=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((i=this._targets[n(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(o&&!Tt(r,t))break;if(s.push(i),o)break}if(r===this._container)break;r=r.parentNode}return s.length||a||o||!Tt(r,t)||(s=[this]),s},_handleDOMEvent:function(t){if(this._loaded&&!kt(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||at(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){if("click"===t.type){var s=e({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,i))).length){var o=n[0];"contextmenu"===i&&o.listens(i,!0)&&vt(t);var r={originalEvent:t};if("keypress"!==t.type){var a=o.getLatLng&&(!o._radius||o._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?o.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var l=0;l<n.length;l++)if(n[l].fire(i,r,!0),r.originalEvent._stopped||!1===n[l].options.bubblingMouseEvents&&-1!==f(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return st(this._mapPane)||new b(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return k([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),o=new w(n.subtract(s),n.add(s)),r=this._getBoundsOffset(o,i,e);return r.round().equals([0,0])?t:this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new w(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=k(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new b(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=De?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){X(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=W("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=si,i=this._proxy.style[e];it(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",(function(){var t=this.getCenter(),e=this.getZoom();it(this._proxy,this.project(t,e),this.getZoomScale(e,1))}),this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){q(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(s)||(_((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,s){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,G(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:s}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&X(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),_((function(){this._moveEnd(!0)}),this))}}),vi=y.extend({options:{position:"topright"},initialize:function(t){u(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return G(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},remove:function(){return this._map?(q(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),yi=function(t){return new vi(t)};_i.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,s){var o=i+t+" "+i+s;e[t+s]=W("div",o,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=W("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)q(this._controlCorners[t]);q(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var bi=vi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in u(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return vi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(n(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){G(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(G(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):X(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return X(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=W("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),_t(e),gt(e);var n=this._section=W("section",t+"-list");i&&(this._map.on("click",this.collapse,this),ye||ut(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var s=this._layersLink=W("a",t+"-toggle",e);s.href="#",s.title="Layers",Be?(ut(s,"click",yt),ut(s,"click",this.expand,this)):ut(s,"focus",this.expand,this),i||this.expand(),this._baseLayersList=W("div",t+"-base",n),this._separator=W("div",t+"-separator",n),this._overlaysList=W("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&n(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(i((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Z(this._baseLayersList),Z(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,s=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(n(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=s):e=this._createRadioElement("leaflet-base-layers",s),this._layerControlInputs.push(e),e.layerId=n(t.layer),ut(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return i.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||s.push(e);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),xi=vi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=W("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,s){var o=W("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),_t(o),ut(o,"click",yt),ut(o,"click",s,this),ut(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";X(this._zoomInButton,e),X(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&G(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&G(this._zoomInButton,e)}});_i.mergeOptions({zoomControl:!0}),_i.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new xi,this.addControl(this.zoomControl))}));var wi=vi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=W("div","leaflet-control-scale"),i=this.options;return this._addScales(i,"leaflet-control-scale-line",e),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=W("div",e,i)),t.imperial&&(this._iScale=W("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,s=3.2808399*t;s>5280?(e=s/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),ki=vi.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){u(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=W("div","leaflet-control-attribution"),_t(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});_i.mergeOptions({attributionControl:!0}),_i.addInitHook((function(){this.options.attributionControl&&(new ki).addTo(this)})),vi.Layers=bi,vi.Zoom=xi,vi.Scale=wi,vi.Attribution=ki,yi.layers=function(t,e,i){return new bi(t,e,i)},yi.zoom=function(t){return new xi(t)},yi.scale=function(t){return new wi(t)},yi.attribution=function(t){return new ki(t)};var Ti=y.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ti.addTo=function(t,e){return t.addHandler(e,this),this};var Ci,Ai={Events:ne},Ei=Be?"touchstart mousedown":"mousedown",Mi={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Li={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Pi=se.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){u(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(ut(this._dragStartTarget,Ei,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Pi._dragging===this&&this.finishDrag(),dt(this._dragStartTarget,Ei,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!K(this._element,"leaflet-zoom-anim")&&!(Pi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Pi._dragging=this,this._preventOutline&&at(this._element),ot(),he(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=ht(this._element);this._startPoint=new b(e.clientX,e.clientY),this._parentScale=ct(i),ut(document,Li[t.type],this._onMove,this),ut(document,Mi[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new b(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,vt(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=st(this._element).subtract(i),G(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),G(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,v(this._animRequest),this._lastEvent=t,this._animRequest=_(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),nt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in X(document.body,"leaflet-dragging"),this._lastTarget&&(X(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Li)dt(document,Li[t],this._onMove,this),dt(document,Mi[t],this._onUp,this);rt(),ce(),this._moved&&this._moving&&(v(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Pi._dragging=!1}}),Si=(Object.freeze||Object)({simplify:Ct,pointToSegmentDistance:At,closestPointOnSegment:function(t,e,i){return Ot(t,e,i)},clipSegment:Mt,_getEdgeIntersection:Lt,_getBitCode:Pt,_sqClosestPointOnSegment:Ot,isFlat:Dt,_flat:It}),Oi=(Object.freeze||Object)({clipPolygon:Nt}),Di={project:function(t){return new b(t.lng,t.lat)},unproject:function(t){return new A(t.y,t.x)},bounds:new w([-180,-90],[180,90])},Ii={R:6378137,R_MINOR:6356752.314245179,bounds:new w([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,o=Math.sqrt(1-s*s),r=o*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),o/2);return n=-i*Math.log(Math.max(a,1e-10)),new b(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=o*Math.sin(a),e=Math.pow((1-e)/(1+e),o/2),a+=h=Math.PI/2-2*Math.atan(r*e)-a;return new A(a*i,t.x*i/n)}},Ni=(Object.freeze||Object)({LonLat:Di,Mercator:Ii,SphericalMercator:le}),zi=e({},ae,{code:"EPSG:3395",projection:Ii,transformation:function(){var t=.5/(Math.PI*Ii.R);return P(t,.5,-t,.5)}()}),Ri=e({},ae,{code:"EPSG:4326",projection:Di,transformation:P(1/180,1,-1/180,.5)}),ji=e({},re,{projection:Di,transformation:P(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});re.Earth=ae,re.EPSG3395=zi,re.EPSG3857=de,re.EPSG900913=pe,re.EPSG4326=Ri,re.Simple=ji;var Bi=se.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[n(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[n(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});_i.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=n(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=n(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&n(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?Xt(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[n(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=n(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),e=void 0===s.maxZoom?e:Math.max(e,s.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var $i=Bi.extend({initialize:function(t,e){var i,n;if(u(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return n(t)}}),Fi=$i.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),$i.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),$i.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new T;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Hi=y.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){u(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=x(n),o=x("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return He&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Vi=Hi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Vi.imagePath||(Vi.imagePath=this._detectIconPath()),(this.options.imagePath||Vi.imagePath)+Hi.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=W("div","leaflet-default-icon-path",document.body),e=V(t,"background-image")||V(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Wi=Ti.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Pi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),G(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&X(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=st(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),l=k(r.min._subtract(a).add(s),r.max._subtract(a).subtract(s));if(!l.contains(o)){var h=x((Math.max(l.max.x,o.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),nt(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=_(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(v(this._panRequest),this._panRequest=_(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=st(e._icon),s=e._map.layerPointToLatLng(n);i&&nt(i,n),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){v(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),qi=Bi.extend({options:{icon:new Vi,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){u(this,e),this._latlng=E(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=E(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),G(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(G(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),q(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&q(this._shadow),this._shadow=null},_setPos:function(t){nt(this._icon,t),this._shadow&&nt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(G(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Wi)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Wi(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;tt(this._icon,t),this._shadow&&tt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Zi=Bi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return u(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Ui=Zi.extend({options:{fill:!0,radius:10},initialize:function(t,e){u(this,e),this._latlng=E(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=E(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Zi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new w(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Yi=Ui.extend({initialize:function(t,i,n){if("number"==typeof i&&(i=e({},n,{radius:i})),u(this,i),this._latlng=E(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new T(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Zi.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===ae.distance){var s=Math.PI/180,o=this._mRadius/ae.R/s,r=i.project([e+o,t]),a=i.project([e-o,t]),l=r.add(a).divideBy(2),h=i.unproject(l).lat,c=Math.acos((Math.cos(o*s)-Math.sin(e*s)*Math.sin(h*s))/(Math.cos(e*s)*Math.cos(h*s)))/s;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([h,t-c]).x,this._radiusY=l.y-r.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(u).x}this._updateBounds()}}),Ki=Zi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){u(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,s=null,o=Ot,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,c=l.length;h<c;h++){var u=o(t,e=l[h-1],i=l[h],!0);u<n&&(n=u,s=o(t,e,i))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,s,o,r,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,n=0;t<l-1;t++)if(s=a[t],o=a[t+1],(n+=i=s.distanceTo(o))>e)return r=(n-e)/i,this._map.layerPointToLatLng([o.x-r*(o.x-s.x),o.y-r*(o.y-s.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=E(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new T,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Dt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Dt(t),n=0,s=t.length;n<s;n++)i?(e[n]=E(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new w;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new b(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t)},_projectLatlngs:function(t,e,i){var n,s,o=t[0]instanceof A,r=t.length;if(o){for(s=[],n=0;n<r;n++)s[n]=this._map.latLngToLayerPoint(t[n]),i.extend(s[n]);e.push(s)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,s,o,r,a,l=this._parts;for(e=0,n=0,s=this._rings.length;e<s;e++)for(i=0,o=(a=this._rings[e]).length;i<o-1;i++)(r=Mt(a[i],a[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(r[0]),r[1]===a[i+1]&&i!==o-2||(l[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=Ct(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,s,o,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,s=(r=(a=this._parts[i]).length)-1;n<r;s=n++)if((e||0!==n)&&At(t,a[s],a[n])<=l)return!0;return!1}});Ki._flat=It;var Gi=Ki.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,s,o,r,a,l,h=this._rings[0],c=h.length;if(!c)return null;for(o=r=a=0,t=0,e=c-1;t<c;e=t++)i=h[t],n=h[e],s=i.y*n.x-n.y*i.x,r+=(i.x+n.x)*s,a+=(i.y+n.y)*s,o+=3*s;return l=0===o?h[0]:[r/o,a/o],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=Ki.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof A&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Ki.prototype._setLatLngs.call(this,t),Dt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Dt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new b(e,e);if(t=new w(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s=0,o=this._rings.length;s<o;s++)(n=Nt(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,s,o,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,a=this._parts.length;s<a;s++)for(o=0,r=(l=(e=this._parts[s]).length)-1;o<l;r=o++)i=e[o],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||Ki.prototype._containsPoint.call(this,t,!0)}}),Xi=Fi.extend({initialize:function(t,e){u(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=Xt(t)?t:t.features;if(s){for(e=0,i=s.length;e<i;e++)((n=s[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=zt(t,o);return r?(r.feature=Ht(t),r.defaultOptions=r.options,this.resetStyle(r),o.onEachFeature&&o.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),Qi={toGeoJSON:function(t){return Ft(this,{type:"Point",coordinates:Bt(this.getLatLng(),t)})}};qi.include(Qi),Yi.include(Qi),Ui.include(Qi),Ki.include({toGeoJSON:function(t){var e=!Dt(this._latlngs);return Ft(this,{type:(e?"Multi":"")+"LineString",coordinates:$t(this._latlngs,e?1:0,!1,t)})}}),Gi.include({toGeoJSON:function(t){var e=!Dt(this._latlngs),i=e&&!Dt(this._latlngs[0]),n=$t(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ft(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),$i.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),Ft(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer((function(e){if(e.toGeoJSON){var s=e.toGeoJSON(t);if(i)n.push(s.geometry);else{var o=Ht(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}})),i?Ft(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Ji=Vt,tn=Bi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=C(e),u(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(G(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){q(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&U(this._image),this},bringToBack:function(){return this._map&&Y(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=C(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:W("img");G(e,"leaflet-image-layer"),this._zoomAnimated&&G(e,"leaflet-zoom-animated"),this.options.className&&G(e,this.options.className),e.onselectstart=a,e.onmousemove=a,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;it(this._image,i,e)},_reset:function(){var t=this._image,e=new w(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();nt(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){tt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),en=tn.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:W("video");if(G(e,"leaflet-image-layer"),this._zoomAnimated&&G(e,"leaflet-zoom-animated"),e.onselectstart=a,e.onmousemove=a,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),s=[],o=0;o<n.length;o++)s.push(n[o].src);this._url=n.length>0?s:[e.src]}else{Xt(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var r=0;r<this._url.length;r++){var l=W("source");l.src=this._url[r],e.appendChild(l)}}}}),nn=Bi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){u(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&tt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&tt(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(tt(this._container,0),this._removeTimeout=setTimeout(i(q,void 0,this._container),200)):q(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=E(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&U(this._container),this},bringToBack:function(){return this._map&&Y(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=x(this.options.offset),i=this._getAnchor();this._zoomAnimated?nt(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}}),sn=nn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){nn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Zi||this._source.on("preclick",mt))},onRemove:function(t){nn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Zi||this._source.off("preclick",mt))},getEvents:function(){var t=nn.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=W("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=W("div",t+"-content-wrapper",e);if(this._contentNode=W("div",t+"-content",i),_t(i),gt(this._contentNode),ut(i,"contextmenu",mt),this._tipContainer=W("div",t+"-tip-container",e),this._tip=W("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=W("a",t+"-close-button",e);n.href="#close",n.innerHTML="&#215;",ut(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight;s&&n>s?(e.height=s+"px",G(t,"leaflet-popup-scrolled")):X(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();nt(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(V(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new b(this._containerLeft,-i-this._containerBottom);s._add(st(this._container));var o=t.layerPointToContainerPoint(s),r=x(this.options.autoPanPadding),a=x(this.options.autoPanPaddingTopLeft||r),l=x(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),c=0,u=0;o.x+n+l.x>h.x&&(c=o.x+n-h.x+l.x),o.x-c-a.x<0&&(c=o.x-a.x),o.y+i+l.y>h.y&&(u=o.y+i-h.y+l.y),o.y-u-a.y<0&&(u=o.y-a.y),(c||u)&&t.fire("autopanstart").panBy([c,u])}},_onCloseButtonClick:function(t){this._close(),yt(t)},_getAnchor:function(){return x(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});_i.mergeOptions({closePopupOnClick:!0}),_i.include({openPopup:function(t,e,i){return t instanceof sn||(t=new sn(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Bi.include({bindPopup:function(t,e){return t instanceof sn?(u(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new sn(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof Bi||(e=t,t=this),t instanceof Fi)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(yt(t),e instanceof Zi?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var on=nn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){nn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){nn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=nn.prototype.getEvents.call(this);return Be&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=W("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),o=this.options.direction,r=i.offsetWidth,a=i.offsetHeight,l=x(this.options.offset),h=this._getAnchor();"top"===o?t=t.add(x(-r/2+l.x,-a+l.y+h.y,!0)):"bottom"===o?t=t.subtract(x(r/2-l.x,-l.y,!0)):"center"===o?t=t.subtract(x(r/2+l.x,a/2-h.y+l.y,!0)):"right"===o||"auto"===o&&s.x<n.x?(o="right",t=t.add(x(l.x+h.x,h.y-a/2+l.y,!0))):(o="left",t=t.subtract(x(r+h.x-l.x,a/2-h.y-l.y,!0))),X(i,"leaflet-tooltip-right"),X(i,"leaflet-tooltip-left"),X(i,"leaflet-tooltip-top"),X(i,"leaflet-tooltip-bottom"),G(i,"leaflet-tooltip-"+o),nt(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&tt(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return x(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});_i.include({openTooltip:function(t,e,i){return t instanceof on||(t=new on(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Bi.include({bindTooltip:function(t,e){return t instanceof on?(u(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new on(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),Be&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof Bi||(e=t,t=this),t instanceof Fi)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(G(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(X(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var rn=Hi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=x(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Hi.Default=Vi;var an=Bi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ie,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){u(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),q(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(U(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Y(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof b?t:new b(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),s=0,o=i.length;s<o;s++)e=i[s].style.zIndex,i[s]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!ge){tt(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);tt(s.el,o),o<1?e=!0:(s.active?i=!0:this._onOpaqueTile(s),s.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(v(this._fadeFrame),this._fadeFrame=_(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=W("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(q(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=W("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)q(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var s=Math.floor(t/2),o=Math.floor(e/2),r=i-1,a=new b(+s,+o);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>n&&this._retainParent(s,o,r,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*e;o<2*e+2;o++){var r=new b(s,o);r.z=i+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(s,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var s=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom)&&(s=void 0);var o=this.options.updateWhenZooming&&s!==this._tileZoom;n&&!o||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();De?it(t.el,s,n):nt(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*n);return new w(s.subtract(o),s.add(o))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),r=[],a=this.options.keepBuffer,l=new w(s.getBottomLeft().subtract([a,-a]),s.getTopRight().add([a,-a]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&l.contains(new b(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var u=s.min.y;u<=s.max.y;u++)for(var d=s.min.x;d<=s.max.x;d++){var p=new b(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return C(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i);return[e.unproject(n,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new T(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new b(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(q(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){G(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=a,t.onmousemove=a,ge&&this.options.opacity<1&&tt(t,this.options.opacity),ye&&!be&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&_(i(this._tileReady,this,t,null,o)),nt(o,n),this._tiles[s]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var s=this._tileCoordsToKey(t);(n=this._tiles[s])&&(n.loaded=+new Date,this._map._fadeAnimated?(tt(n.el,0),v(this._fadeFrame),this._fadeFrame=_(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(G(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ge||!this._map._fadeAnimated?_(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new b(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new w(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),ln=an.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=u(this,e)).detectRetina&&He&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ye||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return ut(n,"load",i(this._tileOnLoad,this,e,n)),ut(n,"error",i(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var i={r:He?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(i.y=n),i["-y"]=n}return p(this._url,e(i,this.options))},_tileOnLoad:function(t,e){ge?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=a,e.onerror=a,e.complete||(e.src=Qt,q(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return we||e.el.setAttribute("src",Qt),an.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==Qt))return an.prototype._tileReady.call(this,t,e,i)}}),hn=ln.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,i){this._url=t;var n=e({},this.defaultWmsParams);for(var s in i)s in this.options||(n[s]=i[s]);var o=(i=u(this,i)).detectRetina&&He?2:1,r=this.getTileSize();n.width=r.x*o,n.height=r.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,ln.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=k(i.project(e[0]),i.project(e[1])),s=n.min,o=n.max,r=(this._wmsVersion>=1.3&&this._crs===Ri?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),a=ln.prototype.getTileUrl.call(this,t);return a+d(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});ln.WMS=hn,Wt.wms=function(t,e){return new hn(t,e)};var cn=Bi.extend({options:{padding:.1,tolerance:0},initialize:function(t){u(this,t),n(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&G(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=st(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=this._map.project(t,e).subtract(o),a=s.multiplyBy(-i).add(n).add(s).subtract(r);De?it(this._container,a,i):nt(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new w(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),un=cn.extend({getEvents:function(){var t=cn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){cn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ut(t,"mousemove",s(this._onMouseMove,32,this),this),ut(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ut(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){v(this._redrawRequest),delete this._ctx,q(this._container),dt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){cn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=He?2:1;nt(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",He&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){cn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[n(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,s=e.prev;i?i.prev=s:this._drawLast=s,s?s.next=i:this._drawFirst=i,delete t._order,delete this._layers[n(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),s=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;s.push(e)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||_(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new w,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,s,o,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(n=0,s=r[i].length;n<s;n++)o=r[i][n],l[n?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,n,0,2*Math.PI,!1),1!==s&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(wt(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(X(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(G(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}}),dn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),pn={_initContainer:function(){this._container=W("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(cn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=dn("shape");G(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=dn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;q(e),t.removeInteractiveTarget(e),delete this._layers[n(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=dn("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=Xt(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=dn("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){U(t._container)},_bringToBack:function(t){Y(t._container)}},fn=qe?dn:S,mn=cn.extend({getEvents:function(){var t=cn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=fn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){q(this._container),dt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){cn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),nt(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=fn("path");t.options.className&&G(e,t.options.className),t.options.interactive&&G(e,"leaflet-interactive"),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){q(t._path),t.removeInteractiveTarget(t._path),delete this._layers[n(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,O(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){U(t._path)},_bringToBack:function(t){Y(t._path)}});qe&&mn.include(pn),_i.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&qt(t)||Zt(t)}});var gn=Gi.extend({initialize:function(t,e){Gi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=C(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});mn.create=fn,mn.pointsToPath=O,Xi.geometryToLayer=zt,Xi.coordsToLatLng=Rt,Xi.coordsToLatLngs=jt,Xi.latLngToCoords=Bt,Xi.latLngsToCoords=$t,Xi.getFeature=Ft,Xi.asFeature=Ht,_i.mergeOptions({boxZoom:!0});var _n=Ti.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ut(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){dt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){q(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),he(),ot(),this._startPoint=this._map.mouseEventToContainerPoint(t),ut(document,{contextmenu:yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=W("div","leaflet-zoom-box",this._container),G(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new w(this._point,this._startPoint),i=e.getSize();nt(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(q(this._box),X(this._container,"leaflet-crosshair")),ce(),rt(),dt(document,{contextmenu:yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new T(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});_i.addInitHook("addHandler","boxZoom",_n),_i.mergeOptions({doubleClickZoom:!0});var vn=Ti.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,s=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});_i.addInitHook("addHandler","doubleClickZoom",vn),_i.mergeOptions({dragging:!0,inertia:!be,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=Ti.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Pi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}G(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){X(this._map._container,"leaflet-grab"),X(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=C(this._map.options.maxBounds);this._offsetLimit=k(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,r=Math.abs(s+i)<Math.abs(o+i)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,a=s.multiplyBy(r/o),l=a.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),c=a.multiplyBy(h/l),u=h/(i.inertiaDeceleration*r),d=c.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),_((function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});_i.addInitHook("addHandler","dragging",yn),_i.mergeOptions({keyboard:!0,keyboardPanDelta:80});var bn=Ti.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ut(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),dt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},s=this.keyCodes;for(e=0,i=s.left.length;e<i;e++)n[s.left[e]]=[-1*t,0];for(e=0,i=s.right.length;e<i;e++)n[s.right[e]]=[t,0];for(e=0,i=s.down.length;e<i;e++)n[s.down[e]]=[0,t];for(e=0,i=s.up.length;e<i;e++)n[s.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},s=this.keyCodes;for(e=0,i=s.zoomIn.length;e<i;e++)n[s.zoomIn[e]]=t;for(e=0,i=s.zoomOut.length;e<i;e++)n[s.zoomOut[e]]=-t},_addHooks:function(){ut(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){dt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=x(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}yt(t)}}});_i.addInitHook("addHandler","keyboard",bn),_i.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var xn=Ti.extend({addHooks:function(){ut(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){dt(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=xt(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),s),yt(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),s=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=i?Math.ceil(s/i)*i:s,r=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});_i.addInitHook("addHandler","scrollWheelZoom",xn),_i.mergeOptions({tap:!0,tapTolerance:15});var wn=Ti.extend({addHooks:function(){ut(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){dt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(vt(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new b(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&G(n,"leaflet-active"),this._holdTimeout=setTimeout(i((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),ut(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),dt(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&X(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new b(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});Be&&!je&&_i.addInitHook("addHandler","tap",wn),_i.mergeOptions({touchZoom:Be&&!be,bounceAtZoomLimits:!0});var kn=Ti.extend({addHooks:function(){G(this._map._container,"leaflet-touch-zoom"),ut(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){X(this._map._container,"leaflet-touch-zoom"),dt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ut(document,"touchmove",this._onTouchMove,this),ut(document,"touchend",this._onTouchEnd,this),vt(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(s)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var r=n._add(s)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),v(this._animRequest);var a=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=_(a,this,!0),vt(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,v(this._animRequest),dt(document,"touchmove",this._onTouchMove),dt(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});_i.addInitHook("addHandler","touchZoom",kn),_i.BoxZoom=_n,_i.DoubleClickZoom=vn,_i.Drag=yn,_i.Keyboard=bn,_i.ScrollWheelZoom=xn,_i.Tap=wn,_i.TouchZoom=kn,Object.freeze=Ut,t.version="1.4.0+HEAD.3337f36",t.Control=vi,t.control=yi,t.Browser=Ze,t.Evented=se,t.Mixin=Ai,t.Util=ie,t.Class=y,t.Handler=Ti,t.extend=e,t.bind=i,t.stamp=n,t.setOptions=u,t.DomEvent=mi,t.DomUtil=ui,t.PosAnimation=gi,t.Draggable=Pi,t.LineUtil=Si,t.PolyUtil=Oi,t.Point=b,t.point=x,t.Bounds=w,t.bounds=k,t.Transformation=M,t.transformation=P,t.Projection=Ni,t.LatLng=A,t.latLng=E,t.LatLngBounds=T,t.latLngBounds=C,t.CRS=re,t.GeoJSON=Xi,t.geoJSON=Vt,t.geoJson=Ji,t.Layer=Bi,t.LayerGroup=$i,t.layerGroup=function(t,e){return new $i(t,e)},t.FeatureGroup=Fi,t.featureGroup=function(t){return new Fi(t)},t.ImageOverlay=tn,t.imageOverlay=function(t,e,i){return new tn(t,e,i)},t.VideoOverlay=en,t.videoOverlay=function(t,e,i){return new en(t,e,i)},t.DivOverlay=nn,t.Popup=sn,t.popup=function(t,e){return new sn(t,e)},t.Tooltip=on,t.tooltip=function(t,e){return new on(t,e)},t.Icon=Hi,t.icon=function(t){return new Hi(t)},t.DivIcon=rn,t.divIcon=function(t){return new rn(t)},t.Marker=qi,t.marker=function(t,e){return new qi(t,e)},t.TileLayer=ln,t.tileLayer=Wt,t.GridLayer=an,t.gridLayer=function(t){return new an(t)},t.SVG=mn,t.svg=Zt,t.Renderer=cn,t.Canvas=un,t.canvas=qt,t.Path=Zi,t.CircleMarker=Ui,t.circleMarker=function(t,e){return new Ui(t,e)},t.Circle=Yi,t.circle=function(t,e,i){return new Yi(t,e,i)},t.Polyline=Ki,t.polyline=function(t,e){return new Ki(t,e)},t.Polygon=Gi,t.polygon=function(t,e){return new Gi(t,e)},t.Rectangle=gn,t.rectangle=function(t,e){return new gn(t,e)},t.Map=_i,t.map=function(t,e){return new _i(t,e)};var Tn=window.L;t.noConflict=function(){return window.L=Tn,this},window.L=t},"object"==r(e)?o(e):(n=[e],void 0===(s="function"==typeof(i=o)?i.apply(e,n):i)||(t.exports=s))},59858:(t,e,i)=>{"use strict";var n,s,o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a="object"===("undefined"==typeof window?"undefined":r(window));s=[i(19755)],n=function(t){var e,i="slider",n="bootstrapSlider";return a&&!window.console&&(window.console={}),a&&!window.console.log&&(window.console.log=function(){}),a&&!window.console.warn&&(window.console.warn=function(){}),function(t){var e=Array.prototype.slice;function i(){}function n(t){if(t){var n="undefined"==typeof console?i:function(t){console.error(t)};return t.bridget=function(t,e){s(e),o(t,e)},t.bridget}function s(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function o(i,s){t.fn[i]=function(o){if("string"==typeof o){for(var r=e.call(arguments,1),a=0,l=this.length;a<l;a++){var h=this[a],c=t.data(h,i);if(c)if(t.isFunction(c[o])&&"_"!==o.charAt(0)){var u=c[o].apply(c,r);if(void 0!==u&&u!==c)return u}else n("no such method '"+o+"' for "+i+" instance");else n("cannot call methods on "+i+" prior to initialization; attempted to call '"+o+"'")}return this}var d=this.map((function(){var e=t.data(this,i);return e?(e.option(o),e._init()):(e=new s(this,o),t.data(this,i,e)),t(this)}));return 1===d.length?d[0]:d}}}n(t)}(t),function(t){var s=void 0,o={formatInvalidInputErrorMsg:function(t){return"Invalid input value '"+t+"' passed in"},callingContextNotSliderInstance:"Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method"},r={linear:{getValue:function(t,e){return t<e.min?e.min:t>e.max?e.max:t},toValue:function(t){var e=t/100*(this.options.max-this.options.min),i=!0;if(this.options.ticks_positions.length>0){for(var n,s,o,a=0,l=1;l<this.options.ticks_positions.length;l++)if(t<=this.options.ticks_positions[l]){n=this.options.ticks[l-1],o=this.options.ticks_positions[l-1],s=this.options.ticks[l],a=this.options.ticks_positions[l];break}e=n+(t-o)/(a-o)*(s-n),i=!1}var h=(i?this.options.min:0)+Math.round(e/this.options.step)*this.options.step;return r.linear.getValue(h,this.options)},toPercentage:function(t){if(this.options.max===this.options.min)return 0;if(this.options.ticks_positions.length>0){for(var e,i,n,s=0,o=0;o<this.options.ticks.length;o++)if(t<=this.options.ticks[o]){e=o>0?this.options.ticks[o-1]:0,n=o>0?this.options.ticks_positions[o-1]:0,i=this.options.ticks[o],s=this.options.ticks_positions[o];break}if(o>0)return n+(t-e)/(i-e)*(s-n)}return 100*(t-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(t){var e=1-this.options.min,i=Math.log(this.options.min+e),n=Math.log(this.options.max+e),s=Math.exp(i+(n-i)*t/100)-e;return Math.round(s)===n?n:(s=this.options.min+Math.round((s-this.options.min)/this.options.step)*this.options.step,r.linear.getValue(s,this.options))},toPercentage:function(t){if(this.options.max===this.options.min)return 0;var e=1-this.options.min,i=Math.log(this.options.max+e),n=Math.log(this.options.min+e);return 100*(Math.log(t+e)-n)/(i-n)}}};function l(e,i){this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1,tickIndex:null},this.ticksCallbackMap={},this.handleCallbackMap={},"string"==typeof e?this.element=document.querySelector(e):e instanceof HTMLElement&&(this.element=e),i=i||{};for(var n=Object.keys(this.defaultOptions),s=i.hasOwnProperty("min"),o=i.hasOwnProperty("max"),a=0;a<n.length;a++){var l=n[a],h=i[l];h=null!==(h=void 0!==h?h:u(this.element,l))?h:this.defaultOptions[l],this.options||(this.options={}),this.options[l]=h}if(this.ticksAreValid=Array.isArray(this.options.ticks)&&this.options.ticks.length>0,this.ticksAreValid||(this.options.lock_to_ticks=!1),"auto"===this.options.rtl){var c=window.getComputedStyle(this.element);this.options.rtl=null!=c?"rtl"===c.direction:"rtl"===this.element.style.direction}function u(t,e){var i="data-slider-"+e.replace(/_/g,"-"),n=t.getAttribute(i);try{return JSON.parse(n)}catch(t){return n}}"vertical"!==this.options.orientation||"top"!==this.options.tooltip_position&&"bottom"!==this.options.tooltip_position?"horizontal"!==this.options.orientation||"left"!==this.options.tooltip_position&&"right"!==this.options.tooltip_position||(this.options.tooltip_position="top"):this.options.rtl?this.options.tooltip_position="left":this.options.tooltip_position="right";var d,p,f,m,g,_=this.element.style.width,v=!1,y=this.element.parentNode;if(this.sliderElem)v=!0;else{this.sliderElem=document.createElement("div"),this.sliderElem.className="slider";var b=document.createElement("div");b.className="slider-track",(p=document.createElement("div")).className="slider-track-low",(d=document.createElement("div")).className="slider-selection",(f=document.createElement("div")).className="slider-track-high",(m=document.createElement("div")).className="slider-handle min-slider-handle",m.setAttribute("role","slider"),m.setAttribute("aria-valuemin",this.options.min),m.setAttribute("aria-valuemax",this.options.max),(g=document.createElement("div")).className="slider-handle max-slider-handle",g.setAttribute("role","slider"),g.setAttribute("aria-valuemin",this.options.min),g.setAttribute("aria-valuemax",this.options.max),b.appendChild(p),b.appendChild(d),b.appendChild(f),this.rangeHighlightElements=[];var x=this.options.rangeHighlights;if(Array.isArray(x)&&x.length>0)for(var w=0;w<x.length;w++){var k=document.createElement("div"),T=x[w].class||"";k.className="slider-rangeHighlight slider-selection "+T,this.rangeHighlightElements.push(k),b.appendChild(k)}var C=Array.isArray(this.options.labelledby);if(C&&this.options.labelledby[0]&&m.setAttribute("aria-labelledby",this.options.labelledby[0]),C&&this.options.labelledby[1]&&g.setAttribute("aria-labelledby",this.options.labelledby[1]),!C&&this.options.labelledby&&(m.setAttribute("aria-labelledby",this.options.labelledby),g.setAttribute("aria-labelledby",this.options.labelledby)),this.ticks=[],Array.isArray(this.options.ticks)&&this.options.ticks.length>0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",a=0;a<this.options.ticks.length;a++){var A=document.createElement("div");if(A.className="slider-tick",this.options.ticks_tooltip){var E=this._addTickListener(),M=E.addMouseEnter(this,A,a),L=E.addMouseLeave(this,A);this.ticksCallbackMap[a]={mouseEnter:M,mouseLeave:L}}this.ticks.push(A),this.ticksContainer.appendChild(A)}d.className+=" tick-slider-selection"}if(this.tickLabels=[],Array.isArray(this.options.ticks_labels)&&this.options.ticks_labels.length>0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",a=0;a<this.options.ticks_labels.length;a++){var P=document.createElement("div"),S=0===this.options.ticks_positions.length,O=this.options.reversed&&S?this.options.ticks_labels.length-(a+1):a;P.className="slider-tick-label",P.innerHTML=this.options.ticks_labels[O],this.tickLabels.push(P),this.tickLabelContainer.appendChild(P)}var D=function(t){var e=document.createElement("div");e.className="arrow";var i=document.createElement("div");i.className="tooltip-inner",t.appendChild(e),t.appendChild(i)},I=document.createElement("div");I.className="tooltip tooltip-main",I.setAttribute("role","presentation"),D(I);var N=document.createElement("div");N.className="tooltip tooltip-min",N.setAttribute("role","presentation"),D(N);var z=document.createElement("div");z.className="tooltip tooltip-max",z.setAttribute("role","presentation"),D(z),this.sliderElem.appendChild(b),this.sliderElem.appendChild(I),this.sliderElem.appendChild(N),this.sliderElem.appendChild(z),this.tickLabelContainer&&this.sliderElem.appendChild(this.tickLabelContainer),this.ticksContainer&&this.sliderElem.appendChild(this.ticksContainer),this.sliderElem.appendChild(m),this.sliderElem.appendChild(g),y.insertBefore(this.sliderElem,this.element),this.element.style.display="none"}if(t&&(this.$element=t(this.element),this.$sliderElem=t(this.sliderElem)),this.eventToCallbackMap={},this.sliderElem.id=this.options.id,this.touchCapable="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,this.touchX=0,this.touchY=0,this.tooltip=this.sliderElem.querySelector(".tooltip-main"),this.tooltipInner=this.tooltip.querySelector(".tooltip-inner"),this.tooltip_min=this.sliderElem.querySelector(".tooltip-min"),this.tooltipInner_min=this.tooltip_min.querySelector(".tooltip-inner"),this.tooltip_max=this.sliderElem.querySelector(".tooltip-max"),this.tooltipInner_max=this.tooltip_max.querySelector(".tooltip-inner"),r[this.options.scale]&&(this.options.scale=r[this.options.scale]),!0===v&&(this._removeClass(this.sliderElem,"slider-horizontal"),this._removeClass(this.sliderElem,"slider-vertical"),this._removeClass(this.sliderElem,"slider-rtl"),this._removeClass(this.tooltip,"hide"),this._removeClass(this.tooltip_min,"hide"),this._removeClass(this.tooltip_max,"hide"),["left","right","top","width","height"].forEach((function(t){this._removeProperty(this.trackLow,t),this._removeProperty(this.trackSelection,t),this._removeProperty(this.trackHigh,t)}),this),[this.handle1,this.handle2].forEach((function(t){this._removeProperty(t,"left"),this._removeProperty(t,"right"),this._removeProperty(t,"top")}),this),[this.tooltip,this.tooltip_min,this.tooltip_max].forEach((function(t){this._removeProperty(t,"bs-tooltip-left"),this._removeProperty(t,"bs-tooltip-right"),this._removeProperty(t,"bs-tooltip-top"),this._removeClass(t,"bs-tooltip-right"),this._removeClass(t,"bs-tooltip-left"),this._removeClass(t,"bs-tooltip-top")}),this)),"vertical"===this.options.orientation?(this._addClass(this.sliderElem,"slider-vertical"),this.stylePos="top",this.mousePos="pageY",this.sizePos="offsetHeight"):(this._addClass(this.sliderElem,"slider-horizontal"),this.sliderElem.style.width=_,this.options.orientation="horizontal",this.options.rtl?this.stylePos="right":this.stylePos="left",this.mousePos="clientX",this.sizePos="offsetWidth"),this.options.rtl&&this._addClass(this.sliderElem,"slider-rtl"),this._setTooltipPosition(),Array.isArray(this.options.ticks)&&this.options.ticks.length>0&&(o||(this.options.max=Math.max.apply(Math,this.options.ticks)),s||(this.options.min=Math.min.apply(Math,this.options.ticks))),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=p||this.trackLow,this.trackSelection=d||this.trackSelection,this.trackHigh=f||this.trackHigh,"none"===this.options.selection?(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")):"after"!==this.options.selection&&"before"!==this.options.selection||(this._removeClass(this.trackLow,"hide"),this._removeClass(this.trackSelection,"hide"),this._removeClass(this.trackHigh,"hide")),this.handle1=m||this.handle1,this.handle2=g||this.handle2,!0===v)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),a=0;a<this.ticks.length;a++)this._removeClass(this.ticks[a],"round triangle hide");if(-1!==["round","triangle","custom"].indexOf(this.options.handle))for(this._addClass(this.handle1,this.options.handle),this._addClass(this.handle2,this.options.handle),a=0;a<this.ticks.length;a++)this._addClass(this.ticks[a],this.options.handle);if(this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this.setValue(this._state.value),this.handle1Keydown=this._keydown.bind(this,0),this.handle1.addEventListener("keydown",this.handle1Keydown,!1),this.handle2Keydown=this._keydown.bind(this,1),this.handle2.addEventListener("keydown",this.handle2Keydown,!1),this.mousedown=this._mousedown.bind(this),this.touchstart=this._touchstart.bind(this),this.touchmove=this._touchmove.bind(this),this.touchCapable&&(this.sliderElem.addEventListener("touchstart",this.touchstart,!1),this.sliderElem.addEventListener("touchmove",this.touchmove,!1)),this.sliderElem.addEventListener("mousedown",this.mousedown,!1),this.resize=this._resize.bind(this),window.addEventListener("resize",this.resize,!1),"hide"===this.options.tooltip)this._addClass(this.tooltip,"hide"),this._addClass(this.tooltip_min,"hide"),this._addClass(this.tooltip_max,"hide");else if("always"===this.options.tooltip)this._showTooltip(),this._alwaysShowTooltip=!0;else{if(this.showTooltip=this._showTooltip.bind(this),this.hideTooltip=this._hideTooltip.bind(this),this.options.ticks_tooltip){var R=this._addTickListener(),j=R.addMouseEnter(this,this.handle1),B=R.addMouseLeave(this,this.handle1);this.handleCallbackMap.handle1={mouseEnter:j,mouseLeave:B},j=R.addMouseEnter(this,this.handle2),B=R.addMouseLeave(this,this.handle2),this.handleCallbackMap.handle2={mouseEnter:j,mouseLeave:B}}else this.sliderElem.addEventListener("mouseenter",this.showTooltip,!1),this.sliderElem.addEventListener("mouseleave",this.hideTooltip,!1),this.touchCapable&&(this.sliderElem.addEventListener("touchstart",this.showTooltip,!1),this.sliderElem.addEventListener("touchmove",this.showTooltip,!1),this.sliderElem.addEventListener("touchend",this.hideTooltip,!1));this.handle1.addEventListener("focus",this.showTooltip,!1),this.handle1.addEventListener("blur",this.hideTooltip,!1),this.handle2.addEventListener("focus",this.showTooltip,!1),this.handle2.addEventListener("blur",this.hideTooltip,!1),this.touchCapable&&(this.handle1.addEventListener("touchstart",this.showTooltip,!1),this.handle1.addEventListener("touchmove",this.showTooltip,!1),this.handle1.addEventListener("touchend",this.hideTooltip,!1),this.handle2.addEventListener("touchstart",this.showTooltip,!1),this.handle2.addEventListener("touchmove",this.showTooltip,!1),this.handle2.addEventListener("touchend",this.hideTooltip,!1))}this.options.enabled?this.enable():this.disable()}(e=function(t,e){return l.call(this,t,e),this}).prototype={_init:function(){},constructor:e,defaultOptions:{id:"",min:0,max:10,step:1,precision:0,orientation:"horizontal",value:5,range:!1,selection:"before",tooltip:"show",tooltip_split:!1,lock_to_ticks:!1,handle:"round",reversed:!1,rtl:"auto",enabled:!0,formatter:function(t){return Array.isArray(t)?t[0]+" : "+t[1]:t},natural_arrow_keys:!1,ticks:[],ticks_positions:[],ticks_labels:[],ticks_snap_bounds:0,ticks_tooltip:!1,scale:"linear",focus:!1,tooltip_position:null,labelledby:null,rangeHighlights:[]},getElement:function(){return this.sliderElem},getValue:function(){return this.options.range?this._state.value:this._state.value[0]},setValue:function(t,e,i){t||(t=0);var n=this.getValue();this._state.value=this._validateInputValue(t);var s=this._applyPrecision.bind(this);this.options.range?(this._state.value[0]=s(this._state.value[0]),this._state.value[1]=s(this._state.value[1]),this.ticksAreValid&&this.options.lock_to_ticks&&(this._state.value[0]=this.options.ticks[this._getClosestTickIndex(this._state.value[0])],this._state.value[1]=this.options.ticks[this._getClosestTickIndex(this._state.value[1])]),this._state.value[0]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[0])),this._state.value[1]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[1]))):(this._state.value=s(this._state.value),this.ticksAreValid&&this.options.lock_to_ticks&&(this._state.value=this.options.ticks[this._getClosestTickIndex(this._state.value)]),this._state.value=[Math.max(this.options.min,Math.min(this.options.max,this._state.value))],this._addClass(this.handle2,"hide"),"after"===this.options.selection?this._state.value[1]=this.options.max:this._state.value[1]=this.options.min),this._setTickIndex(),this.options.max>this.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var o=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(o),!0===e&&this._trigger("slide",o),(Array.isArray(o)?n[0]!==o[0]||n[1]!==o[1]:n!==o)&&!0===i&&this._trigger("change",{oldValue:n,newValue:o}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),t&&(this._unbindJQueryEventHandlers(),s===i&&this.$element.removeData(s),this.$element.removeData(n))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(t,e){return this._bindNonQueryEventHandler(t,e),this},off:function(e,i){t?(this.$element.off(e,i),this.$sliderElem.off(e,i)):this._unbindNonQueryEventHandler(e,i)},getAttribute:function(t){return t?this.options[t]:this.options},setAttribute:function(t,e){return this.options[t]=e,this},refresh:function(e){var o=this.getValue();return this._removeSliderEventHandlers(),l.call(this,this.element,this.options),e&&!0===e.useCurrentValue&&this.setValue(o),t&&(s===i?(t.data(this.element,i,this),t.data(this.element,n,this)):t.data(this.element,n,this)),this},relayout:function(){return this._resize(),this},_removeTooltipListener:function(t,e){this.handle1.removeEventListener(t,e,!1),this.handle2.removeEventListener(t,e,!1)},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var t=this.ticksContainer.getElementsByClassName("slider-tick"),e=0;e<t.length;e++)t[e].removeEventListener("mouseenter",this.ticksCallbackMap[e].mouseEnter,!1),t[e].removeEventListener("mouseleave",this.ticksCallbackMap[e].mouseLeave,!1);this.handleCallbackMap.handle1&&this.handleCallbackMap.handle2&&(this.handle1.removeEventListener("mouseenter",this.handleCallbackMap.handle1.mouseEnter,!1),this.handle2.removeEventListener("mouseenter",this.handleCallbackMap.handle2.mouseEnter,!1),this.handle1.removeEventListener("mouseleave",this.handleCallbackMap.handle1.mouseLeave,!1),this.handle2.removeEventListener("mouseleave",this.handleCallbackMap.handle2.mouseLeave,!1))}this.handleCallbackMap=null,this.ticksCallbackMap=null,this.showTooltip&&this._removeTooltipListener("focus",this.showTooltip),this.hideTooltip&&this._removeTooltipListener("blur",this.hideTooltip),this.showTooltip&&this.sliderElem.removeEventListener("mouseenter",this.showTooltip,!1),this.hideTooltip&&this.sliderElem.removeEventListener("mouseleave",this.hideTooltip,!1),this.sliderElem.removeEventListener("mousedown",this.mousedown,!1),this.touchCapable&&(this.showTooltip&&(this.handle1.removeEventListener("touchstart",this.showTooltip,!1),this.handle1.removeEventListener("touchmove",this.showTooltip,!1),this.handle2.removeEventListener("touchstart",this.showTooltip,!1),this.handle2.removeEventListener("touchmove",this.showTooltip,!1)),this.hideTooltip&&(this.handle1.removeEventListener("touchend",this.hideTooltip,!1),this.handle2.removeEventListener("touchend",this.hideTooltip,!1)),this.showTooltip&&(this.sliderElem.removeEventListener("touchstart",this.showTooltip,!1),this.sliderElem.removeEventListener("touchmove",this.showTooltip,!1)),this.hideTooltip&&this.sliderElem.removeEventListener("touchend",this.hideTooltip,!1),this.sliderElem.removeEventListener("touchstart",this.touchstart,!1),this.sliderElem.removeEventListener("touchmove",this.touchmove,!1)),window.removeEventListener("resize",this.resize,!1)},_bindNonQueryEventHandler:function(t,e){void 0===this.eventToCallbackMap[t]&&(this.eventToCallbackMap[t]=[]),this.eventToCallbackMap[t].push(e)},_unbindNonQueryEventHandler:function(t,e){var i=this.eventToCallbackMap[t];if(void 0!==i)for(var n=0;n<i.length;n++)if(i[n]===e){i.splice(n,1);break}},_cleanUpEventCallbacksMap:function(){for(var t=Object.keys(this.eventToCallbackMap),e=0;e<t.length;e++){var i=t[e];delete this.eventToCallbackMap[i]}},_showTooltip:function(){!1===this.options.tooltip_split?(this._addClass(this.tooltip,"show"),this.tooltip_min.style.display="none",this.tooltip_max.style.display="none"):(this._addClass(this.tooltip_min,"show"),this._addClass(this.tooltip_max,"show"),this.tooltip.style.display="none"),this._state.over=!0},_hideTooltip:function(){!1===this._state.inDrag&&!0!==this._alwaysShowTooltip&&(this._removeClass(this.tooltip,"show"),this._removeClass(this.tooltip_min,"show"),this._removeClass(this.tooltip_max,"show")),this._state.over=!1},_setToolTipOnMouseOver:function(t){var e=this,i=this.options.formatter(t?t.value[0]:this._state.value[0]),n=s(t||this._state,this.options.reversed);function s(t,i){return i?[100-t.percentage[0],e.options.range?100-t.percentage[1]:t.percentage[1]]:[t.percentage[0],t.percentage[1]]}this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=n[0]+"%"},_copyState:function(){return{value:[this._state.value[0],this._state.value[1]],enabled:this._state.enabled,offset:this._state.offset,size:this._state.size,percentage:[this._state.percentage[0],this._state.percentage[1],this._state.percentage[2]],inDrag:this._state.inDrag,over:this._state.over,dragged:this._state.dragged,keyCtrl:this._state.keyCtrl}},_addTickListener:function(){return{addMouseEnter:function(t,e,i){var n=function(){var n=t._copyState(),s=e===t.handle1?n.value[0]:n.value[1],o=void 0;void 0!==i?(s=t.options.ticks[i],o=t.options.ticks_positions.length>0&&t.options.ticks_positions[i]||t._toPercentage(t.options.ticks[i])):o=t._toPercentage(s),n.value[0]=s,n.percentage[0]=o,t._setToolTipOnMouseOver(n),t._showTooltip()};return e.addEventListener("mouseenter",n,!1),n},addMouseLeave:function(t,e){var i=function(){t._hideTooltip()};return e.addEventListener("mouseleave",i,!1),i}}},_layout:function(){var t,e,i;if(t=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=t[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),e=this.options.formatter(this._state.value[0]),isNaN(e)?this.handle1.setAttribute("aria-valuetext",e):this.handle1.removeAttribute("aria-valuetext"),this.handle2.style[this.stylePos]=t[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),e=this.options.formatter(this._state.value[1]),isNaN(e)?this.handle2.setAttribute("aria-valuetext",e):this.handle2.removeAttribute("aria-valuetext"),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var n=0;n<this.options.rangeHighlights.length;n++){var s=this._toPercentage(this.options.rangeHighlights[n].start),o=this._toPercentage(this.options.rangeHighlights[n].end);if(this.options.reversed){var r=100-o;o=100-s,s=r}var a=this._createHighlightRange(s,o);a?"vertical"===this.options.orientation?(this.rangeHighlightElements[n].style.top=a.start+"%",this.rangeHighlightElements[n].style.height=a.size+"%"):(this.options.rtl?this.rangeHighlightElements[n].style.right=a.start+"%":this.rangeHighlightElements[n].style.left=a.start+"%",this.rangeHighlightElements[n].style.width=a.size+"%"):this.rangeHighlightElements[n].style.display="none"}if(Array.isArray(this.options.ticks)&&this.options.ticks.length>0){var l,h="vertical"===this.options.orientation?"height":"width";l="vertical"===this.options.orientation?"marginTop":this.options.rtl?"marginRight":"marginLeft";var c=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var u=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[l]=-c/2+"px"),u=this.tickLabelContainer.offsetHeight;else for(d=0;d<this.tickLabelContainer.childNodes.length;d++)this.tickLabelContainer.childNodes[d].offsetHeight>u&&(u=this.tickLabelContainer.childNodes[d].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=u+"px")}for(var d=0;d<this.options.ticks.length;d++){var p=this.options.ticks_positions[d]||this._toPercentage(this.options.ticks[d]);this.options.reversed&&(p=100-p),this.ticks[d].style[this.stylePos]=p+"%",this._removeClass(this.ticks[d],"in-selection"),this.options.range?p>=t[0]&&p<=t[1]&&this._addClass(this.ticks[d],"in-selection"):("after"===this.options.selection&&p>=t[0]||"before"===this.options.selection&&p<=t[0])&&this._addClass(this.ticks[d],"in-selection"),this.tickLabels[d]&&(this.tickLabels[d].style[h]=c+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[d]?(this.tickLabels[d].style.position="absolute",this.tickLabels[d].style[this.stylePos]=p+"%",this.tickLabels[d].style[l]=-c/2+"px"):"vertical"===this.options.orientation&&(this.options.rtl?this.tickLabels[d].style.marginRight=this.sliderElem.offsetWidth+"px":this.tickLabels[d].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style[l]=this.sliderElem.offsetWidth/2*-1+"px"),this._removeClass(this.tickLabels[d],"label-in-selection label-is-selection"),this.options.range?p>=t[0]&&p<=t[1]&&(this._addClass(this.tickLabels[d],"label-in-selection"),(p===t[0]||t[1])&&this._addClass(this.tickLabels[d],"label-is-selection")):(("after"===this.options.selection&&p>=t[0]||"before"===this.options.selection&&p<=t[0])&&this._addClass(this.tickLabels[d],"label-in-selection"),p===t[0]&&this._addClass(this.tickLabels[d],"label-is-selection")))}}if(this.options.range){i=this.options.formatter(this._state.value),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=(t[1]+t[0])/2+"%";var f=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,f);var m=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,m),this.tooltip_min.style[this.stylePos]=t[0]+"%",this.tooltip_max.style[this.stylePos]=t[1]+"%"}else i=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=t[0]+"%";if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(t[0],t[1])+"%",this.trackSelection.style.top=Math.min(t[0],t[1])+"%",this.trackSelection.style.height=Math.abs(t[0]-t[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(t[0],t[1])-Math.abs(t[0]-t[1])+"%";else{"right"===this.stylePos?this.trackLow.style.right="0":this.trackLow.style.left="0",this.trackLow.style.width=Math.min(t[0],t[1])+"%","right"===this.stylePos?this.trackSelection.style.right=Math.min(t[0],t[1])+"%":this.trackSelection.style.left=Math.min(t[0],t[1])+"%",this.trackSelection.style.width=Math.abs(t[0]-t[1])+"%","right"===this.stylePos?this.trackHigh.style.left="0":this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(t[0],t[1])-Math.abs(t[0]-t[1])+"%";var g=this.tooltip_min.getBoundingClientRect(),_=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?g.right>_.left?(this._removeClass(this.tooltip_max,"bs-tooltip-bottom"),this._addClass(this.tooltip_max,"bs-tooltip-top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"bs-tooltip-top"),this._addClass(this.tooltip_max,"bs-tooltip-bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):g.right>_.left?(this._removeClass(this.tooltip_max,"bs-tooltip-top"),this._addClass(this.tooltip_max,"bs-tooltip-bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bs-tooltip-bottom"),this._addClass(this.tooltip_max,"bs-tooltip-top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(t,e){return this._isHighlightRange(t,e)?t>e?{start:e,size:t-e}:{start:t,size:e-t}:null},_isHighlightRange:function(t,e){return 0<=t&&t<=100&&0<=e&&e<=100},_resize:function(t){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(t,e){t.style.removeProperty?t.style.removeProperty(e):t.style.removeAttribute(e)},_mousedown:function(t){if(!this._state.enabled)return!1;t.preventDefault&&t.preventDefault(),this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var e=this._getPercentage(t);if(this.options.range){var i=Math.abs(this._state.percentage[0]-e),n=Math.abs(this._state.percentage[1]-e);this._state.dragged=i<n?0:1,this._adjustPercentageForRangeSliders(e)}else this._state.dragged=0;this._state.percentage[this._state.dragged]=e,this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),this.mousemove&&document.removeEventListener("mousemove",this.mousemove,!1),this.mouseup&&document.removeEventListener("mouseup",this.mouseup,!1),this.mousemove=this._mousemove.bind(this),this.mouseup=this._mouseup.bind(this),this.touchCapable&&(document.addEventListener("touchmove",this.mousemove,!1),document.addEventListener("touchend",this.mouseup,!1)),document.addEventListener("mousemove",this.mousemove,!1),document.addEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!0;var s=this._calculateValue();return this._trigger("slideStart",s),this.setValue(s,!1,!0),t.returnValue=!1,this.options.focus&&this._triggerFocusOnHandle(this._state.dragged),!0},_touchstart:function(t){this._mousedown(t)},_triggerFocusOnHandle:function(t){0===t&&this.handle1.focus(),1===t&&this.handle2.focus()},_keydown:function(t,e){if(!this._state.enabled)return!1;var i;switch(e.keyCode){case 37:case 40:i=-1;break;case 39:case 38:i=1}if(i){if(this.options.natural_arrow_keys){var n="horizontal"===this.options.orientation,s="vertical"===this.options.orientation,o=this.options.rtl,r=this.options.reversed;n?o?r||(i=-i):r&&(i=-i):s&&(r||(i=-i))}var a;if(this.ticksAreValid&&this.options.lock_to_ticks){var l=void 0;-1===(l=this.options.ticks.indexOf(this._state.value[t]))&&(l=0,window.console.warn("(lock_to_ticks) _keydown: index should not be -1")),l+=i,l=Math.max(0,Math.min(this.options.ticks.length-1,l)),a=this.options.ticks[l]}else a=this._state.value[t]+i*this.options.step;var h=this._toPercentage(a);if(this._state.keyCtrl=t,this.options.range){this._adjustPercentageForRangeSliders(h);var c=this._state.keyCtrl?this._state.value[0]:a,u=this._state.keyCtrl?a:this._state.value[1];a=[Math.max(this.options.min,Math.min(this.options.max,c)),Math.max(this.options.min,Math.min(this.options.max,u))]}else a=Math.max(this.options.min,Math.min(this.options.max,a));return this._trigger("slideStart",a),this.setValue(a,!0,!0),this._trigger("slideStop",a),this._pauseEvent(e),delete this._state.keyCtrl,!1}},_pauseEvent:function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.returnValue=!1},_mousemove:function(t){if(!this._state.enabled)return!1;var e=this._getPercentage(t);this._adjustPercentageForRangeSliders(e),this._state.percentage[this._state.dragged]=e;var i=this._calculateValue(!0);return this.setValue(i,!0,!0),!1},_touchmove:function(t){void 0!==t.changedTouches&&t.preventDefault&&t.preventDefault()},_adjustPercentageForRangeSliders:function(t){if(this.options.range){var e=this._getNumDigitsAfterDecimalPlace(t);e=e?e-1:0;var i=this._applyToFixedAndParseFloat(t,e);0===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[1],e)<i?(this._state.percentage[0]=this._state.percentage[1],this._state.dragged=1):1===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[0],e)>i?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._toPercentage(this._state.value[1])<t?(this._state.percentage[0]=this._state.percentage[1],this._state.keyCtrl=1,this.handle2.focus()):1===this._state.keyCtrl&&this._toPercentage(this._state.value[0])>t&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(t){if(!this._state.enabled)return!1;var e=this._getPercentage(t);this._adjustPercentageForRangeSliders(e),this._state.percentage[this._state.dragged]=e,this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,!1===this._state.over&&this._hideTooltip();var i=this._calculateValue(!0);return this.setValue(i,!1,!0),this._trigger("slideStop",i),this._state.dragged=null,!1},_setValues:function(t,e){var i=0===t?0:100;this._state.percentage[t]!==i&&(e.data[t]=this._toValue(this._state.percentage[t]),e.data[t]=this._applyPrecision(e.data[t]))},_calculateValue:function(t){var e={};return this.options.range?(e.data=[this.options.min,this.options.max],this._setValues(0,e),this._setValues(1,e),t&&(e.data[0]=this._snapToClosestTick(e.data[0]),e.data[1]=this._snapToClosestTick(e.data[1]))):(e.data=this._toValue(this._state.percentage[0]),e.data=parseFloat(e.data),e.data=this._applyPrecision(e.data),t&&(e.data=this._snapToClosestTick(e.data))),e.data},_snapToClosestTick:function(t){for(var e=[t,1/0],i=0;i<this.options.ticks.length;i++){var n=Math.abs(this.options.ticks[i]-t);n<=e[1]&&(e=[this.options.ticks[i],n])}return e[1]<=this.options.ticks_snap_bounds?e[0]:t},_applyPrecision:function(t){var e=this.options.precision||this._getNumDigitsAfterDecimalPlace(this.options.step);return this._applyToFixedAndParseFloat(t,e)},_getNumDigitsAfterDecimalPlace:function(t){var e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0},_applyToFixedAndParseFloat:function(t,e){var i=t.toFixed(e);return parseFloat(i)},_getPercentage:function(t){!this.touchCapable||"touchstart"!==t.type&&"touchmove"!==t.type&&"touchend"!==t.type||(t=t.changedTouches[0]);var e=t[this.mousePos]-this._state.offset[this.stylePos];"right"===this.stylePos&&(e=-e);var i=e/this._state.size*100;return i=Math.round(i/this._state.percentage[2])*this._state.percentage[2],this.options.reversed&&(i=100-i),Math.max(0,Math.min(100,i))},_validateInputValue:function(t){if(isNaN(+t)){if(Array.isArray(t))return this._validateArray(t),t;throw new Error(o.formatInvalidInputErrorMsg(t))}return+t},_validateArray:function(t){for(var e=0;e<t.length;e++){var i=t[e];if("number"!=typeof i)throw new Error(o.formatInvalidInputErrorMsg(i))}},_setDataVal:function(t){this.element.setAttribute("data-value",t),this.element.setAttribute("value",t),this.element.value=t},_trigger:function(e,i){i=i||0===i?i:void 0;var n=this.eventToCallbackMap[e];if(n&&n.length)for(var s=0;s<n.length;s++)(0,n[s])(i);t&&this._triggerJQueryEvent(e,i)},_triggerJQueryEvent:function(t,e){var i={type:t,value:e};this.$element.trigger(i),this.$sliderElem.trigger(i)},_unbindJQueryEventHandlers:function(){this.$element.off(),this.$sliderElem.off()},_setText:function(t,e){void 0!==t.textContent?t.textContent=e:void 0!==t.innerText&&(t.innerText=e)},_removeClass:function(t,e){for(var i=e.split(" "),n=t.className,s=0;s<i.length;s++){var o=i[s],r=new RegExp("(?:\\s|^)"+o+"(?:\\s|$)");n=n.replace(r," ")}t.className=n.trim()},_addClass:function(t,e){for(var i=e.split(" "),n=t.className,s=0;s<i.length;s++){var o=i[s];new RegExp("(?:\\s|^)"+o+"(?:\\s|$)").test(n)||(n+=" "+o)}t.className=n.trim()},_offsetLeft:function(t){return t.getBoundingClientRect().left},_offsetRight:function(t){return t.getBoundingClientRect().right},_offsetTop:function(t){for(var e=t.offsetTop;(t=t.offsetParent)&&!isNaN(t.offsetTop);)e+=t.offsetTop,"BODY"!==t.tagName&&(e-=t.scrollTop);return e},_offset:function(t){return{left:this._offsetLeft(t),right:this._offsetRight(t),top:this._offsetTop(t)}},_css:function(e,i,n){if(t)t.style(e,i,n);else{var s=i.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()}));e.style[s]=n}},_toValue:function(t){return this.options.scale.toValue.apply(this,[t])},_toPercentage:function(t){return this.options.scale.toPercentage.apply(this,[t])},_setTooltipPosition:function(){var t=[this.tooltip,this.tooltip_min,this.tooltip_max];if("vertical"===this.options.orientation){var e,i="left"===(e=this.options.tooltip_position?this.options.tooltip_position:this.options.rtl?"left":"right")?"right":"left";t.forEach(function(t){this._addClass(t,"bs-tooltip-"+e),t.style[i]="100%"}.bind(this))}else"bottom"===this.options.tooltip_position?t.forEach(function(t){this._addClass(t,"bs-tooltip-bottom"),t.style.top="22px"}.bind(this)):t.forEach(function(t){this._addClass(t,"bs-tooltip-top"),t.style.top=-this.tooltip.outerHeight-14+"px"}.bind(this))},_getClosestTickIndex:function(t){for(var e=Math.abs(t-this.options.ticks[0]),i=0,n=0;n<this.options.ticks.length;++n){var s=Math.abs(t-this.options.ticks[n]);s<e&&(e=s,i=n)}return i},_setTickIndex:function(){this.ticksAreValid&&(this._state.tickIndex=[this.options.ticks.indexOf(this._state.value[0]),this.options.ticks.indexOf(this._state.value[1])])}},t&&t.fn&&(t.fn.slider?(a&&window.console.warn("bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead."),s=n):(t.bridget(i,e),s=i),t.bridget(n,e),t((function(){t("input[data-provide=slider]")[s]()})))}(t),e},void 0===(o="function"==typeof n?n.apply(e,s):n)||(t.exports=o)},73138:(t,e,i)=>{"use strict";i.r(e),i.d(e,{Alert:()=>Ae,Button:()=>Me,Carousel:()=>Ze,Collapse:()=>Je,Dropdown:()=>_i,Modal:()=>Hi,Offcanvas:()=>Xi,Popover:()=>xn,ScrollSpy:()=>En,Tab:()=>Rn,Toast:()=>Vn,Tooltip:()=>vn});var n={};i.r(n),i.d(n,{afterMain:()=>k,afterRead:()=>b,afterWrite:()=>A,applyStyles:()=>D,arrow:()=>J,auto:()=>l,basePlacements:()=>h,beforeMain:()=>x,beforeRead:()=>v,beforeWrite:()=>T,bottom:()=>o,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>Dt,createPopperBase:()=>Ot,createPopperLite:()=>It,detectOverflow:()=>yt,end:()=>u,eventListeners:()=>ot,flip:()=>bt,hide:()=>kt,left:()=>a,main:()=>w,modifierPhases:()=>E,offset:()=>Tt,placements:()=>_,popper:()=>f,popperGenerator:()=>St,popperOffsets:()=>Ct,preventOverflow:()=>At,read:()=>y,reference:()=>m,right:()=>r,start:()=>c,top:()=>s,variationPlacements:()=>g,viewport:()=>p,write:()=>C});var s="top",o="bottom",r="right",a="left",l="auto",h=[s,o,r,a],c="start",u="end",d="clippingParents",p="viewport",f="popper",m="reference",g=h.reduce((function(t,e){return t.concat([e+"-"+c,e+"-"+u])}),[]),_=[].concat(h,[l]).reduce((function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])}),[]),v="beforeRead",y="read",b="afterRead",x="beforeMain",w="main",k="afterMain",T="beforeWrite",C="write",A="afterWrite",E=[v,y,b,x,w,k,T,C,A];function M(t){return t?(t.nodeName||"").toLowerCase():null}function L(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function P(t){return t instanceof L(t).Element||t instanceof Element}function S(t){return t instanceof L(t).HTMLElement||t instanceof HTMLElement}function O(t){return"undefined"!=typeof ShadowRoot&&(t instanceof L(t).ShadowRoot||t instanceof ShadowRoot)}const D={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];S(s)&&M(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});S(n)&&M(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function I(t){return t.split("-")[0]}var N=Math.max,z=Math.min,R=Math.round;function j(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function B(){return!/^((?!chrome|android).)*safari/i.test(j())}function $(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&S(t)&&(s=t.offsetWidth>0&&R(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&R(n.height)/t.offsetHeight||1);var r=(P(t)?L(t):window).visualViewport,a=!B()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,h=(n.top+(a&&r?r.offsetTop:0))/o,c=n.width/s,u=n.height/o;return{width:c,height:u,top:h,right:l+c,bottom:h+u,left:l,x:l,y:h}}function F(t){var e=$(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function H(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&O(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function V(t){return L(t).getComputedStyle(t)}function W(t){return["table","td","th"].indexOf(M(t))>=0}function q(t){return((P(t)?t.ownerDocument:t.document)||window.document).documentElement}function Z(t){return"html"===M(t)?t:t.assignedSlot||t.parentNode||(O(t)?t.host:null)||q(t)}function U(t){return S(t)&&"fixed"!==V(t).position?t.offsetParent:null}function Y(t){for(var e=L(t),i=U(t);i&&W(i)&&"static"===V(i).position;)i=U(i);return i&&("html"===M(i)||"body"===M(i)&&"static"===V(i).position)?e:i||function(t){var e=/firefox/i.test(j());if(/Trident/i.test(j())&&S(t)&&"fixed"===V(t).position)return null;var i=Z(t);for(O(i)&&(i=i.host);S(i)&&["html","body"].indexOf(M(i))<0;){var n=V(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function K(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function G(t,e,i){return N(t,z(e,i))}function X(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Q(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const J={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,l=t.options,c=i.elements.arrow,u=i.modifiersData.popperOffsets,d=I(i.placement),p=K(d),f=[a,r].indexOf(d)>=0?"height":"width";if(c&&u){var m=function(t,e){return X("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Q(t,h))}(l.padding,i),g=F(c),_="y"===p?s:a,v="y"===p?o:r,y=i.rects.reference[f]+i.rects.reference[p]-u[p]-i.rects.popper[f],b=u[p]-i.rects.reference[p],x=Y(c),w=x?"y"===p?x.clientHeight||0:x.clientWidth||0:0,k=y/2-b/2,T=m[_],C=w-g[f]-m[v],A=w/2-g[f]/2+k,E=G(T,A,C),M=p;i.modifiersData[n]=((e={})[M]=E,e.centerOffset=E-A,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&H(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tt(t){return t.split("-")[1]}var et={top:"auto",right:"auto",bottom:"auto",left:"auto"};function it(t){var e,i=t.popper,n=t.popperRect,l=t.placement,h=t.variation,c=t.offsets,d=t.position,p=t.gpuAcceleration,f=t.adaptive,m=t.roundOffsets,g=t.isFixed,_=c.x,v=void 0===_?0:_,y=c.y,b=void 0===y?0:y,x="function"==typeof m?m({x:v,y:b}):{x:v,y:b};v=x.x,b=x.y;var w=c.hasOwnProperty("x"),k=c.hasOwnProperty("y"),T=a,C=s,A=window;if(f){var E=Y(i),M="clientHeight",P="clientWidth";if(E===L(i)&&"static"!==V(E=q(i)).position&&"absolute"===d&&(M="scrollHeight",P="scrollWidth"),l===s||(l===a||l===r)&&h===u)C=o,b-=(g&&E===A&&A.visualViewport?A.visualViewport.height:E[M])-n.height,b*=p?1:-1;if(l===a||(l===s||l===o)&&h===u)T=r,v-=(g&&E===A&&A.visualViewport?A.visualViewport.width:E[P])-n.width,v*=p?1:-1}var S,O=Object.assign({position:d},f&&et),D=!0===m?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:R(e*n)/n||0,y:R(i*n)/n||0}}({x:v,y:b}):{x:v,y:b};return v=D.x,b=D.y,p?Object.assign({},O,((S={})[C]=k?"0":"",S[T]=w?"0":"",S.transform=(A.devicePixelRatio||1)<=1?"translate("+v+"px, "+b+"px)":"translate3d("+v+"px, "+b+"px, 0)",S)):Object.assign({},O,((e={})[C]=k?b+"px":"",e[T]=w?v+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,h={placement:I(e.placement),variation:tt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,it(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,it(Object.assign({},h,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var st={passive:!0};const ot={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=L(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&h.forEach((function(t){t.addEventListener("scroll",i.update,st)})),a&&l.addEventListener("resize",i.update,st),function(){o&&h.forEach((function(t){t.removeEventListener("scroll",i.update,st)})),a&&l.removeEventListener("resize",i.update,st)}},data:{}};var rt={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,(function(t){return rt[t]}))}var lt={start:"end",end:"start"};function ht(t){return t.replace(/start|end/g,(function(t){return lt[t]}))}function ct(t){var e=L(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return $(q(t)).left+ct(t).scrollLeft}function dt(t){var e=V(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function pt(t){return["html","body","#document"].indexOf(M(t))>=0?t.ownerDocument.body:S(t)&&dt(t)?t:pt(Z(t))}function ft(t,e){var i;void 0===e&&(e=[]);var n=pt(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=L(n),r=s?[o].concat(o.visualViewport||[],dt(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(ft(Z(r)))}function mt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function gt(t,e,i){return e===p?mt(function(t,e){var i=L(t),n=q(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var h=B();(h||!h&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+ut(t),y:l}}(t,i)):P(e)?function(t,e){var i=$(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):mt(function(t){var e,i=q(t),n=ct(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=N(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=N(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ut(t),l=-n.scrollTop;return"rtl"===V(s||i).direction&&(a+=N(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(q(t)))}function _t(t,e,i,n){var s="clippingParents"===e?function(t){var e=ft(Z(t)),i=["absolute","fixed"].indexOf(V(t).position)>=0&&S(t)?Y(t):t;return P(i)?e.filter((function(t){return P(t)&&H(t,i)&&"body"!==M(t)})):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=gt(t,i,n);return e.top=N(s.top,e.top),e.right=z(s.right,e.right),e.bottom=z(s.bottom,e.bottom),e.left=N(s.left,e.left),e}),gt(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function vt(t){var e,i=t.reference,n=t.element,l=t.placement,h=l?I(l):null,d=l?tt(l):null,p=i.x+i.width/2-n.width/2,f=i.y+i.height/2-n.height/2;switch(h){case s:e={x:p,y:i.y-n.height};break;case o:e={x:p,y:i.y+i.height};break;case r:e={x:i.x+i.width,y:f};break;case a:e={x:i.x-n.width,y:f};break;default:e={x:i.x,y:i.y}}var m=h?K(h):null;if(null!=m){var g="y"===m?"height":"width";switch(d){case c:e[m]=e[m]-(i[g]/2-n[g]/2);break;case u:e[m]=e[m]+(i[g]/2-n[g]/2)}}return e}function yt(t,e){void 0===e&&(e={});var i=e,n=i.placement,a=void 0===n?t.placement:n,l=i.strategy,c=void 0===l?t.strategy:l,u=i.boundary,g=void 0===u?d:u,_=i.rootBoundary,v=void 0===_?p:_,y=i.elementContext,b=void 0===y?f:y,x=i.altBoundary,w=void 0!==x&&x,k=i.padding,T=void 0===k?0:k,C=X("number"!=typeof T?T:Q(T,h)),A=b===f?m:f,E=t.rects.popper,M=t.elements[w?A:b],L=_t(P(M)?M:M.contextElement||q(t.elements.popper),g,v,c),S=$(t.elements.reference),O=vt({reference:S,element:E,strategy:"absolute",placement:a}),D=mt(Object.assign({},E,O)),I=b===f?D:S,N={top:L.top-I.top+C.top,bottom:I.bottom-L.bottom+C.bottom,left:L.left-I.left+C.left,right:I.right-L.right+C.right},z=t.modifiersData.offset;if(b===f&&z){var R=z[a];Object.keys(N).forEach((function(t){var e=[r,o].indexOf(t)>=0?1:-1,i=[s,o].indexOf(t)>=0?"y":"x";N[t]+=R[i]*e}))}return N}const bt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var u=i.mainAxis,d=void 0===u||u,p=i.altAxis,f=void 0===p||p,m=i.fallbackPlacements,v=i.padding,y=i.boundary,b=i.rootBoundary,x=i.altBoundary,w=i.flipVariations,k=void 0===w||w,T=i.allowedAutoPlacements,C=e.options.placement,A=I(C),E=m||(A===C||!k?[at(C)]:function(t){if(I(t)===l)return[];var e=at(t);return[ht(t),e,ht(e)]}(C)),M=[C].concat(E).reduce((function(t,i){return t.concat(I(i)===l?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?_:l,u=tt(n),d=u?a?g:g.filter((function(t){return tt(t)===u})):h,p=d.filter((function(t){return c.indexOf(t)>=0}));0===p.length&&(p=d);var f=p.reduce((function(e,i){return e[i]=yt(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[I(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:y,rootBoundary:b,padding:v,flipVariations:k,allowedAutoPlacements:T}):i)}),[]),L=e.rects.reference,P=e.rects.popper,S=new Map,O=!0,D=M[0],N=0;N<M.length;N++){var z=M[N],R=I(z),j=tt(z)===c,B=[s,o].indexOf(R)>=0,$=B?"width":"height",F=yt(e,{placement:z,boundary:y,rootBoundary:b,altBoundary:x,padding:v}),H=B?j?r:a:j?o:s;L[$]>P[$]&&(H=at(H));var V=at(H),W=[];if(d&&W.push(F[R]<=0),f&&W.push(F[H]<=0,F[V]<=0),W.every((function(t){return t}))){D=z,O=!1;break}S.set(z,W)}if(O)for(var q=function(t){var e=M.find((function(e){var i=S.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return D=e,"break"},Z=k?3:1;Z>0;Z--){if("break"===q(Z))break}e.placement!==D&&(e.modifiersData[n]._skip=!0,e.placement=D,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function xt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function wt(t){return[s,r,o,a].some((function(e){return t[e]>=0}))}const kt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=yt(e,{elementContext:"reference"}),a=yt(e,{altBoundary:!0}),l=xt(r,n),h=xt(a,s,o),c=wt(l),u=wt(h);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":u})}};const Tt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,o=i.offset,l=void 0===o?[0,0]:o,h=_.reduce((function(t,i){return t[i]=function(t,e,i){var n=I(t),o=[a,s].indexOf(n)>=0?-1:1,l="function"==typeof i?i(Object.assign({},e,{placement:t})):i,h=l[0],c=l[1];return h=h||0,c=(c||0)*o,[a,r].indexOf(n)>=0?{x:c,y:h}:{x:h,y:c}}(i,e.rects,l),t}),{}),c=h[e.placement],u=c.x,d=c.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=d),e.modifiersData[n]=h}};const Ct={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=vt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const At={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,l=i.mainAxis,h=void 0===l||l,u=i.altAxis,d=void 0!==u&&u,p=i.boundary,f=i.rootBoundary,m=i.altBoundary,g=i.padding,_=i.tether,v=void 0===_||_,y=i.tetherOffset,b=void 0===y?0:y,x=yt(e,{boundary:p,rootBoundary:f,padding:g,altBoundary:m}),w=I(e.placement),k=tt(e.placement),T=!k,C=K(w),A="x"===C?"y":"x",E=e.modifiersData.popperOffsets,M=e.rects.reference,L=e.rects.popper,P="function"==typeof b?b(Object.assign({},e.rects,{placement:e.placement})):b,S="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),O=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(E){if(h){var R,j="y"===C?s:a,B="y"===C?o:r,$="y"===C?"height":"width",H=E[C],V=H+x[j],W=H-x[B],q=v?-L[$]/2:0,Z=k===c?M[$]:L[$],U=k===c?-L[$]:-M[$],X=e.elements.arrow,Q=v&&X?F(X):{width:0,height:0},J=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=J[j],it=J[B],nt=G(0,M[$],Q[$]),st=T?M[$]/2-q-nt-et-S.mainAxis:Z-nt-et-S.mainAxis,ot=T?-M[$]/2+q+nt+it+S.mainAxis:U+nt+it+S.mainAxis,rt=e.elements.arrow&&Y(e.elements.arrow),at=rt?"y"===C?rt.clientTop||0:rt.clientLeft||0:0,lt=null!=(R=null==O?void 0:O[C])?R:0,ht=H+ot-lt,ct=G(v?z(V,H+st-lt-at):V,H,v?N(W,ht):W);E[C]=ct,D[C]=ct-H}if(d){var ut,dt="x"===C?s:a,pt="x"===C?o:r,ft=E[A],mt="y"===A?"height":"width",gt=ft+x[dt],_t=ft-x[pt],vt=-1!==[s,a].indexOf(w),bt=null!=(ut=null==O?void 0:O[A])?ut:0,xt=vt?gt:ft-M[mt]-L[mt]-bt+S.altAxis,wt=vt?ft+M[mt]+L[mt]-bt-S.altAxis:_t,kt=v&&vt?function(t,e,i){var n=G(t,e,i);return n>i?i:n}(xt,ft,wt):G(v?xt:gt,ft,v?wt:_t);E[A]=kt,D[A]=kt-ft}e.modifiersData[n]=D}},requiresIfExists:["offset"]};function Et(t,e,i){void 0===i&&(i=!1);var n,s,o=S(e),r=S(e)&&function(t){var e=t.getBoundingClientRect(),i=R(e.width)/t.offsetWidth||1,n=R(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=q(e),l=$(t,r,i),h={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!i)&&(("body"!==M(e)||dt(a))&&(h=(n=e)!==L(n)&&S(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:ct(n)),S(e)?((c=$(e,!0)).x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=ut(a))),{x:l.left+h.scrollLeft-c.x,y:l.top+h.scrollTop-c.y,width:l.width,height:l.height}}function Mt(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function Pt(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function St(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?Lt:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Lt,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],h=!1,c={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;u(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:P(t)?ft(t):t.contextElement?ft(t.contextElement):[],popper:ft(e)};var r=function(t){var e=Mt(t);return E.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}(function(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,a.options.modifiers)));return a.orderedModifiers=r.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:c,options:n}),r=function(){};l.push(o||r)}})),c.update()},forceUpdate:function(){if(!h){var t=a.elements,e=t.reference,i=t.popper;if(Pt(e,i)){a.rects={reference:Et(e,Y(i),"fixed"===a.options.strategy),popper:F(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,u=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:u,instance:c})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise((function(t){c.forceUpdate(),t(a)}))},function(){return r||(r=new Promise((function(t){Promise.resolve().then((function(){r=void 0,t(s())}))}))),r}),destroy:function(){u(),h=!0}};if(!Pt(t,e))return c;function u(){l.forEach((function(t){return t()})),l=[]}return c.setOptions(i).then((function(t){!h&&i.onFirstUpdate&&i.onFirstUpdate(t)})),c}}var Ot=St(),Dt=St({defaultModifiers:[ot,Ct,nt,D,Tt,bt,At,J,kt]}),It=St({defaultModifiers:[ot,Ct,nt,D]}),Nt=i(19755);const zt="transitionend",Rt=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},jt=t=>{const e=Rt(t);return e&&document.querySelector(e)?e:null},Bt=t=>{const e=Rt(t);return e?document.querySelector(e):null},$t=t=>{t.dispatchEvent(new Event(zt))},Ft=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),Ht=t=>Ft(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,Vt=t=>{if(!Ft(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},Wt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),qt=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?qt(t.parentNode):null},Zt=()=>{},Ut=t=>{t.offsetHeight},Yt=()=>Nt&&!document.body.hasAttribute("data-bs-no-jquery")?Nt:null,Kt=[],Gt=()=>"rtl"===document.documentElement.dir,Xt=t=>{var e;e=()=>{const e=Yt();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(Kt.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of Kt)t()})),Kt.push(e)):e()},Qt=t=>{"function"==typeof t&&t()},Jt=(t,e,i=!0)=>{if(!i)return void Qt(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(zt,o),Qt(t))};e.addEventListener(zt,o),setTimeout((()=>{s||$t(e)}),n)},te=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},ee=/[^.]*(?=\..*)\.|.*/,ie=/\..*/,ne=/::\d+$/,se={};let oe=1;const re={mouseenter:"mouseover",mouseleave:"mouseout"},ae=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function le(t,e){return e&&`${e}::${oe++}`||t.uidEvent||oe++}function he(t){const e=le(t);return t.uidEvent=e,se[e]=se[e]||{},se[e]}function ce(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function ue(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=me(t);return ae.has(o)||(o=t),[n,s,o]}function de(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=ue(e,i,n);if(e in re){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=he(t),h=l[a]||(l[a]={}),c=ce(h,r,o?i:null);if(c)return void(c.oneOff=c.oneOff&&s);const u=le(r,e.replace(ee,"")),d=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return _e(s,{delegateTarget:r}),n.oneOff&&ge.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return _e(n,{delegateTarget:t}),i.oneOff&&ge.off(t,n.type,e),e.apply(t,[n])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=s,d.uidEvent=u,h[u]=d,t.addEventListener(a,d,o)}function pe(t,e,i,n,s){const o=ce(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function fe(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];pe(t,e,i,n.callable,n.delegationSelector)}}function me(t){return t=t.replace(ie,""),re[t]||t}const ge={on(t,e,i,n){de(t,e,i,n,!1)},one(t,e,i,n){de(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=ue(e,i,n),a=r!==e,l=he(t),h=l[r]||{},c=e.startsWith(".");if(void 0===o){if(c)for(const i of Object.keys(l))fe(t,l,i,e.slice(1));for(const i of Object.keys(h)){const n=i.replace(ne,"");if(!a||e.includes(n)){const e=h[i];pe(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(h).length)return;pe(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=Yt();let s=null,o=!0,r=!0,a=!1;e!==me(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=_e(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function _e(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}const ve=new Map,ye={set(t,e,i){ve.has(t)||ve.set(t,new Map);const n=ve.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>ve.has(t)&&ve.get(t).get(e)||null,remove(t,e){if(!ve.has(t))return;const i=ve.get(t);i.delete(e),0===i.size&&ve.delete(t)}};function be(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function xe(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const we={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${xe(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${xe(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=be(t.dataset[n])}return e},getDataAttribute:(t,e)=>be(t.getAttribute(`data-bs-${xe(e)}`))};class ke{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=Ft(e)?we.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Ft(e)?we.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const s=e[n],o=t[n],r=Ft(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}var i}}class Te extends ke{constructor(t,e){super(),(t=Ht(t))&&(this._element=t,this._config=this._getConfig(e),ye.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ye.remove(this._element,this.constructor.DATA_KEY),ge.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){Jt(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return ye.get(Ht(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.2"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const Ce=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;ge.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Wt(this))return;const s=Bt(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))};class Ae extends Te{static get NAME(){return"alert"}close(){if(ge.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),ge.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Ae.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}Ce(Ae,"close"),Xt(Ae);const Ee='[data-bs-toggle="button"]';class Me extends Te{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Me.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}ge.on(document,"click.bs.button.data-api",Ee,(t=>{t.preventDefault();const e=t.target.closest(Ee);Me.getOrCreateInstance(e).toggle()})),Xt(Me);const Le={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!Wt(t)&&Vt(t)))}},Pe=".bs.swipe",Se={endCallback:null,leftCallback:null,rightCallback:null},Oe={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class De extends ke{constructor(t,e){super(),this._element=t,t&&De.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Se}static get DefaultType(){return Oe}static get NAME(){return"swipe"}dispose(){ge.off(this._element,Pe)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Qt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Qt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ge.on(this._element,"pointerdown.bs.swipe",(t=>this._start(t))),ge.on(this._element,"pointerup.bs.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):(ge.on(this._element,"touchstart.bs.swipe",(t=>this._start(t))),ge.on(this._element,"touchmove.bs.swipe",(t=>this._move(t))),ge.on(this._element,"touchend.bs.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Ie="next",Ne="prev",ze="left",Re="right",je="slid.bs.carousel",Be="carousel",$e="active",Fe=".active",He=".carousel-item",Ve={ArrowLeft:Re,ArrowRight:ze},We={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},qe={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ze extends Te{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Le.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Be&&this.cycle()}static get Default(){return We}static get DefaultType(){return qe}static get NAME(){return"carousel"}next(){this._slide(Ie)}nextWhenVisible(){!document.hidden&&Vt(this._element)&&this.next()}prev(){this._slide(Ne)}pause(){this._isSliding&&$t(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?ge.one(this._element,je,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void ge.one(this._element,je,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?Ie:Ne;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&ge.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&(ge.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),ge.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&De.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Le.find(".carousel-item img",this._element))ge.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(ze)),rightCallback:()=>this._slide(this._directionToOrder(Re)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new De(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Ve[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Le.findOne(Fe,this._indicatorsElement);e.classList.remove($e),e.removeAttribute("aria-current");const i=Le.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add($e),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===Ie,s=e||te(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>ge.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",h=n?"carousel-item-next":"carousel-item-prev";s.classList.add(h),Ut(s),i.classList.add(l),s.classList.add(l);this._queueCallback((()=>{s.classList.remove(l,h),s.classList.add($e),i.classList.remove($e,h,l),this._isSliding=!1,r(je)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Le.findOne(".active.carousel-item",this._element)}_getItems(){return Le.find(He,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Gt()?t===ze?Ne:Ie:t===ze?Ie:Ne}_orderToDirection(t){return Gt()?t===Ne?ze:Re:t===Ne?Re:ze}static jQueryInterface(t){return this.each((function(){const e=Ze.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}ge.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(t){const e=Bt(this);if(!e||!e.classList.contains(Be))return;t.preventDefault();const i=Ze.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===we.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),ge.on(window,"load.bs.carousel.data-api",(()=>{const t=Le.find('[data-bs-ride="carousel"]');for(const e of t)Ze.getOrCreateInstance(e)})),Xt(Ze);const Ue="show",Ye="collapse",Ke="collapsing",Ge='[data-bs-toggle="collapse"]',Xe={parent:null,toggle:!0},Qe={parent:"(null|element)",toggle:"boolean"};class Je extends Te{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=Le.find(Ge);for(const t of i){const e=jt(t),i=Le.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Xe}static get DefaultType(){return Qe}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Je.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(ge.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ye),this._element.classList.add(Ke),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ke),this._element.classList.add(Ye,Ue),this._element.style[e]="",ge.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(ge.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Ut(this._element),this._element.classList.add(Ke),this._element.classList.remove(Ye,Ue);for(const t of this._triggerArray){const e=Bt(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ke),this._element.classList.add(Ye),ge.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Ue)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Ht(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Ge);for(const e of t){const t=Bt(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Le.find(":scope .collapse .collapse",this._config.parent);return Le.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Je.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}ge.on(document,"click.bs.collapse.data-api",Ge,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=jt(this),i=Le.find(e);for(const t of i)Je.getOrCreateInstance(t,{toggle:!1}).toggle()})),Xt(Je);const ti="dropdown",ei="ArrowUp",ii="ArrowDown",ni="click.bs.dropdown.data-api",si="keydown.bs.dropdown.data-api",oi="show",ri='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',ai=`${ri}.show`,li=".dropdown-menu",hi=Gt()?"top-end":"top-start",ci=Gt()?"top-start":"top-end",ui=Gt()?"bottom-end":"bottom-start",di=Gt()?"bottom-start":"bottom-end",pi=Gt()?"left-start":"right-start",fi=Gt()?"right-start":"left-start",mi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},gi={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class _i extends Te{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Le.next(this._element,li)[0]||Le.prev(this._element,li)[0]||Le.findOne(li,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return mi}static get DefaultType(){return gi}static get NAME(){return ti}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Wt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!ge.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))ge.on(t,"mouseover",Zt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(oi),this._element.classList.add(oi),ge.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(Wt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!ge.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.off(t,"mouseover",Zt);this._popper&&this._popper.destroy(),this._menu.classList.remove(oi),this._element.classList.remove(oi),this._element.setAttribute("aria-expanded","false"),we.removeDataAttribute(this._menu,"popper"),ge.trigger(this._element,"hidden.bs.dropdown",t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Ft(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${ti.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===n)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:Ft(this._config.reference)?t=Ht(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=Dt(t,this._menu,e)}_isShown(){return this._menu.classList.contains(oi)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return pi;if(t.classList.contains("dropstart"))return fi;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ci:hi:e?di:ui}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(we.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=Le.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>Vt(t)));i.length&&te(i,e,t===ii,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=_i.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Le.find(ai);for(const i of e){const e=_i.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[ei,ii].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(ri)?this:Le.prev(this,ri)[0]||Le.next(this,ri)[0]||Le.findOne(ri,t.delegateTarget.parentNode),o=_i.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}ge.on(document,si,ri,_i.dataApiKeydownHandler),ge.on(document,si,li,_i.dataApiKeydownHandler),ge.on(document,ni,_i.clearMenus),ge.on(document,"keyup.bs.dropdown.data-api",_i.clearMenus),ge.on(document,ni,ri,(function(t){t.preventDefault(),_i.getOrCreateInstance(this).toggle()})),Xt(_i);const vi=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",yi=".sticky-top",bi="padding-right",xi="margin-right";class wi{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,bi,(e=>e+t)),this._setElementAttributes(vi,bi,(e=>e+t)),this._setElementAttributes(yi,xi,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,bi),this._resetElementAttributes(vi,bi),this._resetElementAttributes(yi,xi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&we.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=we.getDataAttribute(t,e);null!==i?(we.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(Ft(t))e(t);else for(const i of Le.find(t,this._element))e(i)}}const ki="backdrop",Ti="show",Ci="mousedown.bs.backdrop",Ai={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ei={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Mi extends ke{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Ai}static get DefaultType(){return Ei}static get NAME(){return ki}show(t){if(!this._config.isVisible)return void Qt(t);this._append();const e=this._getElement();this._config.isAnimated&&Ut(e),e.classList.add(Ti),this._emulateAnimation((()=>{Qt(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Ti),this._emulateAnimation((()=>{this.dispose(),Qt(t)}))):Qt(t)}dispose(){this._isAppended&&(ge.off(this._element,Ci),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Ht(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),ge.on(t,Ci,(()=>{Qt(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){Jt(t,this._getElement(),this._config.isAnimated)}}const Li=".bs.focustrap",Pi="backward",Si={autofocus:!0,trapElement:null},Oi={autofocus:"boolean",trapElement:"element"};class Di extends ke{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Si}static get DefaultType(){return Oi}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ge.off(document,Li),ge.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),ge.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ge.off(document,Li))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=Le.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Pi?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Pi:"forward")}}const Ii=".bs.modal",Ni="hidden.bs.modal",zi="show.bs.modal",Ri="modal-open",ji="show",Bi="modal-static",$i={backdrop:!0,focus:!0,keyboard:!0},Fi={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Hi extends Te{constructor(t,e){super(t,e),this._dialog=Le.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new wi,this._addEventListeners()}static get Default(){return $i}static get DefaultType(){return Fi}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;ge.trigger(this._element,zi,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ri),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;ge.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(ji),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){for(const t of[window,this._dialog])ge.off(t,Ii);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Mi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Di({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Le.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Ut(this._element),this._element.classList.add(ji);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ge.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){ge.on(this._element,"keydown.dismiss.bs.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),ge.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),ge.on(this._element,"mousedown.dismiss.bs.modal",(t=>{ge.one(this._element,"click.dismiss.bs.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ri),this._resetAdjustments(),this._scrollBar.reset(),ge.trigger(this._element,Ni)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ge.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Bi)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Bi),this._queueCallback((()=>{this._element.classList.remove(Bi),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=Gt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=Gt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Hi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}ge.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=Bt(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),ge.one(e,zi,(t=>{t.defaultPrevented||ge.one(e,Ni,(()=>{Vt(this)&&this.focus()}))}));const i=Le.findOne(".modal.show");i&&Hi.getInstance(i).hide();Hi.getOrCreateInstance(e).toggle(this)})),Ce(Hi),Xt(Hi);const Vi="show",Wi="showing",qi="hiding",Zi=".offcanvas.show",Ui="hidePrevented.bs.offcanvas",Yi="hidden.bs.offcanvas",Ki={backdrop:!0,keyboard:!0,scroll:!1},Gi={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Xi extends Te{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Ki}static get DefaultType(){return Gi}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(ge.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new wi).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Wi);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Vi),this._element.classList.remove(Wi),ge.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0)}hide(){if(!this._isShown)return;if(ge.trigger(this._element,"hide.bs.offcanvas").defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(qi),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(Vi,qi),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new wi).reset(),ge.trigger(this._element,Yi)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Mi({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():ge.trigger(this._element,Ui)}:null})}_initializeFocusTrap(){return new Di({trapElement:this._element})}_addEventListeners(){ge.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():ge.trigger(this._element,Ui))}))}static jQueryInterface(t){return this.each((function(){const e=Xi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}ge.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=Bt(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Wt(this))return;ge.one(e,Yi,(()=>{Vt(this)&&this.focus()}));const i=Le.findOne(Zi);i&&i!==e&&Xi.getInstance(i).hide();Xi.getOrCreateInstance(e).toggle(this)})),ge.on(window,"load.bs.offcanvas.data-api",(()=>{for(const t of Le.find(Zi))Xi.getOrCreateInstance(t).show()})),ge.on(window,"resize.bs.offcanvas",(()=>{for(const t of Le.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Xi.getOrCreateInstance(t).hide()})),Ce(Xi),Xt(Xi);const Qi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ji=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,tn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,en=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Qi.has(i)||Boolean(Ji.test(t.nodeValue)||tn.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},nn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};const sn={allowList:nn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},on={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},rn={entry:"(string|element|function|null)",selector:"(string|element)"};class an extends ke{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return sn}static get DefaultType(){return on}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},rn)}_setContent(t,e,i){const n=Le.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?Ft(e)?this._putElementInTemplate(Ht(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)en(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const ln=new Set(["sanitize","allowList","sanitizeFn"]),hn="fade",cn="show",un=".modal",dn="hide.bs.modal",pn="hover",fn="focus",mn={AUTO:"auto",TOP:"top",RIGHT:Gt()?"left":"right",BOTTOM:"bottom",LEFT:Gt()?"right":"left"},gn={allowList:nn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},_n={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class vn extends Te{constructor(t,e){if(void 0===n)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return gn}static get DefaultType(){return _n}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),ge.off(this._element.closest(un),dn,this._hideModalHandler),this.tip&&this.tip.remove(),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=ge.trigger(this._element,this.constructor.eventName("show")),e=(qt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this.tip&&(this.tip.remove(),this.tip=null);const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),ge.trigger(this._element,this.constructor.eventName("inserted"))),this._popper?this._popper.update():this._popper=this._createPopper(i),i.classList.add(cn),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.on(t,"mouseover",Zt);this._queueCallback((()=>{ge.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(ge.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;const t=this._getTipElement();if(t.classList.remove(cn),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.off(t,"mouseover",Zt);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||t.remove(),this._element.removeAttribute("aria-describedby"),ge.trigger(this._element,this.constructor.eventName("hidden")),this._disposePopper())}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(hn,cn),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(hn),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new an({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(hn)}_isShown(){return this.tip&&this.tip.classList.contains(cn)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,i=mn[e.toUpperCase()];return Dt(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)ge.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===pn?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===pn?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");ge.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?fn:pn]=!0,e._enter()})),ge.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?fn:pn]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},ge.on(this._element.closest(un),dn,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=we.getDataAttributes(this._element);for(const t of Object.keys(e))ln.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:Ht(t.container),"number"==typeof 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()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=vn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Xt(vn);const yn={...vn.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},bn={...vn.DefaultType,content:"(null|string|element|function)"};class xn extends vn{static get Default(){return yn}static get DefaultType(){return bn}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=xn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Xt(xn);const wn="click.bs.scrollspy",kn="active",Tn="[href]",Cn={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},An={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class En extends Te{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Cn}static get DefaultType(){return An}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Ht(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ge.off(this._config.target,wn),ge.on(this._config.target,wn,Tn,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Le.find(Tn,this._config.target);for(const e of t){if(!e.hash||Wt(e))continue;const t=Le.findOne(e.hash,this._element);Vt(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(kn),this._activateParents(t),ge.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Le.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(kn);else for(const e of Le.parents(t,".nav, .list-group"))for(const t of Le.prev(e,".nav-link, .nav-item > .nav-link, .list-group-item"))t.classList.add(kn)}_clearActiveClass(t){t.classList.remove(kn);const e=Le.find("[href].active",t);for(const t of e)t.classList.remove(kn)}static jQueryInterface(t){return this.each((function(){const e=En.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}ge.on(window,"load.bs.scrollspy.data-api",(()=>{for(const t of Le.find('[data-bs-spy="scroll"]'))En.getOrCreateInstance(t)})),Xt(En);const Mn="ArrowLeft",Ln="ArrowRight",Pn="ArrowUp",Sn="ArrowDown",On="active",Dn="fade",In="show",Nn='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',zn=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Nn}`;class Rn extends Te{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ge.on(this._element,"keydown.bs.tab",(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?ge.trigger(e,"hide.bs.tab",{relatedTarget:t}):null;ge.trigger(t,"show.bs.tab",{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(On),this._activate(Bt(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),ge.trigger(t,"shown.bs.tab",{relatedTarget:e})):t.classList.add(In)}),t,t.classList.contains(Dn))}_deactivate(t,e){if(!t)return;t.classList.remove(On),t.blur(),this._deactivate(Bt(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),ge.trigger(t,"hidden.bs.tab",{relatedTarget:e})):t.classList.remove(In)}),t,t.classList.contains(Dn))}_keydown(t){if(![Mn,Ln,Pn,Sn].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Ln,Sn].includes(t.key),i=te(this._getChildren().filter((t=>!Wt(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),Rn.getOrCreateInstance(i).show())}_getChildren(){return Le.find(zn,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=Bt(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=Le.findOne(t,i);s&&s.classList.toggle(n,e)};n(".dropdown-toggle",On),n(".dropdown-menu",In),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(On)}_getInnerElement(t){return t.matches(zn)?t:Le.findOne(zn,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Rn.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}ge.on(document,"click.bs.tab",Nn,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Wt(this)||Rn.getOrCreateInstance(this).show()})),ge.on(window,"load.bs.tab",(()=>{for(const t of Le.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Rn.getOrCreateInstance(t)})),Xt(Rn);const jn="hide",Bn="show",$n="showing",Fn={animation:"boolean",autohide:"boolean",delay:"number"},Hn={animation:!0,autohide:!0,delay:5e3};class Vn extends Te{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Hn}static get DefaultType(){return Fn}static get NAME(){return"toast"}show(){if(ge.trigger(this._element,"show.bs.toast").defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(jn),Ut(this._element),this._element.classList.add(Bn,$n),this._queueCallback((()=>{this._element.classList.remove($n),ge.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(ge.trigger(this._element,"hide.bs.toast").defaultPrevented)return;this._element.classList.add($n),this._queueCallback((()=>{this._element.classList.add(jn),this._element.classList.remove($n,Bn),ge.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Bn),super.dispose()}isShown(){return this._element.classList.contains(Bn)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){ge.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),ge.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),ge.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),ge.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Vn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}Ce(Vn),Xt(Vn)},19755:function(t,e){var i;!function(e,i){"use strict";"object"==typeof t.exports?t.exports=e.document?i(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return i(t)}:i(e)}("undefined"!=typeof window?window:this,(function(n,s){"use strict";var o=[],r=Object.getPrototypeOf,a=o.slice,l=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},h=o.push,c=o.indexOf,u={},d=u.toString,p=u.hasOwnProperty,f=p.toString,m=f.call(Object),g={},_=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},v=function(t){return null!=t&&t===t.window},y=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,i){var n,s,o=(i=i||y).createElement("script");if(o.text=t,e)for(n in b)(s=e[n]||e.getAttribute&&e.getAttribute(n))&&o.setAttribute(n,s);i.head.appendChild(o).parentNode.removeChild(o)}function w(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?u[d.call(t)]||"object":typeof t}var k="3.6.1",T=function(t,e){return new T.fn.init(t,e)};function C(t){var e=!!t&&"length"in t&&t.length,i=w(t);return!_(t)&&!v(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}T.fn=T.prototype={jquery:k,constructor:T,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=T.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return T.each(this,t)},map:function(t){return this.pushStack(T.map(this,(function(e,i){return t.call(e,i,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(T.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:o.sort,splice:o.splice},T.extend=T.fn.extend=function(){var t,e,i,n,s,o,r=arguments[0]||{},a=1,l=arguments.length,h=!1;for("boolean"==typeof r&&(h=r,r=arguments[a]||{},a++),"object"==typeof r||_(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=t[e],"__proto__"!==e&&r!==n&&(h&&n&&(T.isPlainObject(n)||(s=Array.isArray(n)))?(i=r[e],o=s&&!Array.isArray(i)?[]:s||T.isPlainObject(i)?i:{},s=!1,r[e]=T.extend(h,o,n)):void 0!==n&&(r[e]=n));return r},T.extend({expando:"jQuery"+(k+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==d.call(t))&&(!(e=r(t))||"function"==typeof(i=p.call(e,"constructor")&&e.constructor)&&f.call(i)===m)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,i){x(t,{nonce:e&&e.nonce},i)},each:function(t,e){var i,n=0;if(C(t))for(i=t.length;n<i&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},makeArray:function(t,e){var i=e||[];return null!=t&&(C(Object(t))?T.merge(i,"string"==typeof t?[t]:t):h.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:c.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,s=t.length;n<i;n++)t[s++]=e[n];return t.length=s,t},grep:function(t,e,i){for(var n=[],s=0,o=t.length,r=!i;s<o;s++)!e(t[s],s)!==r&&n.push(t[s]);return n},map:function(t,e,i){var n,s,o=0,r=[];if(C(t))for(n=t.length;o<n;o++)null!=(s=e(t[o],o,i))&&r.push(s);else for(o in t)null!=(s=e(t[o],o,i))&&r.push(s);return l(r)},guid:1,support:g}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=o[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){u["[object "+e+"]"]=e.toLowerCase()}));var A=function(t){var e,i,n,s,o,r,a,l,h,c,u,d,p,f,m,g,_,v,y,b="sizzle"+1*new Date,x=t.document,w=0,k=0,T=lt(),C=lt(),A=lt(),E=lt(),M=function(t,e){return t===e&&(u=!0),0},L={}.hasOwnProperty,P=[],S=P.pop,O=P.push,D=P.push,I=P.slice,N=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",j="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",B="\\[[\\x20\\t\\r\\n\\f]*("+j+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+j+"))|)"+R+"*\\]",$=":("+j+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",F=new RegExp(R+"+","g"),H=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),V=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),W=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),q=new RegExp(R+"|>"),Z=new RegExp($),U=new RegExp("^"+j+"$"),Y={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+z+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),it=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},nt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,st=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){d()},rt=bt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{D.apply(P=I.call(x.childNodes),x.childNodes),P[x.childNodes.length].nodeType}catch(t){D={apply:P.length?function(t,e){O.apply(t,I.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function at(t,e,n,s){var o,a,h,c,u,f,_,v=e&&e.ownerDocument,x=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return n;if(!s&&(d(e),e=e||p,m)){if(11!==x&&(u=J.exec(t)))if(o=u[1]){if(9===x){if(!(h=e.getElementById(o)))return n;if(h.id===o)return n.push(h),n}else if(v&&(h=v.getElementById(o))&&y(e,h)&&h.id===o)return n.push(h),n}else{if(u[2])return D.apply(n,e.getElementsByTagName(t)),n;if((o=u[3])&&i.getElementsByClassName&&e.getElementsByClassName)return D.apply(n,e.getElementsByClassName(o)),n}if(i.qsa&&!E[t+" "]&&(!g||!g.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(_=t,v=e,1===x&&(q.test(t)||W.test(t))){for((v=tt.test(t)&&_t(e.parentNode)||e)===e&&i.scope||((c=e.getAttribute("id"))?c=c.replace(nt,st):e.setAttribute("id",c=b)),a=(f=r(t)).length;a--;)f[a]=(c?"#"+c:":scope")+" "+yt(f[a]);_=f.join(",")}try{return D.apply(n,v.querySelectorAll(_)),n}catch(e){E(t,!0)}finally{c===b&&e.removeAttribute("id")}}}return l(t.replace(H,"$1"),e,n,s)}function lt(){var t=[];return function e(i,s){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=s}}function ht(t){return t[b]=!0,t}function ct(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ut(t,e){for(var i=t.split("|"),s=i.length;s--;)n.attrHandle[i[s]]=e}function dt(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function pt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&rt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function gt(t){return ht((function(e){return e=+e,ht((function(i,n){for(var s,o=t([],i.length,e),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))}))}))}function _t(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=at.support={},o=at.isXML=function(t){var e=t&&t.namespaceURI,i=t&&(t.ownerDocument||t).documentElement;return!K.test(e||i&&i.nodeName||"HTML")},d=at.setDocument=function(t){var e,s,r=t?t.ownerDocument||t:x;return r!=p&&9===r.nodeType&&r.documentElement?(f=(p=r).documentElement,m=!o(p),x!=p&&(s=p.defaultView)&&s.top!==s&&(s.addEventListener?s.addEventListener("unload",ot,!1):s.attachEvent&&s.attachEvent("onunload",ot)),i.scope=ct((function(t){return f.appendChild(t).appendChild(p.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),i.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),i.getElementsByTagName=ct((function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length})),i.getElementsByClassName=Q.test(p.getElementsByClassName),i.getById=ct((function(t){return f.appendChild(t).id=b,!p.getElementsByName||!p.getElementsByName(b).length})),i.getById?(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i,n,s,o=e.getElementById(t);if(o){if((i=o.getAttributeNode("id"))&&i.value===t)return[o];for(s=e.getElementsByName(t),n=0;o=s[n++];)if((i=o.getAttributeNode("id"))&&i.value===t)return[o]}return[]}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},_=[],g=[],(i.qsa=Q.test(p.querySelectorAll))&&(ct((function(t){var e;f.appendChild(t).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+z+")"),t.querySelectorAll("[id~="+b+"-]").length||g.push("~="),(e=p.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(i.matchesSelector=Q.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ct((function(t){i.disconnectedMatch=v.call(t,"*"),v.call(t,"[s!='']:x"),_.push("!=",$)})),g=g.length&&new RegExp(g.join("|")),_=_.length&&new RegExp(_.join("|")),e=Q.test(f.compareDocumentPosition),y=e||Q.test(f.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},M=e?function(t,e){if(t===e)return u=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t==p||t.ownerDocument==x&&y(x,t)?-1:e==p||e.ownerDocument==x&&y(x,e)?1:c?N(c,t)-N(c,e):0:4&n?-1:1)}:function(t,e){if(t===e)return u=!0,0;var i,n=0,s=t.parentNode,o=e.parentNode,r=[t],a=[e];if(!s||!o)return t==p?-1:e==p?1:s?-1:o?1:c?N(c,t)-N(c,e):0;if(s===o)return dt(t,e);for(i=t;i=i.parentNode;)r.unshift(i);for(i=e;i=i.parentNode;)a.unshift(i);for(;r[n]===a[n];)n++;return n?dt(r[n],a[n]):r[n]==x?-1:a[n]==x?1:0},p):p},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(d(t),i.matchesSelector&&m&&!E[e+" "]&&(!_||!_.test(e))&&(!g||!g.test(e)))try{var n=v.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){E(e,!0)}return at(e,p,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=p&&d(t),y(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=p&&d(t);var s=n.attrHandle[e.toLowerCase()],o=s&&L.call(n.attrHandle,e.toLowerCase())?s(t,e,!m):void 0;return void 0!==o?o:i.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},at.escape=function(t){return(t+"").replace(nt,st)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,n=[],s=0,o=0;if(u=!i.detectDuplicates,c=!i.sortStable&&t.slice(0),t.sort(M),u){for(;e=t[o++];)e===t[o]&&(s=n.push(o));for(;s--;)t.splice(n[s],1)}return c=null,t},s=at.getText=function(t){var e,i="",n=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=s(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)i+=s(e);return i},n=at.selectors={cacheLength:50,createPseudo:ht,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,it),t[3]=(t[3]||t[4]||t[5]||"").replace(et,it),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&Z.test(i)&&(e=r(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,it).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=T[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+R+"|$)"))&&T(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var s=at.attr(n,t);return null==s?"!="===e:!e||(s+="","="===e?s===i:"!="===e?s!==i:"^="===e?i&&0===s.indexOf(i):"*="===e?i&&s.indexOf(i)>-1:"$="===e?i&&s.slice(-i.length)===i:"~="===e?(" "+s.replace(F," ")+" ").indexOf(i)>-1:"|="===e&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,s){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,l){var h,c,u,d,p,f,m=o!==r?"nextSibling":"previousSibling",g=e.parentNode,_=a&&e.nodeName.toLowerCase(),v=!l&&!a,y=!1;if(g){if(o){for(;m;){for(d=e;d=d[m];)if(a?d.nodeName.toLowerCase()===_:1===d.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?g.firstChild:g.lastChild],r&&v){for(y=(p=(h=(c=(u=(d=g)[b]||(d[b]={}))[d.uniqueID]||(u[d.uniqueID]={}))[t]||[])[0]===w&&h[1])&&h[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(y=p=0)||f.pop();)if(1===d.nodeType&&++y&&d===e){c[t]=[w,p,y];break}}else if(v&&(y=p=(h=(c=(u=(d=e)[b]||(d[b]={}))[d.uniqueID]||(u[d.uniqueID]={}))[t]||[])[0]===w&&h[1]),!1===y)for(;(d=++p&&d&&d[m]||(y=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==_:1!==d.nodeType)||!++y||(v&&((c=(u=d[b]||(d[b]={}))[d.uniqueID]||(u[d.uniqueID]={}))[t]=[w,y]),d!==e)););return(y-=s)===n||y%n==0&&y/n>=0}}},PSEUDO:function(t,e){var i,s=n.pseudos[t]||n.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return s[b]?s(e):s.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?ht((function(t,i){for(var n,o=s(t,e),r=o.length;r--;)t[n=N(t,o[r])]=!(i[n]=o[r])})):function(t){return s(t,0,i)}):s}},pseudos:{not:ht((function(t){var e=[],i=[],n=a(t.replace(H,"$1"));return n[b]?ht((function(t,e,i,s){for(var o,r=n(t,null,s,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))})):function(t,s,o){return e[0]=t,n(e,null,o,i),e[0]=null,!i.pop()}})),has:ht((function(t){return function(e){return at(t,e).length>0}})),contains:ht((function(t){return t=t.replace(et,it),function(e){return(e.textContent||s(e)).indexOf(t)>-1}})),lang:ht((function(t){return U.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,it).toLowerCase(),function(e){var i;do{if(i=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return X.test(t.nodeName)},input:function(t){return G.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:gt((function(){return[0]})),last:gt((function(t,e){return[e-1]})),eq:gt((function(t,e,i){return[i<0?i+e:i]})),even:gt((function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t})),odd:gt((function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t})),lt:gt((function(t,e,i){for(var n=i<0?i+e:i>e?e:i;--n>=0;)t.push(n);return t})),gt:gt((function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t}))}},n.pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=pt(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=ft(e);function vt(){}function yt(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function bt(t,e,i){var n=e.dir,s=e.next,o=s||n,r=i&&"parentNode"===o,a=k++;return e.first?function(e,i,s){for(;e=e[n];)if(1===e.nodeType||r)return t(e,i,s);return!1}:function(e,i,l){var h,c,u,d=[w,a];if(l){for(;e=e[n];)if((1===e.nodeType||r)&&t(e,i,l))return!0}else for(;e=e[n];)if(1===e.nodeType||r)if(c=(u=e[b]||(e[b]={}))[e.uniqueID]||(u[e.uniqueID]={}),s&&s===e.nodeName.toLowerCase())e=e[n]||e;else{if((h=c[o])&&h[0]===w&&h[1]===a)return d[2]=h[2];if(c[o]=d,d[2]=t(e,i,l))return!0}return!1}}function xt(t){return t.length>1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function wt(t,e,i,n,s){for(var o,r=[],a=0,l=t.length,h=null!=e;a<l;a++)(o=t[a])&&(i&&!i(o,n,s)||(r.push(o),h&&e.push(a)));return r}function kt(t,e,i,n,s,o){return n&&!n[b]&&(n=kt(n)),s&&!s[b]&&(s=kt(s,o)),ht((function(o,r,a,l){var h,c,u,d=[],p=[],f=r.length,m=o||function(t,e,i){for(var n=0,s=e.length;n<s;n++)at(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),g=!t||!o&&e?m:wt(m,d,t,a,l),_=i?s||(o?t:f||n)?[]:r:g;if(i&&i(g,_,a,l),n)for(h=wt(_,p),n(h,[],a,l),c=h.length;c--;)(u=h[c])&&(_[p[c]]=!(g[p[c]]=u));if(o){if(s||t){if(s){for(h=[],c=_.length;c--;)(u=_[c])&&h.push(g[c]=u);s(null,_=[],h,l)}for(c=_.length;c--;)(u=_[c])&&(h=s?N(o,u):d[c])>-1&&(o[h]=!(r[h]=u))}}else _=wt(_===r?_.splice(f,_.length):_),s?s(null,r,_,l):D.apply(r,_)}))}function Tt(t){for(var e,i,s,o=t.length,r=n.relative[t[0].type],a=r||n.relative[" "],l=r?1:0,c=bt((function(t){return t===e}),a,!0),u=bt((function(t){return N(e,t)>-1}),a,!0),d=[function(t,i,n){var s=!r&&(n||i!==h)||((e=i).nodeType?c(t,i,n):u(t,i,n));return e=null,s}];l<o;l++)if(i=n.relative[t[l].type])d=[bt(xt(d),i)];else{if((i=n.filter[t[l].type].apply(null,t[l].matches))[b]){for(s=++l;s<o&&!n.relative[t[s].type];s++);return kt(l>1&&xt(d),l>1&&yt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(H,"$1"),i,l<s&&Tt(t.slice(l,s)),s<o&&Tt(t=t.slice(s)),s<o&&yt(t))}d.push(i)}return xt(d)}return vt.prototype=n.filters=n.pseudos,n.setFilters=new vt,r=at.tokenize=function(t,e){var i,s,o,r,a,l,h,c=C[t+" "];if(c)return e?0:c.slice(0);for(a=t,l=[],h=n.preFilter;a;){for(r in i&&!(s=V.exec(a))||(s&&(a=a.slice(s[0].length)||a),l.push(o=[])),i=!1,(s=W.exec(a))&&(i=s.shift(),o.push({value:i,type:s[0].replace(H," ")}),a=a.slice(i.length)),n.filter)!(s=Y[r].exec(a))||h[r]&&!(s=h[r](s))||(i=s.shift(),o.push({value:i,type:r,matches:s}),a=a.slice(i.length));if(!i)break}return e?a.length:a?at.error(t):C(t,l).slice(0)},a=at.compile=function(t,e){var i,s=[],o=[],a=A[t+" "];if(!a){for(e||(e=r(t)),i=e.length;i--;)(a=Tt(e[i]))[b]?s.push(a):o.push(a);a=A(t,function(t,e){var i=e.length>0,s=t.length>0,o=function(o,r,a,l,c){var u,f,g,_=0,v="0",y=o&&[],b=[],x=h,k=o||s&&n.find.TAG("*",c),T=w+=null==x?1:Math.random()||.1,C=k.length;for(c&&(h=r==p||r||c);v!==C&&null!=(u=k[v]);v++){if(s&&u){for(f=0,r||u.ownerDocument==p||(d(u),a=!m);g=t[f++];)if(g(u,r||p,a)){l.push(u);break}c&&(w=T)}i&&((u=!g&&u)&&_--,o&&y.push(u))}if(_+=v,i&&v!==_){for(f=0;g=e[f++];)g(y,b,r,a);if(o){if(_>0)for(;v--;)y[v]||b[v]||(b[v]=S.call(l));b=wt(b)}D.apply(l,b),c&&!o&&b.length>0&&_+e.length>1&&at.uniqueSort(l)}return c&&(w=T,h=x),y};return i?ht(o):o}(o,s)),a.selector=t}return a},l=at.select=function(t,e,i,s){var o,l,h,c,u,d="function"==typeof t&&t,p=!s&&r(t=d.selector||t);if(i=i||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(h=l[0]).type&&9===e.nodeType&&m&&n.relative[l[1].type]){if(!(e=(n.find.ID(h.matches[0].replace(et,it),e)||[])[0]))return i;d&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(o=Y.needsContext.test(t)?0:l.length;o--&&(h=l[o],!n.relative[c=h.type]);)if((u=n.find[c])&&(s=u(h.matches[0].replace(et,it),tt.test(l[0].type)&&_t(e.parentNode)||e))){if(l.splice(o,1),!(t=s.length&&yt(l)))return D.apply(i,s),i;break}}return(d||a(t,p))(s,e,!m,i,!e||tt.test(t)&&_t(e.parentNode)||e),i},i.sortStable=b.split("").sort(M).join("")===b,i.detectDuplicates=!!u,d(),i.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))})),ct((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ut("type|href|height|width",(function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),i.attributes&&ct((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ut("value",(function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ct((function(t){return null==t.getAttribute("disabled")}))||ut(z,(function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null})),at}(n);T.find=A,T.expr=A.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=A.uniqueSort,T.text=A.getText,T.isXMLDoc=A.isXML,T.contains=A.contains,T.escapeSelector=A.escape;var E=function(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&T(t).is(i))break;n.push(t)}return n},M=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},L=T.expr.match.needsContext;function P(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,e,i){return _(e)?T.grep(t,(function(t,n){return!!e.call(t,n,t)!==i})):e.nodeType?T.grep(t,(function(t){return t===e!==i})):"string"!=typeof e?T.grep(t,(function(t){return c.call(e,t)>-1!==i})):T.filter(e,t,i)}T.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?T.find.matchesSelector(n,t)?[n]:[]:T.find.matches(t,T.grep(e,(function(t){return 1===t.nodeType})))},T.fn.extend({find:function(t){var e,i,n=this.length,s=this;if("string"!=typeof t)return this.pushStack(T(t).filter((function(){for(e=0;e<n;e++)if(T.contains(s[e],this))return!0})));for(i=this.pushStack([]),e=0;e<n;e++)T.find(t,s[e],i);return n>1?T.uniqueSort(i):i},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&L.test(t)?T(t):t||[],!1).length}});var D,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||D,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof T?e[0]:e,T.merge(this,T.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:y,!0)),S.test(n[1])&&T.isPlainObject(e))for(n in e)_(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(s=y.getElementById(n[2]))&&(this[0]=s,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):_(t)?void 0!==i.ready?i.ready(t):t(T):T.makeArray(t,this)}).prototype=T.fn,D=T(y);var N=/^(?:parents|prev(?:Until|All))/,z={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}T.fn.extend({has:function(t){var e=T(t,this),i=e.length;return this.filter((function(){for(var t=0;t<i;t++)if(T.contains(this,e[t]))return!0}))},closest:function(t,e){var i,n=0,s=this.length,o=[],r="string"!=typeof t&&T(t);if(!L.test(t))for(;n<s;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&T.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(T(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),T.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return E(t,"parentNode")},parentsUntil:function(t,e,i){return E(t,"parentNode",i)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return E(t,"nextSibling")},prevAll:function(t){return E(t,"previousSibling")},nextUntil:function(t,e,i){return E(t,"nextSibling",i)},prevUntil:function(t,e,i){return E(t,"previousSibling",i)},siblings:function(t){return M((t.parentNode||{}).firstChild,t)},children:function(t){return M(t.firstChild)},contents:function(t){return null!=t.contentDocument&&r(t.contentDocument)?t.contentDocument:(P(t,"template")&&(t=t.content||t),T.merge([],t.childNodes))}},(function(t,e){T.fn[t]=function(i,n){var s=T.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=T.filter(n,s)),this.length>1&&(z[t]||T.uniqueSort(s),N.test(t)&&s.reverse()),this.pushStack(s)}}));var j=/[^\x20\t\r\n\f]+/g;function B(t){return t}function $(t){throw t}function F(t,e,i,n){var s;try{t&&_(s=t.promise)?s.call(t).done(e).fail(i):t&&_(s=t.then)?s.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}T.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return T.each(t.match(j)||[],(function(t,i){e[i]=!0})),e}(t):T.extend({},t);var e,i,n,s,o=[],r=[],a=-1,l=function(){for(s=s||t.once,n=e=!0;r.length;a=-1)for(i=r.shift();++a<o.length;)!1===o[a].apply(i[0],i[1])&&t.stopOnFalse&&(a=o.length,i=!1);t.memory||(i=!1),e=!1,s&&(o=i?[]:"")},h={add:function(){return o&&(i&&!e&&(a=o.length-1,r.push(i)),function e(i){T.each(i,(function(i,n){_(n)?t.unique&&h.has(n)||o.push(n):n&&n.length&&"string"!==w(n)&&e(n)}))}(arguments),i&&!e&&l()),this},remove:function(){return T.each(arguments,(function(t,e){for(var i;(i=T.inArray(e,o,i))>-1;)o.splice(i,1),i<=a&&a--})),this},has:function(t){return t?T.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return s=r=[],o=i="",this},disabled:function(){return!o},lock:function(){return s=r=[],i||e||(o=i=""),this},locked:function(){return!!s},fireWith:function(t,i){return s||(i=[t,(i=i||[]).slice?i.slice():i],r.push(i),e||l()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!n}};return h},T.extend({Deferred:function(t){var e=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],i="pending",s={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return s.then(null,t)},pipe:function(){var t=arguments;return T.Deferred((function(i){T.each(e,(function(e,n){var s=_(t[n[4]])&&t[n[4]];o[n[1]]((function(){var t=s&&s.apply(this,arguments);t&&_(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,s?[t]:arguments)}))})),t=null})).promise()},then:function(t,i,s){var o=0;function r(t,e,i,s){return function(){var a=this,l=arguments,h=function(){var n,h;if(!(t<o)){if((n=i.apply(a,l))===e.promise())throw new TypeError("Thenable self-resolution");h=n&&("object"==typeof n||"function"==typeof n)&&n.then,_(h)?s?h.call(n,r(o,e,B,s),r(o,e,$,s)):(o++,h.call(n,r(o,e,B,s),r(o,e,$,s),r(o,e,B,e.notifyWith))):(i!==B&&(a=void 0,l=[n]),(s||e.resolveWith)(a,l))}},c=s?h:function(){try{h()}catch(n){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(n,c.stackTrace),t+1>=o&&(i!==$&&(a=void 0,l=[n]),e.rejectWith(a,l))}};t?c():(T.Deferred.getStackHook&&(c.stackTrace=T.Deferred.getStackHook()),n.setTimeout(c))}}return T.Deferred((function(n){e[0][3].add(r(0,n,_(s)?s:B,n.notifyWith)),e[1][3].add(r(0,n,_(t)?t:B)),e[2][3].add(r(0,n,_(i)?i:$))})).promise()},promise:function(t){return null!=t?T.extend(t,s):s}},o={};return T.each(e,(function(t,n){var r=n[2],a=n[5];s[n[1]]=r.add,a&&r.add((function(){i=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),r.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=r.fireWith})),s.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,i=e,n=Array(i),s=a.call(arguments),o=T.Deferred(),r=function(t){return function(i){n[t]=this,s[t]=arguments.length>1?a.call(arguments):i,--e||o.resolveWith(n,s)}};if(e<=1&&(F(t,o.done(r(i)).resolve,o.reject,!e),"pending"===o.state()||_(s[i]&&s[i].then)))return o.then();for(;i--;)F(s[i],r(i),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&H.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},T.readyException=function(t){n.setTimeout((function(){throw t}))};var V=T.Deferred();function W(){y.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),T.ready()}T.fn.ready=function(t){return V.then(t).catch((function(t){T.readyException(t)})),this},T.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==t&&--T.readyWait>0||V.resolveWith(y,[T]))}}),T.ready.then=V.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?n.setTimeout(T.ready):(y.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var q=function(t,e,i,n,s,o,r){var a=0,l=t.length,h=null==i;if("object"===w(i))for(a in s=!0,i)q(t,e,a,i[a],!0,o,r);else if(void 0!==n&&(s=!0,_(n)||(r=!0),h&&(r?(e.call(t,n),e=null):(h=e,e=function(t,e,i){return h.call(T(t),i)})),e))for(;a<l;a++)e(t[a],i,r?n:n.call(t[a],a,e(t[a],i)));return s?t:h?e.call(t):l?e(t[0],i):o},Z=/^-ms-/,U=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(Z,"ms-").replace(U,Y)}var G=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function X(){this.expando=T.expando+X.uid++}X.uid=1,X.prototype={cache:function(t){var e=t[this.expando];return e||(e={},G(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,s=this.cache(t);if("string"==typeof e)s[K(e)]=i;else for(n in e)s[K(n)]=e[n];return s},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][K(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(K):(e=K(e))in n?[e]:e.match(j)||[]).length;for(;i--;)delete n[e[i]]}(void 0===e||T.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!T.isEmptyObject(e)}};var Q=new X,J=new X,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function it(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(i)}catch(t){}J.set(t,e,i)}else i=void 0;return i}T.extend({hasData:function(t){return J.hasData(t)||Q.hasData(t)},data:function(t,e,i){return J.access(t,e,i)},removeData:function(t,e){J.remove(t,e)},_data:function(t,e,i){return Q.access(t,e,i)},_removeData:function(t,e){Q.remove(t,e)}}),T.fn.extend({data:function(t,e){var i,n,s,o=this[0],r=o&&o.attributes;if(void 0===t){if(this.length&&(s=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(i=r.length;i--;)r[i]&&0===(n=r[i].name).indexOf("data-")&&(n=K(n.slice(5)),it(o,n,s[n]));Q.set(o,"hasDataAttrs",!0)}return s}return"object"==typeof t?this.each((function(){J.set(this,t)})):q(this,(function(e){var i;if(o&&void 0===e)return void 0!==(i=J.get(o,t))||void 0!==(i=it(o,t))?i:void 0;this.each((function(){J.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){J.remove(this,t)}))}}),T.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=Q.get(t,e),i&&(!n||Array.isArray(i)?n=Q.access(t,e,T.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=T.queue(t,e),n=i.length,s=i.shift(),o=T._queueHooks(t,e);"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,(function(){T.dequeue(t,e)}),o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return Q.get(t,i)||Q.access(t,i,{empty:T.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",i])}))})}}),T.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?T.queue(this[0],t):void 0===e?this:this.each((function(){var i=T.queue(this,t,e);T._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&T.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){T.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,s=T.Deferred(),o=this,r=this.length,a=function(){--n||s.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)(i=Q.get(o[r],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),s.promise(e)}});var nt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,st=new RegExp("^(?:([+-])=|)("+nt+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],rt=y.documentElement,at=function(t){return T.contains(t.ownerDocument,t)},lt={composed:!0};rt.getRootNode&&(at=function(t){return T.contains(t.ownerDocument,t)||t.getRootNode(lt)===t.ownerDocument});var ht=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&at(t)&&"none"===T.css(t,"display")};function ct(t,e,i,n){var s,o,r=20,a=n?function(){return n.cur()}:function(){return T.css(t,e,"")},l=a(),h=i&&i[3]||(T.cssNumber[e]?"":"px"),c=t.nodeType&&(T.cssNumber[e]||"px"!==h&&+l)&&st.exec(T.css(t,e));if(c&&c[3]!==h){for(l/=2,h=h||c[3],c=+l||1;r--;)T.style(t,e,c+h),(1-o)*(1-(o=a()/l||.5))<=0&&(r=0),c/=o;c*=2,T.style(t,e,c+h),i=i||[]}return i&&(c=+c||+l||0,s=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=h,n.start=c,n.end=s)),s}var ut={};function dt(t){var e,i=t.ownerDocument,n=t.nodeName,s=ut[n];return s||(e=i.body.appendChild(i.createElement(n)),s=T.css(e,"display"),e.parentNode.removeChild(e),"none"===s&&(s="block"),ut[n]=s,s)}function pt(t,e){for(var i,n,s=[],o=0,r=t.length;o<r;o++)(n=t[o]).style&&(i=n.style.display,e?("none"===i&&(s[o]=Q.get(n,"display")||null,s[o]||(n.style.display="")),""===n.style.display&&ht(n)&&(s[o]=dt(n))):"none"!==i&&(s[o]="none",Q.set(n,"display",i)));for(o=0;o<r;o++)null!=s[o]&&(t[o].style.display=s[o]);return t}T.fn.extend({show:function(){return pt(this,!0)},hide:function(){return pt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ht(this)?T(this).show():T(this).hide()}))}});var ft,mt,gt=/^(?:checkbox|radio)$/i,_t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,vt=/^$|^module$|\/(?:java|ecma)script/i;ft=y.createDocumentFragment().appendChild(y.createElement("div")),(mt=y.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),ft.appendChild(mt),g.checkClone=ft.cloneNode(!0).cloneNode(!0).lastChild.checked,ft.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!ft.cloneNode(!0).lastChild.defaultValue,ft.innerHTML="<option></option>",g.option=!!ft.lastChild;var yt={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,"",""]};function bt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&P(t,e)?T.merge([t],i):i}function xt(t,e){for(var i=0,n=t.length;i<n;i++)Q.set(t[i],"globalEval",!e||Q.get(e[i],"globalEval"))}yt.tbody=yt.tfoot=yt.colgroup=yt.caption=yt.thead,yt.th=yt.td,g.option||(yt.optgroup=yt.option=[1,"<select multiple='multiple'>","</select>"]);var wt=/<|&#?\w+;/;function kt(t,e,i,n,s){for(var o,r,a,l,h,c,u=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if((o=t[p])||0===o)if("object"===w(o))T.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){for(r=r||u.appendChild(e.createElement("div")),a=(_t.exec(o)||["",""])[1].toLowerCase(),l=yt[a]||yt._default,r.innerHTML=l[1]+T.htmlPrefilter(o)+l[2],c=l[0];c--;)r=r.lastChild;T.merge(d,r.childNodes),(r=u.firstChild).textContent=""}else d.push(e.createTextNode(o));for(u.textContent="",p=0;o=d[p++];)if(n&&T.inArray(o,n)>-1)s&&s.push(o);else if(h=at(o),r=bt(u.appendChild(o),"script"),h&&xt(r),i)for(c=0;o=r[c++];)vt.test(o.type||"")&&i.push(o);return u}var Tt=/^([^.]*)(?:\.(.+)|)/;function Ct(){return!0}function At(){return!1}function Et(t,e){return t===function(){try{return y.activeElement}catch(t){}}()==("focus"===e)}function Mt(t,e,i,n,s,o){var r,a;if("object"==typeof e){for(a in"string"!=typeof i&&(n=n||i,i=void 0),e)Mt(t,a,i,n,e[a],o);return t}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),!1===s)s=At;else if(!s)return t;return 1===o&&(r=s,s=function(t){return T().off(t),r.apply(this,arguments)},s.guid=r.guid||(r.guid=T.guid++)),t.each((function(){T.event.add(this,e,s,n,i)}))}function Lt(t,e,i){i?(Q.set(t,e,!1),T.event.add(t,e,{namespace:!1,handler:function(t){var n,s,o=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(T.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=a.call(arguments),Q.set(this,e,o),n=i(this,e),this[e](),o!==(s=Q.get(this,e))||n?Q.set(this,e,!1):s={},o!==s)return t.stopImmediatePropagation(),t.preventDefault(),s&&s.value}else o.length&&(Q.set(this,e,{value:T.event.trigger(T.extend(o[0],T.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&T.event.add(t,e,Ct)}T.event={global:{},add:function(t,e,i,n,s){var o,r,a,l,h,c,u,d,p,f,m,g=Q.get(t);if(G(t))for(i.handler&&(i=(o=i).handler,s=o.selector),s&&T.find.matchesSelector(rt,s),i.guid||(i.guid=T.guid++),(l=g.events)||(l=g.events=Object.create(null)),(r=g.handle)||(r=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),h=(e=(e||"").match(j)||[""]).length;h--;)p=m=(a=Tt.exec(e[h])||[])[1],f=(a[2]||"").split(".").sort(),p&&(u=T.event.special[p]||{},p=(s?u.delegateType:u.bindType)||p,u=T.event.special[p]||{},c=T.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&T.expr.match.needsContext.test(s),namespace:f.join(".")},o),(d=l[p])||((d=l[p]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,n,f,r)||t.addEventListener&&t.addEventListener(p,r)),u.add&&(u.add.call(t,c),c.handler.guid||(c.handler.guid=i.guid)),s?d.splice(d.delegateCount++,0,c):d.push(c),T.event.global[p]=!0)},remove:function(t,e,i,n,s){var o,r,a,l,h,c,u,d,p,f,m,g=Q.hasData(t)&&Q.get(t);if(g&&(l=g.events)){for(h=(e=(e||"").match(j)||[""]).length;h--;)if(p=m=(a=Tt.exec(e[h])||[])[1],f=(a[2]||"").split(".").sort(),p){for(u=T.event.special[p]||{},d=l[p=(n?u.delegateType:u.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=d.length;o--;)c=d[o],!s&&m!==c.origType||i&&i.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,u.remove&&u.remove.call(t,c));r&&!d.length&&(u.teardown&&!1!==u.teardown.call(t,f,g.handle)||T.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)T.event.remove(t,p+e[h],i,n,!0);T.isEmptyObject(l)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,i,n,s,o,r,a=new Array(arguments.length),l=T.event.fix(t),h=(Q.get(this,"events")||Object.create(null))[l.type]||[],c=T.event.special[l.type]||{};for(a[0]=l,e=1;e<arguments.length;e++)a[e]=arguments[e];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(r=T.event.handlers.call(this,l,h),e=0;(s=r[e++])&&!l.isPropagationStopped();)for(l.currentTarget=s.elem,i=0;(o=s.handlers[i++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(n=((T.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a))&&!1===(l.result=n)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(t,e){var i,n,s,o,r,a=[],l=e.delegateCount,h=t.target;if(l&&h.nodeType&&!("click"===t.type&&t.button>=1))for(;h!==this;h=h.parentNode||this)if(1===h.nodeType&&("click"!==t.type||!0!==h.disabled)){for(o=[],r={},i=0;i<l;i++)void 0===r[s=(n=e[i]).selector+" "]&&(r[s]=n.needsContext?T(s,this).index(h)>-1:T.find(s,this,null,[h]).length),r[s]&&o.push(n);o.length&&a.push({elem:h,handlers:o})}return h=this,l<e.length&&a.push({elem:h,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(T.Event.prototype,t,{enumerable:!0,configurable:!0,get:_(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[T.expando]?t:new T.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return gt.test(e.type)&&e.click&&P(e,"input")&&Lt(e,"click",Ct),!1},trigger:function(t){var e=this||t;return gt.test(e.type)&&e.click&&P(e,"input")&&Lt(e,"click"),!0},_default:function(t){var e=t.target;return gt.test(e.type)&&e.click&&P(e,"input")&&Q.get(e,"click")||P(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},T.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},T.Event=function(t,e){if(!(this instanceof T.Event))return new T.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Ct:At,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&T.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:At,isPropagationStopped:At,isImmediatePropagationStopped:At,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Ct,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Ct,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Ct,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},T.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,code:!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:!0},T.event.addProp),T.each({focus:"focusin",blur:"focusout"},(function(t,e){T.event.special[t]={setup:function(){return Lt(this,t,Et),!1},trigger:function(){return Lt(this,t),!0},_default:function(e){return Q.get(e.target,t)},delegateType:e}})),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){T.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,s=t.relatedTarget,o=t.handleObj;return s&&(s===n||T.contains(n,s))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}})),T.fn.extend({on:function(t,e,i,n){return Mt(this,t,e,i,n)},one:function(t,e,i,n){return Mt(this,t,e,i,n,1)},off:function(t,e,i){var n,s;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,T(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(s in t)this.off(s,e,t[s]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=At),this.each((function(){T.event.remove(this,t,i,e)}))}});var Pt=/<script|<style|<link/i,St=/checked\s*(?:[^=]|=\s*.checked.)/i,Ot=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Dt(t,e){return P(t,"table")&&P(11!==e.nodeType?e:e.firstChild,"tr")&&T(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Nt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function zt(t,e){var i,n,s,o,r,a;if(1===e.nodeType){if(Q.hasData(t)&&(a=Q.get(t).events))for(s in Q.remove(e,"handle events"),a)for(i=0,n=a[s].length;i<n;i++)T.event.add(e,s,a[s][i]);J.hasData(t)&&(o=J.access(t),r=T.extend({},o),J.set(e,r))}}function Rt(t,e){var i=e.nodeName.toLowerCase();"input"===i&&gt.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function jt(t,e,i,n){e=l(e);var s,o,r,a,h,c,u=0,d=t.length,p=d-1,f=e[0],m=_(f);if(m||d>1&&"string"==typeof f&&!g.checkClone&&St.test(f))return t.each((function(s){var o=t.eq(s);m&&(e[0]=f.call(this,s,o.html())),jt(o,e,i,n)}));if(d&&(o=(s=kt(e,t[0].ownerDocument,!1,t,n)).firstChild,1===s.childNodes.length&&(s=o),o||n)){for(a=(r=T.map(bt(s,"script"),It)).length;u<d;u++)h=s,u!==p&&(h=T.clone(h,!0,!0),a&&T.merge(r,bt(h,"script"))),i.call(t[u],h,u);if(a)for(c=r[r.length-1].ownerDocument,T.map(r,Nt),u=0;u<a;u++)h=r[u],vt.test(h.type||"")&&!Q.access(h,"globalEval")&&T.contains(c,h)&&(h.src&&"module"!==(h.type||"").toLowerCase()?T._evalUrl&&!h.noModule&&T._evalUrl(h.src,{nonce:h.nonce||h.getAttribute("nonce")},c):x(h.textContent.replace(Ot,""),h,c))}return t}function Bt(t,e,i){for(var n,s=e?T.filter(e,t):t,o=0;null!=(n=s[o]);o++)i||1!==n.nodeType||T.cleanData(bt(n)),n.parentNode&&(i&&at(n)&&xt(bt(n,"script")),n.parentNode.removeChild(n));return t}T.extend({htmlPrefilter:function(t){return t},clone:function(t,e,i){var n,s,o,r,a=t.cloneNode(!0),l=at(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||T.isXMLDoc(t)))for(r=bt(a),n=0,s=(o=bt(t)).length;n<s;n++)Rt(o[n],r[n]);if(e)if(i)for(o=o||bt(t),r=r||bt(a),n=0,s=o.length;n<s;n++)zt(o[n],r[n]);else zt(t,a);return(r=bt(a,"script")).length>0&&xt(r,!l&&bt(t,"script")),a},cleanData:function(t){for(var e,i,n,s=T.event.special,o=0;void 0!==(i=t[o]);o++)if(G(i)){if(e=i[Q.expando]){if(e.events)for(n in e.events)s[n]?T.event.remove(i,n):T.removeEvent(i,n,e.handle);i[Q.expando]=void 0}i[J.expando]&&(i[J.expando]=void 0)}}}),T.fn.extend({detach:function(t){return Bt(this,t,!0)},remove:function(t){return Bt(this,t)},text:function(t){return q(this,(function(t){return void 0===t?T.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return jt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Dt(this,t).appendChild(t)}))},prepend:function(){return jt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Dt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return jt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return jt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(T.cleanData(bt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return T.clone(this,t,e)}))},html:function(t){return q(this,(function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Pt.test(t)&&!yt[(_t.exec(t)||["",""])[1].toLowerCase()]){t=T.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(T.cleanData(bt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return jt(this,arguments,(function(e){var i=this.parentNode;T.inArray(this,t)<0&&(T.cleanData(bt(this)),i&&i.replaceChild(e,this))}),t)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){T.fn[t]=function(t){for(var i,n=[],s=T(t),o=s.length-1,r=0;r<=o;r++)i=r===o?this:this.clone(!0),T(s[r])[e](i),h.apply(n,i.get());return this.pushStack(n)}}));var $t=new RegExp("^("+nt+")(?!px)[a-z%]+$","i"),Ft=/^--/,Ht=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Vt=function(t,e,i){var n,s,o={};for(s in e)o[s]=t.style[s],t.style[s]=e[s];for(s in n=i.call(t),e)t.style[s]=o[s];return n},Wt=new RegExp(ot.join("|"),"i"),qt=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g");function Zt(t,e,i){var n,s,o,r,a=Ft.test(e),l=t.style;return(i=i||Ht(t))&&(r=i.getPropertyValue(e)||i[e],a&&(r=r.replace(qt,"$1")),""!==r||at(t)||(r=T.style(t,e)),!g.pixelBoxStyles()&&$t.test(r)&&Wt.test(e)&&(n=l.width,s=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=i.width,l.width=n,l.minWidth=s,l.maxWidth=o)),void 0!==r?r+"":r}function Ut(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){h.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",rt.appendChild(h).appendChild(c);var t=n.getComputedStyle(c);i="1%"!==t.top,l=12===e(t.marginLeft),c.style.right="60%",r=36===e(t.right),s=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),rt.removeChild(h),c=null}}function e(t){return Math.round(parseFloat(t))}var i,s,o,r,a,l,h=y.createElement("div"),c=y.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,T.extend(g,{boxSizingReliable:function(){return t(),s},pixelBoxStyles:function(){return t(),r},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,i,s;return null==a&&(t=y.createElement("table"),e=y.createElement("tr"),i=y.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",i.style.height="9px",i.style.display="block",rt.appendChild(t).appendChild(e).appendChild(i),s=n.getComputedStyle(e),a=parseInt(s.height,10)+parseInt(s.borderTopWidth,10)+parseInt(s.borderBottomWidth,10)===e.offsetHeight,rt.removeChild(t)),a}}))}();var Yt=["Webkit","Moz","ms"],Kt=y.createElement("div").style,Gt={};function Xt(t){var e=T.cssProps[t]||Gt[t];return e||(t in Kt?t:Gt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),i=Yt.length;i--;)if((t=Yt[i]+e)in Kt)return t}(t)||t)}var Qt=/^(none|table(?!-c[ea]).+)/,Jt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,i){var n=st.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function ie(t,e,i,n,s,o){var r="width"===e?1:0,a=0,l=0;if(i===(n?"border":"content"))return 0;for(;r<4;r+=2)"margin"===i&&(l+=T.css(t,i+ot[r],!0,s)),n?("content"===i&&(l-=T.css(t,"padding"+ot[r],!0,s)),"margin"!==i&&(l-=T.css(t,"border"+ot[r]+"Width",!0,s))):(l+=T.css(t,"padding"+ot[r],!0,s),"padding"!==i?l+=T.css(t,"border"+ot[r]+"Width",!0,s):a+=T.css(t,"border"+ot[r]+"Width",!0,s));return!n&&o>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-a-.5))||0),l}function ne(t,e,i){var n=Ht(t),s=(!g.boxSizingReliable()||i)&&"border-box"===T.css(t,"boxSizing",!1,n),o=s,r=Zt(t,e,n),a="offset"+e[0].toUpperCase()+e.slice(1);if($t.test(r)){if(!i)return r;r="auto"}return(!g.boxSizingReliable()&&s||!g.reliableTrDimensions()&&P(t,"tr")||"auto"===r||!parseFloat(r)&&"inline"===T.css(t,"display",!1,n))&&t.getClientRects().length&&(s="border-box"===T.css(t,"boxSizing",!1,n),(o=a in t)&&(r=t[a])),(r=parseFloat(r)||0)+ie(t,e,i||(s?"border":"content"),o,n,r)+"px"}function se(t,e,i,n,s){return new se.prototype.init(t,e,i,n,s)}T.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Zt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,o,r,a=K(e),l=Ft.test(e),h=t.style;if(l||(e=Xt(a)),r=T.cssHooks[e]||T.cssHooks[a],void 0===i)return r&&"get"in r&&void 0!==(s=r.get(t,!1,n))?s:h[e];"string"===(o=typeof i)&&(s=st.exec(i))&&s[1]&&(i=ct(t,e,s),o="number"),null!=i&&i==i&&("number"!==o||l||(i+=s&&s[3]||(T.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==i||0!==e.indexOf("background")||(h[e]="inherit"),r&&"set"in r&&void 0===(i=r.set(t,i,n))||(l?h.setProperty(e,i):h[e]=i))}},css:function(t,e,i,n){var s,o,r,a=K(e);return Ft.test(e)||(e=Xt(a)),(r=T.cssHooks[e]||T.cssHooks[a])&&"get"in r&&(s=r.get(t,!0,i)),void 0===s&&(s=Zt(t,e,n)),"normal"===s&&e in te&&(s=te[e]),""===i||i?(o=parseFloat(s),!0===i||isFinite(o)?o||0:s):s}}),T.each(["height","width"],(function(t,e){T.cssHooks[e]={get:function(t,i,n){if(i)return!Qt.test(T.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ne(t,e,n):Vt(t,Jt,(function(){return ne(t,e,n)}))},set:function(t,i,n){var s,o=Ht(t),r=!g.scrollboxSize()&&"absolute"===o.position,a=(r||n)&&"border-box"===T.css(t,"boxSizing",!1,o),l=n?ie(t,e,n,a,o):0;return a&&r&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ie(t,e,"border",!1,o)-.5)),l&&(s=st.exec(i))&&"px"!==(s[3]||"px")&&(t.style[e]=i,i=T.css(t,e)),ee(0,i,l)}}})),T.cssHooks.marginLeft=Ut(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Vt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),T.each({margin:"",padding:"",border:"Width"},(function(t,e){T.cssHooks[t+e]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];n<4;n++)s[t+ot[n]+e]=o[n]||o[n-2]||o[0];return s}},"margin"!==t&&(T.cssHooks[t+e].set=ee)})),T.fn.extend({css:function(t,e){return q(this,(function(t,e,i){var n,s,o={},r=0;if(Array.isArray(e)){for(n=Ht(t),s=e.length;r<s;r++)o[e[r]]=T.css(t,e[r],!1,n);return o}return void 0!==i?T.style(t,e,i):T.css(t,e)}),t,e,arguments.length>1)}}),T.Tween=se,se.prototype={constructor:se,init:function(t,e,i,n,s,o){this.elem=t,this.prop=i,this.easing=s||T.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(T.cssNumber[i]?"":"px")},cur:function(){var t=se.propHooks[this.prop];return t&&t.get?t.get(this):se.propHooks._default.get(this)},run:function(t){var e,i=se.propHooks[this.prop];return this.options.duration?this.pos=e=T.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):se.propHooks._default.set(this),this}},se.prototype.init.prototype=se.prototype,se.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=T.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){T.fx.step[t.prop]?T.fx.step[t.prop](t):1!==t.elem.nodeType||!T.cssHooks[t.prop]&&null==t.elem.style[Xt(t.prop)]?t.elem[t.prop]=t.now:T.style(t.elem,t.prop,t.now+t.unit)}}},se.propHooks.scrollTop=se.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},T.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},T.fx=se.prototype.init,T.fx.step={};var oe,re,ae=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function he(){re&&(!1===y.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(he):n.setTimeout(he,T.fx.interval),T.fx.tick())}function ce(){return n.setTimeout((function(){oe=void 0})),oe=Date.now()}function ue(t,e){var i,n=0,s={height:t};for(e=e?1:0;n<4;n+=2-e)s["margin"+(i=ot[n])]=s["padding"+i]=t;return e&&(s.opacity=s.width=t),s}function de(t,e,i){for(var n,s=(pe.tweeners[e]||[]).concat(pe.tweeners["*"]),o=0,r=s.length;o<r;o++)if(n=s[o].call(i,e,t))return n}function pe(t,e,i){var n,s,o=0,r=pe.prefilters.length,a=T.Deferred().always((function(){delete l.elem})),l=function(){if(s)return!1;for(var e=oe||ce(),i=Math.max(0,h.startTime+h.duration-e),n=1-(i/h.duration||0),o=0,r=h.tweens.length;o<r;o++)h.tweens[o].run(n);return a.notifyWith(t,[h,n,i]),n<1&&r?i:(r||a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:T.extend({},e),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},i),originalProperties:e,originalOptions:i,startTime:oe||ce(),duration:i.duration,tweens:[],createTween:function(e,i){var n=T.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(n),n},stop:function(e){var i=0,n=e?h.tweens.length:0;if(s)return this;for(s=!0;i<n;i++)h.tweens[i].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),c=h.props;for(!function(t,e){var i,n,s,o,r;for(i in t)if(s=e[n=K(i)],o=t[i],Array.isArray(o)&&(s=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),(r=T.cssHooks[n])&&"expand"in r)for(i in o=r.expand(o),delete t[n],o)i in t||(t[i]=o[i],e[i]=s);else e[n]=s}(c,h.opts.specialEasing);o<r;o++)if(n=pe.prefilters[o].call(h,t,c,h.opts))return _(n.stop)&&(T._queueHooks(h.elem,h.opts.queue).stop=n.stop.bind(n)),n;return T.map(c,de,h),_(h.opts.start)&&h.opts.start.call(t,h),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always),T.fx.timer(T.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h}T.Animation=T.extend(pe,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return ct(i.elem,t,st.exec(e),i),i}]},tweener:function(t,e){_(t)?(e=t,t=["*"]):t=t.match(j);for(var i,n=0,s=t.length;n<s;n++)i=t[n],pe.tweeners[i]=pe.tweeners[i]||[],pe.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,s,o,r,a,l,h,c,u="width"in e||"height"in e,d=this,p={},f=t.style,m=t.nodeType&&ht(t),g=Q.get(t,"fxshow");for(n in i.queue||(null==(r=T._queueHooks(t,"fx")).unqueued&&(r.unqueued=0,a=r.empty.fire,r.empty.fire=function(){r.unqueued||a()}),r.unqueued++,d.always((function(){d.always((function(){r.unqueued--,T.queue(t,"fx").length||r.empty.fire()}))}))),e)if(s=e[n],ae.test(s)){if(delete e[n],o=o||"toggle"===s,s===(m?"hide":"show")){if("show"!==s||!g||void 0===g[n])continue;m=!0}p[n]=g&&g[n]||T.style(t,n)}if((l=!T.isEmptyObject(e))||!T.isEmptyObject(p))for(n in u&&1===t.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(h=g&&g.display)&&(h=Q.get(t,"display")),"none"===(c=T.css(t,"display"))&&(h?c=h:(pt([t],!0),h=t.style.display||h,c=T.css(t,"display"),pt([t]))),("inline"===c||"inline-block"===c&&null!=h)&&"none"===T.css(t,"float")&&(l||(d.done((function(){f.display=h})),null==h&&(c=f.display,h="none"===c?"":c)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]}))),l=!1,p)l||(g?"hidden"in g&&(m=g.hidden):g=Q.access(t,"fxshow",{display:h}),o&&(g.hidden=!m),m&&pt([t],!0),d.done((function(){for(n in m||pt([t]),Q.remove(t,"fxshow"),p)T.style(t,n,p[n])}))),l=de(m?g[n]:0,n,d),n in g||(g[n]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?pe.prefilters.unshift(t):pe.prefilters.push(t)}}),T.speed=function(t,e,i){var n=t&&"object"==typeof t?T.extend({},t):{complete:i||!i&&e||_(t)&&t,duration:t,easing:i&&e||e&&!_(e)&&e};return T.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in T.fx.speeds?n.duration=T.fx.speeds[n.duration]:n.duration=T.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){_(n.old)&&n.old.call(this),n.queue&&T.dequeue(this,n.queue)},n},T.fn.extend({fadeTo:function(t,e,i,n){return this.filter(ht).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var s=T.isEmptyObject(t),o=T.speed(e,i,n),r=function(){var e=pe(this,T.extend({},t),o);(s||Q.get(this,"finish"))&&e.stop(!0)};return r.finish=r,s||!1===o.queue?this.each(r):this.queue(o.queue,r)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,s=null!=t&&t+"queueHooks",o=T.timers,r=Q.get(this);if(s)r[s]&&r[s].stop&&n(r[s]);else for(s in r)r[s]&&r[s].stop&&le.test(s)&&n(r[s]);for(s=o.length;s--;)o[s].elem!==this||null!=t&&o[s].queue!==t||(o[s].anim.stop(i),e=!1,o.splice(s,1));!e&&i||T.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,i=Q.get(this),n=i[t+"queue"],s=i[t+"queueHooks"],o=T.timers,r=n?n.length:0;for(i.finish=!0,T.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<r;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish}))}}),T.each(["toggle","show","hide"],(function(t,e){var i=T.fn[e];T.fn[e]=function(t,n,s){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(ue(e,!0),t,n,s)}})),T.each({slideDown:ue("show"),slideUp:ue("hide"),slideToggle:ue("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){T.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}})),T.timers=[],T.fx.tick=function(){var t,e=0,i=T.timers;for(oe=Date.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||T.fx.stop(),oe=void 0},T.fx.timer=function(t){T.timers.push(t),T.fx.start()},T.fx.interval=13,T.fx.start=function(){re||(re=!0,he())},T.fx.stop=function(){re=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(t,e){return t=T.fx&&T.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var s=n.setTimeout(e,t);i.stop=function(){n.clearTimeout(s)}}))},function(){var t=y.createElement("input"),e=y.createElement("select").appendChild(y.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=y.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var fe,me=T.expr.attrHandle;T.fn.extend({attr:function(t,e){return q(this,T.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){T.removeAttr(this,t)}))}}),T.extend({attr:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?T.prop(t,e,i):(1===o&&T.isXMLDoc(t)||(s=T.attrHooks[e.toLowerCase()]||(T.expr.match.bool.test(e)?fe:void 0)),void 0!==i?null===i?void T.removeAttr(t,e):s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:(t.setAttribute(e,i+""),i):s&&"get"in s&&null!==(n=s.get(t,e))?n:null==(n=T.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&P(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,s=e&&e.match(j);if(s&&1===t.nodeType)for(;i=s[n++];)t.removeAttribute(i)}}),fe={set:function(t,e,i){return!1===e?T.removeAttr(t,i):t.setAttribute(i,i),i}},T.each(T.expr.match.bool.source.match(/\w+/g),(function(t,e){var i=me[e]||T.find.attr;me[e]=function(t,e,n){var s,o,r=e.toLowerCase();return n||(o=me[r],me[r]=s,s=null!=i(t,e,n)?r:null,me[r]=o),s}}));var ge=/^(?:input|select|textarea|button)$/i,_e=/^(?:a|area)$/i;function ve(t){return(t.match(j)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function be(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(j)||[]}T.fn.extend({prop:function(t,e){return q(this,T.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[T.propFix[t]||t]}))}}),T.extend({prop:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(t)||(e=T.propFix[e]||e,s=T.propHooks[e]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:t[e]=i:s&&"get"in s&&null!==(n=s.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=T.find.attr(t,"tabindex");return e?parseInt(e,10):ge.test(t.nodeName)||_e.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(T.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){T.propFix[this.toLowerCase()]=this})),T.fn.extend({addClass:function(t){var e,i,n,s,o,r;return _(t)?this.each((function(e){T(this).addClass(t.call(this,e,ye(this)))})):(e=be(t)).length?this.each((function(){if(n=ye(this),i=1===this.nodeType&&" "+ve(n)+" "){for(o=0;o<e.length;o++)s=e[o],i.indexOf(" "+s+" ")<0&&(i+=s+" ");r=ve(i),n!==r&&this.setAttribute("class",r)}})):this},removeClass:function(t){var e,i,n,s,o,r;return _(t)?this.each((function(e){T(this).removeClass(t.call(this,e,ye(this)))})):arguments.length?(e=be(t)).length?this.each((function(){if(n=ye(this),i=1===this.nodeType&&" "+ve(n)+" "){for(o=0;o<e.length;o++)for(s=e[o];i.indexOf(" "+s+" ")>-1;)i=i.replace(" "+s+" "," ");r=ve(i),n!==r&&this.setAttribute("class",r)}})):this:this.attr("class","")},toggleClass:function(t,e){var i,n,s,o,r=typeof t,a="string"===r||Array.isArray(t);return _(t)?this.each((function(i){T(this).toggleClass(t.call(this,i,ye(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(i=be(t),this.each((function(){if(a)for(o=T(this),s=0;s<i.length;s++)n=i[s],o.hasClass(n)?o.removeClass(n):o.addClass(n);else void 0!==t&&"boolean"!==r||((n=ye(this))&&Q.set(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":Q.get(this,"__className__")||""))})))},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+ve(ye(i))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;T.fn.extend({val:function(t){var e,i,n,s=this[0];return arguments.length?(n=_(t),this.each((function(i){var s;1===this.nodeType&&(null==(s=n?t.call(this,i,T(this).val()):t)?s="":"number"==typeof s?s+="":Array.isArray(s)&&(s=T.map(s,(function(t){return null==t?"":t+""}))),(e=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,s,"value")||(this.value=s))}))):s?(e=T.valHooks[s.type]||T.valHooks[s.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(s,"value"))?i:"string"==typeof(i=s.value)?i.replace(xe,""):null==i?"":i:void 0}}),T.extend({valHooks:{option:{get:function(t){var e=T.find.attr(t,"value");return null!=e?e:ve(T.text(t))}},select:{get:function(t){var e,i,n,s=t.options,o=t.selectedIndex,r="select-one"===t.type,a=r?null:[],l=r?o+1:s.length;for(n=o<0?l:r?o:0;n<l;n++)if(((i=s[n]).selected||n===o)&&!i.disabled&&(!i.parentNode.disabled||!P(i.parentNode,"optgroup"))){if(e=T(i).val(),r)return e;a.push(e)}return a},set:function(t,e){for(var i,n,s=t.options,o=T.makeArray(e),r=s.length;r--;)((n=s[r]).selected=T.inArray(T.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],(function(){T.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=T.inArray(T(t).val(),e)>-1}},g.checkOn||(T.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),g.focusin="onfocusin"in n;var we=/^(?:focusinfocus|focusoutblur)$/,ke=function(t){t.stopPropagation()};T.extend(T.event,{trigger:function(t,e,i,s){var o,r,a,l,h,c,u,d,f=[i||y],m=p.call(t,"type")?t.type:t,g=p.call(t,"namespace")?t.namespace.split("."):[];if(r=d=a=i=i||y,3!==i.nodeType&&8!==i.nodeType&&!we.test(m+T.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),h=m.indexOf(":")<0&&"on"+m,(t=t[T.expando]?t:new T.Event(m,"object"==typeof t&&t)).isTrigger=s?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:T.makeArray(e,[t]),u=T.event.special[m]||{},s||!u.trigger||!1!==u.trigger.apply(i,e))){if(!s&&!u.noBubble&&!v(i)){for(l=u.delegateType||m,we.test(l+m)||(r=r.parentNode);r;r=r.parentNode)f.push(r),a=r;a===(i.ownerDocument||y)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(r=f[o++])&&!t.isPropagationStopped();)d=r,t.type=o>1?l:u.bindType||m,(c=(Q.get(r,"events")||Object.create(null))[t.type]&&Q.get(r,"handle"))&&c.apply(r,e),(c=h&&r[h])&&c.apply&&G(r)&&(t.result=c.apply(r,e),!1===t.result&&t.preventDefault());return t.type=m,s||t.isDefaultPrevented()||u._default&&!1!==u._default.apply(f.pop(),e)||!G(i)||h&&_(i[m])&&!v(i)&&((a=i[h])&&(i[h]=null),T.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,ke),i[m](),t.isPropagationStopped()&&d.removeEventListener(m,ke),T.event.triggered=void 0,a&&(i[h]=a)),t.result}},simulate:function(t,e,i){var n=T.extend(new T.Event,i,{type:t,isSimulated:!0});T.event.trigger(n,null,e)}}),T.fn.extend({trigger:function(t,e){return this.each((function(){T.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var i=this[0];if(i)return T.event.trigger(t,e,i,!0)}}),g.focusin||T.each({focus:"focusin",blur:"focusout"},(function(t,e){var i=function(t){T.event.simulate(e,t.target,T.event.fix(t))};T.event.special[e]={setup:function(){var n=this.ownerDocument||this.document||this,s=Q.access(n,e);s||n.addEventListener(t,i,!0),Q.access(n,e,(s||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,s=Q.access(n,e)-1;s?Q.access(n,e,s):(n.removeEventListener(t,i,!0),Q.remove(n,e))}}}));var Te=n.location,Ce={guid:Date.now()},Ae=/\?/;T.parseXML=function(t){var e,i;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){}return i=e&&e.getElementsByTagName("parsererror")[0],e&&!i||T.error("Invalid XML: "+(i?T.map(i.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Ee=/\[\]$/,Me=/\r?\n/g,Le=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i;function Se(t,e,i,n){var s;if(Array.isArray(e))T.each(e,(function(e,s){i||Ee.test(t)?n(t,s):Se(t+"["+("object"==typeof s&&null!=s?e:"")+"]",s,i,n)}));else if(i||"object"!==w(e))n(t,e);else for(s in e)Se(t+"["+s+"]",e[s],i,n)}T.param=function(t,e){var i,n=[],s=function(t,e){var i=_(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!T.isPlainObject(t))T.each(t,(function(){s(this.name,this.value)}));else for(i in t)Se(i,t[i],e,s);return n.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=T.prop(this,"elements");return t?T.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!T(this).is(":disabled")&&Pe.test(this.nodeName)&&!Le.test(t)&&(this.checked||!gt.test(t))})).map((function(t,e){var i=T(this).val();return null==i?null:Array.isArray(i)?T.map(i,(function(t){return{name:e.name,value:t.replace(Me,"\r\n")}})):{name:e.name,value:i.replace(Me,"\r\n")}})).get()}});var Oe=/%20/g,De=/#.*$/,Ie=/([?&])_=[^&]*/,Ne=/^(.*?):[ \t]*([^\r\n]*)$/gm,ze=/^(?:GET|HEAD)$/,Re=/^\/\//,je={},Be={},$e="*/".concat("*"),Fe=y.createElement("a");function He(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,s=0,o=e.toLowerCase().match(j)||[];if(_(i))for(;n=o[s++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Ve(t,e,i,n){var s={},o=t===Be;function r(a){var l;return s[a]=!0,T.each(t[a]||[],(function(t,a){var h=a(e,i,n);return"string"!=typeof h||o||s[h]?o?!(l=h):void 0:(e.dataTypes.unshift(h),r(h),!1)})),l}return r(e.dataTypes[0])||!s["*"]&&r("*")}function We(t,e){var i,n,s=T.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((s[i]?t:n||(n={}))[i]=e[i]);return n&&T.extend(!0,t,n),t}Fe.href=Te.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Te.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Te.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$e,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":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?We(We(t,T.ajaxSettings),e):We(T.ajaxSettings,t)},ajaxPrefilter:He(je),ajaxTransport:He(Be),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,s,o,r,a,l,h,c,u,d,p=T.ajaxSetup({},e),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?T(f):T.event,g=T.Deferred(),_=T.Callbacks("once memory"),v=p.statusCode||{},b={},x={},w="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(h){if(!r)for(r={};e=Ne.exec(o);)r[e[1].toLowerCase()+" "]=(r[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=r[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return h?o:null},setRequestHeader:function(t,e){return null==h&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==h&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)k.always(t[k.status]);else for(e in t)v[e]=[v[e],t[e]];return this},abort:function(t){var e=t||w;return i&&i.abort(e),C(0,e),this}};if(g.promise(k),p.url=((t||p.url||Te.href)+"").replace(Re,Te.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(j)||[""],null==p.crossDomain){l=y.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Fe.protocol+"//"+Fe.host!=l.protocol+"//"+l.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=T.param(p.data,p.traditional)),Ve(je,p,e,k),h)return k;for(u in(c=T.event&&p.global)&&0==T.active++&&T.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!ze.test(p.type),s=p.url.replace(De,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Oe,"+")):(d=p.url.slice(s.length),p.data&&(p.processData||"string"==typeof p.data)&&(s+=(Ae.test(s)?"&":"?")+p.data,delete p.data),!1===p.cache&&(s=s.replace(Ie,"$1"),d=(Ae.test(s)?"&":"?")+"_="+Ce.guid+++d),p.url=s+d),p.ifModified&&(T.lastModified[s]&&k.setRequestHeader("If-Modified-Since",T.lastModified[s]),T.etag[s]&&k.setRequestHeader("If-None-Match",T.etag[s])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+$e+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(u,p.headers[u]);if(p.beforeSend&&(!1===p.beforeSend.call(f,k,p)||h))return k.abort();if(w="abort",_.add(p.complete),k.done(p.success),k.fail(p.error),i=Ve(Be,p,e,k)){if(k.readyState=1,c&&m.trigger("ajaxSend",[k,p]),h)return k;p.async&&p.timeout>0&&(a=n.setTimeout((function(){k.abort("timeout")}),p.timeout));try{h=!1,i.send(b,C)}catch(t){if(h)throw t;C(-1,t)}}else C(-1,"No Transport");function C(t,e,r,l){var u,d,y,b,x,w=e;h||(h=!0,a&&n.clearTimeout(a),i=void 0,o=l||"",k.readyState=t>0?4:0,u=t>=200&&t<300||304===t,r&&(b=function(t,e,i){for(var n,s,o,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(s in a)if(a[s]&&a[s].test(n)){l.unshift(s);break}if(l[0]in i)o=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){o=s;break}r||(r=s)}o=o||r}if(o)return o!==l[0]&&l.unshift(o),i[o]}(p,k,r)),!u&&T.inArray("script",p.dataTypes)>-1&&T.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),b=function(t,e,i,n){var s,o,r,a,l,h={},c=t.dataTypes.slice();if(c[1])for(r in t.converters)h[r.toLowerCase()]=t.converters[r];for(o=c.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(r=h[l+" "+o]||h["* "+o]))for(s in h)if((a=s.split(" "))[1]===o&&(r=h[l+" "+a[0]]||h["* "+a[0]])){!0===r?r=h[s]:!0!==h[s]&&(o=a[0],c.unshift(a[1]));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(p,b,k,u),u?(p.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(T.lastModified[s]=x),(x=k.getResponseHeader("etag"))&&(T.etag[s]=x)),204===t||"HEAD"===p.type?w="nocontent":304===t?w="notmodified":(w=b.state,d=b.data,u=!(y=b.error))):(y=w,!t&&w||(w="error",t<0&&(t=0))),k.status=t,k.statusText=(e||w)+"",u?g.resolveWith(f,[d,w,k]):g.rejectWith(f,[k,w,y]),k.statusCode(v),v=void 0,c&&m.trigger(u?"ajaxSuccess":"ajaxError",[k,p,u?d:y]),_.fireWith(f,[k,w]),c&&(m.trigger("ajaxComplete",[k,p]),--T.active||T.event.trigger("ajaxStop")))}return k},getJSON:function(t,e,i){return T.get(t,e,i,"json")},getScript:function(t,e){return T.get(t,void 0,e,"script")}}),T.each(["get","post"],(function(t,e){T[e]=function(t,i,n,s){return _(i)&&(s=s||n,n=i,i=void 0),T.ajax(T.extend({url:t,type:e,dataType:s,data:i,success:n},T.isPlainObject(t)&&t))}})),T.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),T._evalUrl=function(t,e,i){return T.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){T.globalEval(t,e,i)}})},T.fn.extend({wrapAll:function(t){var e;return this[0]&&(_(t)&&(t=t.call(this[0])),e=T(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return _(t)?this.each((function(e){T(this).wrapInner(t.call(this,e))})):this.each((function(){var e=T(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)}))},wrap:function(t){var e=_(t);return this.each((function(i){T(this).wrapAll(e?t.call(this,i):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){T(this).replaceWith(this.childNodes)})),this}}),T.expr.pseudos.hidden=function(t){return!T.expr.pseudos.visible(t)},T.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var qe={0:200,1223:204},Ze=T.ajaxSettings.xhr();g.cors=!!Ze&&"withCredentials"in Ze,g.ajax=Ze=!!Ze,T.ajaxTransport((function(t){var e,i;if(g.cors||Ze&&!t.crossDomain)return{send:function(s,o){var r,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)a[r]=t.xhrFields[r];for(r in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest"),s)a.setRequestHeader(r,s[r]);e=function(t){return function(){e&&(e=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(qe[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),i=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){e&&i()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),T.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return T.globalEval(t),t}}}),T.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),T.ajaxTransport("script",(function(t){var e,i;if(t.crossDomain||t.scriptAttrs)return{send:function(n,s){e=T("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&s("error"===t.type?404:200,t.type)}),y.head.appendChild(e[0])},abort:function(){i&&i()}}}));var Ue,Ye=[],Ke=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||T.expando+"_"+Ce.guid++;return this[t]=!0,t}}),T.ajaxPrefilter("json jsonp",(function(t,e,i){var s,o,r,a=!1!==t.jsonp&&(Ke.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ke.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=_(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ke,"$1"+s):!1!==t.jsonp&&(t.url+=(Ae.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return r||T.error(s+" was not called"),r[0]},t.dataTypes[0]="json",o=n[s],n[s]=function(){r=arguments},i.always((function(){void 0===o?T(n).removeProp(s):n[s]=o,t[s]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(s)),r&&_(o)&&o(r[0]),r=o=void 0})),"script"})),g.createHTMLDocument=((Ue=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ue.childNodes.length),T.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(g.createHTMLDocument?((n=(e=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,e.head.appendChild(n)):e=y),o=!i&&[],(s=S.exec(t))?[e.createElement(s[1])]:(s=kt([t],e,o),o&&o.length&&T(o).remove(),T.merge([],s.childNodes)));var n,s,o},T.fn.load=function(t,e,i){var n,s,o,r=this,a=t.indexOf(" ");return a>-1&&(n=ve(t.slice(a)),t=t.slice(0,a)),_(e)?(i=e,e=void 0):e&&"object"==typeof e&&(s="POST"),r.length>0&&T.ajax({url:t,type:s||"GET",dataType:"html",data:e}).done((function(t){o=arguments,r.html(n?T("<div>").append(T.parseHTML(t)).find(n):t)})).always(i&&function(t,e){r.each((function(){i.apply(this,o||[t.responseText,e,t])}))}),this},T.expr.pseudos.animated=function(t){return T.grep(T.timers,(function(e){return t===e.elem})).length},T.offset={setOffset:function(t,e,i){var n,s,o,r,a,l,h=T.css(t,"position"),c=T(t),u={};"static"===h&&(t.style.position="relative"),a=c.offset(),o=T.css(t,"top"),l=T.css(t,"left"),("absolute"===h||"fixed"===h)&&(o+l).indexOf("auto")>-1?(r=(n=c.position()).top,s=n.left):(r=parseFloat(o)||0,s=parseFloat(l)||0),_(e)&&(e=e.call(t,i,T.extend({},a))),null!=e.top&&(u.top=e.top-a.top+r),null!=e.left&&(u.left=e.left-a.left+s),"using"in e?e.using.call(t,u):c.css(u)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){T.offset.setOffset(this,t,e)}));var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],s={top:0,left:0};if("fixed"===T.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===T.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((s=T(t).offset()).top+=T.css(t,"borderTopWidth",!0),s.left+=T.css(t,"borderLeftWidth",!0))}return{top:e.top-s.top-T.css(n,"marginTop",!0),left:e.left-s.left-T.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===T.css(t,"position");)t=t.offsetParent;return t||rt}))}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i="pageYOffset"===e;T.fn[t]=function(n){return q(this,(function(t,n,s){var o;if(v(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===s)return o?o[e]:t[n];o?o.scrollTo(i?o.pageXOffset:s,i?s:o.pageYOffset):t[n]=s}),t,n,arguments.length)}})),T.each(["top","left"],(function(t,e){T.cssHooks[e]=Ut(g.pixelPosition,(function(t,i){if(i)return i=Zt(t,e),$t.test(i)?T(t).position()[e]+"px":i}))})),T.each({Height:"height",Width:"width"},(function(t,e){T.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){T.fn[n]=function(s,o){var r=arguments.length&&(i||"boolean"!=typeof s),a=i||(!0===s||!0===o?"margin":"border");return q(this,(function(e,i,s){var o;return v(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===s?T.css(e,i,a):T.style(e,i,s,a)}),e,r?s:void 0,r)}}))})),T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){T.fn[e]=function(t){return this.on(e,t)}})),T.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),T.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(t,e){T.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}));var Ge=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;T.proxy=function(t,e){var i,n,s;if("string"==typeof e&&(i=t[e],e=t,t=i),_(t))return n=a.call(arguments,2),s=function(){return t.apply(e||this,n.concat(a.call(arguments)))},s.guid=t.guid=t.guid||T.guid++,s},T.holdReady=function(t){t?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=P,T.isFunction=_,T.isWindow=v,T.camelCase=K,T.type=w,T.now=Date.now,T.isNumeric=function(t){var e=T.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},T.trim=function(t){return null==t?"":(t+"").replace(Ge,"$1")},void 0===(i=function(){return T}.apply(e,[]))||(t.exports=i);var Xe=n.jQuery,Qe=n.$;return T.noConflict=function(t){return n.$===T&&(n.$=Qe),t&&n.jQuery===T&&(n.jQuery=Xe),T},void 0===s&&(n.jQuery=n.$=T),T}))},94662:(t,e,i)=>{"use strict";i.r(e)},34608:(t,e,i)=>{"use strict";i.r(e)},41849:(t,e,i)=>{"use strict";i.r(e)},74314:(t,e,i)=>{"use strict";i.r(e)},92802:(t,e,i)=>{"use strict";i.r(e)},69850:(t,e,i)=>{var n=i(19755);!function(){if(n&&n.fn&&n.fn.select2&&n.fn.select2.amd)var t=n.fn.select2.amd;t.define("select2/i18n/fr",[],(function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(t){var e=t.input.length-t.maximum;return"Supprimez "+e+" caractère"+(e>1?"s":"")},inputTooShort:function(t){var e=t.minimum-t.input.length;return"Saisissez au moins "+e+" caractère"+(e>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(t){return"Vous pouvez seulement sélectionner "+t.maximum+" élément"+(t.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"},removeItem:function(){return"Supprimer l'élément"}}})),t.define,t.require}()},20454:(t,e,i)=>{var n,s,o,r=i(19755);s=[i(19755)],n=function(e){var i=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var i=e.fn.select2.amd;var n,s,o;return i&&i.requirejs||(i?s=i:i={},function(t){var e,i,r,a,l={},h={},c={},u={},d=Object.prototype.hasOwnProperty,p=[].slice,f=/\.js$/;function m(t,e){return d.call(t,e)}function g(t,e){var i,n,s,o,r,a,l,h,u,d,p,m=e&&e.split("/"),g=c.map,_=g&&g["*"]||{};if(t){for(r=(t=t.split("/")).length-1,c.nodeIdCompat&&f.test(t[r])&&(t[r]=t[r].replace(f,"")),"."===t[0].charAt(0)&&m&&(t=m.slice(0,m.length-1).concat(t)),u=0;u<t.length;u++)if("."===(p=t[u]))t.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===t[2]||".."===t[u-1])continue;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}if((m||_)&&g){for(u=(i=t.split("/")).length;u>0;u-=1){if(n=i.slice(0,u).join("/"),m)for(d=m.length;d>0;d-=1)if((s=g[m.slice(0,d).join("/")])&&(s=s[n])){o=s,a=u;break}if(o)break;!l&&_&&_[n]&&(l=_[n],h=u)}!o&&l&&(o=l,a=h),o&&(i.splice(0,a,o),t=i.join("/"))}return t}function _(e,n){return function(){var s=p.call(arguments,0);return"string"!=typeof s[0]&&1===s.length&&s.push(null),i.apply(t,s.concat([e,n]))}}function v(t){return function(e){return g(e,t)}}function y(t){return function(e){l[t]=e}}function b(i){if(m(h,i)){var n=h[i];delete h[i],u[i]=!0,e.apply(t,n)}if(!m(l,i)&&!m(u,i))throw new Error("No "+i);return l[i]}function x(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function w(t){return t?x(t):[]}function k(t){return function(){return c&&c.config&&c.config[t]||{}}}r=function(t,e){var i,n=x(t),s=n[0],o=e[1];return t=n[1],s&&(i=b(s=g(s,o))),s?t=i&&i.normalize?i.normalize(t,v(o)):g(t,o):(s=(n=x(t=g(t,o)))[0],t=n[1],s&&(i=b(s))),{f:s?s+"!"+t:t,n:t,pr:s,p:i}},a={require:function(t){return _(t)},exports:function(t){var e=l[t];return void 0!==e?e:l[t]={}},module:function(t){return{id:t,uri:"",exports:l[t],config:k(t)}}},e=function(e,i,n,s){var o,c,d,p,f,g,v,x=[],k=typeof n;if(g=w(s=s||e),"undefined"===k||"function"===k){for(i=!i.length&&n.length?["require","exports","module"]:i,f=0;f<i.length;f+=1)if("require"===(c=(p=r(i[f],g)).f))x[f]=a.require(e);else if("exports"===c)x[f]=a.exports(e),v=!0;else if("module"===c)o=x[f]=a.module(e);else if(m(l,c)||m(h,c)||m(u,c))x[f]=b(c);else{if(!p.p)throw new Error(e+" missing "+c);p.p.load(p.n,_(s,!0),y(c),{}),x[f]=l[c]}d=n?n.apply(l[e],x):void 0,e&&(o&&o.exports!==t&&o.exports!==l[e]?l[e]=o.exports:d===t&&v||(l[e]=d))}else e&&(l[e]=n)},n=s=i=function(n,s,o,l,h){if("string"==typeof n)return a[n]?a[n](s):b(r(n,w(s)).f);if(!n.splice){if((c=n).deps&&i(c.deps,c.callback),!s)return;s.splice?(n=s,s=o,o=null):n=t}return s=s||function(){},"function"==typeof o&&(o=l,l=h),l?e(t,n,s,o):setTimeout((function(){e(t,n,s,o)}),4),i},i.config=function(t){return i(t)},n._defined=l,(o=function(t,e,i){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(i=e,e=[]),m(l,t)||m(h,t)||(h[t]=[t,e,i])}).amd={jQuery:!0}}(),i.requirejs=n,i.require=s,i.define=o),i.define("almond",(function(){})),i.define("jquery",[],(function(){var t=e||r;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t})),i.define("select2/utils",["jquery"],(function(t){var e={};function i(t){var e=t.prototype,i=[];for(var n in e)"function"==typeof e[n]&&"constructor"!==n&&i.push(n);return i}e.Extend=function(t,e){var i={}.hasOwnProperty;function n(){this.constructor=t}for(var s in e)i.call(e,s)&&(t[s]=e[s]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},e.Decorate=function(t,e){var n=i(e),s=i(t);function o(){var i=Array.prototype.unshift,n=e.prototype.constructor.length,s=t.prototype.constructor;n>0&&(i.call(arguments,t.prototype.constructor),s=e.prototype.constructor),s.apply(this,arguments)}function r(){this.constructor=o}e.displayName=t.displayName,o.prototype=new r;for(var a=0;a<s.length;a++){var l=s[a];o.prototype[l]=t.prototype[l]}for(var h=function(t){var i=function(){};t in o.prototype&&(i=o.prototype[t]);var n=e.prototype[t];return function(){return Array.prototype.unshift.call(arguments,i),n.apply(this,arguments)}},c=0;c<n.length;c++){var u=n[c];o.prototype[u]=h(u)}return o};var n=function(){this.listeners={}};n.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},n.prototype.trigger=function(t){var e=Array.prototype.slice,i=e.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),i[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},n.prototype.invoke=function(t,e){for(var i=0,n=t.length;i<n;i++)t[i].apply(this,e)},e.Observable=n,e.generateChars=function(t){for(var e="",i=0;i<t;i++)e+=Math.floor(36*Math.random()).toString(36);return e},e.bind=function(t,e){return function(){t.apply(e,arguments)}},e._convertData=function(t){for(var e in t){var i=e.split("-"),n=t;if(1!==i.length){for(var s=0;s<i.length;s++){var o=i[s];(o=o.substring(0,1).toLowerCase()+o.substring(1))in n||(n[o]={}),s==i.length-1&&(n[o]=t[e]),n=n[o]}delete t[e]}}return t},e.hasScroll=function(e,i){var n=t(i),s=i.style.overflowX,o=i.style.overflowY;return(s!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===s||"scroll"===o||n.innerHeight()<i.scrollHeight||n.innerWidth()<i.scrollWidth)},e.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,(function(t){return e[t]}))},e.__cache={};var s=0;return e.GetUniqueElementId=function(t){var i=t.getAttribute("data-select2-id");return null!=i||(i=t.id?"select2-data-"+t.id:"select2-data-"+(++s).toString()+"-"+e.generateChars(4),t.setAttribute("data-select2-id",i)),i},e.StoreData=function(t,i,n){var s=e.GetUniqueElementId(t);e.__cache[s]||(e.__cache[s]={}),e.__cache[s][i]=n},e.GetData=function(i,n){var s=e.GetUniqueElementId(i);return n?e.__cache[s]&&null!=e.__cache[s][n]?e.__cache[s][n]:t(i).data(n):e.__cache[s]},e.RemoveData=function(t){var i=e.GetUniqueElementId(t);null!=e.__cache[i]&&delete e.__cache[i],t.removeAttribute("data-select2-id")},e.copyNonInternalCssClasses=function(t,e){var i=t.getAttribute("class").trim().split(/\s+/);i=i.filter((function(t){return 0===t.indexOf("select2-")}));var n=e.getAttribute("class").trim().split(/\s+/);n=n.filter((function(t){return 0!==t.indexOf("select2-")}));var s=i.concat(n);t.setAttribute("class",s.join(" "))},e})),i.define("select2/results",["jquery","./utils"],(function(t,e){function i(t,e,n){this.$element=t,this.data=n,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var i=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=t('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),s=this.options.get("translations").get(e.message);n.append(i(s(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var i=0;i<t.results.length;i++){var n=t.results[i],s=this.option(n);e.push(s)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(t,e){e.find(".select2-results").append(t)},i.prototype.sort=function(t){return this.options.get("sorter")(t)},i.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option--selectable"),e=t.filter(".select2-results__option--selected");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var i=this;this.data.current((function(n){var s=n.map((function(t){return t.id.toString()}));i.$results.find(".select2-results__option--selectable").each((function(){var i=t(this),n=e.GetData(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&s.indexOf(o)>-1?(this.classList.add("select2-results__option--selected"),i.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),i.attr("aria-selected","false"))}))}))},i.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},i=this.option(e);i.className+=" loading-results",this.$results.prepend(i)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(i){var n=document.createElement("li");n.classList.add("select2-results__option"),n.classList.add("select2-results__option--selectable");var s={role:"option"},o=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var r in(null!=i.element&&o.call(i.element,":disabled")||null==i.element&&i.disabled)&&(s["aria-disabled"]="true",n.classList.remove("select2-results__option--selectable"),n.classList.add("select2-results__option--disabled")),null==i.id&&n.classList.remove("select2-results__option--selectable"),null!=i._resultId&&(n.id=i._resultId),i.title&&(n.title=i.title),i.children&&(s.role="group",s["aria-label"]=i.text,n.classList.remove("select2-results__option--selectable"),n.classList.add("select2-results__option--group")),s){var a=s[r];n.setAttribute(r,a)}if(i.children){var l=t(n),h=document.createElement("strong");h.className="select2-results__group",this.template(i,h);for(var c=[],u=0;u<i.children.length;u++){var d=i.children[u],p=this.option(d);c.push(p)}var f=t("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});f.append(c),l.append(h),l.append(f)}else this.template(i,n);return e.StoreData(n,"data",i),n},i.prototype.bind=function(i,n){var s=this,o=i.id+"-results";this.$results.attr("id",o),i.on("results:all",(function(t){s.clear(),s.append(t.data),i.isOpen()&&(s.setClasses(),s.highlightFirstItem())})),i.on("results:append",(function(t){s.append(t.data),i.isOpen()&&s.setClasses()})),i.on("query",(function(t){s.hideMessages(),s.showLoading(t)})),i.on("select",(function(){i.isOpen()&&(s.setClasses(),s.options.get("scrollAfterSelect")&&s.highlightFirstItem())})),i.on("unselect",(function(){i.isOpen()&&(s.setClasses(),s.options.get("scrollAfterSelect")&&s.highlightFirstItem())})),i.on("open",(function(){s.$results.attr("aria-expanded","true"),s.$results.attr("aria-hidden","false"),s.setClasses(),s.ensureHighlightVisible()})),i.on("close",(function(){s.$results.attr("aria-expanded","false"),s.$results.attr("aria-hidden","true"),s.$results.removeAttr("aria-activedescendant")})),i.on("results:toggle",(function(){var t=s.getHighlightedResults();0!==t.length&&t.trigger("mouseup")})),i.on("results:select",(function(){var t=s.getHighlightedResults();if(0!==t.length){var i=e.GetData(t[0],"data");t.hasClass("select2-results__option--selected")?s.trigger("close",{}):s.trigger("select",{data:i})}})),i.on("results:previous",(function(){var t=s.getHighlightedResults(),e=s.$results.find(".select2-results__option--selectable"),i=e.index(t);if(!(i<=0)){var n=i-1;0===t.length&&(n=0);var o=e.eq(n);o.trigger("mouseenter");var r=s.$results.offset().top,a=o.offset().top,l=s.$results.scrollTop()+(a-r);0===n?s.$results.scrollTop(0):a-r<0&&s.$results.scrollTop(l)}})),i.on("results:next",(function(){var t=s.getHighlightedResults(),e=s.$results.find(".select2-results__option--selectable"),i=e.index(t)+1;if(!(i>=e.length)){var n=e.eq(i);n.trigger("mouseenter");var o=s.$results.offset().top+s.$results.outerHeight(!1),r=n.offset().top+n.outerHeight(!1),a=s.$results.scrollTop()+r-o;0===i?s.$results.scrollTop(0):r>o&&s.$results.scrollTop(a)}})),i.on("results:focus",(function(t){t.element[0].classList.add("select2-results__option--highlighted"),t.element[0].setAttribute("aria-selected","true")})),i.on("results:message",(function(t){s.displayMessage(t)})),t.fn.mousewheel&&this.$results.on("mousewheel",(function(t){var e=s.$results.scrollTop(),i=s.$results.get(0).scrollHeight-e+t.deltaY,n=t.deltaY>0&&e-t.deltaY<=0,o=t.deltaY<0&&i<=s.$results.height();n?(s.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):o&&(s.$results.scrollTop(s.$results.get(0).scrollHeight-s.$results.height()),t.preventDefault(),t.stopPropagation())})),this.$results.on("mouseup",".select2-results__option--selectable",(function(i){var n=t(this),o=e.GetData(this,"data");n.hasClass("select2-results__option--selected")?s.options.get("multiple")?s.trigger("unselect",{originalEvent:i,data:o}):s.trigger("close",{}):s.trigger("select",{originalEvent:i,data:o})})),this.$results.on("mouseenter",".select2-results__option--selectable",(function(i){var n=e.GetData(this,"data");s.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),s.trigger("results:focus",{data:n,element:t(this)})}))},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find(".select2-results__option--selectable").index(t),i=this.$results.offset().top,n=t.offset().top,s=this.$results.scrollTop()+(n-i),o=n-i;s-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(s)}},i.prototype.template=function(e,i){var n=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),o=n(e,i);null==o?i.style.display="none":"string"==typeof o?i.innerHTML=s(o):t(i).append(o)},i})),i.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),i.define("select2/selection/base",["jquery","../utils","../keys"],(function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var i=t('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=e.GetData(this.$element[0],"old-tabindex")?this._tabindex=e.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),i.attr("title",this.$element.attr("title")),i.attr("tabindex",this._tabindex),i.attr("aria-disabled","false"),this.$selection=i,i},n.prototype.bind=function(t,e){var n=this,s=t.id+"-results";this.container=t,this.$selection.on("focus",(function(t){n.trigger("focus",t)})),this.$selection.on("blur",(function(t){n._handleBlur(t)})),this.$selection.on("keydown",(function(t){n.trigger("keypress",t),t.which===i.SPACE&&t.preventDefault()})),t.on("results:focus",(function(t){n.$selection.attr("aria-activedescendant",t.data._resultId)})),t.on("selection:update",(function(t){n.update(t.data)})),t.on("open",(function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",s),n._attachCloseHandler(t)})),t.on("close",(function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(t)})),t.on("enable",(function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")})),t.on("disable",(function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")}))},n.prototype._handleBlur=function(e){var i=this;window.setTimeout((function(){document.activeElement==i.$selection[0]||t.contains(i.$selection[0],document.activeElement)||i.trigger("blur",e)}),1)},n.prototype._attachCloseHandler=function(i){t(document.body).on("mousedown.select2."+i.id,(function(i){var n=t(i.target).closest(".select2");t(".select2.select2-container--open").each((function(){this!=n[0]&&e.GetData(this,"element").select2("close")}))}))},n.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n.prototype.isEnabled=function(){return!this.isDisabled()},n.prototype.isDisabled=function(){return this.options.get("disabled")},n})),i.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(t,e,i,n){function s(){s.__super__.constructor.apply(this,arguments)}return i.Extend(s,e),s.prototype.render=function(){var t=s.__super__.render.call(this);return t[0].classList.add("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},s.prototype.bind=function(t,e){var i=this;s.__super__.bind.apply(this,arguments);var n=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",n),this.$selection.attr("aria-controls",n),this.$selection.on("mousedown",(function(t){1===t.which&&i.trigger("toggle",{originalEvent:t})})),this.$selection.on("focus",(function(t){})),this.$selection.on("blur",(function(t){})),t.on("focus",(function(e){t.isOpen()||i.$selection.trigger("focus")}))},s.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},s.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},s.prototype.selectionContainer=function(){return t("<span></span>")},s.prototype.update=function(t){if(0!==t.length){var e=t[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(e,i);i.empty().append(n);var s=e.title||e.text;s?i.attr("title",s):i.removeAttr("title")}else this.clear()},s})),i.define("select2/selection/multiple",["jquery","./base","../utils"],(function(t,e,i){function n(t,e){n.__super__.constructor.apply(this,arguments)}return i.Extend(n,e),n.prototype.render=function(){var t=n.__super__.render.call(this);return t[0].classList.add("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},n.prototype.bind=function(e,s){var o=this;n.__super__.bind.apply(this,arguments);var r=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r),this.$selection.on("click",(function(t){o.trigger("toggle",{originalEvent:t})})),this.$selection.on("click",".select2-selection__choice__remove",(function(e){if(!o.isDisabled()){var n=t(this).parent(),s=i.GetData(n[0],"data");o.trigger("unselect",{originalEvent:e,data:s})}})),this.$selection.on("keydown",".select2-selection__choice__remove",(function(t){o.isDisabled()||t.stopPropagation()}))},n.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},n.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},n.prototype.selectionContainer=function(){return t('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},n.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",s=0;s<t.length;s++){var o=t[s],r=this.selectionContainer(),a=this.display(o,r),l=n+i.generateChars(4)+"-";o.id?l+=o.id:l+=i.generateChars(4),r.find(".select2-selection__choice__display").append(a).attr("id",l);var h=o.title||o.text;h&&r.attr("title",h);var c=this.options.get("translations").get("removeItem"),u=r.find(".select2-selection__choice__remove");u.attr("title",c()),u.attr("aria-label",c()),u.attr("aria-describedby",l),i.StoreData(r[0],"data",o),e.push(r)}this.$selection.find(".select2-selection__rendered").append(e)}},n})),i.define("select2/selection/placeholder",[],(function(){function t(t,e,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i)}return t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.createPlaceholder=function(t,e){var i=this.selectionContainer();i.html(this.display(e)),i[0].classList.add("select2-selection__placeholder"),i[0].classList.remove("select2-selection__choice");var n=e.title||e.text||i.text();return this.$selection.find(".select2-selection__rendered").attr("title",n),i},t.prototype.update=function(t,e){var i=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||i)return t.call(this,e);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},t})),i.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function(t,e,i){function n(){}return n.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(t){n._handleClear(t)})),e.on("keypress",(function(t){n._handleKeyboardClear(t,e)}))},n.prototype._handleClear=function(t,e){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){e.stopPropagation();var s=i.GetData(n[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var r={data:s};if(this.trigger("clear",r),r.prevented)this.$element.val(o);else{for(var a=0;a<s.length;a++)if(r={data:s[a]},this.trigger("unselect",r),r.prevented)return void this.$element.val(o);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},n.prototype._handleKeyboardClear=function(t,i,n){n.isOpen()||i.which!=e.DELETE&&i.which!=e.BACKSPACE||this._handleClear(i)},n.prototype.update=function(e,n){if(e.call(this,n),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var s=this.$selection.find(".select2-selection__rendered").attr("id"),o=this.options.get("translations").get("removeAllItems"),r=t('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>');r.attr("title",o()),r.attr("aria-label",o()),r.attr("aria-describedby",s),i.StoreData(r[0],"data",n),this.$selection.prepend(r),this.$selection[0].classList.add("select2-selection--clearable")}},n})),i.define("select2/selection/search",["jquery","../utils","../keys"],(function(t,e,i){function n(t,e,i){t.call(this,e,i)}return n.prototype.render=function(e){var i=this.options.get("translations").get("search"),n=t('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=n,this.$search=n.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",i());var s=e.call(this);return this._transferTabIndex(),s.append(this.$searchContainer),s},n.prototype.bind=function(t,n,s){var o=this,r=n.id+"-results",a=n.id+"-container";t.call(this,n,s),o.$search.attr("aria-describedby",a),n.on("open",(function(){o.$search.attr("aria-controls",r),o.$search.trigger("focus")})),n.on("close",(function(){o.$search.val(""),o.resizeSearch(),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),n.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),n.on("disable",(function(){o.$search.prop("disabled",!0)})),n.on("focus",(function(t){o.$search.trigger("focus")})),n.on("results:focus",(function(t){t.data._resultId?o.$search.attr("aria-activedescendant",t.data._resultId):o.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(t){o.trigger("focus",t)})),this.$selection.on("focusout",".select2-search--inline",(function(t){o._handleBlur(t)})),this.$selection.on("keydown",".select2-search--inline",(function(t){if(t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented(),t.which===i.BACKSPACE&&""===o.$search.val()){var n=o.$selection.find(".select2-selection__choice").last();if(n.length>0){var s=e.GetData(n[0],"data");o.searchRemoveChoice(s),t.preventDefault()}}})),this.$selection.on("click",".select2-search--inline",(function(t){o.$search.val()&&t.stopPropagation()}));var l=document.documentMode,h=l&&l<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(t){h?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(t){if(h&&"input"===t.type)o.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=i.SHIFT&&e!=i.CTRL&&e!=i.ALT&&e!=i.TAB&&o.handleSearch(t)}}))},n.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},n.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},n.prototype.update=function(t,e){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.resizeSearch(),i&&this.$search.trigger("focus")},n.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},n.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="100%";""===this.$search.attr("placeholder")&&(t=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",t)},n})),i.define("select2/selection/selectionCss",["../utils"],(function(t){function e(){}return e.prototype.render=function(e){var i=e.call(this),n=this.options.get("selectionCssClass")||"";return-1!==n.indexOf(":all:")&&(n=n.replace(":all:",""),t.copyNonInternalCssClasses(i[0],this.$element[0])),i.addClass(n),i},e})),i.define("select2/selection/eventRelay",["jquery"],(function(t){function e(){}return e.prototype.bind=function(e,i,n){var s=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],r=["opening","closing","selecting","unselecting","clearing"];e.call(this,i,n),i.on("*",(function(e,i){if(-1!==o.indexOf(e)){i=i||{};var n=t.Event("select2:"+e,{params:i});s.$element.trigger(n),-1!==r.indexOf(e)&&(i.prevented=n.isDefaultPrevented())}}))},e})),i.define("select2/translation",["jquery","require"],(function(t,e){function i(t){this.dict=t||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(t){return this.dict[t]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(t){if(!(t in i._cache)){var n=e(t);i._cache[t]=n}return new i(i._cache[t])},i})),i.define("select2/diacritics",[],(function(){return{"":"A",A:"A",À:"A",Á:"A",Â:"A",Ầ:"A",Ấ:"A",Ẫ:"A",Ẩ:"A",Ã:"A",Ā:"A",Ă:"A",Ằ:"A",Ắ:"A",Ẵ:"A",Ẳ:"A",Ȧ:"A",Ǡ:"A",Ä:"A",Ǟ:"A",Ả:"A",Å:"A",Ǻ:"A",Ǎ:"A",Ȁ:"A",Ȃ:"A",Ạ:"A",Ậ:"A",Ặ:"A",Ḁ:"A",Ą:"A",Ⱥ:"A",Ɐ:"A",Ꜳ:"AA",Æ:"AE",Ǽ:"AE",Ǣ:"AE",Ꜵ:"AO",Ꜷ:"AU",Ꜹ:"AV",Ꜻ:"AV",Ꜽ:"AY","":"B",B:"B",Ḃ:"B",Ḅ:"B",Ḇ:"B",Ƀ:"B",Ƃ:"B",Ɓ:"B","":"C",C:"C",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",Ç:"C",Ḉ:"C",Ƈ:"C",Ȼ:"C",Ꜿ:"C","":"D",D:"D",Ḋ:"D",Ď:"D",Ḍ:"D",Ḑ:"D",Ḓ:"D",Ḏ:"D",Đ:"D",Ƌ:"D",Ɗ:"D",Ɖ:"D",Ꝺ:"D",DZ:"DZ",DŽ:"DZ",Dz:"Dz",Dž:"Dz","":"E",E:"E",È:"E",É:"E",Ê:"E",Ề:"E",Ế:"E",Ễ:"E",Ể:"E",Ẽ:"E",Ē:"E",Ḕ:"E",Ḗ:"E",Ĕ:"E",Ė:"E",Ë:"E",Ẻ:"E",Ě:"E",Ȅ:"E",Ȇ:"E",Ẹ:"E",Ệ:"E",Ȩ:"E",Ḝ:"E",Ę:"E",Ḙ:"E",Ḛ:"E",Ɛ:"E",Ǝ:"E","":"F",F:"F",Ḟ:"F",Ƒ:"F",Ꝼ:"F","":"G",G:"G",Ǵ:"G",Ĝ:"G",Ḡ:"G",Ğ:"G",Ġ:"G",Ǧ:"G",Ģ:"G",Ǥ:"G",Ɠ:"G",Ꞡ:"G",Ᵹ:"G",Ꝿ:"G","":"H",H:"H",Ĥ:"H",Ḣ:"H",Ḧ:"H",Ȟ:"H",Ḥ:"H",Ḩ:"H",Ḫ:"H",Ħ:"H",Ⱨ:"H",Ⱶ:"H",Ɥ:"H","":"I",I:"I",Ì:"I",Í:"I",Î:"I",Ĩ:"I",Ī:"I",Ĭ:"I",İ:"I",Ï:"I",Ḯ:"I",Ỉ:"I",Ǐ:"I",Ȉ:"I",Ȋ:"I",Ị:"I",Į:"I",Ḭ:"I",Ɨ:"I","":"J",J:"J",Ĵ:"J",Ɉ:"J","":"K",K:"K",Ḱ:"K",Ǩ:"K",Ḳ:"K",Ķ:"K",Ḵ:"K",Ƙ:"K",Ⱪ:"K",Ꝁ:"K",Ꝃ:"K",Ꝅ:"K",Ꞣ:"K","":"L",L:"L",Ŀ:"L",Ĺ:"L",Ľ:"L",Ḷ:"L",Ḹ:"L",Ļ:"L",Ḽ:"L",Ḻ:"L",Ł:"L",Ƚ:"L",Ɫ:"L",Ⱡ:"L",Ꝉ:"L",Ꝇ:"L",Ꞁ:"L",LJ:"LJ",Lj:"Lj","":"M",M:"M",Ḿ:"M",Ṁ:"M",Ṃ:"M",Ɱ:"M",Ɯ:"M","":"N",N:"N",Ǹ:"N",Ń:"N",Ñ:"N",Ṅ:"N",Ň:"N",Ṇ:"N",Ņ:"N",Ṋ:"N",Ṉ:"N",Ƞ:"N",Ɲ:"N",Ꞑ:"N",Ꞥ:"N",NJ:"NJ",Nj:"Nj","":"O",O:"O",Ò:"O",Ó:"O",Ô:"O",Ồ:"O",Ố:"O",Ỗ:"O",Ổ:"O",Õ:"O",Ṍ:"O",Ȭ:"O",Ṏ:"O",Ō:"O",Ṑ:"O",Ṓ:"O",Ŏ:"O",Ȯ:"O",Ȱ:"O",Ö:"O",Ȫ:"O",Ỏ:"O",Ő:"O",Ǒ:"O",Ȍ:"O",Ȏ:"O",Ơ:"O",Ờ:"O",Ớ:"O",Ỡ:"O",Ở:"O",Ợ:"O",Ọ:"O",Ộ:"O",Ǫ:"O",Ǭ:"O",Ø:"O",Ǿ:"O",Ɔ:"O",Ɵ:"O",Ꝋ:"O",Ꝍ:"O",Œ:"OE",Ƣ:"OI",Ꝏ:"OO",Ȣ:"OU","":"P",P:"P",Ṕ:"P",Ṗ:"P",Ƥ:"P",Ᵽ:"P",Ꝑ:"P",Ꝓ:"P",Ꝕ:"P","":"Q",Q:"Q",Ꝗ:"Q",Ꝙ:"Q",Ɋ:"Q","":"R",R:"R",Ŕ:"R",Ṙ:"R",Ř:"R",Ȑ:"R",Ȓ:"R",Ṛ:"R",Ṝ:"R",Ŗ:"R",Ṟ:"R",Ɍ:"R",Ɽ:"R",Ꝛ:"R",Ꞧ:"R",Ꞃ:"R","":"S",S:"S",ẞ:"S",Ś:"S",Ṥ:"S",Ŝ:"S",Ṡ:"S",Š:"S",Ṧ:"S",Ṣ:"S",Ṩ:"S",Ș:"S",Ş:"S",Ȿ:"S",Ꞩ:"S",Ꞅ:"S","":"T",T:"T",Ṫ:"T",Ť:"T",Ṭ:"T",Ț:"T",Ţ:"T",Ṱ:"T",Ṯ:"T",Ŧ:"T",Ƭ:"T",Ʈ:"T",Ⱦ:"T",Ꞇ:"T",Ꜩ:"TZ","":"U",U:"U",Ù:"U",Ú:"U",Û:"U",Ũ:"U",Ṹ:"U",Ū:"U",Ṻ:"U",Ŭ:"U",Ü:"U",Ǜ:"U",Ǘ:"U",Ǖ:"U",Ǚ:"U",Ủ:"U",Ů:"U",Ű:"U",Ǔ:"U",Ȕ:"U",Ȗ:"U",Ư:"U",Ừ:"U",Ứ:"U",Ữ:"U",Ử:"U",Ự:"U",Ụ:"U",Ṳ:"U",Ų:"U",Ṷ:"U",Ṵ:"U",Ʉ:"U","":"V",V:"V",Ṽ:"V",Ṿ:"V",Ʋ:"V",Ꝟ:"V",Ʌ:"V",Ꝡ:"VY","":"W",W:"W",Ẁ:"W",Ẃ:"W",Ŵ:"W",Ẇ:"W",Ẅ:"W",Ẉ:"W",Ⱳ:"W","":"X",X:"X",Ẋ:"X",Ẍ:"X","":"Y",Y:"Y",Ỳ:"Y",Ý:"Y",Ŷ:"Y",Ỹ:"Y",Ȳ:"Y",Ẏ:"Y",Ÿ:"Y",Ỷ:"Y",Ỵ:"Y",Ƴ:"Y",Ɏ:"Y",Ỿ:"Y","":"Z",Z:"Z",Ź:"Z",Ẑ:"Z",Ż:"Z",Ž:"Z",Ẓ:"Z",Ẕ:"Z",Ƶ:"Z",Ȥ:"Z",Ɀ:"Z",Ⱬ:"Z",Ꝣ:"Z","":"a",a:"a",ẚ:"a",à:"a",á:"a",â:"a",ầ:"a",ấ:"a",ẫ:"a",ẩ:"a",ã:"a",ā:"a",ă:"a",ằ:"a",ắ:"a",ẵ:"a",ẳ:"a",ȧ:"a",ǡ:"a",ä:"a",ǟ:"a",ả:"a",å:"a",ǻ:"a",ǎ:"a",ȁ:"a",ȃ:"a",ạ:"a",ậ:"a",ặ:"a",ḁ:"a",ą:"a",ⱥ:"a",ɐ:"a",ꜳ:"aa",æ:"ae",ǽ:"ae",ǣ:"ae",ꜵ:"ao",ꜷ:"au",ꜹ:"av",ꜻ:"av",ꜽ:"ay","":"b",b:"b",ḃ:"b",ḅ:"b",ḇ:"b",ƀ:"b",ƃ:"b",ɓ:"b","":"c",c:"c",ć:"c",ĉ:"c",ċ:"c",č:"c",ç:"c",ḉ:"c",ƈ:"c",ȼ:"c",ꜿ:"c",ↄ:"c","":"d",d:"d",ḋ:"d",ď:"d",ḍ:"d",ḑ:"d",ḓ:"d",ḏ:"d",đ:"d",ƌ:"d",ɖ:"d",ɗ:"d",ꝺ:"d",dz:"dz",dž:"dz","":"e",e:"e",è:"e",é:"e",ê:"e",ề:"e",ế:"e",ễ:"e",ể:"e",ẽ:"e",ē:"e",ḕ:"e",ḗ:"e",ĕ:"e",ė:"e",ë:"e",ẻ:"e",ě:"e",ȅ:"e",ȇ:"e",ẹ:"e",ệ:"e",ȩ:"e",ḝ:"e",ę:"e",ḙ:"e",ḛ:"e",ɇ:"e",ɛ:"e",ǝ:"e","":"f",f:"f",ḟ:"f",ƒ:"f",ꝼ:"f","":"g",g:"g",ǵ:"g",ĝ:"g",ḡ:"g",ğ:"g",ġ:"g",ǧ:"g",ģ:"g",ǥ:"g",ɠ:"g",ꞡ:"g",ᵹ:"g",ꝿ:"g","":"h",h:"h",ĥ:"h",ḣ:"h",ḧ:"h",ȟ:"h",ḥ:"h",ḩ:"h",ḫ:"h",ẖ:"h",ħ:"h",ⱨ:"h",ⱶ:"h",ɥ:"h",ƕ:"hv","":"i",i:"i",ì:"i",í:"i",î:"i",ĩ:"i",ī:"i",ĭ:"i",ï:"i",ḯ:"i",ỉ:"i",ǐ:"i",ȉ:"i",ȋ:"i",ị:"i",į:"i",ḭ:"i",ɨ:"i",ı:"i","":"j",j:"j",ĵ:"j",ǰ:"j",ɉ:"j","":"k",k:"k",ḱ:"k",ǩ:"k",ḳ:"k",ķ:"k",ḵ:"k",ƙ:"k",ⱪ:"k",ꝁ:"k",ꝃ:"k",ꝅ:"k",ꞣ:"k","":"l",l:"l",ŀ:"l",ĺ:"l",ľ:"l",ḷ:"l",ḹ:"l",ļ:"l",ḽ:"l",ḻ:"l",ſ:"l",ł:"l",ƚ:"l",ɫ:"l",ⱡ:"l",ꝉ:"l",ꞁ:"l",ꝇ:"l",lj:"lj","":"m",m:"m",ḿ:"m",ṁ:"m",ṃ:"m",ɱ:"m",ɯ:"m","":"n",n:"n",ǹ:"n",ń:"n",ñ:"n",ṅ:"n",ň:"n",ṇ:"n",ņ:"n",ṋ:"n",ṉ:"n",ƞ:"n",ɲ:"n",ʼn:"n",ꞑ:"n",ꞥ:"n",nj:"nj","":"o",o:"o",ò:"o",ó:"o",ô:"o",ồ:"o",ố:"o",ỗ:"o",ổ:"o",õ:"o",ṍ:"o",ȭ:"o",ṏ:"o",ō:"o",ṑ:"o",ṓ:"o",ŏ:"o",ȯ:"o",ȱ:"o",ö:"o",ȫ:"o",ỏ:"o",ő:"o",ǒ:"o",ȍ:"o",ȏ:"o",ơ:"o",ờ:"o",ớ:"o",ỡ:"o",ở:"o",ợ:"o",ọ:"o",ộ:"o",ǫ:"o",ǭ:"o",ø:"o",ǿ:"o",ɔ:"o",ꝋ:"o",ꝍ:"o",ɵ:"o",œ:"oe",ƣ:"oi",ȣ:"ou",ꝏ:"oo","":"p",p:"p",ṕ:"p",ṗ:"p",ƥ:"p",ᵽ:"p",ꝑ:"p",ꝓ:"p",ꝕ:"p","":"q",q:"q",ɋ:"q",ꝗ:"q",ꝙ:"q","":"r",r:"r",ŕ:"r",ṙ:"r",ř:"r",ȑ:"r",ȓ:"r",ṛ:"r",ṝ:"r",ŗ:"r",ṟ:"r",ɍ:"r",ɽ:"r",ꝛ:"r",ꞧ:"r",ꞃ:"r","":"s",s:"s",ß:"s",ś:"s",ṥ:"s",ŝ:"s",ṡ:"s",š:"s",ṧ:"s",ṣ:"s",ṩ:"s",ș:"s",ş:"s",ȿ:"s",ꞩ:"s",ꞅ:"s",ẛ:"s","":"t",t:"t",ṫ:"t",ẗ:"t",ť:"t",ṭ:"t",ț:"t",ţ:"t",ṱ:"t",ṯ:"t",ŧ:"t",ƭ:"t",ʈ:"t",ⱦ:"t",ꞇ:"t",ꜩ:"tz","":"u",u:"u",ù:"u",ú:"u",û:"u",ũ:"u",ṹ:"u",ū:"u",ṻ:"u",ŭ:"u",ü:"u",ǜ:"u",ǘ:"u",ǖ:"u",ǚ:"u",ủ:"u",ů:"u",ű:"u",ǔ:"u",ȕ:"u",ȗ:"u",ư:"u",ừ:"u",ứ:"u",ữ:"u",ử:"u",ự:"u",ụ:"u",ṳ:"u",ų:"u",ṷ:"u",ṵ:"u",ʉ:"u","":"v",v:"v",ṽ:"v",ṿ:"v",ʋ:"v",ꝟ:"v",ʌ:"v",ꝡ:"vy","":"w",w:"w",ẁ:"w",ẃ:"w",ŵ:"w",ẇ:"w",ẅ:"w",ẘ:"w",ẉ:"w",ⱳ:"w","":"x",x:"x",ẋ:"x",ẍ:"x","":"y",y:"y",ỳ:"y",ý:"y",ŷ:"y",ỹ:"y",ȳ:"y",ẏ:"y",ÿ:"y",ỷ:"y",ẙ:"y",ỵ:"y",ƴ:"y",ɏ:"y",ỿ:"y","":"z",z:"z",ź:"z",ẑ:"z",ż:"z",ž:"z",ẓ:"z",ẕ:"z",ƶ:"z",ȥ:"z",ɀ:"z",ⱬ:"z",ꝣ:"z",Ά:"Α",Έ:"Ε",Ή:"Η",Ί:"Ι",Ϊ:"Ι",Ό:"Ο",Ύ:"Υ",Ϋ:"Υ",Ώ:"Ω",ά:"α",έ:"ε",ή:"η",ί:"ι",ϊ:"ι",ΐ:"ι",ό:"ο",ύ:"υ",ϋ:"υ",ΰ:"υ",ώ:"ω",ς:"σ","":"'"}})),i.define("select2/data/base",["../utils"],(function(t){function e(t,i){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,i){var n=e.id+"-result-";return n+=t.generateChars(4),null!=i.id?n+="-"+i.id.toString():n+="-"+t.generateChars(4),n},e})),i.define("select2/data/select",["./base","../utils","jquery"],(function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,t),n.prototype.current=function(t){var e=this;t(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),(function(t){return e.item(i(t))})))},n.prototype.select=function(t){var e=this;if(t.selected=!0,null!=t.element&&"option"===t.element.tagName.toLowerCase())return t.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current((function(i){var n=[];(t=[t]).push.apply(t,i);for(var s=0;s<t.length;s++){var o=t[s].id;-1===n.indexOf(o)&&n.push(o)}e.$element.val(n),e.$element.trigger("input").trigger("change")}));else{var i=t.id;this.$element.val(i),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,null!=t.element&&"option"===t.element.tagName.toLowerCase())return t.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current((function(i){for(var n=[],s=0;s<i.length;s++){var o=i[s].id;o!==t.id&&-1===n.indexOf(o)&&n.push(o)}e.$element.val(n),e.$element.trigger("input").trigger("change")}))}},n.prototype.bind=function(t,e){var i=this;this.container=t,t.on("select",(function(t){i.select(t.data)})),t.on("unselect",(function(t){i.unselect(t.data)}))},n.prototype.destroy=function(){this.$element.find("*").each((function(){e.RemoveData(this)}))},n.prototype.query=function(t,e){var n=[],s=this;this.$element.children().each((function(){if("option"===this.tagName.toLowerCase()||"optgroup"===this.tagName.toLowerCase()){var e=i(this),o=s.item(e),r=s.matches(t,o);null!==r&&n.push(r)}})),e({results:n})},n.prototype.addOptions=function(t){this.$element.append(t)},n.prototype.option=function(t){var n;t.children?(n=document.createElement("optgroup")).label=t.text:void 0!==(n=document.createElement("option")).textContent?n.textContent=t.text:n.innerText=t.text,void 0!==t.id&&(n.value=t.id),t.disabled&&(n.disabled=!0),t.selected&&(n.selected=!0),t.title&&(n.title=t.title);var s=this._normalizeItem(t);return s.element=n,e.StoreData(n,"data",s),i(n)},n.prototype.item=function(t){var n={};if(null!=(n=e.GetData(t[0],"data")))return n;var s=t[0];if("option"===s.tagName.toLowerCase())n={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if("optgroup"===s.tagName.toLowerCase()){n={text:t.prop("label"),children:[],title:t.prop("title")};for(var o=t.children("option"),r=[],a=0;a<o.length;a++){var l=i(o[a]),h=this.item(l);r.push(h)}n.children=r}return(n=this._normalizeItem(n)).element=t[0],e.StoreData(t[0],"data",n),n},n.prototype._normalizeItem=function(t){t!==Object(t)&&(t={id:t,text:t});var e={selected:!1,disabled:!1};return null!=(t=i.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),i.extend({},e,t)},n.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},n})),i.define("select2/data/array",["./select","../utils","jquery"],(function(t,e,i){function n(t,e){this._dataToConvert=e.get("data")||[],n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype.bind=function(t,e){n.__super__.bind.call(this,t,e),this.addOptions(this.convertToOptions(this._dataToConvert))},n.prototype.select=function(t){var e=this.$element.find("option").filter((function(e,i){return i.value==t.id.toString()}));0===e.length&&(e=this.option(t),this.addOptions(e)),n.__super__.select.call(this,t)},n.prototype.convertToOptions=function(t){var e=this,n=this.$element.find("option"),s=n.map((function(){return e.item(i(this)).id})).get(),o=[];function r(t){return function(){return i(this).val()==t.id}}for(var a=0;a<t.length;a++){var l=this._normalizeItem(t[a]);if(s.indexOf(l.id)>=0){var h=n.filter(r(l)),c=this.item(h),u=i.extend(!0,{},l,c),d=this.option(u);h.replaceWith(d)}else{var p=this.option(l);if(l.children){var f=this.convertToOptions(l.children);p.append(f)}o.push(p)}}return o},n})),i.define("select2/data/ajax",["./array","../utils","jquery"],(function(t,e,i){function n(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype._applyDefaults=function(t){var e={data:function(t){return i.extend({},t,{q:t.term})},transport:function(t,e,n){var s=i.ajax(t);return s.then(e),s.fail(n),s}};return i.extend({},e,t,!0)},n.prototype.processResults=function(t){return t},n.prototype.query=function(t,e){var n=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var s=i.extend({type:"GET"},this.ajaxOptions);function o(){var i=s.transport(s,(function(i){var s=n.processResults(i,t);n.options.get("debug")&&window.console&&console.error&&(s&&s.results&&Array.isArray(s.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(s)}),(function(){(!("status"in i)||0!==i.status&&"0"!==i.status)&&n.trigger("results:message",{message:"errorLoading"})}));n._request=i}"function"==typeof s.url&&(s.url=s.url.call(this.$element,t)),"function"==typeof s.data&&(s.data=s.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},n})),i.define("select2/data/tags",["jquery"],(function(t){function e(t,e,i){var n=i.get("tags"),s=i.get("createTag");void 0!==s&&(this.createTag=s);var o=i.get("insertTag");if(void 0!==o&&(this.insertTag=o),t.call(this,e,i),Array.isArray(n))for(var r=0;r<n.length;r++){var a=n[r],l=this._normalizeItem(a),h=this.option(l);this.$element.append(h)}}return e.prototype.query=function(t,e,i){var n=this;function s(t,o){for(var r=t.results,a=0;a<r.length;a++){var l=r[a],h=null!=l.children&&!s({results:l.children},!0);if((l.text||"").toUpperCase()===(e.term||"").toUpperCase()||h)return!o&&(t.data=r,void i(t))}if(o)return!0;var c=n.createTag(e);if(null!=c){var u=n.option(c);u.attr("data-select2-tag","true"),n.addOptions([u]),n.insertTag(r,c)}t.results=r,i(t)}this._removeOldTags(),null!=e.term&&null==e.page?t.call(this,e,s):t.call(this,e,i)},e.prototype.createTag=function(t,e){if(null==e.term)return null;var i=e.term.trim();return""===i?null:{id:i,text:i}},e.prototype.insertTag=function(t,e,i){e.unshift(i)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each((function(){this.selected||t(this).remove()}))},e})),i.define("select2/data/tokenizer",["jquery"],(function(t){function e(t,e,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),t.call(this,e,i)}return e.prototype.bind=function(t,e,i){t.call(this,e,i),this.$search=e.dropdown.$search||e.selection.$search||i.find(".select2-search__field")},e.prototype.query=function(e,i,n){var s=this;function o(e){var i=s._normalizeItem(e);if(!s.$element.find("option").filter((function(){return t(this).val()===i.id})).length){var n=s.option(i);n.attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([n])}r(i)}function r(t){s.trigger("select",{data:t})}i.term=i.term||"";var a=this.tokenizer(i,this.options,o);a.term!==i.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.trigger("focus")),i.term=a.term),e.call(this,i,n)},e.prototype.tokenizer=function(e,i,n,s){for(var o=n.get("tokenSeparators")||[],r=i.term,a=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};a<r.length;){var h=r[a];if(-1!==o.indexOf(h)){var c=r.substr(0,a),u=l(t.extend({},i,{term:c}));null!=u?(s(u),r=r.substr(a+1)||"",a=0):a++}else a++}return{term:r}},e})),i.define("select2/data/minimumInputLength",[],(function(){function t(t,e,i){this.minimumInputLength=i.get("minimumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t})),i.define("select2/data/maximumInputLength",[],(function(){function t(t,e,i){this.maximumInputLength=i.get("maximumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t})),i.define("select2/data/maximumSelectionLength",[],(function(){function t(t,e,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),t.call(this,e,i)}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",(function(){n._checkIfMaximumSelected()}))},t.prototype.query=function(t,e,i){var n=this;this._checkIfMaximumSelected((function(){t.call(n,e,i)}))},t.prototype._checkIfMaximumSelected=function(t,e){var i=this;this.current((function(t){var n=null!=t?t.length:0;i.maximumSelectionLength>0&&n>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e&&e()}))},t})),i.define("select2/dropdown",["jquery","./utils"],(function(t,e){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},i.prototype.bind=function(){},i.prototype.position=function(t,e){},i.prototype.destroy=function(){this.$dropdown.remove()},i})),i.define("select2/dropdown/search",["jquery"],(function(t){function e(){}return e.prototype.render=function(e){var i=e.call(this),n=this.options.get("translations").get("search"),s=t('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=s,this.$search=s.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),i.prepend(s),i},e.prototype.bind=function(e,i,n){var s=this,o=i.id+"-results";e.call(this,i,n),this.$search.on("keydown",(function(t){s.trigger("keypress",t),s._keyUpPrevented=t.isDefaultPrevented()})),this.$search.on("input",(function(e){t(this).off("keyup")})),this.$search.on("keyup input",(function(t){s.handleSearch(t)})),i.on("open",(function(){s.$search.attr("tabindex",0),s.$search.attr("aria-controls",o),s.$search.trigger("focus"),window.setTimeout((function(){s.$search.trigger("focus")}),0)})),i.on("close",(function(){s.$search.attr("tabindex",-1),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.val(""),s.$search.trigger("blur")})),i.on("focus",(function(){i.isOpen()||s.$search.trigger("focus")})),i.on("results:all",(function(t){null!=t.query.term&&""!==t.query.term||(s.showSearch(t)?s.$searchContainer[0].classList.remove("select2-search--hide"):s.$searchContainer[0].classList.add("select2-search--hide"))})),i.on("results:focus",(function(t){t.data._resultId?s.$search.attr("aria-activedescendant",t.data._resultId):s.$search.removeAttr("aria-activedescendant")}))},e.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.showSearch=function(t,e){return!0},e})),i.define("select2/dropdown/hidePlaceholder",[],(function(){function t(t,e,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i,n)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var i=e.slice(0),n=e.length-1;n>=0;n--){var s=e[n];this.placeholder.id===s.id&&i.splice(n,1)}return i},t})),i.define("select2/dropdown/infiniteScroll",["jquery"],(function(t){function e(t,e,i,n){this.lastParams={},t.call(this,e,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("query",(function(t){n.lastParams=t,n.loading=!0})),e.on("query:append",(function(t){n.lastParams=t,n.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=t.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.loadMore()},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),i=this.options.get("translations").get("loadingMore");return e.html(i(this.lastParams)),e},e})),i.define("select2/dropdown/attachBody",["jquery","../utils"],(function(t,e){function i(e,i,n){this.$dropdownParent=t(n.get("dropdownParent")||document.body),e.call(this,i,n)}return i.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("open",(function(){n._showDropdown(),n._attachPositioningHandler(e),n._bindContainerResultHandlers(e)})),e.on("close",(function(){n._hideDropdown(),n._detachPositioningHandler(e)})),this.$dropdownContainer.on("mousedown",(function(t){t.stopPropagation()}))},i.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},i.prototype.position=function(t,e,i){e.attr("class",i.attr("class")),e[0].classList.remove("select2"),e[0].classList.add("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=i},i.prototype.render=function(e){var i=t("<span></span>"),n=e.call(this);return i.append(n),this.$dropdownContainer=i,i},i.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},i.prototype._bindContainerResultHandlers=function(t,e){if(!this._containerResultsHandlersBound){var i=this;e.on("results:all",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("results:append",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("results:message",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("select",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("unselect",(function(){i._positionDropdown(),i._resizeDropdown()})),this._containerResultsHandlersBound=!0}},i.prototype._attachPositioningHandler=function(i,n){var s=this,o="scroll.select2."+n.id,r="resize.select2."+n.id,a="orientationchange.select2."+n.id,l=this.$container.parents().filter(e.hasScroll);l.each((function(){e.StoreData(this,"select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})})),l.on(o,(function(i){var n=e.GetData(this,"select2-scroll-position");t(this).scrollTop(n.y)})),t(window).on(o+" "+r+" "+a,(function(t){s._positionDropdown(),s._resizeDropdown()}))},i.prototype._detachPositioningHandler=function(i,n){var s="scroll.select2."+n.id,o="resize.select2."+n.id,r="orientationchange.select2."+n.id;this.$container.parents().filter(e.hasScroll).off(s),t(window).off(s+" "+o+" "+r)},i.prototype._positionDropdown=function(){var e=t(window),i=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),s=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=o.top,r.bottom=o.top+r.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:e.scrollTop(),bottom:e.scrollTop()+e.height()},h=l.top<o.top-a.height,c=l.bottom>o.bottom+a.height,u={left:o.left,top:r.bottom},d=this.$dropdownParent;"static"===d.css("position")&&(d=d.offsetParent());var p={top:0,left:0};(t.contains(document.body,d[0])||d[0].isConnected)&&(p=d.offset()),u.top-=p.top,u.left-=p.left,i||n||(s="below"),c||!h||i?!h&&c&&i&&(s="below"):s="above",("above"==s||i&&"below"!==s)&&(u.top=r.top-p.top-a.height),null!=s&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+s),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+s)),this.$dropdownContainer.css(u)},i.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},i.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},i})),i.define("select2/dropdown/minimumResultsForSearch",[],(function(){function t(e){for(var i=0,n=0;n<e.length;n++){var s=e[n];s.children?i+=t(s.children):i++}return i}function e(t,e,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,i,n)}return e.prototype.showSearch=function(e,i){return!(t(i.data.results)<this.minimumResultsForSearch)&&e.call(this,i)},e})),i.define("select2/dropdown/selectOnClose",["../utils"],(function(t){function e(){}return e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("close",(function(t){n._handleSelectOnClose(t)}))},e.prototype._handleSelectOnClose=function(e,i){if(i&&null!=i.originalSelect2Event){var n=i.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var s=this.getHighlightedResults();if(!(s.length<1)){var o=t.GetData(s[0],"data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e})),i.define("select2/dropdown/closeOnSelect",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",(function(t){n._selectTriggered(t)})),e.on("unselect",(function(t){n._selectTriggered(t)}))},t.prototype._selectTriggered=function(t,e){var i=e.originalEvent;i&&(i.ctrlKey||i.metaKey)||this.trigger("close",{originalEvent:i,originalSelect2Event:e})},t})),i.define("select2/dropdown/dropdownCss",["../utils"],(function(t){function e(){}return e.prototype.render=function(e){var i=e.call(this),n=this.options.get("dropdownCssClass")||"";return-1!==n.indexOf(":all:")&&(n=n.replace(":all:",""),t.copyNonInternalCssClasses(i[0],this.$element[0])),i.addClass(n),i},e})),i.define("select2/dropdown/tagsSearchHighlight",["../utils"],(function(t){function e(){}return e.prototype.highlightFirstItem=function(e){var i=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(i.length>0){var n=i.first(),s=t.GetData(n[0],"data").element;if(s&&s.getAttribute&&"true"===s.getAttribute("data-select2-tag"))return void n.trigger("mouseenter")}e.call(this)},e})),i.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,i="Please delete "+e+" character";return 1!=e&&(i+="s"),i},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}})),i.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],(function(t,e,i,n,s,o,r,a,l,h,c,u,d,p,f,m,g,_,v,y,b,x,w,k,T,C,A,E,M,L,P){function S(){this.reset()}return S.prototype.apply=function(c){if(null==(c=t.extend(!0,{},this.defaults,c)).dataAdapter&&(null!=c.ajax?c.dataAdapter=f:null!=c.data?c.dataAdapter=p:c.dataAdapter=d,c.minimumInputLength>0&&(c.dataAdapter=h.Decorate(c.dataAdapter,_)),c.maximumInputLength>0&&(c.dataAdapter=h.Decorate(c.dataAdapter,v)),c.maximumSelectionLength>0&&(c.dataAdapter=h.Decorate(c.dataAdapter,y)),c.tags&&(c.dataAdapter=h.Decorate(c.dataAdapter,m)),null==c.tokenSeparators&&null==c.tokenizer||(c.dataAdapter=h.Decorate(c.dataAdapter,g))),null==c.resultsAdapter&&(c.resultsAdapter=e,null!=c.ajax&&(c.resultsAdapter=h.Decorate(c.resultsAdapter,k)),null!=c.placeholder&&(c.resultsAdapter=h.Decorate(c.resultsAdapter,w)),c.selectOnClose&&(c.resultsAdapter=h.Decorate(c.resultsAdapter,A)),c.tags&&(c.resultsAdapter=h.Decorate(c.resultsAdapter,L))),null==c.dropdownAdapter){if(c.multiple)c.dropdownAdapter=b;else{var u=h.Decorate(b,x);c.dropdownAdapter=u}0!==c.minimumResultsForSearch&&(c.dropdownAdapter=h.Decorate(c.dropdownAdapter,C)),c.closeOnSelect&&(c.dropdownAdapter=h.Decorate(c.dropdownAdapter,E)),null!=c.dropdownCssClass&&(c.dropdownAdapter=h.Decorate(c.dropdownAdapter,M)),c.dropdownAdapter=h.Decorate(c.dropdownAdapter,T)}null==c.selectionAdapter&&(c.multiple?c.selectionAdapter=n:c.selectionAdapter=i,null!=c.placeholder&&(c.selectionAdapter=h.Decorate(c.selectionAdapter,s)),c.allowClear&&(c.selectionAdapter=h.Decorate(c.selectionAdapter,o)),c.multiple&&(c.selectionAdapter=h.Decorate(c.selectionAdapter,r)),null!=c.selectionCssClass&&(c.selectionAdapter=h.Decorate(c.selectionAdapter,a)),c.selectionAdapter=h.Decorate(c.selectionAdapter,l)),c.language=this._resolveLanguage(c.language),c.language.push("en");for(var P=[],S=0;S<c.language.length;S++){var O=c.language[S];-1===P.indexOf(O)&&P.push(O)}return c.language=P,c.translations=this._processTranslations(c.language,c.debug),c},S.prototype.reset=function(){function e(t){function e(t){return u[t]||t}return t.replace(/[^\u0000-\u007E]/g,e)}function i(n,s){if(null==n.term||""===n.term.trim())return s;if(s.children&&s.children.length>0){for(var o=t.extend(!0,{},s),r=s.children.length-1;r>=0;r--)null==i(n,s.children[r])&&o.children.splice(r,1);return o.children.length>0?o:i(n,o)}var a=e(s.text).toUpperCase(),l=e(n.term).toUpperCase();return a.indexOf(l)>-1?s:null}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:h.escapeMarkup,language:{},matcher:i,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},S.prototype.applyFromElement=function(t,e){var i=t.language,n=this.defaults.language,s=e.prop("lang"),o=e.closest("[lang]").prop("lang"),r=Array.prototype.concat.call(this._resolveLanguage(s),this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(o));return t.language=r,t},S.prototype._resolveLanguage=function(e){if(!e)return[];if(t.isEmptyObject(e))return[];if(t.isPlainObject(e))return[e];var i;i=Array.isArray(e)?e:[e];for(var n=[],s=0;s<i.length;s++)if(n.push(i[s]),"string"==typeof i[s]&&i[s].indexOf("-")>0){var o=i[s].split("-")[0];n.push(o)}return n},S.prototype._processTranslations=function(e,i){for(var n=new c,s=0;s<e.length;s++){var o=new c,r=e[s];if("string"==typeof r)try{o=c.loadPath(r)}catch(t){try{r=this.defaults.amdLanguageBase+r,o=c.loadPath(r)}catch(t){i&&window.console&&console.warn&&console.warn('Select2: The language file for "'+r+'" could not be automatically loaded. A fallback will be used instead.')}}else o=t.isPlainObject(r)?new c(r):r;n.extend(o)}return n},S.prototype.set=function(e,i){var n={};n[t.camelCase(e)]=i;var s=h._convertData(n);t.extend(!0,this.defaults,s)},new S})),i.define("select2/options",["jquery","./defaults","./utils"],(function(t,e,i){function n(t,i){this.options=t,null!=i&&this.fromElement(i),null!=i&&(this.options=e.applyFromElement(this.options,i)),this.options=e.apply(this.options)}return n.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),i.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),i.StoreData(e[0],"data",i.GetData(e[0],"select2Tags")),i.StoreData(e[0],"tags",!0)),i.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",i.GetData(e[0],"ajaxUrl")),i.StoreData(e[0],"ajax-Url",i.GetData(e[0],"ajaxUrl")));var s={};function o(t,e){return e.toUpperCase()}for(var r=0;r<e[0].attributes.length;r++){var a=e[0].attributes[r].name,l="data-";if(a.substr(0,l.length)==l){var h=a.substring(l.length),c=i.GetData(e[0],h);s[h.replace(/-([a-z])/g,o)]=c}}t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset&&(s=t.extend(!0,{},e[0].dataset,s));var u=t.extend(!0,{},i.GetData(e[0]),s);for(var d in u=i._convertData(u))n.indexOf(d)>-1||(t.isPlainObject(this.options[d])?t.extend(this.options[d],u[d]):this.options[d]=u[d]);return this},n.prototype.get=function(t){return this.options[t]},n.prototype.set=function(t,e){this.options[t]=e},n})),i.define("select2/core",["jquery","./options","./utils","./keys"],(function(t,e,i,n){var s=function(t,n){null!=i.GetData(t[0],"select2")&&i.GetData(t[0],"select2").destroy(),this.$element=t,this.id=this._generateId(t),n=n||{},this.options=new e(n,t),s.__super__.constructor.call(this);var o=t.attr("tabindex")||0;i.StoreData(t[0],"old-tabindex",o),t.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(t,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var h=this.options.get("dropdownAdapter");this.dropdown=new h(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var c=this.options.get("resultsAdapter");this.results=new c(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(t){u.trigger("selection:update",{data:t})})),t[0].classList.add("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),i.StoreData(t[0],"select2",this),t.data("select2",this)};return i.Extend(s,i.Observable),s.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},s.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},s.prototype._resolveWidth=function(t,e){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var n=this._resolveWidth(t,"style");return null!=n?n:this._resolveWidth(t,"element")}if("element"==e){var s=t.outerWidth(!1);return s<=0?"auto":s+"px"}if("style"==e){var o=t.attr("style");if("string"!=typeof o)return null;for(var r=o.split(";"),a=0,l=r.length;a<l;a+=1){var h=r[a].replace(/\s/g,"").match(i);if(null!==h&&h.length>=1)return h[1]}return null}return"computedstyle"==e?window.getComputedStyle(t[0]).width:e},s.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},s.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",(function(){t.dataAdapter.current((function(e){t.trigger("selection:update",{data:e})}))})),this.$element.on("focus.select2",(function(e){t.trigger("focus",e)})),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this._observer=new window.MutationObserver((function(e){t._syncA(),t._syncS(e)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},s.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",(function(e,i){t.trigger(e,i)}))},s.prototype._registerSelectionEvents=function(){var t=this,e=["toggle","focus"];this.selection.on("toggle",(function(){t.toggleDropdown()})),this.selection.on("focus",(function(e){t.focus(e)})),this.selection.on("*",(function(i,n){-1===e.indexOf(i)&&t.trigger(i,n)}))},s.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",(function(e,i){t.trigger(e,i)}))},s.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",(function(e,i){t.trigger(e,i)}))},s.prototype._registerEvents=function(){var t=this;this.on("open",(function(){t.$container[0].classList.add("select2-container--open")})),this.on("close",(function(){t.$container[0].classList.remove("select2-container--open")})),this.on("enable",(function(){t.$container[0].classList.remove("select2-container--disabled")})),this.on("disable",(function(){t.$container[0].classList.add("select2-container--disabled")})),this.on("blur",(function(){t.$container[0].classList.remove("select2-container--focus")})),this.on("query",(function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,(function(i){t.trigger("results:all",{data:i,query:e})}))})),this.on("query:append",(function(e){this.dataAdapter.query(e,(function(i){t.trigger("results:append",{data:i,query:e})}))})),this.on("keypress",(function(e){var i=e.which;t.isOpen()?i===n.ESC||i===n.UP&&e.altKey?(t.close(e),e.preventDefault()):i===n.ENTER||i===n.TAB?(t.trigger("results:select",{}),e.preventDefault()):i===n.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):i===n.UP?(t.trigger("results:previous",{}),e.preventDefault()):i===n.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(i===n.ENTER||i===n.SPACE||i===n.DOWN&&e.altKey)&&(t.open(),e.preventDefault())}))},s.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},s.prototype._isChangeMutation=function(t){var e=this;if(t.addedNodes&&t.addedNodes.length>0){for(var i=0;i<t.addedNodes.length;i++)if(t.addedNodes[i].selected)return!0}else{if(t.removedNodes&&t.removedNodes.length>0)return!0;if(Array.isArray(t))return t.some((function(t){return e._isChangeMutation(t)}))}return!1},s.prototype._syncSubtree=function(t){var e=this._isChangeMutation(t),i=this;e&&this.dataAdapter.current((function(t){i.trigger("selection:update",{data:t})}))},s.prototype.trigger=function(t,e){var i=s.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===e&&(e={}),t in n){var o=n[t],r={prevented:!1,name:t,args:e};if(i.call(this,o,r),r.prevented)return void(e.prevented=!0)}i.call(this,t,e)},s.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},s.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},s.prototype.close=function(t){this.isOpen()&&this.trigger("close",{originalEvent:t})},s.prototype.isEnabled=function(){return!this.isDisabled()},s.prototype.isDisabled=function(){return this.options.get("disabled")},s.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},s.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},s.prototype.focus=function(t){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},s.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},s.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current((function(e){t=e})),t},s.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var e=t[0];Array.isArray(e)&&(e=e.map((function(t){return t.toString()}))),this.$element.val(e).trigger("input").trigger("change")},s.prototype.destroy=function(){i.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",i.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),i.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},s.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),i.StoreData(e[0],"element",this.$element),e},s})),i.define("select2/dropdown/attachContainer",[],(function(){function t(t,e,i){t.call(this,e,i)}return t.prototype.position=function(t,e,i){i.find(".dropdown-wrapper").append(e),e[0].classList.add("select2-dropdown--below"),i[0].classList.add("select2-container--below")},t})),i.define("select2/dropdown/stopPropagation",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){t.call(this,e,i);var n=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(n.join(" "),(function(t){t.stopPropagation()}))},t})),i.define("select2/selection/stopPropagation",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){t.call(this,e,i);var n=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(n.join(" "),(function(t){t.stopPropagation()}))},t})),function(e){"function"==typeof i.define&&i.define.amd?i.define("jquery-mousewheel",["jquery"],e):t.exports=e}((function(t){var e,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(t.event.fixHooks)for(var r=n.length;r;)t.event.fixHooks[n[--r]]=t.event.mouseHooks;var a=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=s.length;e;)this.addEventListener(s[--e],l,!1);else this.onmousewheel=l;t.data(this,"mousewheel-line-height",a.getLineHeight(this)),t.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=s.length;e;)this.removeEventListener(s[--e],l,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(n){var s=n||window.event,r=o.call(arguments,1),l=0,u=0,d=0,p=0,f=0,m=0;if((n=t.event.fix(s)).type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(u=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=-1*d,d=0),l=0===d?u:d,"deltaY"in s&&(l=d=-1*s.deltaY),"deltaX"in s&&(u=s.deltaX,0===d&&(l=-1*u)),0!==d||0!==u){if(1===s.deltaMode){var g=t.data(this,"mousewheel-line-height");l*=g,d*=g,u*=g}else if(2===s.deltaMode){var _=t.data(this,"mousewheel-page-height");l*=_,d*=_,u*=_}if(p=Math.max(Math.abs(d),Math.abs(u)),(!i||p<i)&&(i=p,c(s,p)&&(i/=40)),c(s,p)&&(l/=40,u/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/i),u=Math[u>=1?"floor":"ceil"](u/i),d=Math[d>=1?"floor":"ceil"](d/i),a.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();f=n.clientX-v.left,m=n.clientY-v.top}return n.deltaX=u,n.deltaY=d,n.deltaFactor=i,n.offsetX=f,n.offsetY=m,n.deltaMode=0,r.unshift(n,l,u,d),e&&clearTimeout(e),e=setTimeout(h,200),(t.event.dispatch||t.event.handle).apply(this,r)}}function h(){i=null}function c(t,e){return a.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})})),i.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function(t,e,i,n,s){if(null==t.fn.select2){var o=["open","close","destroy"];t.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each((function(){var n=t.extend(!0,{},e);new i(t(this),n)})),this;if("string"==typeof e){var n,r=Array.prototype.slice.call(arguments,1);return this.each((function(){var t=s.GetData(this,"select2");null==t&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),n=t[e].apply(t,r)})),o.indexOf(e)>-1?this:n}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=n),i})),{define:i.define,require:i.require}}(),n=i.require("jquery.select2");return e.fn.select2.amd=i,n},void 0===(o="function"==typeof n?n.apply(e,s):n)||(t.exports=o)}},t=>{var e;e=15177,t(t.s=e)}]);