diff --git a/dist/main.bundle.js b/dist/main.bundle.js index c69befa..ef45436 100644 --- a/dist/main.bundle.js +++ b/dist/main.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see main.bundle.js.LICENSE.txt */ -(()=>{var e={6484:function(e,t,r){e.exports=function(e,t,r,n){"use strict";const a=".bs.alert",i=`close${a}`,o=`closed${a}`;class l extends e{static get NAME(){return"alert"}close(){if(t.trigger(this._element,i).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),t.trigger(this._element,o),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=l.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return r.enableDismissTrigger(l,"close"),n.defineJQueryPlugin(l),l}(r(9011),r(7956),r(8248),r(4035))},9011:function(e,t,r){e.exports=function(e,t,r,n){"use strict";return class extends r{constructor(t,r){super(),(t=n.getElement(t))&&(this._element=t,this._config=this._getConfig(r),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),t.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){n.executeAfterTransition(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(t){return e.get(n.getElement(t),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}}(r(7269),r(7956),r(2105),r(4035))},7960:function(e,t,r){e.exports=function(e,t,r){"use strict";const n='[data-bs-toggle="button"]';class a extends e{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=a.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}return t.on(document,"click.bs.button.data-api",n,(e=>{e.preventDefault();const t=e.target.closest(n);a.getOrCreateInstance(t).toggle()})),r.defineJQueryPlugin(a),a}(r(9011),r(7956),r(4035))},8647:function(e,t,r){e.exports=function(e,t,r,n){"use strict";const a=".bs.collapse",i=`show${a}`,o=`shown${a}`,l=`hide${a}`,s=`hidden${a}`,c=`click${a}.data-api`,u="show",d="collapse",f="collapsing",h=`:scope .${d} .${d}`,p='[data-bs-toggle="collapse"]',m={parent:null,toggle:!0},g={parent:"(null|element)",toggle:"boolean"};class v extends e{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=r.find(p);for(const e of n){const t=r.getSelectorFromElement(e),n=r.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return m}static get DefaultType(){return g}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>v.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(t.trigger(this._element,i).defaultPrevented)return;for(const t of e)t.hide();const r=this._getDimension();this._element.classList.remove(d),this._element.classList.add(f),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(f),this._element.classList.add(d,u),this._element.style[r]="",t.trigger(this._element,o)}),this._element,!0),this._element.style[r]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(t.trigger(this._element,l).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,n.reflow(this._element),this._element.classList.add(f),this._element.classList.remove(d,u);for(const e of this._triggerArray){const t=r.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(f),this._element.classList.add(d),t.trigger(this._element,s)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(u)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=n.getElement(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(p);for(const t of e){const e=r.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=r.find(h,this._config.parent);return r.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const r of e)r.classList.toggle("collapsed",!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const r=v.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===r[e])throw new TypeError(`No method named "${e}"`);r[e]()}}))}}return t.on(document,c,p,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of r.getMultipleElementsFromSelector(this))v.getOrCreateInstance(e,{toggle:!1}).toggle()})),n.defineJQueryPlugin(v),v}(r(9011),r(7956),r(5411),r(4035))},7269:function(e){e.exports=function(){"use strict";const e=new Map;return{set(t,r,n){e.has(t)||e.set(t,new Map);const a=e.get(t);a.has(r)||0===a.size?a.set(r,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(a.keys())[0]}.`)},get:(t,r)=>e.has(t)&&e.get(t).get(r)||null,remove(t,r){if(!e.has(t))return;const n=e.get(t);n.delete(r),0===n.size&&e.delete(t)}}}()},7956:function(e,t,r){e.exports=function(e){"use strict";const t=/[^.]*(?=\..*)\.|.*/,r=/\..*/,n=/::\d+$/,a={};let i=1;const o={mouseenter:"mouseover",mouseleave:"mouseout"},l=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 s(e,t){return t&&`${t}::${i++}`||e.uidEvent||i++}function c(e){const t=s(e);return e.uidEvent=t,a[t]=a[t]||{},a[t]}function u(e,t,r=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===r))}function d(e,t,r){const n="string"==typeof t,a=n?r:t||r;let i=m(e);return l.has(i)||(i=e),[n,a,i]}function f(e,r,n,a,i){if("string"!=typeof r||!e)return;let[l,f,h]=d(r,n,a);if(r in o){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};f=e(f)}const p=c(e),m=p[h]||(p[h]={}),y=u(m,f,l?n:null);if(y)return void(y.oneOff=y.oneOff&&i);const x=s(f,r.replace(t,"")),b=l?function(e,t,r){return function n(a){const i=e.querySelectorAll(t);for(let{target:o}=a;o&&o!==this;o=o.parentNode)for(const l of i)if(l===o)return v(a,{delegateTarget:o}),n.oneOff&&g.off(e,a.type,t,r),r.apply(o,[a])}}(e,n,f):function(e,t){return function r(n){return v(n,{delegateTarget:e}),r.oneOff&&g.off(e,n.type,t),t.apply(e,[n])}}(e,f);b.delegationSelector=l?n:null,b.callable=f,b.oneOff=i,b.uidEvent=x,m[x]=b,e.addEventListener(h,b,l)}function h(e,t,r,n,a){const i=u(t[r],n,a);i&&(e.removeEventListener(r,i,Boolean(a)),delete t[r][i.uidEvent])}function p(e,t,r,n){const a=t[r]||{};for(const[i,o]of Object.entries(a))i.includes(n)&&h(e,t,r,o.callable,o.delegationSelector)}function m(e){return e=e.replace(r,""),o[e]||e}const g={on(e,t,r,n){f(e,t,r,n,!1)},one(e,t,r,n){f(e,t,r,n,!0)},off(e,t,r,a){if("string"!=typeof t||!e)return;const[i,o,l]=d(t,r,a),s=l!==t,u=c(e),f=u[l]||{},m=t.startsWith(".");if(void 0===o){if(m)for(const r of Object.keys(u))p(e,u,r,t.slice(1));for(const[r,a]of Object.entries(f)){const i=r.replace(n,"");s&&!t.includes(i)||h(e,u,l,a.callable,a.delegationSelector)}}else{if(!Object.keys(f).length)return;h(e,u,l,o,i?r:null)}},trigger(t,r,n){if("string"!=typeof r||!t)return null;const a=e.getjQuery();let i=null,o=!0,l=!0,s=!1;r!==m(r)&&a&&(i=a.Event(r,n),a(t).trigger(i),o=!i.isPropagationStopped(),l=!i.isImmediatePropagationStopped(),s=i.isDefaultPrevented());const c=v(new Event(r,{bubbles:o,cancelable:!0}),n);return s&&c.preventDefault(),l&&t.dispatchEvent(c),c.defaultPrevented&&i&&i.preventDefault(),c}};function v(e,t={}){for(const[r,n]of Object.entries(t))try{e[r]=n}catch(t){Object.defineProperty(e,r,{configurable:!0,get:()=>n})}return e}return g}(r(4035))},2333:function(e){e.exports=function(){"use strict";function e(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function t(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}return{setDataAttribute(e,r,n){e.setAttribute(`data-bs-${t(r)}`,n)},removeDataAttribute(e,r){e.removeAttribute(`data-bs-${t(r)}`)},getDataAttributes(t){if(!t)return{};const r={},n=Object.keys(t.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const a of n){let n=a.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),r[n]=e(t.dataset[a])}return r},getDataAttribute:(r,n)=>e(r.getAttribute(`data-bs-${t(n)}`))}}()},5411:function(e,t,r){e.exports=function(e){"use strict";const t=t=>{let r=t.getAttribute("data-bs-target");if(!r||"#"===r){let e=t.getAttribute("href");if(!e||!e.includes("#")&&!e.startsWith("."))return null;e.includes("#")&&!e.startsWith("#")&&(e=`#${e.split("#")[1]}`),r=e&&"#"!==e?e.trim():null}return r?r.split(",").map((t=>e.parseSelector(t))).join(","):null},r={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const r=[];let n=e.parentNode.closest(t);for(;n;)r.push(n),n=n.parentNode.closest(t);return r},prev(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return[r];r=r.previousElementSibling}return[]},next(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return[r];r=r.nextElementSibling}return[]},focusableChildren(t){const r=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(r,t).filter((t=>!e.isDisabled(t)&&e.isVisible(t)))},getSelectorFromElement(e){const n=t(e);return n&&r.findOne(n)?n:null},getElementFromSelector(e){const n=t(e);return n?r.findOne(n):null},getMultipleElementsFromSelector(e){const n=t(e);return n?r.find(n):[]}};return r}(r(4035))},9635:function(e,t,r){e.exports=function(e,t,r,n,a,i,o,l){"use strict";const s=".bs.modal",c=`hide${s}`,u=`hidePrevented${s}`,d=`hidden${s}`,f=`show${s}`,h=`shown${s}`,p=`resize${s}`,m=`click.dismiss${s}`,g=`mousedown.dismiss${s}`,v=`keydown.dismiss${s}`,y=`click${s}.data-api`,x="modal-open",b="show",_="modal-static",w={backdrop:!0,focus:!0,keyboard:!0},T={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class A extends e{constructor(e,t){super(e,t),this._dialog=r.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new l,this._addEventListeners()}static get Default(){return w}static get DefaultType(){return T}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||t.trigger(this._element,f,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(x),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){this._isShown&&!this._isTransitioning&&(t.trigger(this._element,c).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(b),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){t.off(window,s),t.off(this._dialog,s),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new n({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new i({trapElement:this._element})}_showElement(e){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 n=r.findOne(".modal-body",this._dialog);n&&(n.scrollTop=0),o.reflow(this._element),this._element.classList.add(b);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,t.trigger(this._element,h,{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){t.on(this._element,v,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),t.on(window,p,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),t.on(this._element,g,(e=>{t.one(this._element,m,(t=>{this._element===e.target&&this._element===t.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(x),this._resetAdjustments(),this._scrollBar.reset(),t.trigger(this._element,d)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(t.trigger(this._element,u).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;"hidden"===r||this._element.classList.contains(_)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(_),this._queueCallback((()=>{this._element.classList.remove(_),this._queueCallback((()=>{this._element.style.overflowY=r}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){const e=o.isRTL()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!r&&e){const e=o.isRTL()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const r=A.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===r[e])throw new TypeError(`No method named "${e}"`);r[e](t)}}))}}return t.on(document,y,'[data-bs-toggle="modal"]',(function(e){const n=r.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),t.one(n,f,(e=>{e.defaultPrevented||t.one(n,d,(()=>{o.isVisible(this)&&this.focus()}))}));const a=r.findOne(".modal.show");a&&A.getInstance(a).hide(),A.getOrCreateInstance(n).toggle(this)})),a.enableDismissTrigger(A),o.defineJQueryPlugin(A),A}(r(9011),r(7956),r(5411),r(1877),r(8248),r(2936),r(4035),r(3673))},8451:function(e,t,r){e.exports=function(e,t,r,n,a,i,o,l){"use strict";const s=".bs.offcanvas",c=".data-api",u=`load${s}${c}`,d="show",f="showing",h="hiding",p=".offcanvas.show",m=`show${s}`,g=`shown${s}`,v=`hide${s}`,y=`hidePrevented${s}`,x=`hidden${s}`,b=`resize${s}`,_=`click${s}${c}`,w=`keydown.dismiss${s}`,T={backdrop:!0,keyboard:!0,scroll:!1},A={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class M extends e{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return T}static get DefaultType(){return A}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(t.trigger(this._element,m,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new l).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(f);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(d),this._element.classList.remove(f),t.trigger(this._element,g,{relatedTarget:e})}),this._element,!0)}hide(){if(!this._isShown)return;if(t.trigger(this._element,v).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(h),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(d,h),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new l).reset(),t.trigger(this._element,x)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new n({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():t.trigger(this._element,y)}:null})}_initializeFocusTrap(){return new i({trapElement:this._element})}_addEventListeners(){t.on(this._element,w,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():t.trigger(this._element,y))}))}static jQueryInterface(e){return this.each((function(){const t=M.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return t.on(document,_,'[data-bs-toggle="offcanvas"]',(function(e){const n=r.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),o.isDisabled(this))return;t.one(n,x,(()=>{o.isVisible(this)&&this.focus()}));const a=r.findOne(p);a&&a!==n&&M.getInstance(a).hide(),M.getOrCreateInstance(n).toggle(this)})),t.on(window,u,(()=>{for(const e of r.find(p))M.getOrCreateInstance(e).show()})),t.on(window,b,(()=>{for(const e of r.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&M.getOrCreateInstance(e).hide()})),a.enableDismissTrigger(M),o.defineJQueryPlugin(M),M}(r(9011),r(7956),r(5411),r(1877),r(8248),r(2936),r(4035),r(3673))},8013:function(e,t,r){e.exports=function(e,t,r,n){"use strict";const a=".bs.tab",i=`hide${a}`,o=`hidden${a}`,l=`show${a}`,s=`shown${a}`,c=`click${a}`,u=`keydown${a}`,d=`load${a}`,f="ArrowLeft",h="ArrowRight",p="ArrowUp",m="ArrowDown",g="Home",v="End",y="active",x="fade",b="show",_=".dropdown-toggle",w=`:not(${_})`,T='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',A=`.nav-link${w}, .list-group-item${w}, [role="tab"]${w}, ${T}`,M=`.${y}[data-bs-toggle="tab"], .${y}[data-bs-toggle="pill"], .${y}[data-bs-toggle="list"]`;class k extends e{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),t.on(this._element,u,(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const r=this._getActiveElem(),n=r?t.trigger(r,i,{relatedTarget:e}):null;t.trigger(e,l,{relatedTarget:r}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(r,e),this._activate(e,r))}_activate(e,n){if(!e)return;e.classList.add(y),this._activate(r.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),t.trigger(e,s,{relatedTarget:n})):e.classList.add(b)}),e,e.classList.contains(x))}_deactivate(e,n){if(!e)return;e.classList.remove(y),e.blur(),this._deactivate(r.getElementFromSelector(e));this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),t.trigger(e,o,{relatedTarget:n})):e.classList.remove(b)}),e,e.classList.contains(x))}_keydown(e){if(![f,h,p,m,g,v].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!n.isDisabled(e)));let r;if([g,v].includes(e.key))r=t[e.key===g?0:t.length-1];else{const a=[h,m].includes(e.key);r=n.getNextActiveElement(t,e.target,a,!0)}r&&(r.focus({preventScroll:!0}),k.getOrCreateInstance(r).show())}_getChildren(){return r.find(A,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=r.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const a=(e,a)=>{const i=r.findOne(e,n);i&&i.classList.toggle(a,t)};a(_,y),a(".dropdown-menu",b),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(y)}_getInnerElement(e){return e.matches(A)?e:r.findOne(A,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=k.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}return t.on(document,c,T,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),n.isDisabled(this)||k.getOrCreateInstance(this).show()})),t.on(window,d,(()=>{for(const e of r.find(M))k.getOrCreateInstance(e)})),n.defineJQueryPlugin(k),k}(r(9011),r(7956),r(5411),r(4035))},653:function(e,t,r){e.exports=function(e,t,r,n){"use strict";const a=".bs.toast",i=`mouseover${a}`,o=`mouseout${a}`,l=`focusin${a}`,s=`focusout${a}`,c=`hide${a}`,u=`hidden${a}`,d=`show${a}`,f=`shown${a}`,h="hide",p="show",m="showing",g={animation:"boolean",autohide:"boolean",delay:"number"},v={animation:!0,autohide:!0,delay:5e3};class y extends e{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return v}static get DefaultType(){return g}static get NAME(){return"toast"}show(){if(t.trigger(this._element,d).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(h),n.reflow(this._element),this._element.classList.add(p,m),this._queueCallback((()=>{this._element.classList.remove(m),t.trigger(this._element,f),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(t.trigger(this._element,c).defaultPrevented)return;this._element.classList.add(m),this._queueCallback((()=>{this._element.classList.add(h),this._element.classList.remove(m,p),t.trigger(this._element,u)}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(p),super.dispose()}isShown(){return this._element.classList.contains(p)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){t.on(this._element,i,(e=>this._onInteraction(e,!0))),t.on(this._element,o,(e=>this._onInteraction(e,!1))),t.on(this._element,l,(e=>this._onInteraction(e,!0))),t.on(this._element,s,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=y.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return r.enableDismissTrigger(y),n.defineJQueryPlugin(y),y}(r(9011),r(7956),r(8248),r(4035))},1877:function(e,t,r){e.exports=function(e,t,r){"use strict";const n="backdrop",a="show",i=`mousedown.bs.${n}`,o={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},l={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};return class extends t{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return o}static get DefaultType(){return l}static get NAME(){return n}show(e){if(!this._config.isVisible)return void r.execute(e);this._append();const t=this._getElement();this._config.isAnimated&&r.reflow(t),t.classList.add(a),this._emulateAnimation((()=>{r.execute(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(a),this._emulateAnimation((()=>{this.dispose(),r.execute(e)}))):r.execute(e)}dispose(){this._isAppended&&(e.off(this._element,i),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=r.getElement(e.rootElement),e}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),e.on(t,i,(()=>{r.execute(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){r.executeAfterTransition(e,this._getElement(),this._config.isAnimated)}}}(r(7956),r(2105),r(4035))},8248:function(e,t,r){!function(e,t,r,n){"use strict";e.enableDismissTrigger=(e,a="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,o=e.NAME;t.on(document,i,`[data-bs-dismiss="${o}"]`,(function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),n.isDisabled(this))return;const i=r.getElementFromSelector(this)||this.closest(`.${o}`);e.getOrCreateInstance(i)[a]()}))},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t,r(7956),r(5411),r(4035))},2105:function(e,t,r){e.exports=function(e,t){"use strict";return class{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(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(r,n){const a=t.isElement(n)?e.getDataAttribute(n,"config"):{};return{...this.constructor.Default,..."object"==typeof a?a:{},...t.isElement(n)?e.getDataAttributes(n):{},..."object"==typeof r?r:{}}}_typeCheckConfig(e,r=this.constructor.DefaultType){for(const[n,a]of Object.entries(r)){const r=e[n],i=t.isElement(r)?"element":t.toType(r);if(!new RegExp(a).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${a}".`)}}}}(r(2333),r(4035))},2936:function(e,t,r){e.exports=function(e,t,r){"use strict";const n=".bs.focustrap",a=`focusin${n}`,i=`keydown.tab${n}`,o="backward",l={autofocus:!0,trapElement:null},s={autofocus:"boolean",trapElement:"element"};return class extends r{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return l}static get DefaultType(){return s}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),e.off(document,n),e.on(document,a,(e=>this._handleFocusin(e))),e.on(document,i,(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,e.off(document,n))}_handleFocusin(e){const{trapElement:r}=this._config;if(e.target===document||e.target===r||r.contains(e.target))return;const n=t.focusableChildren(r);0===n.length?r.focus():this._lastTabNavDirection===o?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?o:"forward")}}}(r(7956),r(5411),r(2105))},4035:function(e,t){!function(e){"use strict";const t="transitionend",r=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),n=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e);const n=Number.parseFloat(t),a=Number.parseFloat(r);return n||a?(t=t.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(r))):0},a=e=>{e.dispatchEvent(new Event(t))},i=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),o=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?o(e.parentNode):null},l=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,s=[],c=e=>{"loading"===document.readyState?(s.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of s)e()})),s.push(e)):e()},u=(e,t=[],r=e)=>"function"==typeof e?e(...t):r;e.defineJQueryPlugin=e=>{c((()=>{const t=l();if(t){const r=e.NAME,n=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=n,e.jQueryInterface)}}))},e.execute=u,e.executeAfterTransition=(e,r,i=!0)=>{if(!i)return void u(e);const o=n(r)+5;let l=!1;const s=({target:n})=>{n===r&&(l=!0,r.removeEventListener(t,s),u(e))};r.addEventListener(t,s),setTimeout((()=>{l||a(r)}),o)},e.findShadowRoot=o,e.getElement=e=>i(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(r(e)):null,e.getNextActiveElement=(e,t,r,n)=>{const a=e.length;let i=e.indexOf(t);return-1===i?!r&&n?e[a-1]:e[0]:(i+=r?1:-1,n&&(i=(i+a)%a),e[Math.max(0,Math.min(i,a-1))])},e.getTransitionDurationFromElement=n,e.getUID=e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},e.getjQuery=l,e.isDisabled=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),e.isElement=i,e.isRTL=()=>"rtl"===document.documentElement.dir,e.isVisible=e=>{if(!i(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),r=e.closest("details:not([open])");if(!r)return t;if(r!==e){const t=e.closest("summary");if(t&&t.parentNode!==r)return!1;if(null===t)return!1}return t},e.noop=()=>{},e.onDOMContentLoaded=c,e.parseSelector=r,e.reflow=e=>{e.offsetHeight},e.toType=e=>null==e?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),e.triggerTransitionEnd=a,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t)},3673:function(e,t,r){e.exports=function(e,t,r){"use strict";const n=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",a=".sticky-top",i="padding-right",o="margin-right";return class{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,i,(t=>t+e)),this._setElementAttributes(n,i,(t=>t+e)),this._setElementAttributes(a,o,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,i),this._resetElementAttributes(n,i),this._resetElementAttributes(a,o)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){const n=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const a=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${r(Number.parseFloat(a))}px`)}))}_saveInitialAttribute(t,r){const n=t.style.getPropertyValue(r);n&&e.setDataAttribute(t,r,n)}_resetElementAttributes(t,r){this._applyManipulationCallback(t,(t=>{const n=e.getDataAttribute(t,r);null!==n?(e.removeDataAttribute(t,r),t.style.setProperty(r,n)):t.style.removeProperty(r)}))}_applyManipulationCallback(e,n){if(r.isElement(e))n(e);else for(const r of t.find(e,this._element))n(r)}}}(r(2333),r(5411),r(4035))},6762:(e,t,r)=>{var n,a="__lodash_hash_undefined__",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/,l=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,d="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,f="object"==typeof self&&self&&self.Object===Object&&self,h=d||f||Function("return this")(),p=Array.prototype,m=Function.prototype,g=Object.prototype,v=h["__core-js_shared__"],y=(n=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",x=m.toString,b=g.hasOwnProperty,_=g.toString,w=RegExp("^"+x.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=h.Symbol,A=p.splice,M=P(h,"Map"),k=P(Object,"create"),S=T?T.prototype:void 0,E=S?S.toString:void 0;function C(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1},L.prototype.set=function(e,t){var r=this.__data__,n=D(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new C,map:new(M||L),string:new C}},O.prototype.delete=function(e){return I(this,e).delete(e)},O.prototype.get=function(e){return I(this,e).get(e)},O.prototype.has=function(e){return I(this,e).has(e)},O.prototype.set=function(e,t){return I(this,e).set(e,t),this};var R=F((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if($(e))return E?E.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return l.test(e)&&r.push(""),e.replace(s,(function(e,t,n,a){r.push(n?a.replace(c,"$1"):t||e)})),r}));function N(e){if("string"==typeof e||$(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o),o};return r.cache=new(F.Cache||O),r}F.Cache=O;var B=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function $(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==_.call(e)}e.exports=function(e,t,r){var n=null==e?void 0:function(e,t){var r;t=function(e,t){if(B(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!$(e))||o.test(e)||!i.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:B(r=t)?r:R(r);for(var n=0,a=t.length;null!=e&&n{e=r.nmd(e);var n="__lodash_hash_undefined__",a=9007199254740991,i="[object Arguments]",o="[object Array]",l="[object Boolean]",s="[object Date]",c="[object Error]",u="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",m="[object RegExp]",g="[object Set]",v="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",b="[object DataView]",_=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[i]=T[o]=T[x]=T[l]=T[b]=T[s]=T[c]=T[u]=T[d]=T[f]=T[h]=T[m]=T[g]=T[v]=T[y]=!1;var A="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,M="object"==typeof self&&self&&self.Object===Object&&self,k=A||M||Function("return this")(),S=t&&!t.nodeType&&t,E=S&&e&&!e.nodeType&&e,C=E&&E.exports===S,L=C&&A.process,O=function(){try{return L&&L.binding&&L.binding("util")}catch(e){}}(),D=O&&O.isTypedArray;function I(e,t){for(var r=-1,n=null==e?0:e.length;++rl))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var u=-1,d=!0,f=2&r?new xe:void 0;for(i.set(e,t),i.set(t,e);++u-1},ve.prototype.set=function(e,t){var r=this.__data__,n=_e(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(ae||ve),string:new ge}},ye.prototype.delete=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Se(this,e).get(e)},ye.prototype.has=function(e){return Se(this,e).has(e)},ye.prototype.set=function(e,t){var r=Se(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},xe.prototype.add=xe.prototype.push=function(e){return this.__data__.set(e,n),this},xe.prototype.has=function(e){return this.__data__.has(e)},be.prototype.clear=function(){this.__data__=new ve,this.size=0},be.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},be.prototype.get=function(e){return this.__data__.get(e)},be.prototype.has=function(e){return this.__data__.has(e)},be.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ve){var n=r.__data__;if(!ae||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ye(n)}return r.set(e,t),this.size=r.size,this};var Ce=ee?function(e){return null==e?[]:(e=Object(e),function(t){for(var r=-1,n=null==t?0:t.length,a=0,i=[];++r-1&&e%1==0&&e-1&&e%1==0&&e<=a}function ze(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $e(e){return null!=e&&"object"==typeof e}var je=D?function(e){return function(t){return e(t)}}(D):function(e){return $e(e)&&Be(e.length)&&!!T[we(e)]};function He(e){return null!=(t=e)&&Be(t.length)&&!Fe(t)?function(e,t){var r=Re(e),n=!r&&Pe(e),a=!r&&!n&&Ne(e),i=!r&&!n&&!a&&je(e),o=r||n||a||i,l=o?function(e,t){for(var r=-1,n=Array(e);++r{"use strict";r.r(t)},8956:e=>{self,e.exports=function(){var e={6713:function(e,t,r){"use strict";var n=r(4809),a={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,a[i])}},4187:function(e,t,r){"use strict";e.exports=r(7908)},273:function(e,t,r){"use strict";e.exports=r(8218)},8847:function(e,t,r){"use strict";e.exports=r(7317)},7549:function(e,t,r){"use strict";e.exports=r(7430)},6200:function(e,t,r){"use strict";e.exports=r(2849)},3430:function(e,t,r){"use strict";e.exports=r(453)},5611:function(e,t,r){"use strict";var n=r(7549);n.register([r(273),r(8170),r(4187),r(6200),r(3430),r(590),r(8847)]),e.exports=n},8170:function(e,t,r){"use strict";e.exports=r(9913)},590:function(e,t,r){"use strict";e.exports=r(9855)},1645:function(e){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},222:function(e,t,r){"use strict";var n=r(1645),a=r(337),i=r(4826),o=r(8032).templatedArray;r(5081),e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},317:function(e,t,r){"use strict";var n=r(4809),a=r(9714),i=r(3377).draw;function o(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=a.getFromId(e,t.xref),n=a.getFromId(e,t.yref),i=a.getRefType(t.xref),o=a.getRefType(t.yref);t._extremes={},"range"===i&&l(t,r),"range"===o&&l(t,n)}))}function l(e,t){var r,n=t._id,i=n.charAt(0),o=e[i],l=e["a"+i],s=e[i+"ref"],c=e["a"+i+"ref"],u=e["_"+i+"padplus"],d=e["_"+i+"padminus"],f={x:1,y:-1}[i]*e[i+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+f,m=h-f,g=3*e.startarrowsize*e.arrowwidth||0,v=g+f,y=g-f;if(c===s){var x=a.findExtremes(t,[t.r2c(o)],{ppadplus:p,ppadminus:m}),b=a.findExtremes(t,[t.r2c(l)],{ppadplus:Math.max(u,v),ppadminus:Math.max(d,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=l?v+l:v,y=l?y-l:y,r=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(u,p,v),ppadminus:Math.max(d,m,y)});e._extremes[n]=r}e.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([i,o],e)}},6035:function(e,t,r){"use strict";var n=r(4809),a=r(3626),i=r(8032).arrayEditor;function o(e,t){var r,n,a,i,o,s,c,u=e._fullLayout.annotations,d=[],f=[],h=[],p=(t||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var r,l,s=o(e,t),c=s.on,u=s.off.concat(s.explicitOff),d={},f=e._fullLayout.annotations;if(c.length||u.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var G=!1,W=["x","y"],q=0;q1)&&(ne===re?((he=ae.r2fraction(t["a"+te]))<0||he>1)&&(G=!0):G=!0),K=ae._offset+ae.r2p(t[te]),Q=.5}else{var pe="domain"===fe;"x"===te?(J=t[te],K=pe?ae._offset+ae._length*J:K=T.l+T.w*J):(J=1-t[te],K=pe?ae._offset+ae._length*J:K=T.t+T.h*J),Q=t.showarrow?.5:J}if(t.showarrow){de.head=K;var me=t["a"+te];if(ee=oe*Y(.5,t.xanchor)-le*Y(.5,t.yanchor),ne===re){var ge=s.getRefType(ne);"domain"===ge?("y"===te&&(me=1-me),de.tail=ae._offset+ae._length*me):"paper"===ge?"y"===te?(me=1-me,de.tail=T.t+T.h*me):de.tail=T.l+T.w*me:de.tail=ae._offset+ae.r2p(me),X=ee}else de.tail=K+me,X=ee+me;de.text=de.tail+ee;var ve=w["x"===te?"width":"height"];if("paper"===re&&(de.head=o.constrain(de.head,1,ve-1)),"pixel"===ne){var ye=-Math.max(de.tail-3,de.text),xe=Math.min(de.tail+3,de.text)-ve;ye>0?(de.tail+=ye,de.text+=ye):xe>0&&(de.tail-=xe,de.text-=xe)}de.tail+=ue,de.head+=ue}else X=ee=se*Y(Q,ce),de.text=K+ee;de.text+=ue,ee+=ue,X+=ue,t["_"+te+"padplus"]=se/2+X,t["_"+te+"padminus"]=se/2-X,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(G)N.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(M-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(R-_)*("middle"===t.valign?.5:1)),d)n.select("svg").attr({x:z+be-1,y:z+_e}).call(u.setClipUrl,j?C:null,e);else{var we=z+_e-m.top,Te=z+be-m.left;V.call(f.positionText,Te,we).call(u.setClipUrl,j?C:null,e)}H.select("rect").call(u.setRect,z,z,M,R),$.call(u.setRect,F/2,F/2,B-F,U-F),N.call(u.setTranslate,Math.round(L.x.text-B/2),Math.round(L.y.text-U/2)),I.attr({transform:"rotate("+O+","+L.x.text+","+L.y.text+")"});var Ae,Me=function(r,n){D.selectAll(".annotation-arrow-g").remove();var s=L.x.head,d=L.y.head,f=L.x.tail+r,h=L.y.tail+n,m=L.x.text+r,b=L.y.text+n,_=o.rotationXYMatrix(O,m,b),w=o.apply2DTransform(_),M=o.apply2DTransform2(_),C=+$.attr("width"),P=+$.attr("height"),R=m-.5*C,F=R+C,B=b-.5*P,z=B+P,j=[[R,B,R,z],[R,z,F,z],[F,z,F,B],[F,B,R,B]].map(M);if(!j.reduce((function(e,t){return e^!!o.segmentsIntersect(s,d,s+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){j.forEach((function(e){var t=o.segmentsIntersect(f,h,s,d,e[0],e[1],e[2],e[3]);t&&(f=t.x,h=t.y)}));var H=t.arrowwidth,U=t.arrowcolor,Y=t.arrowside,V=D.append("g").style({opacity:c.opacity(U)}).classed("annotation-arrow-g",!0),Z=V.append("path").attr("d","M"+f+","+h+"L"+s+","+d).style("stroke-width",H+"px").call(c.stroke,c.rgb(U));if(g(Z,Y,t),A.annotationPosition&&Z.node().parentNode&&!i){var G=s,W=d;if(t.standoff){var q=Math.sqrt(Math.pow(s-f,2)+Math.pow(d-h,2));G+=t.standoff*(f-s)/q,W+=t.standoff*(h-d)/q}var K,X,J=V.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-G)+","+(h-W),transform:l(G,W)}).style("stroke-width",H+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:e,prepFn:function(){var e=u.getTranslate(N);K=e.x,X=e.y,v&&v.autorange&&k(v._name+".autorange",!0),x&&x.autorange&&k(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(K,X),a=n[0]+e,i=n[1]+r;N.call(u.setTranslate,a,i),S("x",y(v,e,"x",T,t)),S("y",y(x,r,"y",T,t)),t.axref===t.xref&&S("ax",y(v,e,"ax",T,t)),t.ayref===t.yref&&S("ay",y(x,r,"ay",T,t)),V.attr("transform",l(e,r)),I.attr({transform:"rotate("+O+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&Me(0,0),P&&p.init({element:N.node(),gd:e,prepFn:function(){Ae=I.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(v,e,"ax",T,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,r,"ay",T.w,t)):S("ay",t.ay+r),Me(e,r);else{if(i)return;var a,o;if(v)a=y(v,e,"x",T,t);else{var s=t._xsize/T.w,c=t.x+(t._xshift-t.xshift)/T.w-s/2;a=p.align(c+e/T.w,s,0,1,t.xanchor)}if(x)o=y(x,r,"y",T,t);else{var u=t._ysize/T.h,d=t.y-(t._yshift+t.yshift)/T.h-u/2;o=p.align(d-r/T.h,u,0,1,t.yanchor)}S("x",a),S("y",o),v&&x||(n=p.getCursor(v?.5:a,x?.5:o,t.xanchor,t.yanchor))}I.attr({transform:l(e,r)+Ae}),h(N,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",Z(n))},doneFn:function(){h(N),a.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}e.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=t.indexOf("end")>=0,b=p.backoff*g+r.standoff,_=m.backoff*v+r.startstandoff;if("line"===h.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=o.x-u.x,T=o.y-u.y;if(f=(d=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void P();if(b){if(b*b>w*w+T*T)return void P();var A=b*Math.cos(d),M=b*Math.sin(d);u.x+=A,u.y+=M,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void P();var k=_*Math.cos(d),S=_*Math.sin(d);o.x-=k,o.y-=S,e.attr({x1:o.x,y1:o.y})}}else if("path"===h.nodeName){var E=h.getTotalLength(),C="";if(E1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+l+'"]').remove():(s._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(s.x)*r[0],t.yaxis.r2l(s.y)*r[1],t.zaxis.r2l(s.z)*r[2]]),n(e.graphDiv,s,l,e.id,s._xa,s._ya))}}},3348:function(e,t,r){"use strict";var n=r(3626),a=r(4809);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(8239)}}},layoutAttributes:r(8239),handleDefaults:r(4232),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,o=Object.keys(e),l=0;l=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var l=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+l+", "+n[3]+")":"rgb("+l+")"}o.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},o.rgb=function(e){return o.tinyRGB(n(e))},o.opacity=function(e){return e?n(e).getAlpha():0},o.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},o.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var a=n(t||c).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(e,t,r){var a=n(e).toRgb(),i=n(t).toRgb(),o={r:r*a.r+(1-r)*i.r,g:r*a.g+(1-r)*i.g,b:r*a.b+(1-r)*i.b};return n(o).toRgbString()},o.contrast=function(e,t,r){var a=n(e);return 1!==a.getAlpha()&&(a=n(o.combine(e,c))),(a.isDark()?t?a.lighten(t):c:r?a.darken(r):s).toString()},o.stroke=function(e,t){var r=n(t);e.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(e,t){var r=n(t);e.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(e){if(e&&"object"==typeof e){var t,r,n,a,l=Object.keys(e);for(t=0;t0?n>=s:n<=s));a++)n>u&&n0?n>=s:n<=s));a++)n>r[0]&&n1){var he=Math.pow(10,Math.floor(Math.log(fe)/Math.LN10));ue*=he*c.roundUp(fe/he,[2,5,10]),(Math.abs(Z.start)/Z.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=ue}se.domain=o?[oe+D/B.h,oe+Q-D/B.h]:[oe+O/B.w,oe+Q-O/B.w],se.setScale(),e.attr("transform",u(Math.round(B.l),Math.round(B.t)));var pe,me=e.select("."+M.cbtitleunshift).attr("transform",u(-Math.round(B.l),-Math.round(B.t))),ge=se.ticklabelposition,ve=se.title.font.size,ye=e.select("."+M.cbaxis),xe=0,be=0;function _e(n,a){var i={propContainer:se,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:F._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(r,n,d(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){var e,t;(o&&ce||!o&&!ce)&&("top"===H&&(e=O+B.l+ee*I,t=D+B.t+te*(1-oe-Q)+3+.75*ve),"bottom"===H&&(e=O+B.l+ee*I,t=D+B.t+te*(1-oe)-3-.25*ve),"right"===H&&(t=D+B.t+te*P+3+.75*ve,e=O+B.l+ee*oe),_e(se._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ce||o&&ce){var i,s=e.select("."+M.cbtitle),d=s.select("text"),f=[-k/2,k/2],p=s.select(".h"+se._id+"title-math-group").node(),m=15.6;if(d.node()&&(m=parseInt(d.node().style.fontSize,10)*w),p?(i=h.bBox(p),be=i.width,(xe=i.height)>m&&(f[1]-=(xe-m)/2)):d.node()&&!d.classed(M.jsPlaceholder)&&(i=h.bBox(d.node()),be=i.width,xe=i.height),o){if(xe){if(xe+=5,"top"===H)se.domain[1]-=xe/B.h,f[1]*=-1;else{se.domain[0]+=xe/B.h;var v=g.lineCount(d);f[1]+=(1-v)*m}s.attr("transform",u(f[0],f[1])),se.setScale()}}else be&&("right"===H&&(se.domain[0]+=(be+ve/2)/B.w),s.attr("transform",u(f[0],f[1])),se.setScale())}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",o?u(0,Math.round(B.h*(1-se.domain[1]))):u(Math.round(B.w*se.domain[0]),0)),ye.attr("transform",o?u(0,Math.round(-B.t)):u(Math.round(-B.l),0));var y=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(W);y.enter().append("rect").classed(M.cbfill,!0).attr("style",""),y.exit().remove();var x=U.map(se.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,i){var l=[0===i?U[0]:(W[i]+W[i-1])/2,i===W.length-1?U[1]:(W[i]+W[i+1])/2].map(se.c2p).map(Math.round);o&&(l[1]=c.constrain(l[1]+(l[1]>l[0])?1:-1,x[0],x[1]));var s=n.select(this).attr(o?"x":"y",re).attr(o?"y":"x",n.min(l)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(n.max(l)-n.min(l),2));if(t._fillgradient)h.gradient(s,r,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=V(e).replace("e-","");s.attr("fill",a(u).toHexString())}}));var b=e.select("."+M.cblines).selectAll("path."+M.cbline).data($.color&&$.width?q:[]);b.enter().append("path").classed(M.cbline,!0),b.exit().remove(),b.each((function(e){var t=re,r=Math.round(se.c2p(e))+$.width/2%1;n.select(this).attr("d","M"+(o?t+","+r:r+","+t)+(o?"h":"v")+K).call(h.lineGroupStyle,$.width,Y(e),$.dash)})),ye.selectAll("g."+se._id+"tick,path").remove();var _=re+K+(k||0)/2-("outside"===t.ticks?1:0),T=l.calcTicks(se),A=l.getTickSigns(se)[2];return l.drawTicks(r,se,{vals:"inside"===se.ticks?l.clipEnds(se,T):T,layer:ye,path:l.makeTickPath(se,_,A),transFn:l.makeTransTickFn(se)}),l.drawLabels(r,se,{vals:T,layer:ye,transFn:l.makeTransTickLabelFn(se),labelFns:l.makeLabelFns(se,_)})},function(){if(o&&!ce||!o&&ce){var e,a,i=se.position||0,l=se._offset+se._length/2;if("right"===H)a=l,e=B.l+ee*i+10+ve*(se.showticklabels?1:.5);else if(e=l,"bottom"===H&&(a=B.t+te*i+10+(-1===ge.indexOf("inside")?se.tickfont.size:0)+("intside"!==se.ticks&&t.ticklen||0)),"top"===H){var s=j.text.split("
").length;a=B.t+te*i+10-K-w*ve*s}_e((o?"h":"v")+se._id+"title",{avoid:{selection:n.select(r).selectAll("g."+se._id+"tick"),side:H,offsetTop:o?0:B.t,offsetLeft:o?B.l:0,maxShift:o?F.width:F.height},attributes:{x:e,y:a,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var n,l=K+k/2;-1===ge.indexOf("inside")&&(n=h.bBox(ye.node()),l+=o?n.width:n.height),pe=me.select("text");var c=0,d=o&&"top"===H,m=!o&&"right"===H,g=0;if(pe.node()&&!pe.classed(M.jsPlaceholder)){var y,x=me.select(".h"+se._id+"title-math-group").node();x&&(o&&ce||!o&&!ce)?(c=(n=h.bBox(x)).width,y=n.height):(c=(n=h.bBox(me.node())).right-B.l-(o?re:le),y=n.bottom-B.t-(o?le:re),o||"top"!==H||(l+=n.height,g=n.height)),m&&(pe.attr("transform",u(c/2+ve/2,0)),c*=2),l=Math.max(l,o?c:y)}var b=2*(o?O:D)+l+S+k/2,w=0;!o&&j.text&&"bottom"===L&&P<=0&&(b+=w=b/2,g+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=g;var z=S+k,$=(o?re:le)-z/2-(o?O:0),U=(o?le:re)-(o?J:D+g-w);e.select("."+M.cbbg).attr("x",$).attr("y",U).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(J+z,2)).call(p.fill,E).call(p.stroke,t.bordercolor).style("stroke-width",S);var Y=m?Math.max(c-10,0):0;e.selectAll("."+M.cboutline).attr("x",(o?re:le+O)+Y).attr("y",(o?le+D-J:re)+(d?xe:0)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(J-(o?2*D+xe:2*O+Y),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":k});var V=o?ne*b:0,Z=o?0:(1-ae)*b-g;if(V=N?B.l-V:-V,Z=R?B.t-Z:-Z,e.attr("transform",u(V,Z)),!o&&(S||a(E).getAlpha()&&!a.equals(F.paper_bgcolor,E))){var G=ye.selectAll("text"),W=G[0].length,q=e.select("."+M.cbbg).node(),X=h.bBox(q),Q=h.getTranslate(e);G.each((function(e,t){var r=W-1;if(0===t||t===r){var n,a=h.bBox(this),i=h.getTranslate(this);if(t===r){var o=a.right+i.x;(n=X.right+Q.x+le-S-2+I-o)>0&&(n=0)}else if(0===t){var l=a.left+i.x;(n=X.left+Q.x+le+S+2-l)<0&&(n=0)}n&&(W<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var ee={},te=T[C],ie=A[C],oe=T[L],ue=A[L],de=b-K;o?("pixels"===f?(ee.y=P,ee.t=J*oe,ee.b=J*ue):(ee.t=ee.b=0,ee.yt=P+s*oe,ee.yb=P-s*ue),"pixels"===_?(ee.x=I,ee.l=b*te,ee.r=b*ie):(ee.l=de*te,ee.r=de*ie,ee.xl=I-v*te,ee.xr=I+v*ie)):("pixels"===f?(ee.x=I,ee.l=J*te,ee.r=J*ie):(ee.l=ee.r=0,ee.xl=I+s*te,ee.xr=I-s*ie),"pixels"===_?(ee.y=1-P,ee.t=b*oe,ee.b=b*ue):(ee.t=de*oe,ee.b=de*ue,ee.yt=P-v*oe,ee.yb=P+v*ue));var fe=t.y<.5?"b":"t",he=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var be={r:F.width-$-V,l:$+ee.r,b:F.height-U-Z,t:U+ee.b};N&&R?i.autoMargin(r,t._id,ee):N?r._fullLayout._reservedMargin[t._id][fe]=be[fe]:R||o?r._fullLayout._reservedMargin[t._id][he]=be[he]:r._fullLayout._reservedMargin[t._id][fe]=be[fe]}],r)}(r,t,e);v&&v.then&&(e._promises||[]).push(v),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,l="v"===t.orientation,c=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),f(e)},moveFn:function(r,o){e.attr("transform",n+u(r,o)),a=s.align((l?t._uFrac:t._vFrac)+r/c.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),i=s.align((l?t._vFrac:1-t._uFrac)-o/c.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var d=s.getCursor(a,i,t.xanchor,t.yanchor);f(e,d)},doneFn:function(){if(f(e),void 0!==a&&void 0!==i){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},1362:function(e,t,r){"use strict";var n=r(4809);e.exports=function(e){return n.isPlainObject(e.colorbar)}},6919:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:r(5158),supplyDefaults:r(2097),draw:r(5881).draw,hasColorbar:r(1362)}},7163:function(e,t,r){"use strict";var n=r(5158),a=r(694).counter,i=r(2994),o=r(9017).scales;function l(e){return"`"+e+"`"}i(o),e.exports=function(e,t){e=e||"";var r,i=(t=t||{}).cLetter||"c",s=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===i,u="string"==typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,d=t.editTypeOverride||"",f=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):l(f+(r={z:"z",c:"color"}[i]));var h=i+"auto",p=i+"min",m=i+"max",g=i+"mid",v=(l(f+h),l(f+p),l(f+m),{});v[p]=v[m]=void 0;var y={};y[h]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:d||"style"},t.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},x[p]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},8379:function(e,t,r){"use strict";var n=r(721),a=r(4809),i=r(5477).extractOpts;e.exports=function(e,t,r){var o,l=e._fullLayout,s=r.vals,c=r.containerStr,u=c?a.nestedProperty(t,c).get():t,d=i(u),f=!1!==d.auto,h=d.min,p=d.max,m=d.mid,g=function(){return a.aggNums(Math.min,null,s)},v=function(){return a.aggNums(Math.max,null,s)};void 0===h?h=g():f&&(h=u._colorAx&&n(h)?Math.min(h,g()):g()),void 0===p?p=v():f&&(p=u._colorAx&&n(p)?Math.max(p,v()):v()),f&&void 0!==m&&(p-m>m-h?h=m-(p-m):p-m=0?l.colorscale.sequential:l.colorscale.sequentialminus,d._sync("colorscale",o))}},7623:function(e,t,r){"use strict";var n=r(4809),a=r(5477).hasColorscale,i=r(5477).extractOpts;e.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,a){var o=a.container?n.nestedProperty(e,a.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var l=i(o),s=l.auto;(s||void 0===l.min)&&r(o,a.min),(s||void 0===l.max)&&r(o,a.max),l.autocolorscale&&r(o,"colorscale")}}for(var l=0;l=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,o=e.range,s=o.length,c=new Array(s),u=0;u4/3-l?o:l}},4001:function(e,t,r){"use strict";var n=r(4809),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,r,i){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*t),0,2),a[t][e]}},414:function(e,t){"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},4751:function(e,t,r){"use strict";var n=r(4039),a=r(9784),i=r(4043),o=r(4809).removeElement,l=r(4826),s=e.exports={};s.align=r(3770),s.getCursor=r(4001);var c=r(148);function u(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function d(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=c.wrapped,s.unhoverRaw=c.raw,s.init=function(e){var t,r,n,c,f,h,p,m,g=e.gd,v=1,y=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)y&&(v=Math.max(v-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(v,h),!m){var r;try{r=new MouseEvent("click",t)}catch(e){var n=d(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},s.coverSlip=u},148:function(e,t,r){"use strict";var n=r(8596),a=r(4025),i=r(5425).getGraphDiv,o=r(5988),l=e.exports={};l.wrapped=function(e,t,r){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),l.raw(e,t,r)},l.raw=function(e,t){var r=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},4850:function(e,t){"use strict";t.T={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},t.k={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},2203:function(e,t,r){"use strict";var n=r(5568),a=r(4809),i=a.numberFormat,o=r(721),l=r(5657),s=r(3626),c=r(8766),u=r(8856),d=a.strTranslate,f=r(635),h=r(2972),p=r(4530).LINE_SPACING,m=r(438).DESELECTDIM,g=r(4726),v=r(2527),y=r(6040).appendArrayPointValue,x=e.exports={};function b(e){return"none"===e?void 0:e}x.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,l=t.family,s=t.shadow,u=t.lineposition,d=t.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(c.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),d&&e.style("text-transform",b(function(e){return _[e]}(d))),s&&e.style("text-shadow","auto"===s?f.makeTextShadow(c.contrast(i)):b(s)),u&&e.style("text-decoration-line",b(function(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(u)))};var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function w(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=a&&x.getPatternAttr(a.shape,0,"");if(o){var l=x.getPatternAttr(a.bgcolor,0,null),s=x.getPatternAttr(a.fgcolor,0,null),u=a.fgopacity,d=x.getPatternAttr(a.size,0,8),f=x.getPatternAttr(a.solidity,0,.3),h=t.uid;x.pattern(e,"point",r,h,o,d,f,void 0,a.fillmode,l,s,u)}else if(i&&"none"!==i.type){var p,m,g=i.type,v="scatterfill-"+t.uid;n&&(v="legendfill-"+t.uid),n||void 0===i.start&&void 0===i.stop?("horizontal"===g&&(g+="reversed"),e.call(x.gradient,r,v,g,i.colorscale,"fill")):("horizontal"===g?(p={x:i.start,y:0},m={x:i.stop,y:0}):"vertical"===g&&(p={x:0,y:i.start},m={x:0,y:i.stop}),p.x=t._xA.c2p(void 0===p.x?t._extremes.x.min[0].val:p.x,!0),p.y=t._yA.c2p(void 0===p.y?t._extremes.y.min[0].val:p.y,!0),m.x=t._xA.c2p(void 0===m.x?t._extremes.x.max[0].val:m.x,!0),m.y=t._yA.c2p(void 0===m.y?t._extremes.y.max[0].val:m.y,!0),e.call(E,r,v,"linear",i.colorscale,"fill",p,m,!0,!1))}else t.fillcolor&&e.call(c.fill,t.fillcolor)}x.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},x.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},x.setRect=function(e,t,r,n,a){e.call(x.setPosition,t,r).call(x.setSize,n,a)},x.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);return!!(o(a)&&o(i)&&t.node())&&("text"===t.node().nodeName?t.attr("x",a).attr("y",i):t.attr("transform",d(a,i)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var a=n.select(this);x.translatePoint(e,a,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,o=i.xcalendar,l=i.ycalendar,c=s.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,a,o,l)}))}))}},x.crispRound=function(e,t,r){return t&&o(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},x.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";c.stroke(t,n||i.color),x.dashLine(t,l,o)},x.lineGroupStyle=function(e,t,r,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";n.select(this).call(c.stroke,r||i.color).call(x.dashLine,l,o)}))},x.dashLine=function(e,t,r){r=+r||0,t=x.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},x.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},x.singleFillStyle=function(e,t){var r=n.select(e.node());w(e,((r.data()[0]||[])[0]||{}).trace||{},t,!1)},x.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each((function(e){var a=n.select(this);e[0].trace&&w(a,e[0].trace,t,r)}))};var T=r(8882);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(T).forEach((function(e){var t=T[e],r=t.n;x.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),x.symbolNames[r]=e,x.symbolFuncs[r]=t.f,x.symbolBackOffs[r]=t.backoff||0,t.needLine&&(x.symbolNeedLines[r]=!0),t.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[r]=!0)}));var A=x.symbolNames.length;function M(e,t,r,n){var a=e%100;return x.symbolFuncs[a](t,r,n)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(o(e))e=+e;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=A||e>=400?0:Math.floor(Math.max(e,0))};var k=i("~f"),S={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function E(e,t,r,i,o,s,u,d,f,h){var p,m=o.length;"linear"===i?p={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:d.x,y2:d.y,gradientUnits:f?"userSpaceOnUse":"objectBoundingBox"},reversed:h}:"radial"===i&&(p={node:"radialGradient",reversed:h});for(var g=new Array(m),v=0;v=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?l.opacity:e.mo),n.ms2mrc){var u;u="various"===e.ms||"various"===l.size?3:n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var d=x.symbolNumber(e.mx||l.symbol)||0;e.om=d%200>=100;var f=ne(e,r),h=Z(e,r);t.attr("d",M(d,u,f,h))}var p,m,g,v=!1;if(e.so)g=s.outlierwidth,m=s.outliercolor,p=l.outliercolor;else{var y=(s||{}).width;g=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in e?e.mlcc=n.lineScale(e.mlc):a.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,a.isArrayOrTypedArray(l.color)&&(p=c.defaultLine,v=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):l.color||l.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(c.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=l.gradient,_=e.mgt;_?v=!0:_=b&&b.type,a.isArrayOrTypedArray(_)&&(_=_[0],S[_]||(_=0));var w=l.pattern,T=w&&x.getPatternAttr(w.shape,e.i,"");if(_&&"none"!==_){var A=e.mgc;A?v=!0:A=b.color;var k=r.uid;v&&(k+="-"+e.i),x.gradient(t,i,k,_,[[0,A],[1,p]],"fill")}else if(T){var E=!1,C=w.fgcolor;!C&&o&&o.color&&(C=o.color,E=!0);var L=x.getPatternAttr(C,e.i,o&&o.color||null),O=x.getPatternAttr(w.bgcolor,e.i,null),D=w.fgopacity,I=x.getPatternAttr(w.size,e.i,8),P=x.getPatternAttr(w.solidity,e.i,.3);E=E||e.mcc||a.isArrayOrTypedArray(w.shape)||a.isArrayOrTypedArray(w.bgcolor)||a.isArrayOrTypedArray(w.fgcolor)||a.isArrayOrTypedArray(w.size)||a.isArrayOrTypedArray(w.solidity);var R=r.uid;E&&(R+="-"+e.i),x.pattern(t,"point",i,R,T,I,P,e.mcc,w.fillmode,O,L,D)}else a.isArrayOrTypedArray(p)?c.fill(t,p[e.i]):c.fill(t,p);g&&c.stroke(t,m)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=g.isBubble(e)?v(e):function(){return(r.size||6)/2}),e.selectedpoints&&a.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},o=r.marker||{},l=n.marker||{},c=i.opacity,u=o.opacity,d=l.opacity,f=void 0!==u,h=void 0!==d;(a.isArrayOrTypedArray(c)||f||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?f?u:t:h?d:m*t});var p=i.color,g=o.color,v=l.color;(g||v)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?g||t:v||t});var y=i.size,x=o.size,b=l.size,_=void 0!==x,w=void 0!==b;return s.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?_?x/2:t:w?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,s=i.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?s||t:u||(s?t:c.addOpacity(t,m))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];r.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&i.push((function(e,t){c.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&i.push((function(e,n){var i=n.mx||a.symbol||0,o=r.selectedSizeFn(n);e.attr("d",M(x.symbolNumber(i),o,ne(n,t),Z(n,t))),n.mrc2=o})),i.length&&e.each((function(e){for(var t=n.select(this),r=0;r0?r:0}function P(e,t,r){return r&&(e=$(e)),t?N(e[1]):R(e[0])}function R(e){var t=n.round(e,2);return C=t,t}function N(e){var t=n.round(e,2);return L=t,t}function F(e,t,r,n){var a=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],l=r[1]-t[1],s=Math.pow(a*a+i*i,.25),c=Math.pow(o*o+l*l,.25),u=(c*c*a-s*s*o)*n,d=(c*c*i-s*s*l)*n,f=3*c*(s+c),h=3*s*(s+c);return[[R(t[0]+(f&&u/f)),N(t[1]+(f&&d/f))],[R(t[0]-(h&&u/h)),N(t[1]-(h&&d/h))]]}x.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);i=o.selectedTextColorFn}var l=t.texttemplate,s=r._fullLayout;e.each((function(e){var o=n.select(this),c=l?a.extractOption(e,t,"txt","texttemplate"):a.extractOption(e,t,"tx","text");if(c||0===c){if(l){var u=t._module.formatLabels,d=u?u(e,t,s):{},h={};y(h,t,e.i);var p=t._meta||{};c=a.texttemplateString(c,d,s._d3locale,h,e,p)}var m=e.tp||t.textposition,g=I(e,t),v=i?i(e):e.tc||t.textfont.color;o.call(x.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:g,color:v}).text(c).call(f.convertToTspans,r).call(D,m,g,e.mrc)}else o.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedTextStyleFns(t);e.each((function(e){var a=n.select(this),i=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=I(e,t);c.fill(a,i);var u=s.traceIs(t,"bar-like");D(a,o,l,e.mrc2||e.mrc,u)}))}},x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r=c||w>=d&&w<=c)&&(T<=f&&T>=u||T>=f&&T<=u)&&(e=[w,T])}return e}x.steps=function(e){var t=B[e]||z;return function(e){for(var r="M"+R(e[0][0])+","+N(e[0][1]),n=e.length,a=1;a=1e4&&(x.savedBBoxes={},j=0),r&&(x.savedBBoxes[r]=g),j++,a.extendFlat({},g)},x.setClipUrl=function(e,t,r){e.attr("clip-path",U(t,r))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=d(t,r)).trim(),e[a]("transform",i),i},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+="scale("+t+","+r+")").trim(),e[a]("transform",i),i};var Y=/\s*sc.*/;x.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(Y,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var V=/translate\([^)]*\)\s*$/;function Z(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(V);e=1===t&&1===r?[]:[d(o,l),"scale("+t+","+r+")",d(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}}))},x.getMarkerStandoff=Z;var G,W,q,K,X,J,Q=Math.atan2,ee=Math.cos,te=Math.sin;function re(e,t){var r=t[0],n=t[1];return[r*ee(e)-n*te(e),r*te(e)+n*ee(e)]}function ne(e,t){var r,n,i=e.ma;void 0===i&&((i=t.marker.angle)&&!a.isArrayOrTypedArray(i)||(i=0));var l=t.marker.angleref;if("previous"===l||"north"===l){if(t._geo){var s=t._geo.project(e.lonlat);r=s[0],n=s[1]}else{var c=t._xA,u=t._yA;if(!c||!u)return 90;r=c.c2p(e.x),n=u.c2p(e.y)}if(t._geo){var d,f=e.lonlat[0],h=e.lonlat[1],p=t._geo.project([f,h+1e-5]),m=t._geo.project([f+1e-5,h]),g=Q(m[1]-n,m[0]-r),v=Q(p[1]-n,p[0]-r);if("north"===l)d=i/180*Math.PI;else if("previous"===l){var y=f/180*Math.PI,x=h/180*Math.PI,b=G/180*Math.PI,_=W/180*Math.PI,w=b-y,T=ee(_)*te(w),A=te(_)*ee(x)-ee(_)*te(x)*ee(w);d=-Q(T,A)-Math.PI,G=f,W=h}var M=re(g,[ee(d),0]),k=re(v,[te(d),0]);i=Q(M[1]+k[1],M[0]+k[0])/Math.PI*180,"previous"!==l||J===t.uid&&e.i===X+1||(i=null)}if("previous"===l&&!t._geo)if(J===t.uid&&e.i===X+1&&o(r)&&o(n)){var S=r-q,E=n-K,C=t.line&&t.line.shape||"",L=C.slice(C.length-1);"h"===L&&(E=0),"v"===L&&(S=0),i+=Q(E,S)/Math.PI*180+90}else i=null}return q=r,K=n,X=e.i,J=t.uid,i}x.getMarkerAngle=ne},8882:function(e,t,r){"use strict";var n,a,i,o,l=r(6953),s=r(5568).round,c="M0,0Z",u=Math.sqrt(2),d=Math.sqrt(3),f=Math.PI,h=Math.cos,p=Math.sin;function m(e){return null===e}function g(e,t,r){if(!(e&&e%360!=0||t))return r;if(i===e&&o===t&&n===r)return a;function s(e,r){var n=h(e),a=p(e),i=r[0],o=r[1]+(t||0);return[i*n-o*a,i*a+o*n]}i=e,o=t,n=r;for(var c=e/180*f,u=0,d=0,m=l(r),g="",v=0;v0,d=e._context.staticPlot;t.each((function(t){var f,h=t[0].trace,p=h.error_x||{},m=h.error_y||{};h.ids&&(f=function(e){return e.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;m.visible||p.visible||(t=[]);var v=n.select(this).selectAll("g.errorbar").data(t,f);if(v.exit().remove(),t.length){p.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var y=v.enter().append("g").classed("errorbar",!0);u&&y.style("opacity",0).transition().duration(l.duration).style("opacity",1),i.setClipUrl(v,r.layerClipId,e),v.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),a(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}(e,s,c);if(!g||e.vis){var i,o=t.select("path.yerror");if(m.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var f=m.width;i="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(i+="m-"+f+",0h"+2*f),o.size()?u&&(o=o.transition().duration(l.duration).ease(l.easing)):o=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var h=t.select("path.xerror");if(p.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var v=(p.copy_ystyle?m:p).width;i="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(i+="m0,-"+v+"v"+2*v),h.size()?u&&(h=h.transition().duration(l.duration).ease(l.easing)):h=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0),h.attr("d",i)}else h.remove()}}))}}))}},2800:function(e,t,r){"use strict";var n=r(5568),a=r(8766);e.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},i=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},192:function(e,t,r){"use strict";var n=r(337),a=r(6811).hoverlabel,i=r(3049).extendFlat;e.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},3552:function(e,t,r){"use strict";var n=r(4809),a=r(3626);function i(e,t,r,a){a=a||n.identity,Array.isArray(e)&&(t[0][r]=a(e))}e.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var l=0;l=0&&r.indexK[0]._length||_e<0||_e>X[0]._length)return m.unhoverRaw(e,t)}else be="xpx"in t?t.xpx:K[0]._length/2,_e="ypx"in t?t.ypx:X[0]._length/2;if(t.pointerX=be+K[0]._offset,t.pointerY=_e+X[0]._offset,ne="xval"in t?x.flat(b,t.xval):x.p2c(K,be),ae="yval"in t?x.flat(b,t.yval):x.p2c(X,_e),!a(ne[0])||!a(ae[0]))return o.warn("Fx.hover failed",t,e),m.unhoverRaw(e,t)}var Me=1/0;function ke(r,n){for(oe=0;oeme&&(ge.splice(0,me),Me=ge[0].distance),k&&0!==re&&0===ge.length){pe.distance=re,pe.index=!1;var u=se._module.hoverPoints(pe,fe,he,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter((function(e){return e.spikeDistance<=re}))),u&&u.length){var d,f=u.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(f.length){var h=f[0];a(h.x0)&&a(h.y0)&&(d=Ee(h),(!ye.vLinePoint||ye.vLinePoint.spikeDistance>d.spikeDistance)&&(ye.vLinePoint=d))}var m=u.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(m.length){var g=m[0];a(g.x0)&&a(g.y0)&&(d=Ee(g),(!ye.hLinePoint||ye.hLinePoint.spikeDistance>d.spikeDistance)&&(ye.hLinePoint=d))}}}}}function Se(e,t,r){for(var n,a=null,i=1/0,o=0;o0&&Math.abs(e.distance)ze-1;$e--)Ye(ge[$e]);ge=je,De()}var Ve=e._hoverdata,Ze=[],Ge=Y(e),We=V(e);for(ie=0;ie1||ge.length>1)||"closest"===S&&xe&&ge.length>1,lt=p.combine(_.plot_bgcolor||p.background,_.paper_bgcolor),st=R(ge,{gd:e,hovermode:S,rotateLabels:ot,bgColor:lt,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),ct=st.hoverLabels;if(x.isUnifiedHover(S)||(function(e,t,r,n){var a,i,o,l,s,c,u,d=t?"xa":"ya",f=t?"ya":"xa",h=0,p=1,m=e.size(),g=new Array(m),v=0,y=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(e){return e*r._invScaleX},T=function(e){return e*r._invScaleY};function A(e){var t=e[0],r=e[e.length-1];if(i=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,i>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=i;a=!1}if(!(o<.01)){if(i<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=o;a=!1}if(a){var n=0;for(l=0;lt.pmax&&n++;for(l=e.length-1;l>=0&&!(n<=0);l--)(c=e[l]).pos>t.pmax-1&&(c.del=!0,n--);for(l=0;l=0;s--)e[s].dp-=o;for(l=e.length-1;l>=0&&!(n<=0);l--)(c=e[l]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}for(e.each((function(e){var n=e[d],a=e[f],i="x"===n._id.charAt(0),o=n.range;0===v&&o&&o[0]>o[1]!==i&&(p=-1);var l=0,s=i?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,h=F(e,t),m=e.anchor,A="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(i?T(h.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(i?T(e.by):w(e.bx));else if(i)u=(c=e.crossPos+T(E+h.y)-T(e.by/2-E))+T(e.by);else{var k=w(A*E+h.x),S=k+w(A*e.bx);c=e.crossPos+Math.min(k,S),u=e.crossPos+Math.max(k,S)}i?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===a.side?(l=a._mainLinePosition,s=r.width):s=a._mainLinePosition):void 0!==y&&void 0!==x&&Math.min(u,x)-Math.max(c,y)>1&&("top"===a.side?(l=a._mainLinePosition,s=r.height):s=a._mainLinePosition)}g[v++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(i?M:1)/2,pmin:l,pmax:s}]})),g.sort((function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)}));!a&&h<=m;){for(h++,a=!0,l=0;l.01){for(s=S.length-1;s>=0;s--)S[s].dp+=i;for(k.push.apply(k,S),g.splice(l+1,1),u=0,s=k.length-1;s>=0;s--)u+=k[s].dp;for(o=u/k.length,s=k.length-1;s>=0;s--)k[s].dp-=o;a=!1}else l++}g.forEach(A)}for(l=g.length-1;l>=0;l--){var O=g[l];for(s=O.length-1;s>=0;s--){var D=O[s],I=D.datum;I.offset=D.dp,I.del=D.del}}}(ct,ot,_,st.commonLabelBoundingBox),B(ct,ot,_._invScaleX,_._invScaleY)),s&&s.tagName){var ut=y.getComponentMethod("annotations","hasClickToShow")(e,Ze);f(n.select(s),ut?"pointer":"")}s&&!i&&function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,Ve)&&(Ve&&e.emit("plotly_unhover",{event:t,points:Ve}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:K,yaxes:X,xvals:ne,yvals:ae}))}(e,t,r,i,s)}))},t.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var a=t.gd,i=Y(a),o=V(a),l=R(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,l=e._y0||e.y0||e.y||0,s=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(r,n),d=Math.max(r,n),f=Math.min(l,s),h=Math.max(l,s),m=e.trace;if(y.traceIs(m,"gl3d")){var g=a._fullLayout[m.scene]._scene.container,v=g.offsetLeft,x=g.offsetTop;u+=v,d+=v,f+=x,h+=x}c.bbox={x0:u+o,x1:d+o,y0:f+i,y1:h+i},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||p.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:a,hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||p.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,s=0,c=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function R(e,t){var r=t.gd,a=r._fullLayout,i=t.hovermode,l=t.rotateLabels,u=t.bgColor,f=t.container,m=t.outerContainer,g=t.commonLabelOpts||{};if(0===e.length)return[[]];var v=t.fontFamily||b.HOVERFONT,A=t.fontSize||b.HOVERFONTSIZE,M=t.fontWeight||a.font.weight,k=t.fontStyle||a.font.style,S=t.fontVariant||a.font.variant,L=t.fontTextcase||a.font.textcase,O=t.fontLineposition||a.font.lineposition,D=t.fontShadow||a.font.shadow,P=e[0],R=P.xa,F=P.ya,B=i.charAt(0),z=B+"Label",$=P[z];if(void 0===$&&"multicategory"===R.type)for(var j=0;ja.width-T&&(I=a.width-T),t.attr("d","M"+(x-I)+",0L"+(x-I+E)+","+w+E+"H"+T+"v"+w+(2*C+_.height)+"H"+-T+"V"+w+E+"H"+(x-I-E)+"Z"),x=I,Q.minX=x-T,Q.maxX=x+T,"top"===R.side?(Q.minY=b-(2*C+_.height),Q.maxY=b-C):(Q.minY=b+C,Q.maxY=b+(2*C+_.height))}else{var N,B,z;"right"===F.side?(N="start",B=1,z="",x=R._offset+R._length):(N="end",B=-1,z="-",x=R._offset),b=F._offset+(P.y0+P.y1)/2,l.attr("text-anchor",N),t.attr("d","M0,0L"+z+E+","+E+"V"+(C+_.height/2)+"h"+z+(2*C+_.width)+"V-"+(C+_.height/2)+"H"+z+E+"V-"+E+"Z"),Q.minY=b-(C+_.height/2),Q.maxY=b+(C+_.height/2),"right"===F.side?(Q.minX=x+E,Q.maxX=x+E+(2*C+_.width)):(Q.minX=x-E-(2*C+_.width),Q.maxX=x-E);var j,H=_.height/2,Y=U-_.top-H,V="clip"+a._uid+"commonlabel"+F._id;if(x<_.width+2*C+E){j="M-"+(E+C)+"-"+H+"h-"+(_.width-C)+"V"+H+"h"+(_.width-C)+"Z";var G=_.width-x+C;d.positionText(l,G,Y),"end"===N&&l.selectAll("tspan").each((function(){var e=n.select(this),t=h.tester.append("text").text(e.text()).call(h.font,y),a=Z(r,t.node());Math.round(a.width)=0?pe:me+ye=0?me:ke+ye=0?fe:he+xe=0?he:Se+xe=0,"top"!==e.idealAlign&&X||!J?X?(z+=H/2,e.anchor="start"):e.anchor="middle":(z-=H/2,e.anchor="end"),e.crossPos=z;else{if(e.pos=z,X=B+j/2+Q<=Y,J=B-j/2-Q>=0,"left"!==e.idealAlign&&X||!J)if(X)B+=j/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,te=B+ee-Y,re=B-ee;te>0&&(B-=te),re<0&&(B+=-re)}else B-=j/2,e.anchor="end";e.crossPos=B}w.attr("text-anchor",e.anchor),P&&I.attr("text-anchor",e.anchor),t.attr("transform",s(B,z)+(l?c(T):""))})),{hoverLabels:Ee,commonLabelBoundingBox:Q}}function N(e,t,r,n,a,i){var l="",s="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),l=H(e.name,e.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(s+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(s+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&"choroplethmap"!==e.trace.type&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===a?s=e[u+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(s=e.yLabel):s=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(s+=(s?"
":"")+e.text),void 0!==e.extraText&&(s+=(s?"
":"")+e.extraText),i&&""===s&&!e.hovertemplate&&(""===l&&i.remove(),s=l);var d=e.hovertemplate||!1;if(d){var f=e.hovertemplateLabels||e;e[c+"Label"]!==a&&(f[c+"other"]=f[c+"Val"],f[c+"otherLabel"]=f[c+"Label"]),s=(s=o.hovertemplateString(d,f,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(P,(function(t,r){return l=H(r,e.nameLength),""}))}return[s,l]}function F(e,t){var r=0,n=e.offset;return t&&(n*=-S,r=e.offset*k),{x:r,y:n}}function B(e,t,r,a){var i=function(e){return e*r},o=function(e){return e*a};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var a,l,s,c,u=r.select("text.nums"),f=e.anchor,p="end"===f?-1:1,m=(c=(s=(l={start:1,end:-1,middle:0}[(a=e).anchor])*(E+C))+l*(a.txwidth+C),"middle"===a.anchor&&(s-=a.tx2width/2,c+=a.txwidth/2+C),{alignShift:l,textShiftX:s,text2ShiftX:c}),g=F(e,t),v=g.x,y=g.y,x="middle"===f;r.select("path").attr("d",x?"M-"+i(e.bx/2+e.tx2width/2)+","+o(y-e.by/2)+"h"+i(e.bx)+"v"+o(e.by)+"h-"+i(e.bx)+"Z":"M0,0L"+i(p*E+v)+","+o(E+y)+"v"+o(e.by/2-E)+"h"+i(p*e.bx)+"v-"+o(e.by)+"H"+i(p*E+v)+"V"+o(y-E)+"Z");var b=v+m.textShiftX,_=y+e.ty0-e.by/2+C,w=e.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==f?(u.attr("text-anchor","start"),b=x?-e.bx/2-e.tx2width/2+C:-e.bx-C):"right"===w&&"end"!==f&&(u.attr("text-anchor","end"),b=x?e.bx/2-e.tx2width/2-C:e.bx+C)),u.call(d.positionText,i(b),o(_)),e.tx2width&&(r.select("text.name").call(d.positionText,i(m.text2ShiftX+m.alignShift*C+v),o(y+e.ty0-e.by/2+C)),r.select("rect").call(h.setRect,i(m.text2ShiftX+(m.alignShift-1)*e.tx2width/2+v),o(y-e.by/2-1),i(e.tx2width),o(e.by+2)))}))}function z(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],l=e.cd[r]||{};function s(e){return e||a(e)&&0===e}var c=Array.isArray(r)?function(e,t){var a=o.castOption(i,r,e);return s(a)?a:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(l,n,e,t)};function u(t,r,n){var a=c(r,n);s(a)&&(e[t]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:g.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:g.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var d=g.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+g.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+d,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var f=g.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+g.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+f,"y"===t&&(e.distance+=1)}var h=e.hoverinfo||e.trace.hoverinfo;return h&&"all"!==h&&(-1===(h=Array.isArray(h)?h:h.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===h.indexOf("y")&&(e.yLabel=void 0),-1===h.indexOf("z")&&(e.zLabel=void 0),-1===h.indexOf("text")&&(e.text=void 0),-1===h.indexOf("name")&&(e.name=void 0)),e}function $(e,t,r){var n,a,o=r.container,l=r.fullLayout,s=l._size,c=r.event,u=!!t.hLinePoint,d=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),d||u){var f=p.combine(l.plot_bgcolor,l.paper_bgcolor);if(u){var m,v,y=t.hLinePoint;n=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=a._offset+y.y);var x,b,_=i.readability(y.color,f)<1.5?p.contrast(f):y.color,w=a.spikemode,T=a.spikethickness,A=a.spikecolor||_,M=g.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=M,b=m),-1!==w.indexOf("across")){var k=a._counterDomainMin,S=a._counterDomainMax;"free"===a.anchor&&(k=Math.min(k,a.position),S=Math.max(S,a.position)),x=s.l+k*s.w,b=s.l+S*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T,stroke:A,"stroke-dasharray":h.dashStyle(a.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:M+("right"!==a.side?T:-T),cy:v,r:T,fill:A}).classed("spikeline",!0)}if(d){var E,C,L=t.vLinePoint;n=L&&L.xa,a=L&&L.ya,"cursor"===n.spikesnap?(E=c.pointerX,C=c.pointerY):(E=n._offset+L.x,C=a._offset+L.y);var O,D,I=i.readability(L.color,f)<1.5?p.contrast(f):L.color,P=n.spikemode,R=n.spikethickness,N=n.spikecolor||I,F=g.getPxPosition(e,n);if(-1!==P.indexOf("toaxis")||-1!==P.indexOf("across")){if(-1!==P.indexOf("toaxis")&&(O=F,D=C),-1!==P.indexOf("across")){var B=n._counterDomainMin,z=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),z=Math.max(z,n.position)),O=s.t+(1-z)*s.h,D=s.t+(1-B)*s.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:O,y2:D,"stroke-width":R,stroke:N,"stroke-dasharray":h.dashStyle(n.spikedash,R)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:O,y2:D,"stroke-width":R+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}-1!==P.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?R:-R),r:R,fill:N}).classed("spikeline",!0)}}}function j(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function H(e,t){return d.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function U(e,t,r){var n=t[e+"a"],a=t[e+"Val"],i=t.cd[0];if("category"===n.type||"multicategory"===n.type)a=n._categoriesMap[a];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var l=t.cd[t.index],s=l[e+"Start"];void 0===s&&(s=l[e]);var c=l[e+"End"];void 0===c&&(c=l[e]);var u=c-s;"end"===o?a+=u:"middle"===o&&(a+=u/2)}a=n.d2c(a)}return i&&i.t&&i.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(a+=i.t.dPos)),a}function Y(e){return e.offsetTop+e.clientTop}function V(e){return e.offsetLeft+e.clientLeft}function Z(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,l=a+n.width,s=i+n.height,c=o.apply3DTransform(r._invTransform)(a,i),u=o.apply3DTransform(r._invTransform)(l,s),d=c[0],f=c[1],h=u[0],p=u[1];return{x:d,y:f,width:h-d,height:p-f,top:Math.min(f,p),left:Math.min(d,h),right:Math.max(d,h),bottom:Math.max(f,p)}}},6430:function(e,t,r){"use strict";var n=r(4809),a=r(8766),i=r(6040).isUnifiedHover;e.exports=function(e,t,r,o){o=o||{};var l=t.legend;function s(e){o.font[e]||(o.font[e]=l?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),s("size"),s("family"),s("color"),s("weight"),s("style"),s("variant"),l?(o.bgcolor||(o.bgcolor=a.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},5265:function(e,t,r){"use strict";var n=r(4809),a=r(6811);e.exports=function(e,t){function r(r,i){return void 0!==t[r]?t[r]:n.coerce(e,t,a,r,i)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},2141:function(e,t,r){"use strict";var n=r(5568),a=r(4809),i=r(4751),o=r(6040),l=r(6811),s=r(8103);e.exports={moduleType:"component",name:"fx",constants:r(5988),schema:{layout:l},attributes:r(192),layoutAttributes:l,supplyLayoutGlobalDefaults:r(5358),supplyDefaults:r(3239),supplyLayoutDefaults:r(8412),calc:r(3552),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return a.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return a.castOption(e,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:s.hover,unhover:i.unhover,loneHover:s.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:r(4225)}},6811:function(e,t,r){"use strict";var n=r(5988),a=r(337),i=a({editType:"none"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:i,grouptitlefont:a({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},8412:function(e,t,r){"use strict";var n=r(4809),a=r(6811),i=r(5265),o=r(6430);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}i(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var l=t._has("mapbox"),s=t._has("map"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||s||c)&&1===u||(l||s)&&c&&2===u)&&(t.dragmode="pan"),o(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},5358:function(e,t,r){"use strict";var n=r(4809),a=r(6430),i=r(6811);e.exports=function(e,t){a(e,t,(function(r,a){return n.coerce(e,t,i,r,a)}))}},3595:function(e,t,r){"use strict";var n=r(4809),a=r(694).counter,i=r(3792).u,o=r(4826).idRegex,l=r(8032),s={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function c(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:a.length?a:void 0}function u(e,t,r,n,a,i){var o=t(e+"gap",r),l=t("domain."+e);t(e+"side",n);for(var s=new Array(a),c=l[0],u=(l[1]-c)/(a-o),d=u*(1-o),f=0;f1){f||h||p||"independent"===A("pattern")&&(f=!0),g._hasSubplotGrid=f;var x,b,_="top to bottom"===A("roworder"),w=f?.2:.1,T=f?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:u("x",A,w,x,y),y:u("y",A,T,b,v,_)}}else delete t.grid}function A(e,t){return n.coerce(r,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,l,s,u,f=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(p){var x=f.subplots||[];s=r.subplots=new Array(m);var b=1;for(n=0;n("legend"===e?1:0));if(!1===k&&(r[e]=void 0),(!1!==k||d.uirevision)&&(h("uirevision",r.uirevision),!1!==k)){h("borderwidth");var S,E,C,L="h"===h("orientation"),O="paper"===h("yref"),D="paper"===h("xref"),I="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?O?(E=1.1,C="bottom"):(E=1,C="top"):O?(E=-.1,C="top"):(E=0,C="bottom")):(E=1,C="auto",D?S=1.02:(S=1,I="right")),a.coerce(d,f,{x:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:S}},"x"),a.coerce(d,f,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:E}},"y"),h("traceorder",_),c.isGrouped(r[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("indentation"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",I),h("yanchor",C),h("valign"),a.noneOrAll(d,f,["x","y"]),h("title.text")){h("title.side",L?"left":"top");var P=a.extendFlat({},p,{size:a.bigFont(p.size)});a.coerceFont(h,"title.font",P)}}}}e.exports=function(e,t,r){var n,i=r.slice(),o=t.shapes;if(o)for(n=0;n1)}var F=p.hiddenlabels||[];if(!(w||p.showlegend&&k.length))return l.selectAll("."+_).remove(),p._topdefs.select("#"+r).remove(),i.autoMargin(e,_);var B=a.ensureSingle(l,"g",_,(function(e){w||e.attr("pointer-events","all")})),z=a.ensureSingleById(p._topdefs,"clipPath",r,(function(e){e.append("rect")})),$=a.ensureSingle(B,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));$.call(u.stroke,f.bordercolor).call(u.fill,f.bgcolor).style("stroke-width",f.borderwidth+"px");var j,H=a.ensureSingle(B,"g","scrollbox"),U=f.title;f._titleWidth=0,f._titleHeight=0,U.text?((j=a.ensureSingle(H,"text",_+"titletext")).attr("text-anchor","start").call(c.font,U.font).text(U.text),E(j,H,e,f,1)):H.selectAll("."+_+"titletext").remove();var Y=a.ensureSingle(B,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),V=H.selectAll("g.groups").data(k);V.enter().append("g").attr("class","groups"),V.exit().remove();var Z=V.selectAll("g.traces").data(a.identity);Z.enter().append("g").attr("class","traces"),Z.exit().remove(),Z.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==F.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(M,e,f)})).call(x,e,f).each((function(){w||n.select(this).call(S,e,_)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,r,a){var i=e._fullLayout,o=O(a);a||(a=i[o]);var l=i._size,s=b.isVertical(a),u=b.isGrouped(a),d="fraction"===a.entrywidthmode,f=a.borderwidth,p=2*f,m=h.itemGap,g=a.indentation+a.itemwidth+2*m,v=2*(f+m),y=L(a),x=a.y<0||0===a.y&&"top"===y,_=a.y>1||1===a.y&&"bottom"===y,w=a.tracegroupgap,A={};a._maxHeight=Math.max(x||_?i.height/2:l.h,30);var M=0;a._width=0,a._height=0;var k=function(e){var t=0,r=0,n=e.title.side;return n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight)),[t,r]}(a);if(s)r.each((function(e){var t=e[0].height;c.setTranslate(this,f+k[0],f+k[1]+a._height+t/2+m),a._height+=t,a._width=Math.max(a._width,e[0].width)})),M=g+a._width,a._width+=m+g+p,a._height+=v,u&&(t.each((function(e,t){c.setTranslate(this,0,t*a.tracegroupgap)})),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var S=C(a),E=a.x<0||0===a.x&&"right"===S,D=a.x>1||1===a.x&&"left"===S,I=_||x,P=i.width/2;a._maxWidth=Math.max(E?I&&"left"===S?l.l+l.w:P:D?I&&"right"===S?l.r+l.w:P:l.w,2*g);var R=0,N=0;r.each((function(e){var t=T(e,a,g);R=Math.max(R,t),N+=t})),M=null;var F=0;if(u){var B=0,z=0,$=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=T(r,a,g),i=r[0].height;c.setTranslate(this,k[0],k[1]+f+m+i/2+t),t+=i,e=Math.max(e,n),A[r[0].trace.legendgroup]=e}));var r=e+m;z>0&&r+f+z>a._maxWidth?(F=Math.max(F,z),z=0,$+=B+w,B=t):B=Math.max(B,t),c.setTranslate(this,z,$),z+=r})),a._width=Math.max(F,z)+f,a._height=$+B+v}else{var j=r.size(),H=N+p+(j-1)*m=a._maxWidth&&(F=Math.max(F,Z),Y=0,V+=U,a._height+=U,U=0),c.setTranslate(this,k[0]+f+Y,k[1]+f+V+t/2+m),Z=Y+r+m,Y+=n,U=Math.max(U,t)})),H?(a._width=Y+p,a._height=U+v):(a._width=Math.max(F,Z)+p,a._height+=U+v)}}a._width=Math.ceil(Math.max(a._width+k[0],a._titleWidth+2*(f+h.titlePad))),a._height=Math.ceil(Math.max(a._height+k[1],a._titleHeight+2*(f+h.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var G=e._context.edits,W=G.legendText||G.legendPosition;r.each((function(e){var t=n.select(this).select("."+o+"toggle"),r=e[0].height,i=e[0].trace.legendgroup,l=T(e,a,g);u&&""!==i&&(l=A[i]);var f=W?g:M||l;s||d||(f+=m/2),c.setRect(t,0,-r/2,f,r)}))}(e,V,Z,f)},function(){var t,u,y,x,b=p._size,T=f.borderwidth,M="paper"===f.xref,k="paper"===f.yref;if(U.text&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*m,a=0,i=e.node(),o=c.bBox(i).width;"top center"===t.title.side?a=.5*(t._width-2*r-2*h.titlePad-o):"top right"===t.title.side&&(a=t._width-2*r-2*h.titlePad-o),d.positionText(e,r+h.titlePad+a,r+n)}}(j,f,T),!w){var S,E;S=M?b.l+b.w*f.x-g[C(f)]*f._width:p.width*f.x-g[C(f)]*f._width,E=k?b.t+b.h*(1-f.y)-g[L(f)]*f._effHeight:p.height*(1-f.y)-g[L(f)]*f._effHeight;var O=function(e,t,r,n){var a=e._fullLayout,o=a[t],l=C(o),s=L(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var d=o.y<.5?"b":"t",f=o.x<.5?"l":"r",h={r:a.width-r,l:r+o._width,b:a.height-n,t:n+o._effHeight};if(c&&u)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[l],r:o._width*v[l],b:o._effHeight*v[s],t:o._effHeight*g[s]});c?e._fullLayout._reservedMargin[t][d]=h[d]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][d]=h[d]}(e,_,S,E);if(O)return;if(p.margin.autoexpand){var D=S,I=E;S=M?a.constrain(S,0,p.width-f._width):D,E=k?a.constrain(E,0,p.height-f._effHeight):I,S!==D&&a.log("Constrain "+_+".x to make legend fit inside graph"),E!==I&&a.log("Constrain "+_+".y to make legend fit inside graph")}c.setTranslate(B,S,E)}if(Y.on(".drag",null),B.on("wheel",null),w||f._height<=f._maxHeight||e._context.staticPlot){var P=f._effHeight;w&&(P=f._height),$.attr({width:f._width-T,height:P-T,x:T/2,y:T/2}),c.setTranslate(H,0,0),z.select("rect").attr({width:f._width-2*T,height:P-2*T,x:T,y:T}),c.setClipUrl(H,r,e),c.setRect(Y,0,0,0,0),delete f._scrollY}else{var R,N,F,V=Math.max(h.scrollBarMinHeight,f._effHeight*f._effHeight/f._height),Z=f._effHeight-V-2*h.scrollBarMargin,G=f._height-f._effHeight,W=Z/G,q=Math.min(f._scrollY||0,G);$.attr({width:f._width-2*T+h.scrollBarWidth+h.scrollBarMargin,height:f._effHeight-T,x:T/2,y:T/2}),z.select("rect").attr({width:f._width-2*T+h.scrollBarWidth+h.scrollBarMargin,height:f._effHeight-2*T,x:T,y:T+q}),c.setClipUrl(H,r,e),J(q,V,W),B.on("wheel",(function(){J(q=a.constrain(f._scrollY+n.event.deltaY/Z*G,0,G),V,W),0!==q&&q!==G&&n.event.preventDefault()}));var K=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;R="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,F=q})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(N="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,q=function(e,t,r){var n=(r-t)/W+e;return a.constrain(n,0,G)}(F,R,N),J(q,V,W))}));Y.call(K);var X=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(R=e.changedTouches[0].clientY,F=q)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(N=e.changedTouches[0].clientY,q=function(e,t,r){var n=(t-r)/W+e;return a.constrain(n,0,G)}(F,R,N),J(q,V,W))}));H.call(X)}function J(t,r,n){f._scrollY=e._fullLayout[_]._scrollY=t,c.setTranslate(H,0,-t),c.setRect(Y,f._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),z.select("rect").attr("y",T+t)}e._context.edits.legendPosition&&(B.classed("cursor-move",!0),s.init({element:B.node(),gd:e,prepFn:function(e){if(e.target!==Y.node()){var t=c.getTranslate(B);y=t.x,x=t.y}},moveFn:function(e,r){if(void 0!==y&&void 0!==x){var n=y+e,a=x+r;c.setTranslate(B,n,a),t=s.align(n,f._width,b.l,b.l+b.w,f.xanchor),u=s.align(a+f._height,-f._height,b.t+b.h,b.t,f.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==u){var r={};r[_+".x"]=t,r[_+".y"]=u,o.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=l.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&A(e,B,n,t,r)}}))}],e)}}function T(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===i?t._maxWidth*o:r+(o||a)}function A(e,t,r,n,a){var i=r.data()[0][0].trace,s={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(s.group=i._group),o.traceIs(i,"pie-like")&&(s.label=r.datum()[0].label);var c=l.triggerHandler(e,"plotly_legendclick",s);if(1===n){if(!1===c)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&f(r,e,n)}),e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==l.triggerHandler(e,"plotly_legenddoubleclick",s)&&!1!==c&&f(r,e,n))}function M(e,t,r){var n,i,l=O(r),s=e.data()[0][0],u=s.trace,f=o.traceIs(u,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!f,m=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,i=s.groupTitle.font):(i=r.font,r.entries?n=s.text:(n=f?s.label:u.name,u._meta&&(n=a.templateString(n,u._meta))));var g=a.ensureSingle(e,"text",l+"text");g.attr("text-anchor","start").call(c.font,i).text(p?k(n,m):n);var v=r.indentation+r.itemwidth+2*h.itemGap;d.positionText(g,v,0),p?g.call(d.makeEditable,{gd:t,text:n}).call(E,e,t,r).on("edit",(function(n){this.text(k(n,m)).call(E,e,t,r);var i=s.trace._fullInput||{},l={};if(o.hasTransform(i,"groupby")){var c=o.getTransformIndices(i,"groupby"),d=c[c.length-1],f=a.keyedContainer(i,"transforms["+d+"].styles","target","value.name");f.set(s.trace._group,n),l=f.constructUpdate()}else l.name=n;return i._isShape?o.call("_guiRelayout",t,"shapes["+u.index+"].name",l.name):o.call("_guiRestyle",t,l,u.index)})):E(g,e,t,r)}function k(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function S(e,t,r){var i,o=t._context.doubleClickDelay,l=1,s=a.ensureSingle(e,"rect",r+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(s.on("mousedown",(function(){(i=(new Date).getTime())-t._legendMouseDownTimeo&&(l=Math.max(l-1,1)),A(t,a,e,l,n.event)}})))}function E(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),d.convertToTspans(e,r,(function(){!function(e,t,r,n){var a=e.data()[0][0];if(r._inHover||!a||a.trace.showlegend){var i=e.select("g[class*=math-group]"),o=i.node(),l=O(r);r||(r=t._fullLayout[l]);var s,u,f=r.borderwidth,p=(1===n?r.title.font:a.groupTitle?a.groupTitle.font:r.font).size*m;if(o){var g=c.bBox(o);s=g.height,u=g.width,1===n?c.setTranslate(i,f,f+.75*s):c.setTranslate(i,0,.25*s)}else{var v="."+l+(1===n?"title":"")+"text",y=e.select(v),x=d.lineCount(y),b=y.node();if(s=p*x,u=b?c.bBox(b).width:0,1===n)"left"===r.title.side&&(u+=2*h.itemGap),d.positionText(y,f+h.titlePad,f+p);else{var _=2*h.itemGap+r.indentation+r.itemwidth;a.groupTitle&&(_=h.itemGap,u-=r.indentation+r.itemwidth),d.positionText(y,_,-p*((x-1)/2-.3))}}1===n?(r._titleWidth=u,r._titleHeight=s):(a.lineHeight=p,a.height=Math.max(s,16)+3,a.width=u)}else e.remove()}(t,r,n,a)}))}function C(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function L(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}function O(e){return e._id||"legend"}e.exports=function(e,t){if(t)w(e,t);else{var r=e._fullLayout,a=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var e=n.select(this),t=e.attr("class").split(" ")[0];t.match(_)&&-1===a.indexOf(t)&&e.remove()}));for(var i=0;iS&&(k=S)}A[i][0]._groupMinRank=k,A[i][0]._preGroupSort=i}var E=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(A.forEach((function(e,t){e[0]._preGroupSort=t})),A.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),i=0;ir?r:e}e.exports=function(e,t,r){var v=t._fullLayout;r||(r=v.legend);var y="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*h.itemGap)/2,_=o(b,0),w=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return y?n:Math.min(a,r)};function T(e,i,o){var u=e[0].trace,d=u.marker||{},f=d.line||{},h=d.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=o?u.visible&&u.type===o:a.traceIs(u,"bar"),m=n.select(i).select("g.legendpoints").selectAll("path.legend"+o).data(p?[e]:[]);m.enter().append("path").classed("legend"+o,!0).attr("d",h).attr("transform",_),m.exit().remove(),m.each((function(e){var a=n.select(this),i=e[0],o=w(i.mlw,d.line,5,2);a.style("stroke-width",o+"px");var h=i.mcc;if(!r._inHover&&"mc"in i){var p=c(d),m=p.mid;void 0===m&&(m=(p.max+p.min)/2),h=l.tryColorscale(d,"")(m)}var v=h||i.mc||d.color,y=d.pattern,x=y&&l.getPatternAttr(y.shape,0,"");if(x){var b=l.getPatternAttr(y.bgcolor,0,null),_=l.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,A=g(y.size,8,10),M=g(y.solidity,.5,1),k="legend-"+u.uid;a.call(l.pattern,"legend",t,k,x,A,M,h,y.fillmode,b,_,T)}else a.call(s.fill,v);o&&s.stroke(a,i.mlc||f.color)}))}function A(e,r,o){var l=e[0],s=l.trace,c=o?s.visible&&s.type===o:a.traceIs(s,o),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(u.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),u.exit().remove(),u.size()){var h=s.marker||{},p=w(f(h.line.width,l.pts),h.line,5,2),m="pieLike",g=i.minExtend(s,{marker:{line:{width:p}}},m),v=i.minExtend(l,{trace:g},m);d(u,v,g,t)}}e.each((function(e){var t=n.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var l=r.indentation,s=r.valign,c=e[0].lineHeight,u=e[0].height;if("middle"===s&&0===l||!c||!u)a.attr("transform",null);else{var d={top:1,bottom:-1}[s]*(.5*(c-u+3))||0,f=r.indentation;a.attr("transform",o(f,d))}a.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=a.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,a=e[0].trace,o=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":case"densitymap":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,o){var u,d=n.select(this),f=c(a),h=f.colorscale,m=f.reversescale;if(h){if(!r){var g=h.length;u=0===o?h[m?g-1:0][1]:1===o?h[m?0:g-1][1]:h[Math.floor((g-1)/2)][1]}}else{var v=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(v)?v[o]||v[0]:v}d.attr("d",e[0]),u?d.call(s.fill,u):d.call((function(e){if(e.size()){var n="legendfill-"+a.uid;l.gradient(e,t,n,p(m,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var a=e[0].trace[e[0].dir].marker;return e[0].mc=a.color,e[0].mlw=a.line.width,e[0].mlc=a.line.color,T(e,this,"waterfall")}var i=[];t.visible&&r&&(i=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(i);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var r=n.select(this),a=t[e[0]].marker,i=w(void 0,a.line,5,2);r.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(e){T(e,this,"funnel")})).each((function(e){T(e,this)})).each((function(e){var r=e[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[e]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=w(void 0,r.line,5,2);e.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(e,r.line.color)}else{var c=i.minExtend(r,{marker:{size:y?12:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(l.pointStyle,c,t)}}))})).each((function(e){A(e,this,"funnelarea")})).each((function(e){A(e,this,"pie")})).each((function(e){var r,a,o=m(e),s=o.showFill,d=o.showLine,f=o.showGradientLine,h=o.showGradientFill,g=o.anyFill,v=o.anyLine,y=e[0],b=y.trace,_=c(b),T=_.colorscale,A=_.reversescale,M=u.hasMarkers(b)||!g?"M5,0":v?"M5,-2":"M5,-3",k=n.select(this),S=k.select(".legendfill").selectAll("path").data(s||h?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",M+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(s)l.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;l.gradient(e,t,r,p(A),T,"fill")}})),d||f){var E=w(void 0,b.line,10,5);a=i.minExtend(b,{line:{width:E}}),r=[i.minExtend(y,{trace:a})]}var C=k.select(".legendlines").selectAll("path").data(d||f?[r]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",M+(f?"l"+x+",0.0001":"h"+x)).call(d?l.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;l.lineGroupStyle(e),l.gradient(e,t,r,p(A),T,"stroke")}})})).each((function(e){var r,a,o=m(e),s=o.anyFill,c=o.anyLine,d=o.showLine,f=o.showMarker,h=e[0],p=h.trace,g=!f&&!c&&!s&&u.hasText(p);function v(e,t,r,n){var a=i.nestedProperty(p,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(f||g||d){var b={},w={};if(f){b.mc=v("marker.color",x),b.mx=v("marker.symbol",x),b.mo=v("marker.opacity",i.mean,[.2,1]),b.mlc=v("marker.line.color",x),b.mlw=v("marker.line.width",i.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=v("marker.size",i.mean,[2,16],12);b.ms=T,w.marker.size=T}d&&(w.line={width:v("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=v("textposition",x),b.ts=10,b.tc=v("textfont.color",x),b.tf=v("textfont.family",x),b.tw=v("textfont.weight",x),b.ty=v("textfont.style",x),b.tv=v("textfont.variant",x),b.tC=v("textfont.textcase",x),b.tE=v("textfont.lineposition",x),b.tS=v("textfont.shadow",x)),r=[i.minExtend(h,b)],(a=i.minExtend(p,w)).selectedpoints=null,a.texttemplate=null}var A=n.select(this).select("g.legendpoints"),M=A.selectAll("path.scatterpts").data(f?r:[]);M.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),M.exit().remove(),M.call(l.pointStyle,a,t),f&&(r[0].mrc=3);var k=A.selectAll("g.pointtext").data(g?r:[]);k.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),k.exit().remove(),k.selectAll("text").call(l.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("fill","none").call(l.dashLine,i.line.dash,o),o&&s.stroke(a,i.line.color)}))}))}},308:function(e,t,r){"use strict";r(7632),e.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},5832:function(e,t,r){"use strict";var n=r(3626),a=r(4122),i=r(5975),o=r(5188),l=r(8231).eraseActiveShape,s=r(4809),c=s._,u=e.exports={};function d(e,t){var r,a,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=i.list(e,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===l){var h,p="in"===s?.5:2,m=(1+p)/2,g=(1-p)/2;for(a=0;a1?(I=["toggleHover"],P=["resetViews"]):v?(D=["zoomInGeo","zoomOutGeo"],I=["hoverClosestGeo"],P=["resetGeo"]):g?(I=["hoverClosest3d"],P=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(D=["zoomInMapbox","zoomOutMapbox"],I=["toggleHover"],P=["resetViewMapbox"]):T?(D=["zoomInMap","zoomOutMap"],I=["toggleHover"],P=["resetViewMap"]):b?I=["hoverClosestGl2d"]:y?I=["hoverClosestPie"]:k?(I=["hoverClosestCartesian","hoverCompareCartesian"],P=["resetViewSankey"]):I=["toggleHover"],m&&I.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;t0)){var m=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),a=0,i=0;i0?e.touches[0].clientX:0}function v(e,t,r,n){var a=o.ensureSingle(e,"rect",m.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),i=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,d=s.crispRound(t,n.borderwidth);a.attr({width:n._width+i,height:n._height+i,transform:l(u,u),"stroke-width":d}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function y(e,t,r,n){var a=t._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function x(e,t,r,a){var l,c=t.calcdata,u=e.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,o.identity);u.enter().append("g").attr("class",(function(e){return m.rangePlotClassName+" "+e})).call(s.setClipUrl,a._clipId,t),u.order(),u.exit().remove(),u.each((function(e,o){var s=n.select(this),u=0===o,h=f.getFromId(t,e,"y"),p=h._name,m=a[p],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:a.range.slice(),calendar:r.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:h.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(g.layout[p].rangebreaks=h.rangebreaks),i.supplyDefaults(g);var v=g._fullLayout.xaxis,y=g._fullLayout[p];v.clearCalc(),v.setScale(),y.clearCalc(),y.setScale();var x={id:e,plotgroup:s,xaxis:v,yaxis:y,isRangePlot:!0};u?l=x:(x.mainplot="xy",x.mainplotinfo=l),d.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=B[r+1];else if(e=n.pmax)t=B[r+1];else if(er._length||y+_<0)return;u=v+_,h=y+_;break;case s:if(b="col-resize",v+_>r._length)return;u=v+_,h=y;break;case c:if(b="col-resize",y+_<0)return;u=v,h=y+_;break;default:b="ew-resize",u=m,h=m+_}if(h=0;A--){var M=r.append("path").attr(g).style("opacity",A?.1:v).call(o.stroke,x).call(o.fill,y).call(l.dashLine,A?"solid":_,A?4+b:b);if(p(M,e,i),w){var k=s(e.layout,"selections",i);M.style({cursor:"move"});var S={element:M.node(),plotinfo:h,gd:e,editHelpers:k,isActiveSelection:!0},E=n(c,e);a(E,M,S)}else M.style("pointer-events",A?"all":"none");T[A]=M}var C=T[0];T[1].node().addEventListener("click",(function(){return function(e,t){if(f(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void m(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=m,d(e)}}}(e,C)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;l.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function m(e){f(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,d(e))}e.exports={draw:d,drawOne:h,activateLastSelection:function(e){if(f(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=m,d(e)}}}},2307:function(e,t,r){"use strict";var n=r(4850).T,a=r(3049).extendFlat;e.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:a({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},3028:function(e){"use strict";e.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},4198:function(e,t,r){"use strict";var n=r(414).selectMode,a=r(8534).clearOutline,i=r(1055),o=i.readPaths,l=i.writePaths,s=i.fixDatesForPaths;e.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var i=r.getAttribute("d"),c=t.gd,u=c._fullLayout.newselection,d=t.plotinfo,f=d.xaxis,h=d.yaxis,p=t.isActiveSelection,m=t.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==p){var v=c._fullLayout._activeSelectionIndex;if(v-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(v)){Z(e,t,i);var _=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n0?function(e,t){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a1)return!1;if((n+=t.selectedpoints.length)>1)return!1}return 1===n}(l)&&(f=X(_))){for(o&&o.remove(),g=0;g=0})(a)&&a._fullLayout._deactivateShape(a),function(e){return e._fullLayout._activeSelectionIndex>=0}(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,l=h(r),s=m(r);if(l||s){var c,u,d=o.selectAll(".select-outline-"+n.id);d&&a._fullLayout._outlining&&(l&&(c=T(d,e)),c&&i.call("_guiRelayout",a,{shapes:c}),s&&!j(e)&&(u=A(d,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:u}).then((function(){t&&M(a)}))),a._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function W(e){return e._id}function q(e,t,r,n){if(!e.calcdata)return[];var a,i,o,l=[],s=t.map(W),c=r.map(W);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function J(e,t,r){var n,a;for(n=0;n-1&&t;if(!i&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ce(te);ue([L(e,ne,"x"),L(e,he,"y")])(Q,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&de(e,Q),f._reselect=!1}if(!i&&f._deselect){var me=f._deselect;(function(e,t,r){for(var n=0;n=0)A._fullLayout._deactivateShape(A);else if(!x){var r=M.clickmode;C.done(ke).then((function(){if(C.clear(ke),2===e){for(be.remove(),X=0;X-1&&H(t,A,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&de(A,void 0);s.click(A,t,O.id)})).catch(k.error)}},n.doneFn=function(){Ae.remove(),C.done(ke).then((function(){C.clear(ke),!S&&K&&n.selectionDefs&&(K.subtract=xe,n.selectionDefs.push(K),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,W)),(S||x)&&G(n,S),n.doneFnCompleted&&n.doneFnCompleted(Se),b&&de(A,ie)})).catch(k.error)}},clearOutline:x,clearSelectionsCache:G,selectOnClick:H}},3144:function(e,t,r){"use strict";var n=r(222),a=r(337),i=r(6640).line,o=r(4850).T,l=r(3049).extendFlat,s=r(8032).templatedArray,c=(r(5081),r(9829)),u=r(3208).LF,d=r(1235);e.exports=s("shape",{visible:l({},c.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:l({},c.legend,{editType:"calc+arraydraw"}),legendgroup:l({},c.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:l({},c.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:a({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:l({},c.legendrank,{editType:"calc+arraydraw"}),legendwidth:l({},c.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:l({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:l({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:l({},i.color,{editType:"arraydraw"}),width:l({},i.width,{editType:"calc+arraydraw"}),dash:l({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:u({},{keys:Object.keys(d)}),font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},4959:function(e,t,r){"use strict";var n=r(4809),a=r(9714),i=r(2956),o=r(9728);function l(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function s(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,r,a,l,s){var c=e/2,u=s;if("pixel"===t){var d=l?o.extractPathCoords(l,s?i.paramIsY:i.paramIsX):[r,a],f=n.aggNums(Math.max,null,d),h=n.aggNums(Math.min,null,d),p=h<0?Math.abs(h)+c:c,m=f>0?f+c:c;return{ppad:c,ppadplus:u?p:m,ppadminus:u?m:p}}return{ppad:c}}function u(e,t,r){var n,a,l="x"===e._id.charAt(0)?"x":"y",s="category"===e.type||"multicategory"===e.type,c=0,u=0,d=s?e.r2c:e.d2c;if("scaled"===t[l+"sizemode"]?(n=t[l+"0"],a=t[l+"1"],s&&(c=t[l+"0shift"],u=t[l+"1shift"])):(n=t[l+"anchor"],a=t[l+"anchor"]),void 0!==n)return[d(n)+c,d(a)+u];if(t.path){var f,h,p,m,g=1/0,v=-1/0,y=t.path.match(i.segmentRE);for("date"===e.type&&(d=o.decodeDate(d)),f=0;fv&&(v=m)));return v>=g?[g,v]:void 0}}e.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;o=e?t-n:n-t,-180/Math.PI*Math.atan2(a,i)}(x,_,b,w):0),M.call((function(t){return t.call(o.font,A).attr({}),i.convertToTspans(t,e),t}));var V=function(e,t,r,n,a,i,o){var l,s,c,u,f=a.label.textposition,h=a.label.textangle,p=a.label.padding,m=a.type,g=Math.PI/180*i,v=Math.sin(g),y=Math.cos(g),x=a.label.xanchor,b=a.label.yanchor;if("line"===m){"start"===f?(l=e,s=t):"end"===f?(l=r,s=n):(l=(e+r)/2,s=(t+n)/2),"auto"===x&&(x="start"===f?"auto"===h?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===L&&(e[0][0]="M"),t[C]=e,M(),k())}}()}}function H(e,r){!function(e,r){if(t.length)for(var n=0;n_?(k=h,L="y0",S=_,O="y1"):(k=_,L="y1",S=h,O="y0"),re(n),ie(s,r),function(e,t,r){var n=t.xref,a=t.yref,i=o.getFromId(r,n),l=o.getFromId(r,a),s="";"paper"===n||i.autorange||(s+=n),"paper"===a||l.autorange||(s+=a),f.setClipUrl(e,s?"clip"+r._fullLayout._uid+s:null,r)}(t,r,e),te.moveFn="move"===R?ne:ae,te.altKey=n.altKey)},doneFn:function(){b(e)||(m(t),oe(s),T(t,e,r),a.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){b(e)||oe(s)}};function re(r){if(b(e))R=null;else if(B)R="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=te.element.getBoundingClientRect(),a=n.right-n.left,i=n.bottom-n.top,o=r.clientX-n.left,l=r.clientY-n.top,s=!z&&a>10&&i>10&&!r.shiftKey?p.getCursor(o/a,1-l/i):"move";m(t,s),R=s.split("-")[0]}}function ne(n,a){if("path"===r.type){var i=function(e){return e},o=i,u=i;N?$("xanchor",r.xanchor=J(w+n)):(o=function(e){return J(K(e)+n)},H&&"date"===H.type&&(o=v.encodeDate(o))),F?$("yanchor",r.yanchor=Q(M+a)):(u=function(e){return Q(X(e)+a)},Y&&"date"===Y.type&&(u=v.encodeDate(u))),$("path",r.path=A(P,o,u))}else N?$("xanchor",r.xanchor=J(w+n)):($("x0",r.x0=J(d+n)),$("x1",r.x1=J(x+n))),F?$("yanchor",r.yanchor=Q(M+a)):($("y0",r.y0=Q(h+a)),$("y1",r.y1=Q(_+a)));t.attr("d",y(e,r)),ie(s,r),c(e,l,r,j)}function ae(n,a){if(z){var i=function(e){return e},o=i,u=i;N?$("xanchor",r.xanchor=J(w+n)):(o=function(e){return J(K(e)+n)},H&&"date"===H.type&&(o=v.encodeDate(o))),F?$("yanchor",r.yanchor=Q(M+a)):(u=function(e){return Q(X(e)+a)},Y&&"date"===Y.type&&(u=v.encodeDate(u))),$("path",r.path=A(P,o,u))}else if(B){if("resize-over-start-point"===R){var f=d+n,p=F?h-a:h+a;$("x0",r.x0=N?f:J(f)),$("y0",r.y0=F?p:Q(p))}else if("resize-over-end-point"===R){var m=x+n,g=F?_-a:_+a;$("x1",r.x1=N?m:J(m)),$("y1",r.y1=F?g:Q(g))}}else{var b=function(e){return-1!==R.indexOf(e)},T=b("n"),U=b("s"),V=b("w"),Z=b("e"),G=T?k+a:k,W=U?S+a:S,q=V?E+n:E,ee=Z?C+n:C;F&&(T&&(G=k-a),U&&(W=S-a)),(!F&&W-G>10||F&&G-W>10)&&($(L,r[L]=F?G:Q(G)),$(O,r[O]=F?W:Q(W))),ee-q>10&&($(D,r[D]=N?q:J(q)),$(I,r[I]=N?ee:J(ee)))}t.attr("d",y(e,r)),ie(s,r),c(e,l,r,j)}function ie(e,t){(N||F)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=K(N?t.xanchor:i.midRange(r?[t.x0,t.x1]:v.extractPathCoords(t.path,g.paramIsX))),o=X(F?t.yanchor:i.midRange(r?[t.y0,t.y1]:v.extractPathCoords(t.path,g.paramIsY)));if(a=v.roundPositionForSharpStrokeRendering(a,1),o=v.roundPositionForSharpStrokeRendering(o,1),N&&F){var l="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(N){var s="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",s)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function oe(e){e.selectAll(".visual-cue").remove()}p.init(te),ee.node().onmousemove=re}(e,F,u,t,r,R):!0===u.editable&&F.style("pointer-events",I||d.opacity(C)*E<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(e,t){if(_(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void M(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=M,x(e)}}}(e,F)}))}u._input&&!0===u.visible&&("above"===u.layer?k(e._fullLayout._shapeUpperLayer):"paper"===u.xref||"paper"===u.yref?k(e._fullLayout._shapeLowerLayer):"between"===u.layer?k(w.shapelayerBetween):w._hadPlotinfo?k((w.mainplotinfo||w).shapelayer):k(e._fullLayout._shapeLowerLayer))}function T(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");f.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function A(e,t,r){return e.replace(g.segmentRE,(function(e){var n=0,a=e.charAt(0),i=g.paramIsX[a],o=g.paramIsY[a],l=g.numParams[a];return a+e.substr(1).replace(g.paramRE,(function(e){return n>=l||(i[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function M(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(u(e),delete e._fullLayout._activeShapeIndex,x(e))}e.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){u(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t0&&sh&&(e="X"),e}));return i>h&&(p=p.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),u+p}))}(r,s,u);if("pixel"===r.xsizemode){var M=s(r.xanchor);d=M+r.x0+_,f=M+r.x1+w}else d=s(r.x0)+_,f=s(r.x1)+w;if("pixel"===r.ysizemode){var k=u(r.yanchor);h=k-r.y0+T,p=k-r.y1+A}else h=u(r.y0)+T,p=u(r.y1)+A;if("line"===m)return"M"+d+","+h+"L"+f+","+p;if("rect"===m)return"M"+d+","+h+"H"+f+"V"+p+"H"+d+"Z";var S=(d+f)/2,E=(h+p)/2,C=Math.abs(S-d),L=Math.abs(E-h),O="A"+C+","+L,D=S+C+","+E;return"M"+D+O+" 0 1,1 "+S+","+(E-L)+O+" 0 0,1 "+D+"Z"}},3701:function(e,t,r){"use strict";var n=r(8231);e.exports={moduleType:"component",name:"shapes",layoutAttributes:r(3144),supplyLayoutDefaults:r(4367),supplyDrawNewShapeDefaults:r(5522),includeBasePlot:r(706)("shapes"),calcAutorange:r(4959),draw:n.draw,drawOne:n.drawOne}},1235:function(e){"use strict";function t(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function n(e){return e.x0shift||0}function a(e){return e.x1shift||0}function i(e){return e.y0shift||0}function o(e){return e.y1shift||0}function l(e,r){return t(e.x1,r)+a(e)-t(e.x0,r)-n(e)}function s(e,r,n){return t(e.y1,n)+o(e)-t(e.y0,n)-i(e)}e.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:s(e,0,r)/l(e,t)},dx:l,dy:s,width:function(e,t){return Math.abs(l(e,t))},height:function(e,t,r){return Math.abs(s(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(l(e,t),2)+Math.pow(s(e,0,r),2))},xcenter:function(e,i){return r((t(e.x1,i)+a(e)+t(e.x0,i)+n(e))/2,i)},ycenter:function(e,n,a){return r((t(e.y1,a)+o(e)+t(e.y0,a)+i(e))/2,a)}}},8606:function(e,t,r){"use strict";var n=r(337),a=r(7891),i=r(3049).extendDeepAll,o=r(3582).overrideAll,l=r(9722),s=r(8032).templatedArray,c=r(4194),u=s("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});e.exports=o(s("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(a({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:l.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")},4194:function(e){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},4537:function(e,t,r){"use strict";var n=r(4809),a=r(9008),i=r(8606),o=r(4194).name,l=i.steps;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}for(var l=a(e,t,{name:"steps",handleItemDefaults:c}),s=0,u=0;u0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*d.gripWidth,t._dims.currentValueTotalHeight))}}function E(e,t){var r=e._dims;return r.inputAreaStart+d.stepInset+(r.inputAreaLength-2*d.stepInset)*Math.min(1,Math.max(0,t))}function C(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-d.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*d.stepInset-2*r.inputAreaStart)))}function L(e,t,r){var n=r._dims,a=l.ensureSingle(e,"rect",d.railTouchRectClass,(function(n){n.call(M,t,e,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,d.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function O(e,t){var r=t._dims,n=r.inputAreaLength-2*d.railInset,a=l.ensureSingle(e,"rect",d.railRectClass);a.attr({width:n,height:d.railWidth,rx:d.railRadius,ry:d.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,d.railInset,.5*(r.inputAreaWidth-d.railWidth)+r.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,r=e._fullLayout,i=function(e,t){for(var r=e[d.name],n=[],a=0;a0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,g(t))}if(l.enter().append("g").classed(d.containerClassName,!0).style("cursor",t?null:"ew-resize"),l.exit().each((function(){n.select(this).selectAll("g."+d.groupClassName).each(s)})).remove(),0!==i.length){var c=l.selectAll("g."+d.groupClassName).data(i,v);c.enter().append("g").classed(d.groupClassName,!0),c.exit().each(s).remove();for(var u=0;u0||T<0){var E={left:[-A,0],right:[A,0],top:[0,-A],bottom:[0,A]}[_.side];i.attr("transform",s(E[0],E[1]))}}}function fe(e,t){e.text(t).on("mouseover.opacity",(function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))}if(ie.call(ce,oe),te&&(S?ie.on(".opacity",null):(fe(ie,x),E=!0),ie.call(d.makeEditable,{gd:e}).on("edit",(function(t){void 0!==b?o.call("_guiRestyle",e,y,t,b):o.call("_guiRelayout",e,y,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ce)})).on("input",(function(e){this.text(e||" ").call(d.positionText,w.x,w.y)})),z)){if(z&&!S){var he=ie.node().getBBox(),pe=he.y+he.height+1.6*G;oe.attr("y",pe)}H?oe.on(".opacity",null):(fe(oe,$),U=!0),oe.call(d.makeEditable,{gd:e}).on("edit",(function(t){o.call("_guiRelayout",e,"title.subtitle.text",t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ce)})).on("input",(function(e){this.text(e||" ").call(d.positionText,oe.attr("x"),oe.attr("y"))}))}return ie.classed("js-placeholder",E),oe&&oe.classed("js-placeholder",U),A},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}},5389:function(e,t,r){"use strict";var n=r(337),a=r(229),i=r(3049).extendFlat,o=r(3582).overrideAll,l=r(7891),s=r(8032).templatedArray,c=s("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(s("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(l({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},1559:function(e){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},2746:function(e,t,r){"use strict";var n=r(4809),a=r(9008),i=r(5389),o=r(1559).name,l=i.buttons;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(e,t){function r(r,a){return n.coerce(e,t,l,r,a)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},974:function(e,t,r){"use strict";var n=r(5568),a=r(4122),i=r(8766),o=r(2203),l=r(4809),s=r(635),c=r(8032).arrayEditor,u=r(4530).LINE_SPACING,d=r(1559),f=r(1736);function h(e){return e._index}function p(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function m(e,t,r,n,a,i,o,l){t.active=o,c(e.layout,d.name,t).applyUpdate("active",o),"buttons"===t.type?v(e,n,null,null,t):"dropdown"===t.type&&(a.attr(d.menuIndexAttrName,"-1"),g(e,n,a,i,t),l||v(e,n,a,i,t))}function g(e,t,r,n,a){var i=l.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),s=a._dims,c=a.active,u=a.buttons[c]||d.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:s.headerWidth,height:s.headerHeight};i.call(y,a,u,e).call(k,a,f,h),l.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,a.font).text(d.arrowSymbol[a.direction])})).attr({x:s.headerWidth-d.arrowOffsetX+a.pad.l,y:s.headerHeight/2+d.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(S,String(p(r,a)?-1:a._index)),v(e,t,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(T,a)})),o.setTranslate(t,s.lx,s.ly)}function v(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(d.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?d.dropdownButtonClassName:d.buttonClassName,u=r.selectAll("g."+c).data(l.filterVisible(s)),f=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,g=0,v=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=v.headerHeight+d.gapButtonHeader:p=v.headerWidth+d.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-d.gapButtonHeader+d.gapButton-v.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-d.gapButtonHeader+d.gapButton-v.openWidth);var b={x:v.lx+p+o.pad.l,y:v.ly+g+o.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},A={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(l,s){var c=n.select(this);c.call(y,o,l,e).call(k,o,b),c.on("click",(function(){n.event.defaultPrevented||(l.execute&&(l.args2&&o.active===s?(m(e,o,0,t,r,i,-1),a.executeAPICommand(e,l.method,l.args2)):(m(e,o,0,t,r,i,s),a.executeAPICommand(e,l.method,l.args))),e.emit("plotly_buttonclicked",{menu:o,button:l,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(A.w=Math.max(v.openWidth,v.headerWidth),A.h=b.y-A.t):(A.w=b.x-A.l,A.h=Math.max(v.openHeight,v.headerHeight)),A.direction=o.direction,i&&(u.size()?function(e,t,r,n,a,i){var o,l,s,c=a.direction,u="up"===c||"down"===c,f=a._dims,h=a.active;if(u)for(l=0,s=0;s0?[0]:[]);if(o.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+d.headerGroupClassName).each(i)})).remove(),0!==r.length){var s=o.selectAll("g."+d.headerGroupClassName).data(r,h);s.enter().append("g").classed(d.headerGroupClassName,!0);for(var c=l.ensureSingle(o,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;uw,M=l.barLength+2*l.barPad,k=l.barWidth+2*l.barPad,S=p,E=g+v;E+k>c&&(E=c-k);var C=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,l.barColor),A?(this.hbar=C.attr({rx:l.barRadius,ry:l.barRadius,x:S,y:E,width:M,height:k}),this._hbarXMin=S+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=v>T,O=l.barWidth+2*l.barPad,D=l.barLength+2*l.barPad,I=p+m,P=g;I+O>s&&(I=s-O);var R=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,l.barColor),L?(this.vbar=R.attr({rx:l.barRadius,ry:l.barRadius,x:I,y:P,width:O,height:D}),this._vbarYMin=P+D/2,this._vbarTranslateMax=T-D):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var N=this.id,F=u-.5,B=L?d+O+.5:d+.5,z=f-.5,$=A?h+k+.5:h+.5,j=o._topdefs.selectAll("#"+N).data(A||L?[0]:[]);if(j.exit().remove(),j.enter().append("clipPath").attr("id",N).append("rect"),A||L?(this._clipRect=j.select("rect").attr({x:Math.floor(F),y:Math.floor(z),width:Math.ceil(B)-Math.floor(F),height:Math.ceil($)-Math.floor(z)}),this.container.call(i.setClipUrl,N,this.gd),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),A||L){var H=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var U=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(U),L&&this.vbar.on(".drag",null).call(U)}this.setTranslate(t,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},l.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},l.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,a=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,l=i+this._vbarTranslateMax;t=(o.constrain(n.event.y,i,l)-i)/(l-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},l.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=o.constrain(e||0,0,r),t=o.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var a=e/r;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(i.setTranslate,e,t+l*this._vbarTranslateMax)}}},4530:function(e){"use strict";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},5081:function(e){"use strict";e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}},7296:function(e){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},726:function(e){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},438:function(e){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},3821:function(e){"use strict";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},2972:function(e,t){"use strict";t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}},7430:function(e,t,r){"use strict";t.version=r(9697).version,r(1116),r(6713);for(var n=r(3626),a=t.register=n.register,i=r(742),o=Object.keys(i),l=0;l",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},2546:function(e,t){"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},4313:function(e,t,r){"use strict";var n=r(8953),a=n.mod,i=n.modHalf,o=Math.PI,l=2*o;function s(e){return Math.abs(e[1]-e[0])>l-1e-14}function c(e,t){return i(t-e,l)}function u(e,t){if(s(t))return!0;var r,n;t[0](n=a(n,l))&&(n+=l);var i=a(e,l),o=i+l;return i>=r&&i<=n||o>=r&&o<=n}function d(e,t,r,n,a,i,c){a=a||0,i=i||0;var u,d,f,h,p,m=s([r,n]);function g(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}m?(u=0,d=o,f=l):r=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return d(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return d(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return d(e,t,r,n,a,i,1)}}},7800:function(e,t,r){"use strict";var n=r(3229).decode,a=r(6174),i=Array.isArray,o=ArrayBuffer,l=DataView;function s(e){return o.isView(e)&&!(e instanceof l)}function c(e){return i(e)||s(e)}t.isTypedArray=s,t.isArrayOrTypedArray=c,t.isArray1D=function(e){return!c(e[0])},t.ensureArray=function(e,t){return i(e)||(e=[]),e.length=t,e};var u={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function d(e){return e.constructor===ArrayBuffer}function f(e,t,r){if(c(e)){if(c(e[0])){for(var n=r,a=0;aa.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,a){-1===(a.extras||[]).indexOf(e)?(p(e)&&(e=m(e)),e%1||!n(e)||void 0!==a.min&&ea.max?t.set(r):t.set(+e)):t.set(e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){p(e)&&(e=m(e)),a(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(l.get(e,r))}},angle:{coerceFunction:function(e,t,r){p(e)&&(e=m(e)),"auto"===e?t.set("auto"):n(e)?t.set(f(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||d(r);"string"==typeof e&&a.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!d(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"==typeof e){for(var a=e.split("+"),i=0;i=n&&e<=a?e:u}if("string"!=typeof e&&"number"!=typeof e)return u;e=String(e);var c=_(r),v=e.charAt(0);!c||"G"!==v&&"g"!==v||(e=e.substr(1),r="");var w=c&&"chinese"===r.substr(0,7),T=e.match(w?x:y);if(!T)return u;var A=T[1],M=T[3]||"1",k=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(c){if(2===A.length)return u;var L;A=Number(A);try{var O=g.getComponentMethod("calendars","getCal")(r);if(w){var D="i"===M.charAt(M.length-1);M=parseInt(M,10),L=O.newDate(A,O.toMonthIndex(A,M,D),k)}else L=O.newDate(A,Number(M),k)}catch(e){return u}return L?(L.toJD()-m)*d+S*f+E*h+C*p:u}A=2===A.length?(Number(A)+2e3-b)%100+b:Number(A),M-=1;var I=new Date(Date.UTC(2e3,M,k,S,E));return I.setUTCFullYear(A),I.getUTCMonth()!==M||I.getUTCDate()!==k?u:I.getTime()+C*p},n=t.MIN_MS=t.dateTime2ms("-9999"),a=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,r){return t.dateTime2ms(e,r)!==u};var T=90*d,A=3*f,M=5*h;function k(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+w(t,2)+":"+w(r,2),(n||a)&&(e+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}t.ms2DateTime=function(e,t,r){if("number"!=typeof e||!(e>=n&&e<=a))return u;t||(t=0);var i,o,l,c,y,x,b=Math.floor(10*s(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var S=Math.floor(w/d)+m,E=Math.floor(s(e,d));try{i=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(e){i=v("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t=n+d&&e<=a-d))return u;var t=Math.floor(10*s(e+.05,1)),r=new Date(Math.round(e-t/10));return k(i("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},t.cleanDate=function(e,r,n){if(e===u)return r;if(t.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(_(n))return l.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==r)return r}else if(!t.isDateTime(e,n))return l.error("unrecognized date",e),r;return e};var S=/%\d?f/g,E=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function L(e,t,r,n){e=e.replace(S,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(e=e.replace(E,(function(){return C[r("%q")(a)]})),_(n))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var O=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,r,n,a,i){if(a=_(a)&&a,!t)if("y"===r)t=i.year;else if("m"===r)t=i.month;else{if("d"!==r)return function(e,t){var r=s(e+.05,d),n=w(Math.floor(r/f),2)+":"+w(s(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(s(e/p,60),O[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+L(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return L(t,e,n,a)};var D=3*d;t.incrementMonth=function(e,t,r){r=_(r)&&r;var n=s(e,d);if(e=Math.round(e-n),r)try{var a=Math.round(e/d)+m,i=g.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-m)*d+n}catch(t){l.error("invalid ms "+e+" in calendar "+r)}var c=new Date(e+D);return c.setUTCMonth(c.getUTCMonth()+t)+n-D},t.findExactDates=function(e,t){for(var r,n,a=0,i=0,l=0,s=0,c=_(t)&&g.getComponentMethod("calendars","getCal")(t),u=0;u1||m<0||m>1?null:{x:e+s*m,y:t+d*m}}function s(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,l=a-t;return o*o+l*l}var s=n*t-a*e;return s*s/r}t.segmentsIntersect=l,t.segmentDistance=function(e,t,r,n,a,i,o,c){if(l(e,t,r,n,a,i,o,c))return 0;var u=r-e,d=n-t,f=o-a,h=c-i,p=u*u+d*d,m=f*f+h*h,g=Math.min(s(u,d,p,a-e,i-t),s(u,d,p,o-e,c-t),s(f,h,m,e-a,t-i),s(f,h,m,r-a,n-i));return Math.sqrt(g)},t.getTextLocation=function(e,t,r,l){if(e===a&&l===i||(n={},a=e,i=l),n[r])return n[r];var s=e.getPointAtLength(o(r-l/2,t)),c=e.getPointAtLength(o(r+l/2,t)),u=Math.atan((c.y-s.y)/(c.x-s.x)),d=e.getPointAtLength(o(r,t)),f={x:(4*d.x+s.x+c.x)/6,y:(4*d.y+s.y+c.y)/6,theta:u};return n[r]=f,f},t.clearLocationCache=function(){a=null},t.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,l=t.top,s=t.bottom,c=0,u=e.getTotalLength(),d=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(a=r);var c=r.xo?r.x-o:0,d=r.ys?r.y-s:0;return Math.sqrt(c*c+d*d)}for(var h=f(c);h;){if((c+=h+r)>d)return;h=f(c)}for(h=f(d);h;){if(c>(d-=h+r))return;h=f(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},t.findPointOnPath=function(e,t,r,n){for(var a,i,o,l=(n=n||{}).pathLength||e.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(l)[r]?-1:1,d=0,f=0,h=l;d0?h=a:f=a,d++}return i}},9527:function(e){"use strict";e.exports=function(e){return e}},688:function(e){"use strict";e.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,a=String(n).length;if(a>16){var i=String(t).length;if(a>=String(e).length+i){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},4809:function(e,t,r){"use strict";var n=r(5568),a=r(2696).aL,i=r(6464).GP,o=r(721),l=r(3821),s=l.FP_SAFE,c=-s,u=l.BADNUM,d=e.exports={};d.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var f={};d.warnBadFormat=function(e){var t=String(e);f[t]||(f[t]=1,d.warn('encountered bad format: "'+t+'"'))},d.noFormat=function(e){return String(e)},d.numberFormat=function(e){var t;try{t=i(d.adjustFormat(e))}catch(t){return d.warnBadFormat(e),d.noFormat}return t},d.nestedProperty=r(5632),d.keyedContainer=r(4967),d.relativeAttr=r(2047),d.isPlainObject=r(6174),d.toLogRange=r(8083),d.relinkPrivateKeys=r(428);var h=r(7800);d.isArrayBuffer=h.isArrayBuffer,d.isTypedArray=h.isTypedArray,d.isArrayOrTypedArray=h.isArrayOrTypedArray,d.isArray1D=h.isArray1D,d.ensureArray=h.ensureArray,d.concat=h.concat,d.maxRowLength=h.maxRowLength,d.minRowLength=h.minRowLength;var p=r(8953);d.mod=p.mod,d.modHalf=p.modHalf;var m=r(4220);d.valObjectMeta=m.valObjectMeta,d.coerce=m.coerce,d.coerce2=m.coerce2,d.coerceFont=m.coerceFont,d.coercePattern=m.coercePattern,d.coerceHoverinfo=m.coerceHoverinfo,d.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,d.validate=m.validate;var g=r(2596);d.dateTime2ms=g.dateTime2ms,d.isDateTime=g.isDateTime,d.ms2DateTime=g.ms2DateTime,d.ms2DateTimeLocal=g.ms2DateTimeLocal,d.cleanDate=g.cleanDate,d.isJSDate=g.isJSDate,d.formatDate=g.formatDate,d.incrementMonth=g.incrementMonth,d.dateTick0=g.dateTick0,d.dfltRange=g.dfltRange,d.findExactDates=g.findExactDates,d.MIN_MS=g.MIN_MS,d.MAX_MS=g.MAX_MS;var v=r(8813);d.findBin=v.findBin,d.sorterAsc=v.sorterAsc,d.sorterDes=v.sorterDes,d.distinctVals=v.distinctVals,d.roundUp=v.roundUp,d.sort=v.sort,d.findIndexOfMin=v.findIndexOfMin,d.sortObjectKeys=r(2994);var y=r(9258);d.aggNums=y.aggNums,d.len=y.len,d.mean=y.mean,d.geometricMean=y.geometricMean,d.median=y.median,d.midRange=y.midRange,d.variance=y.variance,d.stdev=y.stdev,d.interp=y.interp;var x=r(5236);d.init2dArray=x.init2dArray,d.transposeRagged=x.transposeRagged,d.dot=x.dot,d.translationMatrix=x.translationMatrix,d.rotationMatrix=x.rotationMatrix,d.rotationXYMatrix=x.rotationXYMatrix,d.apply3DTransform=x.apply3DTransform,d.apply2DTransform=x.apply2DTransform,d.apply2DTransform2=x.apply2DTransform2,d.convertCssMatrix=x.convertCssMatrix,d.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(4313);d.deg2rad=b.deg2rad,d.rad2deg=b.rad2deg,d.angleDelta=b.angleDelta,d.angleDist=b.angleDist,d.isFullCircle=b.isFullCircle,d.isAngleInsideSector=b.isAngleInsideSector,d.isPtInsideSector=b.isPtInsideSector,d.pathArc=b.pathArc,d.pathSector=b.pathSector,d.pathAnnulus=b.pathAnnulus;var _=r(2546);d.isLeftAnchor=_.isLeftAnchor,d.isCenterAnchor=_.isCenterAnchor,d.isRightAnchor=_.isRightAnchor,d.isTopAnchor=_.isTopAnchor,d.isMiddleAnchor=_.isMiddleAnchor,d.isBottomAnchor=_.isBottomAnchor;var w=r(3447);d.segmentsIntersect=w.segmentsIntersect,d.segmentDistance=w.segmentDistance,d.getTextLocation=w.getTextLocation,d.clearLocationCache=w.clearLocationCache,d.getVisibleSegment=w.getVisibleSegment,d.findPointOnPath=w.findPointOnPath;var T=r(3049);d.extendFlat=T.extendFlat,d.extendDeep=T.extendDeep,d.extendDeepAll=T.extendDeepAll,d.extendDeepNoArrays=T.extendDeepNoArrays;var A=r(8636);d.log=A.log,d.warn=A.warn,d.error=A.error;var M=r(694);d.counterRegex=M.counter;var k=r(4025);d.throttle=k.throttle,d.throttleDone=k.done,d.clearThrottle=k.clear;var S=r(5425);function E(e){var t={};for(var r in e)for(var n=e[r],a=0;as||e=t)&&o(e)&&e>=0&&e%1==0},d.noop=r(4969),d.identity=r(9527),d.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},d.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},d.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,r)?a>10?(d.warn("randstr failed uniqueness"),s):e(t,r,n,(a||0)+1):s},d.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},d.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,l=2*o,s=2*t-1,c=new Array(s),u=new Array(o);for(r=0;r=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=o&&(a=l-1-a),i+=e[a]*c[n];u[r]=i}return u},d.syncOrAsync=function(e,t,r){var n;function a(){return d.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a);return r&&r(t)},d.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},d.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n0?t:0}))},d.fillArray=function(e,t,r,n){if(n=n||d.identity,d.isArrayOrTypedArray(e))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s},d.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;d.templateString=function(e,t){var r={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,n){var a;return R.test(n)?a=t[n]:(r[n]=r[n]||d.nestedProperty(t,n).get,a=r[n]()),d.isValidTextValue(a)?a:""}))};var N={max:10,count:0,name:"hovertemplate"};d.hovertemplateString=function(){return j.apply(N,arguments)};var F={max:10,count:0,name:"texttemplate"};d.texttemplateString=function(){return j.apply(F,arguments)};var B=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,z={max:10,count:0,name:"texttemplate",parseMultDiv:!0};d.texttemplateStringForShapes=function(){return j.apply(z,arguments)};var $=/^[:|\|]/;function j(e,t,r){var n=this,i=arguments;t||(t={});var o={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,l,s){var c="_xother"===l||"_yother"===l,u="_xother_"===l||"_yother_"===l,f="xother_"===l||"yother_"===l,h="xother"===l||"yother"===l||c||f||u,p=l;(c||u)&&(p=p.substring(1)),(f||u)&&(p=p.substring(0,p.length-1));var m,g,v,y=null,x=null;if(n.parseMultDiv){var b=function(e){var t=e.match(B);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,y=b.op,x=b.number}if(h){if(void 0===(m=t[p]))return""}else for(v=3;v=48&&o<=57,c=l>=48&&l<=57;if(s&&(n=10*n+o-48),c&&(a=10*a+l-48),!s||!c){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var H=2e9;d.seedPseudoRandom=function(){H=2e9},d.pseudoRandom=function(){var e=H;return H=(69069*H+1)%4294967296,Math.abs(H-e)<429496729?d.pseudoRandom():H/4294967296},d.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=d.extractOption(e,t,"htx","hovertext");if(d.isValidTextValue(a))return n(a);var i=d.extractOption(e,t,"tx","text");return d.isValidTextValue(i)?n(i):void 0},d.isValidTextValue=function(e){return e||0===e},d.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,d.strTranslate(a-c*(r+o),i-c*(n+l))+d.strScale(c)+(s?"rotate("+s+(t?"":" "+r+" "+n)+")":"")},d.setTransormAndDisplay=function(e,t){e.attr("transform",d.getTextTransform(t)),e.style("display",t.scale?null:"none")},d.ensureUniformFontSize=function(e,t){var r=d.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},d.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},d.bigFont=function(e){return Math.round(1.2*e)};var U=d.getFirefoxVersion(),Y=null!==U&&U<86;d.getPositionFromD3Event=function(){return Y?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},6174:function(e){"use strict";e.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},4967:function(e,t,r){"use strict";var n=r(5632),a=/^\w*$/;e.exports=function(e,t,r,i){var o,l,s;r=r||"name",i=i||"value";var c={};t&&t.length?(s=n(e,t),l=s.get()):l=e,t=t||"";var u={};if(l)for(o=0;o2)return c[t]=2|c[t],f.set(e,null);if(d){for(o=t;o1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}},i.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}},i.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}},5944:function(e,t,r){"use strict";var n=r(5568);e.exports=function(e,t,r){var a=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(e){e[0][i]=n.select(this)})),a}},5236:function(e,t,r){"use strict";var n=r(1191);t.init2dArray=function(e,t){for(var r=new Array(e),n=0;nt/2?e-Math.round(e/t)*t:e}}},5632:function(e,t,r){"use strict";var n=r(721),a=r(7800).isArrayOrTypedArray;function i(e,t){return function(){var r,n,o,l,s,c=e;for(l=0;l/g),s=0;si||c===a||cl||t&&s(e))}:function(e,t){var s=e[0],c=e[1];if(s===a||si||c===a||cl)return!1;var u,d,f,h,p,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(d,g)||c>Math.max(f,v)))if(cu||Math.abs(n(o,f))>a)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var l=r.length,s=n;r.splice(a+1);for(var c=s+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}},2521:function(e,t,r){"use strict";var n=r(721),a=r(3087);e.exports=function(e){var t;if("string"!=typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;return"undefined"!=typeof navigator&&(e=navigator.userAgent),e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),e}()))return!0;var r=a({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var i=t.split(" "),o=1;o-1;l--){var s=i[l];if("Version/"===s.substr(0,8)){var c=s.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}return r}},6539:function(e){"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;na.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;rt}function d(e,t){return e>=t}t.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-l)-1:Math.floor((e-t.start)/t.size+l);var i,o,f=0,h=t.length,p=0,m=h>1?(t[h-1]-t[0])/(h-1):1;for(o=m>=0?r?s:c:r?d:u,e+=m*l*(r?-1:1)*(m>=0?1:-1);f90&&a.log("Long binary search..."),f-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var r,n=e.slice();for(n.sort(t.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var a,i=n[r]-n[0]||1,l=i/(r||1)/1e4,s=[],c=0;c<=r;c++){var u=n[c],d=u-a;void 0===a?(s.push(u),a=u):d>l&&(i=Math.min(i,d),s.push(u),a=u)}return{vals:s,minDiff:i}},t.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,l=r?0:1,s=r?1:0,c=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(r)||(r=!1),a(i[0])){for(s=new Array(o),l=0;le.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},635:function(e,t,r){"use strict";var n=r(5568),a=r(4809),i=a.strTranslate,o=r(2972),l=r(4530).LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,r,g){var S=e.text(),E=!e.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(s),O=n.select(e.node().parentNode);if(!O.empty()){var D=e.attr("class")?e.attr("class").split(" ")[0]:"text";return D+="-math",O.selectAll("svg."+D).remove(),O.selectAll("g."+D+"-group").remove(),e.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(r&&r._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),o={fontSize:r};!function(e,t,r){var i,o,l,s,f=parseInt((MathJax.version||"").split(".")[0]);if(2===f||3===f){var h=function(){var r="math-output-"+a.randstr({},64),i=(s=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===f?MathJax.Hub.Typeset(i):MathJax.typeset([i])},p=function(){var t=s.select(2===f?".MathJax_SVG":".MathJax"),i=!t.empty()&&s.select("svg").node();if(i){var o,l=i.getBoundingClientRect();o=2===f?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,o,l)}else a.log("There was an error in the tex syntax.",e),r();s.remove()};2===f?MathJax.Hub.Queue((function(){return o=a.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:d},displayAlign:"left"})}),(function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),h,p,(function(){if("SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==l&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(o)})):3===f&&(o=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=d,"svg"!==(i=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){h(),p(),"svg"!==i&&(MathJax.config.startup.output=i),MathJax.config=o})))}else a.warn("No MathJax version:",MathJax.version)}(E[2],o,(function(n,a,o){O.selectAll("svg."+D).remove(),O.selectAll("g."+D+"-group").remove();var l=n&&n.select("svg");if(!l||!l.node())return I(),void t();var s=O.append("g").classed(D+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});s.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild);var c=o.width,u=o.height;l.attr({class:D,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var d=e.node().style.fill||"black",f=l.select("g");f.attr({fill:d,stroke:d});var h=f.node().getBoundingClientRect(),p=h.width,m=h.height;(p>c||m>u)&&(l.style("overflow","hidden"),p=(h=l.node().getBoundingClientRect()).width,m=h.height);var v=+e.attr("x"),y=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===D[0])s.attr({transform:"rotate("+[-90,v,y]+")"+i(-p/2,x-m/2)});else if("l"===D[0])y=x-m/2;else if("a"===D[0]&&0!==D.indexOf("atitle"))v=0,y=x;else{var b=e.attr("text-anchor");v-=p*("middle"===b?.5:"end"===b?1:0),y=y+x-m/2}l.attr({x:v,y}),g&&g.call(e,s),t(s)}))}))):I(),e}function I(){O.empty()||(D=e.attr("class")+"-math",O.select("svg."+D).remove()),e.text("").style("white-space","pre");var r=function(e,t){t=t.replace(v," ");var r,i=!1,s=[],c=-1;function u(){c++;var t=document.createElementNS(o.svg,"tspan");n.select(t).attr({class:"line",dy:c*l+"em"}),e.appendChild(t),r=t;var a=s;if(s=[{node:t}],a.length>1)for(var i=1;i doesnt match end tag <"+e+">. Pretending it did match.",t),r=s[s.length-1].node}else a.log("Ignoring unexpected end tag .",t)}b.test(t)?u():(r=e,s=[{node:e}]);for(var E=t.split(y),O=0;O|>|>)/g,d=[["$","$"],["\\(","\\)"]],f={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},h={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},m="​",g=["http:","https:","mailto:","",void 0,":"],v=t.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;t.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&C(n)}var k=/(^|;)\s*color:/;t.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a=e.split(y),i=[],o="",l=0,s=0;s3?i.push(c.substr(0,h-3)+"..."):i.push(c.substr(0,h));break}o=""}}return i.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(e){return e.replace(E,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):S[t])||e}))}function L(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var a=r.protocol,i=n.protocol;return-1!==g.indexOf(a)&&-1!==g.indexOf(i)?t:""}function O(e,t,r){var n,i,o,l=r.horizontalAlign,s=r.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return i="bottom"===s?function(){return c.bottom-n.height}:"middle"===s?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===l?function(){return c.right-n.width}:"center"===l?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=o()-u.left,t=i()-u.top,l=r.gd||{};if(r.gd){l._fullLayout._calcInverseTransform(l);var s=a.apply3DTransform(l._fullLayout._invTransform)(e,t);e=s[0],t=s[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=C,t.sanitizeHTML=function(e){e=e.replace(v," ");for(var t=document.createElement("p"),r=t,a=[],i=e.split(y),o=0;oi.ts+t?s():i.timer=setTimeout((function(){s(),i.timer=null}),t)},t.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)n(r[e]),delete r[e];else for(var a in r)t.clear(a)}},8083:function(e,t,r){"use strict";var n=r(721);e.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},4611:function(e){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},227:function(e){"use strict";e.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},6037:function(e,t,r){"use strict";var n=r(3626);e.exports=function(e){for(var t,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=e.split("[")[0],l=0;l0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var r,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(l.subplotsRegistry.cartesian||{}).attrRegex,s=(l.subplotsRegistry.polar||{}).attrRegex,d=(l.subplotsRegistry.ternary||{}).attrRegex,f=(l.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(e);for(r=0;r3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var r=0;r0)return e.substr(0,t)}t.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var _=["x","y","z"];t.clearAxisTypes=function(e,t,r){for(var n=0;n1&&i.warn("Full array edits are incompatible with other edits",d);var y=r[""][""];if(c(y))t.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!m&&(f(g,v),h(e),!0)}var x,b,_,w,T,A,M,k,S=Object.keys(r).map(Number).sort(o),E=t.get(),C=E||[],L=u(v,d).get(),O=[],D=-1,I=C.length;for(x=0;xC.length-(M?0:1))i.warn("index out of range",d,_);else if(void 0!==A)T.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,_),c(A)?O.push(_):M?("add"===A&&(A={}),C.splice(_,0,A),L&&L.splice(_,0,{})):i.warn("Unrecognized full object edit value",d,_,A),-1===D&&(D=_);else for(b=0;b=0;x--)C.splice(O[x],1),L&&L.splice(O[x],1);if(C.length?E||t.set(C):t.set(null),m)return!1;if(f(g,v),p!==a){var P;if(-1===D)P=S;else{for(I=Math.max(C.length,I),P=[],x=0;x=D);x++)P.push(_);for(x=D;x=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function P(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),I(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&I(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function R(e,t,r,n,i){!function(e,t,r,n){var a=o.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var i in I(e,r,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[i].length!==t[i].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,r,n);for(var s=function(e,t,r,n){var i,s,c,u,d,f=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=D(r,e.data.length-1),t)for(var m=0;m-1&&-1===r.indexOf("grouptitlefont")?s(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?s(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?s(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&s(r,r.replace("titleoffset","title.offset")):s(r,r.replace("title","title.text"));function s(t,r){e[r]=e[t],delete e[t]}}function U(e,t,r){e=o.getGraphDiv(e),T.clearPromiseQueue(e);var n={};if("string"==typeof t)n[t]=r;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,r),Promise.reject();n=o.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var a=q(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var l=[f.previousPromises];i.layoutReplot?l.push(A.layoutReplot):Object.keys(n).length&&(Y(e,i,a)||f.supplyDefaults(e),i.legend&&l.push(A.doLegend),i.layoutstyle&&l.push(A.layoutStyles),i.axrange&&V(l,a.rangesAltered),i.ticks&&l.push(A.doTicksRelayout),i.modebar&&l.push(A.doModeBar),i.camera&&l.push(A.doCamera),i.colorbars&&l.push(A.doColorBars),l.push(E)),l.push(f.rehover,f.redrag,f.reselect),c.add(e,U,[e,a.undoit],U,[e,a.redoit]);var s=o.syncOrAsync(l,e);return s&&s.then||(s=Promise.resolve(e)),s.then((function(){return e.emit("plotly_relayout",a.eventData),e}))}function Y(e,t,r){var n,a,i=e._fullLayout;if(!t.axrange)return!1;for(var l in t)if("axrange"!==l&&t[l])return!1;var s=function(e,t){return o.coerce(n,a,m,e,t)},c={};for(var u in r.rangesAltered){var d=h.id2name(u);if(n=e.layout[d],a=i[d],p(n,a,s,c),a._matchGroup)for(var f in a._matchGroup)if(f!==u){var g=i[h.id2name(f)];g.autorange=a.autorange,g.range=a.range.slice(),g._input.range=a.range.slice()}}return!0}function V(e,t){var r=t?function(e){var r=[];for(var n in t){var a=h.getFromId(e,n);if(r.push(n),-1!==(a.ticklabelposition||"").indexOf("inside")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var i in a._matchGroup)t[i]||r.push(i)}return h.draw(e,r,{skipTitle:!0})}:function(e){return h.draw(e,"redraw")};e.push(b,A.doAutoRangeAndConstraints,r,A.drawData,A.finalDraw)}var Z=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,G=/^[xyz]axis[0-9]*\.autorange$/,W=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function q(e,t){var r,n,a,i=e.layout,s=e._fullLayout,c=s._guiEditing,f=z(s._preGUI,c),p=Object.keys(t),m=h.list(e),g=o.extendDeepAll({},t),v={};for(H(t),p=Object.keys(t),n=0;n0&&"string"!=typeof I.parts[R];)R--;var N=I.parts[R],F=I.parts[R-1]+"."+N,$=I.parts.slice(0,R).join("."),j=l(e.layout,$).get(),U=l(s,$).get(),Y=I.get();if(void 0!==P){A[D]=P,S[D]="reverse"===N?P:B(Y);var V=d.getLayoutValObject(s,I.parts);if(V&&V.impliedEdits&&null!==P)for(var q in V.impliedEdits)E(o.relativeAttr(D,q),V.impliedEdits[q]);if(-1!==["width","height"].indexOf(D))if(P){E("autosize",null);var X="height"===D?"width":"height";E(X,s[X])}else s[D]=e._initialAutoSize[D];else if("autosize"===D)E("width",P?null:s.width),E("height",P?null:s.height);else if(F.match(Z))O(F),l(s,$+"._inputRange").set(null);else if(F.match(G)){O(F),l(s,$+"._inputRange").set(null);var J=l(s,$).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else F.match(W)&&l(s,$+"._inputDomain").set(null);if("type"===N){C=j;var Q="linear"===U.type&&"log"===P,ee="log"===U.type&&"linear"===P;if(Q||ee){if(C&&C.range)if(U.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var te=C.range[0],re=C.range[1];Q?(te<=0&&re<=0&&E($+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),E($+".range[0]",Math.log(te)/Math.LN10),E($+".range[1]",Math.log(re)/Math.LN10)):(E($+".range[0]",Math.pow(10,te)),E($+".range[1]",Math.pow(10,re)))}else E($+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete s[I.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,U,P,E),u.getComponentMethod("images","convertCoords")(e,U,P,E)}else E($+".autorange",!0),E($+".range",null);l(s,$+"._inputRange").set(null)}else if(N.match(k)){var ne=l(s,D).get(),ae=(P||{}).type;ae&&"-"!==ae||(ae="linear"),u.getComponentMethod("annotations","convertCoords")(e,ne,ae,E),u.getComponentMethod("images","convertCoords")(e,ne,ae,E)}var ie=w.containerArrayMatch(D);if(ie){r=ie.array,n=ie.index;var oe=ie.property,le=V||{editType:"calc"};""!==n&&""===oe&&(w.isAddVal(P)?S[D]=null:w.isRemoveVal(P)?S[D]=(l(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),M.update(_,le),v[r]||(v[r]={});var se=v[r][n];se||(se=v[r][n]={}),se[oe]=P,delete t[D]}else"reverse"===N?(j.range?j.range.reverse():(E($+".autorange",!0),j.range=[1,0]),U.autorange?_.calc=!0:_.plot=!0):("dragmode"===D&&(!1===P&&!1!==Y||!1!==P&&!1===Y)||s._has("scatter-like")&&s._has("regl")&&"dragmode"===D&&("lasso"===P||"select"===P)&&"lasso"!==Y&&"select"!==Y||s._has("gl2d")?_.plot=!0:V?M.update(_,V):_.calc=!0,I.set(P))}}for(r in v)w.applyContainerArrayChanges(e,f(i,r),v[r],_,f)||(_.plot=!0);for(var ce in L){var ue=(C=h.getFromId(e,ce))&&C._constraintGroup;if(ue)for(var de in _.calc=!0,ue)L[de]||(h.getFromId(e,de)._constraintShrinkable=!0)}(K(e)||t.height||t.width)&&(_.plot=!0);var fe=s.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=l(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ne(e,t){for(var r=0;r=a.length?a[0]:a[e]:a}function s(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,u){var d,h,p=0;function m(e){return Array.isArray(a)?p>=a.length?e.transitionOpts=a[p]:e.transitionOpts=a[0]:e.transitionOpts=a,p++,e}var g=[],v=null==t,y=Array.isArray(t);if(v||y||!o.isPlainObject(t)){if(v||-1!==["string","number"].indexOf(typeof t))for(d=0;d0&&__)&&w.push(h);g=w}}g.length>0?function(t){if(0!==t.length){for(var a=0;an._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,f.transition(e,t.frame.data,t.frame.layout,T.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};t()}()}}(g):(e.emit("plotly_animated"),i())}))},t.addFrames=function(e,t,r){if(e=o.getGraphDiv(e),null==t)return Promise.resolve();if(!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,i,l,s=e._transitionData._frames,u=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var d=s.length+2*t.length,h=[],p={};for(n=t.length-1;n>=0;n--)if(o.isPlainObject(t[n])){var m=t[n].name,g=(u[m]||p[m]||{}).name,v=t[n].name,y=u[g]||p[g];g&&v&&"number"==typeof v&&y&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(u[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},h.push({frame:f.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:d+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"==typeof(a=h[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+e._transitionData._counter++];);if(u[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var s=f.modifyFrames,u=f.modifyFrames,d=[e,l],h=[e,i];return c&&c.add(e,s,d,u,h),f.modifyFrames(e,i)},t.addTraces=function e(r,n,a){r=o.getGraphDiv(r);var i,l,s=[],u=t.deleteTraces,d=e,f=[r,s],h=[r,n];for(function(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!_(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function _(e){return e===Math.round(e)&&e>=0}function w(){var e,t,r={};for(e in d(r,o),n.subplotsRegistry)if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a=s.length)return!1;a=(r=(n.transformsRegistry[s[c].type]||{}).attributes)&&r[t[2]],l=3}else{var u=e._module;if(u||(u=(n.modules[e.type||i.type.dflt]||{})._module),!u)return!1;if(!(a=(r=u.attributes)&&r[o])){var d=u.basePlotModule;d&&d.attributes&&(a=d.attributes[o])}a||(a=i[o])}return b(a,t,l)},t.getLayoutValObject=function(e,t){var r=function(e,t){var r,a,i,l,s=e._basePlotModules;if(s){var c;for(r=0;r=a&&(r._input||{})._templateitemname;l&&(o=a);var s,c=t+"["+o+"]";function u(){s={},l&&(s[c]={},s[c][i]=l)}function d(e,t){l?n.nestedProperty(s[c],e).set(t):s[c+"."+e]=t}function f(){var e=s;return u(),e}return u(),{modifyBase:function(e,t){s[e]=t},modifyItem:d,getUpdateObj:f,applyUpdate:function(t,r){t&&d(t,r);var a=f();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},1817:function(e,t,r){"use strict";var n=r(5568),a=r(3626),i=r(4122),o=r(4809),l=r(635),s=r(4823),c=r(8766),u=r(2203),d=r(7240),f=r(5433),h=r(9714),p=r(4530),m=r(4391),g=m.enforce,v=m.clean,y=r(2919).doAutoRange,x="start",b=r(4826).zindexSeparator;function _(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function w(e){var r,a,l,s,d,m,g=e._fullLayout,v=g._size,y=v.p,x=h.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),t.drawMainTitle(e),f.manage(e),!g._has("cartesian"))return i.previousPromises(e);function w(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-y-n:t._offset+t._length+y+n:v.t+v.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+y+n:t._offset-y-n:v.l+v.w*(e.position||0)+n%1}for(r=0;r.5?"t":"b",o=e._fullLayout.margin[i],l=0;return"paper"===t.yref?l=r+t.pad.t+t.pad.b:"container"===t.yref&&(l=function(e,t,r,n,a){var i=0;return"middle"===r&&(i+=a/2),"t"===e?("top"===r&&(i+=a),i+=n-t*n):("bottom"===r&&(i+=a),i+=t*n),i}(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),l>o?l:0}(e,t,m);if(g>0){!function(e,t,r,n){var a="title.automargin",l=e._fullLayout.title,s=l.y>.5?"t":"b",c={x:l.x,y:l.y,t:0,b:0},u={};"paper"===l.yref&&function(e,t,r,n,a){var i="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,l=o.isTopAnchor(t)?n:n-a,s="b"===r?i-l:l;return!(o.isTopAnchor(t)&&"t"===r||o.isBottomAnchor(t)&&"b"===r)&&sT?u.push({code:"unused",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=m(t,n,r);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&g(i)&&e(i,o)}}({data:h,layout:f},""),u.length)return u.map(v)}},491:function(e,t,r){"use strict";var n=r(721),a=r(1420),i=r(4122),o=r(4809),l=r(4619),s=r(6243),c=r(2914),u=r(9697).version,d={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(e,t){var r,f,h,p;function m(e){return!(e in t)||o.validate(t[e],d[e])}if(t=t||{},o.isPlainObject(e)?(r=e.data||[],f=e.layout||{},h=e.config||{},p={}):(e=o.getGraphDiv(e),r=o.extendDeep([],e.data),f=o.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!m("width")&&null!==t.width||!m("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+o.join2(d.format.values,", "," or ")+".");var g={};function v(e,r){return o.coerce(t,g,d,e,r)}var y=v("format"),x=v("width"),b=v("height"),_=v("scale"),w=v("setBackground"),T=v("imageDataOnly"),A=document.createElement("div");A.style.position="absolute",A.style.left="-5000px",document.body.appendChild(A);var M=o.extendFlat({},f);x?M.width=x:null===t.width&&n(p.width)&&(M.width=p.width),b?M.height=b:null===t.height&&n(p.height)&&(M.height=p.height);var k=o.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=l.getRedrawFunc(A);function E(){return new Promise((function(e){setTimeout(e,l.getDelay(A._fullLayout))}))}function C(){return new Promise((function(e,t){var r=s(A,y,_),n=A._fullLayout.width,d=A._fullLayout.height;function f(){a.purge(A),document.body.removeChild(A)}if("full-json"===y){var h=i.graphJson(A,!1,"keepdata","object",!0,!0);return h.version=u,h=JSON.stringify(h),f(),e(T?h:l.encodeJSON(h))}if(f(),"svg"===y)return e(T?r:l.encodeSVG(r));var p=document.createElement("canvas");p.id=o.randstr(),c({format:y,width:n,height:d,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.newPlot(A,r,M,k).then(S).then(E).then(C).then((function(t){e(function(e){return T?e.replace(l.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},2466:function(e,t,r){"use strict";var n=r(4809),a=r(4122),i=r(7297),o=r(4452).dfltConfig,l=n.isPlainObject,s=Array.isArray,c=n.isArrayOrTypedArray;function u(e,t,r,a,i,o){o=o||[];for(var d=Object.keys(e),f=0;fx.length&&a.push(h("unused",i,v.concat(x.length)));var M,k,S,E,C,L=x.length,O=Array.isArray(A);if(O&&(L=Math.min(L,A.length)),2===b.dimensions)for(k=0;kx[k].length&&a.push(h("unused",i,v.concat(k,x[k].length)));var D=x[k].length;for(M=0;M<(O?Math.min(D,A[k].length):D);M++)S=O?A[k][M]:A,E=y[k][M],C=x[k][M],n.validate(E,S)?C!==E&&C!==+E&&a.push(h("dynamic",i,v.concat(k,M),E,C)):a.push(h("value",i,v.concat(k,M),E))}else a.push(h("array",i,v.concat(k),y[k]));else for(k=0;k1&&f.push(h("object","layout"))),a.supplyDefaults(p);for(var m=p._fullData,g=r.length,v=0;v0&&Math.round(d)===d))return{vals:a};c=d}for(var f=t.calendar,h="start"===s,p="end"===s,m=e[r+"period0"],g=i(m,f)||0,v=[],y=[],x=[],b=a.length,_=0;_M;)A=o(A,-c,f);for(;A<=M;)A=o(A,c,f);T=o(A,-c,f)}else{for(A=g+(w=Math.round((M-g)/u))*u;A>M;)A-=u;for(;A<=M;)A+=u;T=A-u}v[_]=h?T:p?A:(T+A)/2,y[_]=T,x[_]=A}return{vals:v,starts:y,ends:x}}},5126:function(e){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},2919:function(e,t,r){"use strict";var n=r(5568),a=r(721),i=r(4809),o=r(3821).FP_SAFE,l=r(3626),s=r(2203),c=r(5975),u=c.getFromId,d=c.isLinked;function f(e,t){var r,n,a=[],o=e._fullLayout,l=p(o,t,0),s=p(o,t,1),c=g(e,t),u=c.min,d=c.max;if(0===u.length||0===d.length)return i.simpleMap(t.range,t.r2l);var f=u[0].val,m=d[0].val;for(r=1;r0&&((M=L-l(b)-s(_))>O?k/M>D&&(w=b,T=_,D=k/M):k/L>D&&(w={val:b.val,nopad:1},T={val:_.val,nopad:1},D=k/L));if(f===m){var I=f-1,P=f+1;if(E)if(0===f)a=[0,1];else{var R=(f>0?d:u).reduce((function(e,t){return Math.max(e,s(t))}),0),N=f/(1-Math.min(.5,R/L));a=f>0?[0,N]:[N,0]}else a=C?[Math.max(0,I),Math.max(1,P)]:[I,P]}else E?(w.val>=0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):C&&(w.val-D*l(w)<0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),D=(T.val-w.val-h(t,b.val,_.val))/(L-l(w)-s(T)),a=[w.val-D*l(w),T.val+D*s(T)];return a=A(a,t),t.limitRange&&t.limitRange(),y&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),S=M((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!T){if(f=1/0,h=-1/0,w)for(n=0;n0&&(f=i),i>h&&i-o&&(f=i),i>h&&i=D;n--)O(n);return{min:p,max:m,opts:r}},concatExtremes:g};var m=3;function g(e,t,r){var n,a,i,o=t._id,l=e._fullData,s=e._fullLayout,c=[],d=[];function f(e,t){for(n=0;n=r&&(c.extrapad||!o)){l=!1;break}a(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(s,1),s--)}if(l){var u=i&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function b(e){return a(e)&&Math.abs(e)=t}function T(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))=c&&(o=c,r=c),l<=c&&(l=c,n=c)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&T(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&T(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&T(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&T(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},5511:function(e){"use strict";e.exports=function(e,t,r){var n,a;if(r){var i="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[i?1:0],a=r[i?0:1]}var o=e("autorangeoptions.minallowed",null===a?n:void 0),l=e("autorangeoptions.maxallowed",null===n?a:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===l&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},9714:function(e,t,r){"use strict";var n=r(5568),a=r(721),i=r(4122),o=r(3626),l=r(4809),s=l.strTranslate,c=r(635),u=r(7240),d=r(8766),f=r(2203),h=r(5829),p=r(8599),m=r(3821),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,y=m.ONEMINYEAR,x=m.ONEMAXQUARTER,b=m.ONEAVGQUARTER,_=m.ONEMINQUARTER,w=m.ONEMAXMONTH,T=m.ONEAVGMONTH,A=m.ONEMINMONTH,M=m.ONEWEEK,k=m.ONEDAY,S=k/2,E=m.ONEHOUR,C=m.ONEMIN,L=m.ONESEC,O=m.ONEMILLI,D=m.ONEMICROSEC,I=m.MINUS_SIGN,P=m.BADNUM,R={K:"zeroline"},N={K:"gridline",L:"path"},F={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},z={K:"tick",L:"text"},$={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},j=r(4530),H=j.MID_SHIFT,U=j.CAP_SHIFT,Y=j.LINE_SPACING,V=j.OPPOSITE_SIDE,Z=e.exports={};Z.setConvert=r(9091);var G=r(9666),W=r(5975),q=W.idSort,K=W.isLinked;Z.id2name=W.id2name,Z.name2id=W.name2id,Z.cleanId=W.cleanId,Z.list=W.list,Z.listIds=W.listIds,Z.getFromId=W.getFromId,Z.getFromTrace=W.getFromTrace;var X=r(2919);Z.getAutoRange=X.getAutoRange,Z.findExtremes=X.findExtremes;function J(e){var t=1e-4*(e[1]-e[0]);return[e[0]-t,e[1]+t]}Z.coerceRef=function(e,t,r,n,a,i){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=s[0]||("string"==typeof i?i:i[0])),i||(i=a),s=s.concat(s.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:s.concat(i?"string"==typeof i?[i]:i:[]),dflt:a},l.coerce(e,t,u,c)},Z.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},Z.coercePosition=function(e,t,r,n,a,i){var o,s;if("range"!==Z.getRefType(n))o=l.ensureNumber,s=r(a,i);else{var c=Z.getFromId(t,n);s=r(a,i=c.fraction2r(i)),o=c.cleanPos}e[a]=o(s)},Z.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?l.ensureNumber:Z.getFromId(t,r).cleanPos)(e)},Z.redrawComponents=function(e,t){t=t||Z.listIds(e);var r=e._fullLayout;function n(n,a,i,l){for(var s=o.getComponentMethod(n,a),c={},u=0;un&&f2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},Z.saveRangeInitial=function(e,t){for(var r=Z.list(e,"",!0),n=!1,a=0;a.3*f||u(n)||u(i))){var h=r.dtick/2;e+=e+h.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?e=Z.tickIncrement(e,"M6","reverse")+1.5*k:i.exactMonths>.8?e=Z.tickIncrement(e,"M1","reverse")+15.5*k:e-=S;var s=Z.tickIncrement(e,r);if(s<=n)return s}return e}(y,e,v,c,i)),g=y;g<=u;)g=Z.tickIncrement(g,v,!1,i);return{start:t.c2r(y,0,i),end:t.c2r(g,0,i),size:v,_dataSpan:u-c}},Z.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,i=t.dtick&&a(t._tmin);if(i){var o=Z.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*o+.01*t._tmin]}else{var s=l.simpleMap(t.range,t.r2l);n=[s[0],.8*s[0]+.2*s[1]]}if(e.range=l.simpleMap(n,t.l2r),e._isMinor=!0,Z.prepTicks(e,r),i){var c=a(t.dtick),u=a(e.dtick),d=c?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);c&&u?re(d,f)?d===2*M&&f===2*k&&(e.dtick=M):d===2*M&&f===3*k?e.dtick=M:d!==M||(t._input.minor||{}).nticks?ne(d/f,2.5)?e.dtick=d/2:e.dtick=d:e.dtick=k:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":re(d,f)?d>=12&&2===f&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?re(d,f)||(e.dtick=ne(d/f,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},Z.prepTicks=function(e,t){var r=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,i=e.nticks;i||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?l.bigFont(e.tickfont.size||12):15,i=e._length/n):(n="y"===e._id.charAt(0)?40:80,i=l.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(i*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,Z.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(a(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),i=Z.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=E,o&&!n&&e.dticke.range[1],h=!e.ticklabelindex||l.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],p=l.simpleMap(e.range,e.r2l,void 0,void 0,t),m=p[1]=(H?0:1);U--){var Y=!U;U?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var V=U?e:l.extendFlat({},e,e.minor);if(Y?Z.prepMinorTicks(V,e,t):Z.prepTicks(V,t),"array"!==V.tickmode)if("sync"!==V.tickmode){var G=J(p),W=G[0],q=G[1],K=a(V.dtick),X="log"===s&&!(K||"L"===V.dtick.charAt(0)),Q=Z.tickFirst(V,t);if(U){if(e._tmin=Q,Q=q:ne<=q;ne=Z.tickIncrement(ne,ae,m,c)){if(U&&ee++,V.rangebreaks&&!m){if(ne=R)break}if(z.length>N||ne===re)break;re=ne;var ie={value:ne};U?(X&&ne!==(0|ne)&&(ie.simpleLabel=!0),u>1&&ee%u&&(ie.skipLabel=!0),z.push(ie)):(ie.minor=!0,$.push(ie))}}else z=[],F=oe(e);else U?(z=[],F=le(e,!Y)):($=[],B=le(e,!Y))}if(!$||$.length<2?h=!1:(r=($[1].value-$[0].value)*(f?-1:1),n=e.tickformat,(/%f/.test(n)?r>=D:/%L/.test(n)?r>=O:/%[SX]/.test(n)?r>=L:/%M/.test(n)?r>=C:/%[HI]/.test(n)?r>=E:/%p/.test(n)?r>=S:/%[Aadejuwx]/.test(n)?r>=k:/%[UVW]/.test(n)?r>=M:/%[Bbm]/.test(n)?r>=A:/%[q]/.test(n)?r>=_:!/%[Yy]/.test(n)||r>=y)||(h=!1)),h){var se=z.concat($);d&&z.length&&(se=se.slice(1)),(se=se.sort((function(e,t){return e.value-t.value})).filter((function(e,t,r){return 0===t||e.value!==r[t-1].value}))).map((function(e,t){return void 0!==e.minor||e.skipLabel?null:t})).filter((function(e){return null!==e})).forEach((function(e){h.map((function(t){var r=e+t;r>=0&&r0?(i=n-1,o=n):(i=n,o=n);var l,s=e[i].value,c=e[o].value,u=Math.abs(c-s),d=r||u,f=0;d>=y?f=u>=y&&u<=g?u:v:r===b&&d>=_?f=u>=_&&u<=x?u:b:d>=A?f=u>=A&&u<=w?u:T:r===M&&d>=M?f=M:d>=k?f=k:r===S&&d>=S?f=S:r===E&&d>=E&&(f=E),f>=u&&(f=u,l=!0);var h=a+f;if(t.rangebreaks&&f>0){for(var p=0,m=0;m<84;m++){var C=(m+.5)/84;t.maskBreaks(a*(1-C)+C*h)!==P&&p++}(f*=p/84)||(e[n].drop=!0),l&&u>M&&(f=u)}(f>0||0===n)&&(e[n].periodX=a+f/2)}}(j,e,e._definedDelta),e.rangebreaks){var ge="y"===e._id.charAt(0),ve=1;"auto"===e.tickmode&&(ve=e.tickfont?e.tickfont.size:12);var ye=NaN;for(i=z.length-1;i>-1;i--)if(z[i].drop)z.splice(i,1);else{z[i].value=Ne(z[i].value,e);var xe=e.c2p(z[i].value);(ge?ye>xe-ve:yeR||nR&&(r.periodX=R),n10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=k&&i<=10||t>=15*k)e._tickround="d";else if(t>=C&&i<=16||t>=E)e._tickround="M";else if(t>=L&&i<=19||t>=C)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(a(t)||"L"===t.charAt(0)){var l=e.range.map(e.r2d||Number);a(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(l[0]),Math.abs(l[1])),c=Math.floor(Math.log(s)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(xe(e.exponentformat)&&!be(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function ve(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}Z.autoTicks=function(e,t,r){var n;function i(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=l.dateTick0(e.calendar,0);var o=2*t;if(o>v)t/=v,n=i(10),e.dtick="M"+12*me(t,n,se);else if(o>T)t/=T,e.dtick="M"+me(t,1,ce);else if(o>k){if(e.dtick=me(t,k,e._hasDayOfWeekBreaks?[1,2,7,14]:de),!r){var s=Z.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(s)?e.tick0=l.dateTick0(e.calendar,2):e.tick0=l.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else o>E?e.dtick=me(t,E,ce):o>C?e.dtick=me(t,C,ue):o>L?e.dtick=me(t,L,ue):(n=i(10),e.dtick=me(t,n,se))}else if("log"===e.type){e.tick0=0;var u=l.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var d=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/d,n=i(10),e.dtick="L"+me(t,n,se)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Re(e)?(e.tick0=0,n=1,e.dtick=me(t,n,pe)):(e.tick0=0,n=i(10),e.dtick=me(t,n,se));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}},Z.tickIncrement=function(e,t,r,i){var o=r?-1:1;if(a(t))return l.increment(e,o*t);var s=t.charAt(0),c=o*Number(t.substr(1));if("M"===s)return l.incrementMonth(e,c,i);if("L"===s)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===s){var u="D2"===t?he:fe,d=e+.01*o,f=l.roundUp(l.mod(d,1),u,r);return Math.floor(d)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},Z.tickFirst=function(e,t){var r=e.r2l||Number,i=l.simpleMap(e.range,r,void 0,void 0,t),o=i[1]=0&&r<=e._length?t:null};if(s&&l.isArrayOrTypedArray(e.ticktext)){var h=l.simpleMap(e.range,e.r2l),p=(Math.abs(h[1]-h[0])-(e._lBreaks||0))/1e4;for(i=0;i ")}else e._prevDateHead=s,c+="
"+s;t.text=c}(e,o,r,c):"log"===u?function(e,t,r,n,i){var o=e.dtick,s=t.x,c=e.tickformat,u="string"==typeof o&&o.charAt(0);if("never"===i&&(i=""),n&&"L"!==u&&(o="L3",u="L"),c||"L"===u)t.text=_e(Math.pow(10,s),e,i,n);else if(a(o)||"D"===u&&l.mod(s+.01,1)<.1){var d=Math.round(s),f=Math.abs(d),h=e.exponentformat;"power"===h||xe(h)&&be(d)?(t.text=0===d?1:1===d?"10":"10"+(d>1?"":I)+f+"",t.fontSize*=1.25):("e"===h||"E"===h)&&f>2?t.text="1"+h+(d>0?"+":I)+f:(t.text=_e(Math.pow(10,s),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,l.mod(s,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,o,0,c,g):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,o):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,r):Re(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=_e(t.x,e,a,n);else{var i=t.x/180;if(0===i)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)t.text=_e(l.deg2rad(t.x),e,a,n);else{var s=t.x<0;1===o[1]?1===o[0]?t.text="π":t.text=o[0]+"π":t.text=["",o[0],"","⁄","",o[1],"","π"].join(""),s&&(t.text=I+t.text)}}}}(e,o,r,c,g):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=_e(t.x,e,a,n)}(e,o,0,c,g),n||(e.tickprefix&&!m(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!m(e.showticksuffix)&&(o.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(o.text)){var v=e.labelalias[o.text];"string"==typeof v&&(o.text=v)}return("boundaries"===e.tickson||e.showdividers)&&(o.xbnd=[f(o.x-.5),f(o.x+e.dtick-.5)]),o},Z.hoverLabelText=function(e,t,r){r&&(e=l.extendFlat({},e,{hoverformat:r}));var n=l.isArrayOrTypedArray(t)?t[0]:t,a=l.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==a&&a!==n)return Z.hoverLabelText(e,n,r)+" - "+Z.hoverLabelText(e,a,r);var i="log"===e.type&&n<=0,o=Z.tickText(e,e.c2l(i?-n:n),"hover").text;return i?0===n?"0":I+o:o};var ye=["f","p","n","μ","m","","k","M","G","T"];function xe(e){return"SI"===e||"B"===e}function be(e){return e>14||e<-15}function _e(e,t,r,n){var i=e<0,o=t._tickround,s=r||t.exponentformat||"B",c=t._tickexponent,u=Z.getTickFormat(t),d=t.separatethousands;if(n){var f={exponentformat:s,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ge(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,I);var h,p=Math.pow(10,-o)/2;if("none"===s&&(c=0),(e=Math.abs(e))"+h+"":"B"===s&&9===c?e+="B":xe(s)&&(e+=ye[c/3+5])),i?I+e:e}function we(e,t){if(e){var r=Object.keys($).reduce((function(e,r){return-1!==t.indexOf(r)&&$[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function Te(e,t){for(var r=[],n={},a=0;a1&&r=a.min&&e=0,i=u(e,t[1])<=0;return(r||a)&&(n||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=o(a)))){r=n;break}break;case"log":for(t=0;t=0&&a.unshift(a.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return l.syncOrAsync(a.map((function(t){return function(){if(t){var n=Z.getFromId(e,t);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=i;var a=Z.drawOne(e,n,r);return n._shiftPusher&&ze(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=l.simpleMap(n._r,n.r2l),a}}})))},Z.drawOne=function(e,t,r){var n,a,s,h=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var m=e._fullLayout,g=t._id,v=g.charAt(0),y=Z.counterLetter(g),x=m._plots[t._mainSubplot];if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var b=t.linewidth/2||0;"inside"===t.ticks&&(b+=t.ticklen),ze(t,b,h,!0),ze(t,t.shift||0,h,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,h));var _=x[v+"axislayer"],w=t._mainLinePosition,T=w+=t._shift,A=t._mainMirrorPosition,M=t._vals=Z.calcTicks(t),k=[t.mirror,T,A].join("_");for(n=0;n0?r.bottom-u:0,d))));var f=0,h=0;if(t._shiftPusher&&(f=Math.max(d,r.height>0?"l"===s?u-r.left:r.right-u:0),t.title.text!==m._dfltTitle[v]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===s&&(h+=ke(t))),t._fullDepth=Math.max(f,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===v){if("b"===s?n[s]=t._depth:(n[s]=t._depth=Math.max(r.width>0?u-r.top:0,d),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===s?(t._depth=Math.max(r.height>0?u-r.left:0,d),n[s]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-u:0,d),n[s]=t._depth+g,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(n.yb=0,n.b=_);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[y]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==m._dfltTitle[v]&&(n[s]+=ke(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[c]+=d),!0===t.mirror||"ticks"===t.mirror?a[y]=t._anchorAxis.domain[p[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[y]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}de&&(l=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(we(n,t.automargin),we(a,t.automargin)),i.autoMargin(e,Ce(t),n),i.autoMargin(e,Le(t),a),i.autoMargin(e,Oe(t),l)})),l.syncOrAsync(ce)}}function fe(e){var r=g+(e||"tick");return S[r]||(S[r]=function(e,t,r){var n,a,i,o;if(e._selections[t].size())n=1/0,a=-1/0,i=1/0,o=-1/0,e._selections[t].each((function(){var e=Ee(this),t=f.bBox(e.node().parentNode);n=Math.min(n,t.top),a=Math.max(a,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}));else{var l=Z.makeLabelFns(e,r);n=a=l.yFn({dx:0,dy:0,fontSize:0}),i=o=l.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:a,left:i,right:o,height:a-n,width:o-i}}(t,r,T)),S[r]}},Z.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],a=e.side===n?1:-1,i=[-1,1,a,-a];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(i=i.map((function(e){return-e}))),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},Z.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},Z.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),a=r("left"),i=r("right"),o=r("bottom"),l=r("inside"),s=o||a||n||i;if(!s&&!l)return[0,0];var c=e.side,u=s?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;return(o||n)&&(u+=f*U,d+=(e.linewidth||0)/2),(a||i)&&(u+=(e.linewidth||0)/2,d+=3),l&&"top"===c&&(d-=f*(1-U)),(a||n)&&(u=-u),"bottom"!==c&&"right"!==c||(d=-d),[s?u:0,l?d:0]}(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,a=t[0],i=t[1],o=e.range[0]>e.range[1],l=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside"),c=!l;if(r&&(r*=o?-1:1),n){var u=e.side;n*=l&&("top"===u||"left"===u)||c&&("bottom"===u||"right"===u)?1:-1}return"x"===e._id.charAt(0)?function(t){return s(a+e._offset+e.l2p(Ae(t))+r,i+n)}:function(t){return s(i+n,a+e._offset+e.l2p(Ae(t))+r)}},Z.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=void 0!==n.len?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+l*r)+"v"+i*r:"M"+(t+l*r)+",0h"+i*r},Z.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(e){return-1!==n.indexOf(e)},o=i("top"),s=i("left"),c=i("right"),u=i("bottom")||s||o||c,d=i("inside"),f="inside"===n&&"inside"===e.ticks||!d&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,m=f?e.ticklen:0;if(d?m*=-1:u&&(m=0),f&&(h+=m,r)){var g=l.deg2rad(r);h=m*Math.cos(g)+1,p=m*Math.sin(g)}e.showticklabels&&(f||e.showline)&&(h+=.2*e.tickfont.size);var v,y,x,b,_,w={labelStandoff:h+=(e.linewidth||1)/2*(d?-1:1),labelShift:p},T=0,A=e.side,M=e._id.charAt(0),k=e.tickangle;if("x"===M)b=(_=!d&&"bottom"===A||d&&"top"===A)?1:-1,d&&(b*=-1),v=p*b,y=t+h*b,x=_?1:-.2,90===Math.abs(k)&&(d?x+=H:x=-90===k&&"bottom"===A?U:90===k&&"top"===A?H:.5,T=H/2*(k/90)),w.xFn=function(e){return e.dx+v+T*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*x},w.anchorFn=function(e,t){if(u){if(s)return"end";if(c)return"start"}return a(t)&&0!==t&&180!==t?t*b<0!==d?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==d?-n:0};else if("y"===M){if(b=(_=!d&&"left"===A||d&&"right"===A)?1:-1,d&&(b*=-1),v=h,y=p*b,x=0,d||90!==Math.abs(k)||(x=-90===k&&"left"===A||90===k&&"right"===A?U:.5),d){var S=a(k)?+k:0;if(0!==S){var E=l.deg2rad(S);T=Math.abs(Math.sin(E))*U*b,x=0}}w.xFn=function(e){return e.dx+t-(v+e.fontSize*x)*b+T*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*H},w.anchorFn=function(e,t){return a(t)&&90===Math.abs(t)?"middle":_?"end":"start"},w.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},Z.drawTicks=function(e,t,r){r=r||{};var a=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=r.layer.selectAll("path."+a).data(i,Me);o.exit().remove(),o.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return d.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return f.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Be(t,[B]),o.attr("transform",r.transFn)},Z.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var a=t._id+"grid",i=t.minor&&t.minor.showgrid,o=i?r.vals.filter((function(e){return e.minor})):[],l=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],s=r.counterAxis;if(s&&Z.shouldShowZeroLine(e,t,s))for(var c="array"===t.tickmode,u=0;u=0;v--){var y=v?m:g;if(y){var x=y.selectAll("path."+a).data(v?l:o,Me);x.exit().remove(),x.enter().append("path").classed(a,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(e){return d.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return f.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Be(t,[N,F])}},Z.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=Z.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return q(e.id,t.id)}))})),i.attr("transform",r.transFn).attr("d",r.path).call(d.stroke,t.zerolinecolor||d.defaultLine).style("stroke-width",f.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Be(t,[R])},Z.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,o=t._id,u=r.cls||o+"tick",d=r.vals.filter((function(e){return e.text})),h=r.labelFns,p=r.secondary?0:t.tickangle,m=(t._prevTickAngles||{})[u],g=r.layer.selectAll("g."+u).data(t.showticklabels?d:[],Me),v=[];function y(e,i){e.each((function(e){var o=n.select(this),l=o.select(".text-math-group"),u=h.anchorFn(e,i),d=r.transFn.call(o.node(),e)+(a(i)&&0!=+i?" rotate("+i+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),p=c.lineCount(o),m=Y*e.fontSize,g=h.heightFn(e,a(i)?+i:0,(p-1)*m);if(g&&(d+=s(0,g)),l.empty()){var v=o.select("text");v.attr({transform:d,"text-anchor":u}),v.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=f.bBox(l.node()).width*{end:-.5,start:.5}[u];l.attr("transform",d+s(y,0))}}))}g.enter().append("g").classed(u,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),a=e._promises.length;r.call(c.positionText,h.xFn(t),h.yFn(t)).call(f.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(c.convertToTspans,e),e._promises[a]?v.push(e._promises.pop().then((function(){y(r,p)}))):y(r,p)})),Be(t,[z]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(e){n.select(this).select("text").call(c.positionText,h.xFn(e),h.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var a=-1!==r.indexOf("hide"),o="x"===t._id.charAt(0),s=0,c=o?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var u=l.simpleMap(t.range,t.r2l);s=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var d=Math.min(s,c),h=Math.max(s,c),p=t.side,m=1/0,v=-1/0;for(var y in g.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var i=f.bBox(r.node()),l=0;o?(i.right>h||i.lefth||i.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?s.style("display","none"):"tick"!==e.K||a||s.style("display",null)}))}))}))}))},y(g,m+1?m:p);var x=null;t._selections&&(t._selections[u]=g);var b=[function(){return v.length&&Promise.all(v)}];t.automargin&&i._redrawFromAutoMarginCount&&90===m?(x=m,b.push((function(){y(g,m)}))):b.push((function(){if(y(g,p),d.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){x=t.autotickangles[0];var e,n=0,a=[],i=1;g.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),o=Ee(this),l=f.bBox(o.node());i=Math.max(i,c.lineCount(o)),a.push({top:0,bottom:10,height:10,left:r-l.width/2,right:r+l.width/2+2,width:l.width+2})}));var o=("boundaries"===t.tickson||t.showdividers)&&!r.secondary,s=d.length,u=Math.abs((d[s-1].x-d[0].x)*t._m)/(s-1),h=o?u/2:u,m=o?t.ticklen:1.25*n*i,v=h/Math.sqrt(Math.pow(h,2)+Math.pow(m,2)),b=t.autotickangles.map((function(e){return e*Math.PI/180})),_=b.find((function(e){return Math.abs(Math.cos(e))<=v}));void 0===_&&(_=b.reduce((function(e,t){return Math.abs(Math.cos(e))$*P&&(O=P,E[S]=C[S]=D[S])}var j=Math.abs(O-L);j-A>0?A*=1+A/(j-=A):A=0,"y"!==t._id.charAt(0)&&(A=-A),E[k]=w.p2r(w.r2p(C[k])+M*A),"min"===w.autorange||"max reversed"===w.autorange?(E[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(E[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[w._name+".range"]=E}var H=l.syncOrAsync(b);return H&&H.then&&e._promises.push(H),H},Z.getPxPosition=function(e,t){var r,n=e._fullLayout._size,a=t._id.charAt(0),i=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===a?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===a&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===i||"left"===i?r._offset:"bottom"===i||"right"===i?r._offset+r._length:void 0},Z.shouldShowZeroLine=function(e,t,r){var n=l.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===P)&&(Se(t,0)||!function(e,t,r,n){var a=r._mainAxis;if(a){var i=e._fullLayout,o=t._id.charAt(0),l=Z.counterLetter(t._id),s=t._offset+(Math.abs(n[0])1)for(n=1;n2*o}(a,t))return"date";var g="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=d(r),a=0,o=0,l={},u=0;u2*a}(a,g)?"category":function(e,t){for(var r=e.length,n=0;n=2){var l,c,u="";if(2===o.length)for(l=0;l<2;l++)if(c=_(o[l])){u=v;break}var d=a("pattern",u);if(d===v)for(l=0;l<2;l++)(c=_(o[l]))&&(t.bounds[l]=o[l]=c-1);if(d)for(l=0;l<2;l++)switch(c=o[l],d){case v:if(!n(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[l]=o[l]=c;break;case y:if(!n(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[l]=o[l]=c}if(!1===r.autorange){var f=r.range;if(f[0]f[1])return void(t.enabled=!1)}else if(o[0]>f[0]&&o[1]n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}},6473:function(e,t,r){"use strict";var n=r(7800).isTypedArraySpec;e.exports=function(e,t,r,a){if("category"===t.type){var i,o=e.categoryarray,l=Array.isArray(o)&&o.length>0||n(o);l&&(i="array");var s,c=r("categoryorder",i);"array"===c&&(s=r("categoryarray")),l||"array"!==c||(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=s.slice():(s=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;nn?a.substr(n):i.substr(r))+o:a+i+e*t:o}function g(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;oc*x)||T)for(r=0;rI&&FO&&(O=F);f/=(O-L)/(2*D),L=s.l2r(L),O=s.l2r(O),s.range=s._input.range=S=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function z(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",a+"Z")}function $(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,r)).attr("d","M0,0Z")}function j(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),H(e,t,a,i)}function H(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function U(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Y(e){D&&e.data&&e._context.showTips&&(a.notifier(a._(e,"Double-click to zoom back out"),"long"),D=!1)}function V(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,O)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Z(e,t,r,n,i){for(var o,l,s,c,u=!1,d={},f={},h=(i||{}).xaHash,p=(i||{}).yaHash,m=0;m=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(U(a),2!==e||ve||Ye(),ge)o.indexOf("select")>-1&&S(r,a,K,X,t.id,Oe),o.indexOf("event")>-1&&h.click(a,r,t.id);else if(1===e&&ve){var l=m?I:D,c="s"===m||"w"===v?0:1,d=l._name+".range["+c+"]",f=function(e,t){var r,n=e.range[t],a=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(r)+"g")(n))}(l,c),p="left",g="middle";if(l.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===l.side&&(p="right")):"e"===v&&(p="right"),a._context.showAxisRangeEntryBoxes&&n.select(be).call(u.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(f),fill:l.tickfont?l.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(e){var t=l.d2r(e);void 0!==t&&s.call("_guiRelayout",a,d,t)}))}}}function Pe(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+_e)),a=Math.max(0,Math.min(te,pe*r+we)),i=Math.abs(n-_e),o=Math.abs(a-we);function l(){Se="",Te.r=Te.l,Te.t=Te.b,Ce.attr("d","M0,0Z")}if(Te.l=Math.min(_e,n),Te.r=Math.max(_e,n),Te.t=Math.min(we,a),Te.b=Math.max(we,a),re.isSubplotConstrained)i>O||o>O?(Se="xy",i/ee>o/te?(o=i*te/ee,we>a?Te.t=we-o:Te.b=we+o):(i=o*ee/te,_e>n?Te.l=_e-i:Te.r=_e+i),Ce.attr("d",V(Te))):l();else if(ne.isSubplotConstrained)if(i>O||o>O){Se="xy";var s=Math.min(Te.l/ee,(te-Te.b)/te),c=Math.max(Te.r/ee,(te-Te.t)/te);Te.l=s*ee,Te.r=c*ee,Te.b=(1-s)*te,Te.t=(1-c)*te,Ce.attr("d",V(Te))}else l();else!ie||o0){var u;if(ne.isSubplotConstrained||!ae&&1===ie.length){for(u=0;u1&&(void 0!==i.maxallowed&&le===(i.range[0]1&&(void 0!==o.maxallowed&&se===(o.range[0]1)if(s)t.xlines=f(n,"path","xlines-above"),t.ylines=f(n,"path","ylines-above"),t.xaxislayer=f(n,"g","xaxislayer-above"),t.yaxislayer=f(n,"g","yaxislayer-above");else{if(!i){var d=f(n,"g","layer-subplot");t.shapelayer=f(d,"g","shapelayer"),t.imagelayer=f(d,"g","imagelayer"),t.minorGridlayer=f(n,"g","minor-gridlayer"),t.gridlayer=f(n,"g","gridlayer"),t.zerolinelayer=f(n,"g","zerolinelayer");var m=f(n,"g","layer-between");t.shapelayerBetween=f(m,"g","shapelayer"),t.imagelayerBetween=f(m,"g","imagelayer"),f(n,"path","xlines-below"),f(n,"path","ylines-below"),t.overlinesBelow=f(n,"g","overlines-below"),f(n,"g","xaxislayer-below"),f(n,"g","yaxislayer-below"),t.overaxesBelow=f(n,"g","overaxes-below")}t.overplot=f(n,"g","overplot"),t.plot=f(t.overplot,"g",a),i||(t.xlines=f(n,"path","xlines-above"),t.ylines=f(n,"path","ylines-above"),t.overlinesAbove=f(n,"g","overlines-above"),f(n,"g","xaxislayer-above"),f(n,"g","yaxislayer-above"),t.overaxesAbove=f(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+o),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+o),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var g=t.mainplotinfo,v=g.plotgroup,y=a+"-x",x=a+"-y";t.minorGridlayer=g.minorGridlayer,t.gridlayer=g.gridlayer,t.zerolinelayer=g.zerolinelayer,f(g.overlinesBelow,"path",y),f(g.overlinesBelow,"path",x),f(g.overaxesBelow,"g",y),f(g.overaxesBelow,"g",x),t.plot=f(g.overplot,"g",a),f(g.overlinesAbove,"path",y),f(g.overlinesAbove,"path",x),f(g.overaxesAbove,"g",y),f(g.overaxesAbove,"g",x),t.xlines=v.select(".overlines-"+o).select("."+y),t.ylines=v.select(".overlines-"+l).select("."+x),t.xaxislayer=v.select(".overaxes-"+o).select("."+y),t.yaxislayer=v.select(".overaxes-"+l).select("."+x)}i||(s||(h(t.minorGridlayer,"g",t.xaxis._id),h(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map((function(e){return e[0]})).sort(c.idSort),h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map((function(e){return e[0]})).sort(c.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function v(e,t){if(e){var r={};for(var a in e.each((function(e){var a=e[0];n.select(this).remove(),y(a,t),r[a]=!0})),t._plots)for(var i=t._plots[a].overlays||[],o=0;o0){var g=h.id;if(-1!==g.indexOf(p))continue;g+=p+(u+1),h=i.extendFlat({},h,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var v,y=[],x=0;x1&&(w+=p+_),b.push(n+w),r=0;rb[1]-1/4096&&(t.domain=l),a.noneOrAll(e.domain,t.domain,l),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},4616:function(e,t,r){"use strict";var n=r(7703);e.exports=function(e,t,r,a,i){i||(i={});var o=i.tickSuffixDflt,l=n(e);r("tickprefix")&&r("showtickprefix",l),r("ticksuffix",o)&&r("showticksuffix",l)}},259:function(e,t,r){"use strict";var n=r(5511);e.exports=function(e,t,r,a){var i=t._template||{},o=t.type||i.type||"-";r("minallowed"),r("maxallowed");var l,s=r("range");s||a.noInsiderange||"log"===o||(!(l=r("insiderange"))||null!==l[0]&&null!==l[1]||(t.insiderange=!1,l=void 0),l&&(s=r("range",l)));var c,u=t.getAutorangeDflt(s,a),d=r("autorange",u);!s||(null!==s[0]||null!==s[1])&&(null!==s[0]&&null!==s[1]||"reversed"!==d&&!0!==d)&&(null===s[0]||"min"!==d&&"max reversed"!==d)&&(null===s[1]||"max"!==d&&"min reversed"!==d)||(s=void 0,delete t.range,t.autorange=!0,c=!0),c||(d=r("autorange",u=t.getAutorangeDflt(s,a))),d&&(n(r,d,s),"linear"!==o&&"-"!==o||r("rangemode")),t.cleanRange()}},7611:function(e,t,r){"use strict";var n=r(4530).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*r;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)],e.setScale()}},9091:function(e,t,r){"use strict";var n=r(5568),a=r(2696).aL,i=r(4809),o=i.numberFormat,l=r(721),s=i.cleanNumber,c=i.ms2DateTime,u=i.dateTime2ms,d=i.ensureNumber,f=i.isArrayOrTypedArray,h=r(3821),p=h.FP_SAFE,m=h.BADNUM,g=h.LOG_CLIP,v=h.ONEWEEK,y=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,_=h.ONESEC,w=r(5975),T=r(4826),A=T.HOUR_PATTERN,M=T.WEEKDAY_PATTERN;function k(e){return Math.pow(10,e)}function S(e){return null!=e}e.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function E(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],a=e.range[1];return.5*(n+a-2*g*Math.abs(n-a))}return m}function C(t,r,n,a){if((a||{}).msUTC&&l(t))return+t;var o=u(t,n||e.calendar);if(o===m){if(!l(t))return m;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),c=Math.round(t-s/10);o=u(new Date(c))+s/10}return o}function L(t,r,n){return c(t,r,n||e.calendar)}function O(t){return e._categories[Math.round(t)]}function D(t){if(S(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return m}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function P(e){var t=I(e);return void 0!==t?t:l(e)?+e:void 0}function R(e){return l(e)?+e:I(e)}function N(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var B=function(t){return l(t)?N(t,e._m,e._b):m},z=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var $="y"===h;B=function(t){if(!l(t))return m;var r=e._rangebreaks.length;if(!r)return N(t,e._m,e._b);var n=$;e.range[0]>e.range[1]&&(n=!n);for(var a=n?-1:1,i=a*t,o=0,s=0;su)){o=i<(c+u)/2?s:s+1;break}o=s+1}var d=e._B[o]||0;return isFinite(d)?N(t,e._m2,d):0},z=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,a=0;ae._rangebreaks[a].pmax&&(n=a+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?E:d,e.l2c="log"===e.type?k:d,e.l2p=B,e.p2l=z,e.c2p="log"===e.type?function(e,t){return B(E(e,t))}:B,e.p2c="log"===e.type?function(e){return k(z(e))}:z,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=d,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=z,e.cleanPos=d):"log"===e.type?(e.d2r=e.d2l=function(e,t){return E(s(e),t)},e.r2d=e.r2c=function(e){return k(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=d,e.c2r=E,e.l2d=k,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return k(z(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=z,e.cleanPos=d):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=C,e.c2d=e.c2r=e.l2d=e.l2r=L,e.d2p=e.r2p=function(t,r,n){return e.l2p(C(t,0,n))},e.p2d=e.p2r=function(e,t,r){return L(z(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,m,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=D,e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=P,e.r2c=function(t){var r=R(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=d,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(z(e))},e.r2p=e.d2p,e.p2r=z,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:d(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=P,e.r2c=function(t){var r=P(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=d,e.r2l=P,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(z(e))},e.r2p=e.d2p,e.p2r=z,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:d(e)},e.setupMultiCategory=function(n){var a,o,l=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var c in s)if(c!==r){var u=t[w.id2name(c)];l=l.concat(u._traceIndices)}var d=[[0,{}],[0,{}]],p=[];for(a=0;as[1]&&(a[l?0:1]=n),a[0]===a[1]){var c=e.l2r(r),u=e.l2r(n);if(void 0!==r){var d=c+1;void 0!==n&&(d=Math.min(d,u)),a[l?1:0]=d}if(void 0!==n){var f=u+1;void 0!==r&&(f=Math.max(f,c)),a[l?0:1]=f}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,a,o=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===h?T.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(a[0]=0),o&&2===o.length){var s=null===o[0],c=null===o[1];for("date"!==e.type||e.autorange||(o[0]=i.cleanDate(o[0],m,e.calendar),o[1]=i.cleanDate(o[1],m,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(o[n],e.calendar)){e[t]=a;break}if(e.r2l(o[0])===e.r2l(o[1])){var u=i.constrain(e.r2l(o[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);o[0]=e.l2r(u-1e3),o[1]=e.l2r(u+1e3);break}}else{if(!l(o[n])){if(s||c||!l(o[1-n])){e[t]=a;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-p?o[n]=-p:o[n]>p&&(o[n]=p),o[0]===o[1]){var d=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=d,o[1]+=d}}}else i.nestedProperty(e,t).set(a)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=w.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var l,s,c=e.r2l(e[i][0],o),u=e.r2l(e[i][1],o),d="y"===h;if(d?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(l=0;lu&&(f=!f),f&&e._rangebreaks.reverse();var p=f?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(d?u:c)),l=0;la&&(a+=7,oa&&(a+=24,o=n&&o=n&&t=l.min&&(el.max&&(l.max=n),a=!1)}a&&c.push({min:e,max:n})}};for(n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,r._offset).call(o.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,a=n.xaxis,s=n.yaxis,c=a._length,u=s._length,d=!!t.xr1,f=!!t.yr1,h=[];if(d){var p=i.simpleMap(t.xr0,a.r2l),m=i.simpleMap(t.xr1,a.r2l),g=p[1]-p[0],v=m[1]-m[0];h[0]=(p[0]*(1-r)+r*m[0]-p[0])/(p[1]-p[0])*c,h[2]=c*(1-r+r*v/g),a.range[0]=a.l2r(p[0]*(1-r)+r*m[0]),a.range[1]=a.l2r(p[1]*(1-r)+r*m[1])}else h[0]=0,h[2]=c;if(f){var y=i.simpleMap(t.yr0,s.r2l),x=i.simpleMap(t.yr1,s.r2l),b=y[1]-y[0],_=x[1]-x[0];h[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,h[3]=u*(1-r+r*_/b),s.range[0]=a.l2r(y[0]*(1-r)+r*x[0]),s.range[1]=s.l2r(y[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=u;l.drawOne(e,a,{skipTitle:!0}),l.drawOne(e,s,{skipTitle:!0}),l.redrawComponents(e,[a._id,s._id]);var w=d?c/h[2]:1,T=f?u/h[3]:1,A=d?h[0]:0,M=f?h[1]:0,k=d?h[0]/h[2]*c:0,S=f?h[1]/h[3]*u:0,E=a._offset-k,C=s._offset-S;n.clipRect.call(o.setTranslate,A,M).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}l.redrawComponents(e)}},4392:function(e,t,r){"use strict";var n=r(3626).traceIs,a=r(9666);function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=i(e),a=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return a&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,l){r("autotypenumbers",l.autotypenumbersDflt),"-"===r("type",(l.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var r,l=e._id,s=l.charAt(0);-1!==l.indexOf("scene")&&(l=s);var c=function(e,t,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,l,s);if(c)if("histogram"!==c.type||s!=={v:"y",h:"x"}[c.orientation||"v"]){var u=s+"calendar",d=c[u],f={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0),f.autotypenumbers=e.autotypenumbers,o(c,s)){var h=i(c),p=[];for(r=0;r0?".":"")+i;a.isPlainObject(o)?s(o,t,l,n+1):t(l,i,o)}}))}t.manageCommandObserver=function(e,r,n,o){var l={},s=!0;r&&r._commandObserver&&(l=r._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var c=t.hasSimpleAPICommandBindings(e,n,l.lookupTable);if(r&&r._commandObserver){if(c)return l;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,l}if(c){i(e,c,l.cache),l.check=function(){if(s){var t=i(e,c,l.cache);return t.changed&&o&&void 0!==l.lookupTable[t.value]&&(l.disable(),Promise.resolve(o({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:l.lookupTable[t.value]})).then(l.enable,l.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),l.text(o.text()&&s.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),a.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var M=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];function S(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,a={};function i(e){for(var r=!0,i=0;i1&&P.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&P.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(f,l,u,n),w.cleanPlot(f,l,u,n);var z=!(!n._has||!n._has("gl2d")),$=!(!l._has||!l._has("gl2d")),j=!(!n._has||!n._has("cartesian"))||z,H=!(!l._has||!l._has("cartesian"))||$;j&&!H?n._bgLayer.remove():H&&!j&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&m({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a0){var u=1-2*l;n=Math.round(u*n),a=Math.round(u*a)}}var f=w.layoutAttributes.width.min,h=w.layoutAttributes.height.min;n1,m=!t.height&&Math.abs(r.height-a)>1;(m||p)&&(p&&(r.width=n),m&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:n,height:a}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var a,i,o,l=s.componentsRegistry,c=t._basePlotModules,u=s.subplotsRegistry.cartesian;for(a in l)(o=l[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var f in c.length||c.push(u),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(d.subplotSort);for(i=0;i1&&(r.l/=v,r.r/=v)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:_,size:r.t+g}},m[t]=1}else delete p[t],delete m[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),D(t);var a=t._size,i=t.margin,l={t:0,b:0,l:0,r:0},c=d.extendFlat({},a),u=i.l,f=i.r,h=i.t,m=i.b,g=t._pushmargin,v=t._pushmarginIds,y=t.minreducedwidth,x=t.minreducedheight;if(!1!==i.autoexpand){for(var b in g)v[b]||delete g[b];var _=e._fullLayout._reservedMargin;for(var T in _)for(var A in _[T]){var M=_[T][A];l[A]=Math.max(l[A],M)}for(var k in g.base={l:{val:0,size:u},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:m}},l){var S=0;for(var E in g)"base"!==E&&o(g[E][k].size)&&(S=g[E][k].size>S?g[E][k].size:S);var C=Math.max(0,i[k]-S);l[k]=Math.max(0,l[k]-C)}for(var L in g){var O=g[L].l||{},I=g[L].b||{},P=O.val,R=O.size,N=I.val,F=I.size,B=r-l.r-l.l,z=n-l.t-l.b;for(var $ in g){if(o(R)&&g[$].r){var j=g[$].r.val,H=g[$].r.size;if(j>P){var U=(R*j+(H-B)*P)/(j-P),Y=(H*(1-P)+(R-B)*(1-j))/(j-P);U+Y>u+f&&(u=U,f=Y)}}if(o(F)&&g[$].t){var V=g[$].t.val,Z=g[$].t.size;if(V>N){var G=(F*V+(Z-z)*N)/(V-N),W=(Z*(1-N)+(F-z)*(1-V))/(V-N);G+W>m+h&&(m=G,h=W)}}}}}var q=d.constrain(r-i.l-i.r,2,y),K=d.constrain(n-i.t-i.b,2,x),X=Math.max(0,r-q),J=Math.max(0,n-K);if(X){var Q=(u+f)/X;Q>1&&(u/=Q,f/=Q)}if(J){var ee=(m+h)/J;ee>1&&(m/=ee,h/=ee)}if(a.l=Math.round(u)+l.l,a.r=Math.round(f)+l.r,a.t=Math.round(h)+l.t,a.b=Math.round(m)+l.b,a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(w.didMarginChange(c,a)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(v).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var i=0,o=0;function l(){return i++,function(){var t;o++,n||o!==i||(t=a,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}r.runFn(l),setTimeout(l())}))}],i=d.syncOrAsync(a,e);return i&&i.then||(i=Promise.resolve()),i.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,a,i){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=a?e._fullData:e.data,s=a?e._fullLayout:e.layout,c=(e._transitionData||{})._frames;function u(e,t){if("function"==typeof e)return t?"_function_":null;if(d.isPlainObject(e)){var n,a={};return Object.keys(e).sort().forEach((function(i){if(-1===["_","["].indexOf(i.charAt(0)))if("function"!=typeof e[i]){if("keepdata"===r){if("src"===i.substr(i.length-3))return}else if("keepstream"===r){if("string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0&&!d.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0)return;a[i]=u(e[i],t)}else t&&(a[i]="_function")})),a}var i=Array.isArray(e),o=d.isTypedArray(e);if((i||o)&&e.dtype&&e.shape){var s=e.bdata;return u({dtype:e.dtype,shape:e.shape,bdata:d.isArrayBuffer(s)?l.encode(s):s},t)}return i?e.map((function(e){return u(e,t)})):o?d.simpleMap(e,d.identity):d.isJSDate(e)?d.ms2DateTimeLocal(+e):e}var f={data:(o||[]).map((function(e){var r=u(e);return t&&delete r.fit,r}))};if(!t&&(f.layout=u(s),a)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return c&&(f.frames=u(c)),i&&(f.config=u(e._context,!0)),"object"===n?f:JSON.stringify(f)},w.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;i--)if(s[i].enabled){r._indexToPoints=s[i]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,f[t]=o}}for(N(o,l,u),a=0;a0){for(var n=[],a=0;a-1&&(d[h[r]].title={text:""});for(r=0;r")?"":t.html(e).text()}));return t.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),a.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},5374:function(e,t,r){"use strict";var n=r(4809);e.exports=function(e,t){for(var r=0;rd+c||!n(u))}for(var h=0;h=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&n(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,r,n,i,o){var l=!(!1===(o=o||{}).moduleHasSelected),s=!(!1===o.moduleHasUnselected),c=!(!1===o.moduleHasConstrain),u=!(!1===o.moduleHasCliponaxis),d=!(!1===o.moduleHasTextangle),h=!(!1===o.moduleHasInsideanchor),p=!!o.hasPathbar,m=Array.isArray(i)||"auto"===i,g=m||"inside"===i,v=m||"outside"===i;if(g||v){var y=f(n,"textfont",r.font),x=a.extendFlat({},y),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,f(n,"insidetextfont",x),p){var _=a.extendFlat({},y);b&&delete _.color,f(n,"pathbar.textfont",_)}v&&f(n,"outsidetextfont",y),l&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),c&&n("constraintext"),u&&n("cliponaxis"),d&&n("textangle"),n("texttemplate")}g&&h&&n("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,n){function u(r,n){return a.coerce(e,t,d,r,n)}if(l(e,t,n,u)){s(e,t,n,u),u("xhoverformat"),u("yhoverformat"),u("zorder"),u("orientation",t.x&&!t.y?"h":"v"),u("base"),u("offset"),u("width"),u("text"),u("hovertext"),u("hovertemplate");var f=u("textposition");p(e,0,n,u,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c(e,t,u,r,n);var h=(t.marker.line||{}).color,m=o.getComponentMethod("errorbars","supplyDefaults");m(e,t,h||i.defaultLine,{axis:"y"}),m(e,t,h||i.defaultLine,{axis:"x",inherit:"y"}),a.coerceSelectionMarkerOpacity(t,u)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,n;function i(e,t){return a.coerce(n._input,n,d,e,t)}for(var o=0;oi))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return a(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return i(e)?t0?t+=r:u<0&&(t-=r)}return t}function P(e){var t=u,r=e.b,a=I(e);return n.inbox(r-t,a-t,_+(a-t)/(a-r)-1)}var R=e[d+"a"],N=e[f+"a"];m=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));var F=n.getDistanceFunction(a,h,p,(function(e){return(h(e)+p(e))/2}));if(n.getClosest(g,F,e),!1!==e.index&&g[e.index].p!==c){A||(C=function(e){return Math.min(M(e),e.p-y.bargroupwidth/2)},L=function(e){return Math.max(k(e),e.p+y.bargroupwidth/2)});var B=g[e.index],z=v.base?B.b+B.s:B.s;e[f+"0"]=e[f+"1"]=N.c2p(B[f],!0),e[f+"LabelVal"]=z;var $=y.extents[y.extents.round(B.p)];e[d+"0"]=R.c2p(x?C(B):$[0],!0),e[d+"1"]=R.c2p(x?L(B):$[1],!0);var j=void 0!==B.orig_p;return e[d+"LabelVal"]=j?B.orig_p:B.p,e.labelLabel=s(R,e[d+"LabelVal"],v[d+"hoverformat"]),e.valueLabel=s(N,e[f+"LabelVal"],v[f+"hoverformat"]),e.baseLabel=s(N,B.b,v[f+"hoverformat"]),e.spikeDistance=(function(e){var t=u,r=e.b,a=I(e);return n.inbox(r-t,a-t,w+(a-t)/(a-r)-1)}(B)+function(e){return O(M(e),k(e),w)}(B))/2,e[d+"Spike"]=R.c2p(B.p,!0),o(B,v,e),e.hovertemplate=v.hovertemplate,e}}function d(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=l(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}e.exports={hoverPoints:function(e,t,r,n,i){var o=u(e,t,r,n,i);if(o){var l=o.cd,s=l[0].trace,c=l[o.index];return o.color=d(s,c),a.getComponentMethod("errorbars","hoverInfo")(c,s,o),[o]}},hoverOnBars:u,getTraceColor:d}},8218:function(e,t,r){"use strict";e.exports={attributes:r(1481),layoutAttributes:r(5412),supplyDefaults:r(7550).supplyDefaults,crossTraceDefaults:r(7550).crossTraceDefaults,supplyLayoutDefaults:r(8931),calc:r(7565),crossTraceCalc:r(4782).crossTraceCalc,colorbar:r(1146),arraysToCalcdata:r(5374),plot:r(2995).plot,style:r(6851).style,styleOnSelect:r(6851).styleOnSelect,hoverPoints:r(1664).hoverPoints,eventData:r(9541),selectPoints:r(8384),moduleType:"trace",name:"bar",basePlotModule:r(84),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},5412:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},8931:function(e,t,r){"use strict";var n=r(3626),a=r(9714),i=r(4809),o=r(5412),l=r(7550).validateCornerradius;e.exports=function(e,t,r){function s(r,n){return i.coerce(e,t,o,r,n)}for(var c=!1,u=!1,d=!1,f={},h=s("barmode"),p=0;p0)-(e<0)}function M(e,t){return e0}function E(e,t,r,n,a){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(a?e>=r*(t/n):t>=n*(e/r)))}function C(e){return"auto"===e?0:e}function L(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function O(e,t,r,n,a,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,c=i.anchor,u="end"===c,d="start"===c,f=((i.leftToRight||0)+1)/2,h=1-f,p=i.hasB,m=i.r,g=i.overhead,v=a.width,y=a.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var T=C(s);"auto"!==s||v<=x&&y<=b||!(v>x||y>b)||(v>b||y>x)&&v_){var E=function(e,t,r,n,a,i,o,l,s){var c,u,d,f,h=Math.max(0,Math.abs(t-e)-2*_),p=Math.max(0,Math.abs(n-r)-2*_),m=i-_,g=o?m-Math.sqrt(m*m-(m-o)*(m-o)):m,v=s?2*m:l?m-o:2*g,y=s?2*m:l?2*g:m-o;return a.y/a.x>=p/(h-v)?f=p/a.y:a.y/a.x<=(p-y)/h?f=h/a.x:!s&&l?(c=a.x*a.x+a.y*a.y/4,d=(h-m)*(h-m)+(p/2-m)*(p/2-m)-m*m,f=(-(u=-2*a.x*(h-m)-a.y*(p/2-m))+Math.sqrt(u*u-4*c*d))/(2*c)):s?(c=(a.x*a.x+a.y*a.y)/4,d=(h/2-m)*(h/2-m)+(p/2-m)*(p/2-m)-m*m,f=(-(u=-a.x*(h/2-m)-a.y*(p/2-m))+Math.sqrt(u*u-4*c*d))/(2*c)):(c=a.x*a.x/4+a.y*a.y,d=(h/2-m)*(h/2-m)+(p-m)*(p-m)-m*m,f=(-(u=-a.x*(h/2-m)-2*a.y*(p-m))+Math.sqrt(u*u-4*c*d))/(2*c)),{scale:f=Math.min(1,f),pad:l?Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(p-a.y*f)/2)*(m-(p-a.y*f)/2)))-o):Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(h-a.x*f)/2)*(m-(h-a.x*f)/2)))-o)}}(e,t,r,n,S,m,g,o,p);A=E.scale,k=E.pad}else A=1,l&&(A=Math.min(1,x/S.x,b/S.y)),k=0;var O=a.left*h+a.right*f,D=(a.top+a.bottom)/2,I=(e+_)*h+(t-_)*f,P=(r+n)/2,R=0,N=0;if(d||u){var F=(o?S.x:S.y)/2;m&&(u||p)&&(w+=k);var B=o?M(e,t):M(r,n);o?d?(I=e+B*w,R=-B*F):(I=t-B*w,R=B*F):d?(P=r+B*w,N=-B*F):(P=n-B*w,N=B*F)}return{textX:O,textY:D,targetX:I,targetY:P,anchorX:R,anchorY:N,scale:A,rotate:T}}e.exports={plot:function(e,t,r,d,g,v){var w=t.xaxis,D=t.yaxis,I=e._fullLayout,P=e._context.staticPlot;g||(g={mode:I.barmode,norm:I.barmode,gap:I.bargap,groupgap:I.bargroupgap},h("bar",I));var R=i.makeTraceGroups(d,r,"trace bars").each((function(r){var c=n.select(this),d=r[0].trace,h=r[0].t,R="waterfall"===d.type,N="funnel"===d.type,F="histogram"===d.type,B="bar"===d.type,z=B||N,$=0;R&&d.connector.visible&&"between"===d.connector.mode&&($=d.connector.line.width/2);var j="h"===d.orientation,H=S(g),U=i.ensureSingle(c,"g","points"),Y=T(d),V=U.selectAll("g.point").data(i.identity,Y);V.enter().append("g").classed("point",!0),V.exit().remove(),V.each((function(c,T){var S,R,N=n.select(this),U=function(e,t,r,n){var a=[],i=[],o=n?t:r,l=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=l.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=l.c2p(e.p1,!0),n?[a,i]:[i,a]}(c,w,D,j),Y=U[0][0],V=U[0][1],Z=U[1][0],G=U[1][1],W=0==(j?V-Y:G-Z);if(W&&z&&m.getLineWidth(d,c)&&(W=!1),W||(W=!(a(Y)&&a(V)&&a(Z)&&a(G))),c.isBlank=W,W&&(j?V=Y:G=Z),$&&!W&&(j?(Y-=M(Y,V)*$,V+=M(Y,V)*$):(Z-=M(Z,G)*$,G+=M(Z,G)*$)),"waterfall"===d.type){if(!W){var q=d[c.dir].marker;S=q.line.width,R=q.color}}else S=m.getLineWidth(d,c),R=c.mc||d.marker.color;function K(e){var t=n.round(S/2%1,2);return 0===g.gap&&0===g.groupgap?n.round(Math.round(e)-t,2):e}var X=l.opacity(R)<1||S>.01?K:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?K(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(Y=X(Y,V,j),V=X(V,Y,j),Z=X(Z,G,!j),G=X(G,Z,!j));var J,Q=j?w.c2p:D.c2p;J=c.s0>0?c._sMax:c.s0<0?c._sMin:c.s1>0?c._sMax:c._sMin;var ee,te,re=B||F?function(e,t){if(!e)return 0;var r,n=j?Math.abs(G-Z):Math.abs(V-Y),a=j?Math.abs(V-Y):Math.abs(G-Z),i=X(Math.abs(Q(J,!0)-Q(0,!0))),o=c.hasB?Math.min(n/2,a/2):Math.min(n/2,i);return r="%"===t?n*(Math.min(50,e)/100):e,X(Math.max(Math.min(r,o),0))}(h.cornerradiusvalue,h.cornerradiusform):0,ne="M"+Y+","+Z+"V"+G+"H"+V+"V"+Z+"Z",ae=0;if(re&&c.s){var ie=0===A(c.s0)||A(c.s)===A(c.s0)?c.s1:c.s0;if((ae=X(c.hasB?0:Math.abs(Q(J,!0)-Q(ie,!0))))0?Math.sqrt(ae*(2*re-ae)):0,de=oe>0?Math.max:Math.min;ee="M"+Y+","+Z+"V"+(G-ce*le)+"H"+de(V-(re-ae)*oe,Y)+"A "+re+","+re+" 0 0 "+se+" "+V+","+(G-re*le-ue)+"V"+(Z+re*le+ue)+"A "+re+","+re+" 0 0 "+se+" "+de(V-(re-ae)*oe,Y)+","+(Z+ce*le)+"Z"}else if(c.hasB)ee="M"+(Y+re*oe)+","+Z+"A "+re+","+re+" 0 0 "+se+" "+Y+","+(Z+re*le)+"V"+(G-re*le)+"A "+re+","+re+" 0 0 "+se+" "+(Y+re*oe)+","+G+"H"+(V-re*oe)+"A "+re+","+re+" 0 0 "+se+" "+V+","+(G-re*le)+"V"+(Z+re*le)+"A "+re+","+re+" 0 0 "+se+" "+(V-re*oe)+","+Z+"Z";else{var fe=(te=Math.abs(G-Z)+ae)0?Math.sqrt(ae*(2*re-ae)):0,pe=le>0?Math.max:Math.min;ee="M"+(Y+fe*oe)+","+Z+"V"+pe(G-(re-ae)*le,Z)+"A "+re+","+re+" 0 0 "+se+" "+(Y+re*oe-he)+","+G+"H"+(V-re*oe+he)+"A "+re+","+re+" 0 0 "+se+" "+(V-fe*oe)+","+pe(G-(re-ae)*le,Z)+"V"+Z+"Z"}}else ee=ne}else ee=ne;var me=k(i.ensureSingle(N,"path"),I,g,v);if(me.style("vector-effect",P?"none":"non-scaling-stroke").attr("d",isNaN((V-Y)*(G-Z))||W&&e._context.staticPlot?"M0,0Z":ee).call(s.setClipUrl,t.layerClipId,e),!I.uniformtext.mode&&H){var ge=s.makePointStyleFns(d);s.singlePointStyle(c,me,d,ge,e)}!function(e,t,r,n,a,l,c,d,h,g,v,w,T){var A,S=t.xaxis,D=t.yaxis,I=e._fullLayout;function P(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+A,"text-anchor":"middle","data-notex":1}).call(s.font,n).call(o.convertToTspans,e)}var R=n[0].trace,N="h"===R.orientation,F=function(e,t,r,n,a){var o,l=t[0].trace;return o=l.texttemplate?function(e,t,r,n,a){var o=t[0].trace,l=i.castOption(o,r,"texttemplate");if(!l)return"";var s,c,d,f,h="histogram"===o.type,p="waterfall"===o.type,m="funnel"===o.type,g="h"===o.orientation;function v(e){return u(f,f.c2l(e),!0).text}g?(s="y",c=a,d="x",f=n):(s="x",c=n,d="y",f=a);var y,x=t[r],_={};_.label=x.p,_.labelLabel=_[s+"Label"]=(y=x.p,u(c,c.c2l(y),!0).text);var w=i.castOption(o,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[d+"Label"]=v(x.s);var T={};b(T,o,x.i),(h||void 0===T.x)&&(T.x=g?_.value:_.label),(h||void 0===T.y)&&(T.y=g?_.label:_.value),(h||void 0===T.xLabel)&&(T.xLabel=g?_.valueLabel:_.labelLabel),(h||void 0===T.yLabel)&&(T.yLabel=g?_.labelLabel:_.valueLabel),p&&(_.delta=+x.rawS||x.s,_.deltaLabel=v(_.delta),_.final=x.v,_.finalLabel=v(_.final),_.initial=_.final-_.delta,_.initialLabel=v(_.initial)),m&&(_.value=x.s,_.valueLabel=v(_.value),_.percentInitial=x.begR,_.percentInitialLabel=i.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=i.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=i.formatPercent(x.sumR));var A=i.castOption(o,x.i,"customdata");return A&&(_.customdata=A),i.texttemplateString(l,_,e._d3locale,T,_,o._meta||{})}(e,t,r,n,a):l.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,l="waterfall"===a.type,s="funnel"===a.type;function c(e){return u(o?r:n,+e,!0).text}var d,f,h=a.textinfo,p=e[t],m=h.split("+"),g=[],v=function(e){return-1!==m.indexOf(e)};if(v("label")&&g.push((f=e[t].p,u(o?n:r,f,!0).text)),v("text")&&(0===(d=i.castOption(a,p.i,"text"))||d)&&g.push(d),l){var y=+p.rawS||p.s,x=p.v,b=x-y;v("initial")&&g.push(c(b)),v("delta")&&g.push(c(y)),v("final")&&g.push(c(x))}if(s){v("value")&&g.push(c(p.s));var _=0;v("percent initial")&&_++,v("percent previous")&&_++,v("percent total")&&_++;var w=_>1;v("percent initial")&&(d=i.formatPercent(p.begR),w&&(d+=" of initial"),g.push(d)),v("percent previous")&&(d=i.formatPercent(p.difR),w&&(d+=" of previous"),g.push(d)),v("percent total")&&(d=i.formatPercent(p.sumR),w&&(d+=" of total"),g.push(d))}return g.join("
")}(t,r,n,a):m.getValue(l.text,r),m.coerceString(y,o)}(I,n,a,S,D);A=function(e,t){var r=m.getValue(e.textposition,t);return m.coerceEnumerated(x,r)}(R,a);var B="stack"===w.mode||"relative"===w.mode,z=n[a],$=!B||z._outmost,j=z.hasB,H=g&&g-v>_;if(F&&"none"!==A&&(!z.isBlank&&l!==c&&d!==h||"auto"!==A&&"inside"!==A)){var U=I.font,Y=p.getBarColor(n[a],R),V=p.getInsideTextFont(R,a,U,Y),Z=p.getOutsideTextFont(R,a,U),G=R.insidetextanchor||"end",W=r.datum();N?"log"===S.type&&W.s0<=0&&(l=S.range[0]0&&J>0;ae=H?j?E(re-2*g,ne,X,J,N)||E(re,ne-2*g,X,J,N):N?E(re-(g-v),ne,X,J,N)||E(re,ne-2*(g-v),X,J,N):E(re,ne-(g-v),X,J,N)||E(re-2*(g-v),ne,X,J,N):E(re,ne,X,J,N),ie&&ae?A="inside":(A="outside",q.remove(),q=null)}else A="inside";if(!q){var oe=(q=P(r,F,Q=i.ensureUniformFontSize(e,"outside"===A?Z:V))).attr("transform");if(q.attr("transform",""),X=(K=s.bBox(q.node())).width,J=K.height,q.attr("transform",oe),X<=0||J<=0)return void q.remove()}var le,se=R.textangle;le="outside"===A?function(e,t,r,n,a,i){var o,l=!!i.isHorizontal,s=!!i.constrained,c=i.angle||0,u=a.width,d=a.height,f=Math.abs(t-e),h=Math.abs(n-r);o=l?h>2*_?_:0:f>2*_?_:0;var p=1;s&&(p=l?Math.min(1,h/d):Math.min(1,f/u));var m=C(c),g=L(a,m),v=(l?g.x:g.y)/2,y=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(e+t)/2,w=(r+n)/2,T=0,A=0,k=l?M(t,e):M(r,n);return l?(b=t-k*o,T=k*v):(w=n+k*o,A=-k*v),{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:p,rotate:m}}(l,c,d,h,K,{isHorizontal:N,constrained:"both"===R.constraintext||"outside"===R.constraintext,angle:se}):O(l,c,d,h,K,{isHorizontal:N,constrained:"both"===R.constraintext||"inside"===R.constraintext,angle:se,anchor:G,hasB:j,r:g,overhead:v}),le.fontSize=Q.size,f("histogram"===R.type?"bar":R.type,le,I),z.transform=le;var ce=k(q,I,w,T);i.setTransormAndDisplay(ce,le)}else r.select("text").remove()}(e,t,N,r,T,Y,V,Z,G,re,ae,g,v),t.layerClipId&&s.hideOutsideRangePoint(c,N.select("text"),w,D,d.xcalendar,d.ycalendar)}));var Z=!1===d.cliponaxis;s.setClipUrl(c,Z?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,R,t,g)},toMoveInsideBar:O}},8384:function(e){"use strict";function t(e,t,r,n,a){var i=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),l=r.c2p(n?e.p0:e.s0,!0),s=r.c2p(n?e.p1:e.s1,!0);return a?[(i+o)/2,(l+s)/2]:n?[o,(l+s)/2]:[(i+o)/2,s]}e.exports=function(e,r){var n,a=e.cd,i=e.xaxis,o=e.yaxis,l=a[0].trace,s="funnel"===l.type,c="h"===l.orientation,u=[];if(!1===r)for(n=0;n1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(n.select(this),t[0].trace,e)})),l.getComponentMethod("errorbars","style")(t)},styleTextPoints:m,styleOnSelect:function(e,t,r){var a=t[0].trace;a.selectedpoints?function(e,t,r){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var a,l=n.select(this);if(e.selected){a=o.ensureUniformFontSize(r,g(l,e,t,r));var s=t.selected.textfont&&t.selected.textfont.color;s&&(a.color=s),i.font(l,a)}else i.selectedTextStyle(l,t)}))}(e.selectAll("text"),t,r)}(r,a,e):(p(r,a,e),l.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:s}},9760:function(e,t,r){"use strict";var n=r(8766),a=r(5477).hasColorscale,i=r(9356),o=r(4809).coercePattern;e.exports=function(e,t,r,l,s){var c=r("marker.color",l),u=a(e,"marker");u&&i(e,t,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(e,"marker.line")&&i(e,t,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",c,u),r("selected.marker.color"),r("unselected.marker.color")}},4102:function(e,t,r){"use strict";var n=r(5568),a=r(4809);function i(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=i(e),a=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o=0})),("funnelarea"===t.type?v:t.sort)&&i.sort((function(e,t){return t.v-e.v})),i[0]&&(i[0].vTotal=g),i},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],l=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=s(i,o));for(var c=0,u=0;u0){l=!0;break}}l||(o=0)}return{hasLabels:r,hasValues:i,len:o}}function u(e,t,r,n,a){n("marker.line.width")&&n("marker.line.color",a?void 0:r.paper_bgcolor);var i=n("marker.colors");s(n,"marker.pattern",i),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}e.exports={handleLabelsAndValues:c,handleMarkerDefaults:u,supplyDefaults:function(e,t,r,n){function s(r,n){return a.coerce(e,t,i,r,n)}var d=c(s("labels"),s("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(s("label0"),s("dlabel")),f){t._length=f,u(e,t,n,s,!0),s("scalegroup");var h,p=s("text"),m=s("texttemplate");if(m||(h=s("textinfo",a.isArrayOrTypedArray(p)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),m||h&&"none"!==h){var g=s("textposition");l(e,t,n,s,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&s("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&s("insidetextorientation")}else"none"===h&&s("textposition","none");o(t,n,s);var v=s("hole");if(s("title.text")){var y=s("title.position",v?"middle center":"top center");v||"middle center"!==y||(t.title.position="top center"),a.coerceFont(s,"title.font",n.font)}s("sort"),s("direction"),s("rotation"),s("pull")}else t.visible=!1}}},568:function(e,t,r){"use strict";var n=r(6040).appendArrayMultiPointValues;e.exports=function(e,t){var r={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),"funnelarea"===t.type&&(delete r.v,delete r.i),r}},5067:function(e,t,r){"use strict";var n=r(2203),a=r(8766);e.exports=function(e,t,r,i){var o=r.marker.pattern;o&&o.shape?n.pointStyle(e,r,i,t):a.fill(e,t.color)}},7252:function(e,t,r){"use strict";var n=r(4809);function a(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}t.formatPiePercent=function(e,t){var r=a((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},t.formatPieValue=function(e,t){var r=a(e.toPrecision(10));return n.numSeparate(r,t)},t.getFirstFilled=function(e,t){if(n.isArrayOrTypedArray(e))for(var r=0;r"),name:d.hovertemplate||-1!==f.indexOf("name")?d.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,e.pts)||e.color,borderColor:g.castOption(_.bordercolor,e.pts),fontFamily:g.castOption(w.family,e.pts),fontSize:g.castOption(w.size,e.pts),fontColor:g.castOption(w.color,e.pts),nameLength:g.castOption(_.namelength,e.pts),textAlign:g.castOption(_.align,e.pts),hovertemplate:g.castOption(d.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[v(e,d)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[v(e,d)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,a=t._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[v(o,a)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===r.hovermode||(t._hoverdata=[v(e,a)],i.click(t,n.event))}))}function b(e,t,r){var n=g.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=g.castOption(e._input.textfont.color,t.pts));var a=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,i=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size,l=g.castOption(e.insidetextfont.weight,t.pts)||g.castOption(e.textfont.weight,t.pts)||r.weight,s=g.castOption(e.insidetextfont.style,t.pts)||g.castOption(e.textfont.style,t.pts)||r.style,c=g.castOption(e.insidetextfont.variant,t.pts)||g.castOption(e.textfont.variant,t.pts)||r.variant,u=g.castOption(e.insidetextfont.textcase,t.pts)||g.castOption(e.textfont.textcase,t.pts)||r.textcase,d=g.castOption(e.insidetextfont.lineposition,t.pts)||g.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=g.castOption(e.insidetextfont.shadow,t.pts)||g.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||o.contrast(t.color),family:a,size:i,weight:l,style:s,variant:c,textcase:u,lineposition:d,shadow:f}}function _(e,t){for(var r,n,a=0;at&&t>n||r=-4;g-=2)v(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)v(Math.PI*(g+1),"tan")}if(d||h){for(g=4;g>=-4;g-=2)v(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)v(Math.PI*(g+.5),"rad")}}if(l||p||d){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((i={scale:a*n*2/y,rCenter:1-a,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,i.scale>=1)return i;m.push(i)}(p||h)&&((i=T(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(i)),(p||f)&&((i=A(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(i));for(var x=0,b=0,_=0;_=1)break}return m[x]}function T(e,t,r,n,a){t=Math.max(0,t-2*m);var i=e.width/e.height,o=S(i,n,t,r);return{scale:2*o/e.height,rCenter:M(i,o/t),rotate:k(a)}}function A(e,t,r,n,a){t=Math.max(0,t-2*m);var i=e.height/e.width,o=S(i,n,t,r);return{scale:2*o/e.width,rCenter:M(i,o/t),rotate:k(a+Math.PI/2)}}function M(e,t){return Math.cos(t)-e*t}function k(e){return(180/Math.PI*e+720)%180-90}function S(e,t,r,n){var a=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(a*a+.5)+a),n/(Math.sqrt(e*e+n/2)+e))}function E(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function C(e,t){var r=t.pxmid[0],n=t.pxmid[1],a=e.width/2,i=e.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function L(e,t){var r,n,a,i=e.trace,o={x:e.cx,y:e.cy},l={tx:0,ty:0};l.ty+=i.title.font.size,a=D(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*e.r,l.ty-=e.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*e.r);var s,c=e.r/(void 0===(s=e.trace.aspectratio)?1:s),u=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(u+=c,o.x-=(1+a)*c,l.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?u*=2:-1!==i.title.position.indexOf("right")&&(u+=c,o.x+=(1+a)*c,l.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=O(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:l.tx,ty:l.ty}}function O(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function D(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],n=0;n1?u=(c=r.r)/a.aspectratio:c=(u=r.r)*a.aspectratio,s=(c*=(1+a.baseratio)/2)*u}o=Math.min(o,s/r.vTotal)}for(n=0;n")}if(i){var x=s.castOption(a,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:g.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:s.castOption(a,e.i,"customdata")}}(t),_=g.getFirstFilled(a.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=s.texttemplateString(x,b,e._fullLayout._d3locale,b,a._meta||{})}else t.text=""}}function N(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}e.exports={plot:function(e,t){var r=e._context.staticPlot,i=e._fullLayout,f=i._size;p("pie",i),_(t,e),I(t,f);var m=s.makeTraceGroups(i._pielayer,t,"trace").each((function(t){var p=n.select(this),m=t[0],v=m.trace;!function(e){var t,r,n,a=e[0],i=a.r,o=a.trace,l=g.getRotationAngle(o.rotation),s=2*Math.PI/a.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;ta.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,a))}(t),p.attr("stroke-linejoin","round"),p.each((function(){var y=n.select(this).selectAll("g.slice").data(t);y.enter().append("g").classed("slice",!0),y.exit().remove();var _=[[[],[]],[[],[]]],T=!1;y.each((function(a,o){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=v.index,_[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var c=m.cx,u=m.cy,f=n.select(this),p=f.selectAll("path.surface").data([a]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),f.call(x,e,t),v.pull){var y=+g.castOption(v.pull,a.pts)||0;y>0&&(c+=y*a.pxmid[0],u+=y*a.pxmid[1])}a.cxFinal=c,a.cyFinal=u;var A=v.hole;if(a.v===m.vTotal){var M="M"+(c+a.px0[0])+","+(u+a.px0[1])+O(a.px0,a.pxmid,!0,1)+O(a.pxmid,a.px0,!0,1)+"Z";A?p.attr("d","M"+(c+A*a.px0[0])+","+(u+A*a.px0[1])+O(a.px0,a.pxmid,!1,A)+O(a.pxmid,a.px0,!1,A)+"Z"+M):p.attr("d",M)}else{var k=O(a.px0,a.px1,!0,1);if(A){var S=1-A;p.attr("d","M"+(c+A*a.px1[0])+","+(u+A*a.px1[1])+O(a.px1,a.px0,!1,A)+"l"+S*a.px0[0]+","+S*a.px0[1]+k+"Z")}else p.attr("d","M"+c+","+u+"l"+a.px0[0]+","+a.px0[1]+k+"Z")}R(e,a,m);var E=g.castOption(v.textposition,a.pts),L=f.selectAll("g.slicetext").data(a.text&&"none"!==E?[0]:[]);L.enter().append("g").classed("slicetext",!0),L.exit().remove(),L.each((function(){var r=s.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=s.ensureUniformFontSize(e,"outside"===E?function(e,t,r){return{color:g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||r.color,family:g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,size:g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size,weight:g.castOption(e.outsidetextfont.weight,t.pts)||g.castOption(e.textfont.weight,t.pts)||r.weight,style:g.castOption(e.outsidetextfont.style,t.pts)||g.castOption(e.textfont.style,t.pts)||r.style,variant:g.castOption(e.outsidetextfont.variant,t.pts)||g.castOption(e.textfont.variant,t.pts)||r.variant,textcase:g.castOption(e.outsidetextfont.textcase,t.pts)||g.castOption(e.textfont.textcase,t.pts)||r.textcase,lineposition:g.castOption(e.outsidetextfont.lineposition,t.pts)||g.castOption(e.textfont.lineposition,t.pts)||r.lineposition,shadow:g.castOption(e.outsidetextfont.shadow,t.pts)||g.castOption(e.textfont.shadow,t.pts)||r.shadow}}(v,a,i.font):b(v,a,i.font));r.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,f).call(d.convertToTspans,e);var p,y=l.bBox(r.node());if("outside"===E)p=C(y,a);else if(p=w(y,a,m),"auto"===E&&p.scale<1){var x=s.ensureUniformFontSize(e,v.outsidetextfont);r.call(l.font,x),p=C(y=l.bBox(r.node()),a)}var _=p.textPosAngle,A=void 0===_?a.pxmid:P(m.r,_);if(p.targetX=c+A[0]*p.rCenter+(p.x||0),p.targetY=u+A[1]*p.rCenter+(p.y||0),N(p,y),p.outside){var M=p.targetY;a.yLabelMin=M-y.height/2,a.yLabelMid=M,a.yLabelMax=M+y.height/2,a.labelExtraX=0,a.labelExtraY=0,T=!0}p.fontSize=f.size,h(v.type,p,i),t[o].transform=p,s.setTransormAndDisplay(r,p)}))}function O(e,t,r,n){var i=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*m.r+","+n*m.r+" 0 "+a.largeArc+(r?" 1 ":" 0 ")+i+","+o}}));var A=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);if(A.enter().append("g").classed("titletext",!0),A.exit().remove(),A.each((function(){var t,r=s.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),a=v.title.text;v._meta&&(a=s.templateString(a,v._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,v.title.font).call(d.convertToTspans,e),t="middle center"===v.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(m):L(m,f),r.attr("transform",u(t.x,t.y)+c(Math.min(1,t.scale))+u(t.tx,t.ty))})),T&&function(e,t){var r,n,a,i,o,l,c,u,d,f,h,p,m;function v(e,t){return e.pxmid[1]-t.pxmid[1]}function y(e,t){return t.pxmid[1]-e.pxmid[1]}function x(e,r){r||(r={});var a,u,d,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?e.yLabelMin:e.yLabelMax,v=n?e.yLabelMax:e.yLabelMin,y=e.cyFinal+o(e.px0[1],e.px1[1]),x=p-m;if(x*c>0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(u=0;u=(g.castOption(t.pull,d.pts)||0)||((e.pxmid[1]-d.pxmid[1])*c>0?(x=d.cyFinal+o(d.px0[1],d.px1[1])-m-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(v+e.labelExtraY-y)*c>0&&(a=3*l*Math.abs(u-f.indexOf(e)),(h=d.cxFinal+i(d.px0[0],d.px1[0])+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=h)))}for(n=0;n<2;n++)for(a=n?v:y,o=n?Math.max:Math.min,c=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,l=r?1:-1,(u=e[n][r]).sort(a),d=e[1-n][r],f=d.concat(u),p=[],h=0;hMath.abs(d)?l+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(i+e.labelExtraX+c):l+="l"+e.labelExtraX+","+u+"v"+(d-u)+"h"+c}else l+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;s.ensureSingle(r,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:l,fill:"none"})}else r.select("path.textline").remove()}))}(y,v),T&&v.automargin){var M=l.bBox(p.node()),k=v.domain,S=f.w*(k.x[1]-k.x[0]),E=f.h*(k.y[1]-k.y[0]),O=(.5*S-m.r)/f.w,D=(.5*E-m.r)/f.h;a.autoMargin(e,"pie."+v.uid+".automargin",{xl:k.x[0]-O,xr:k.x[1]+O,yb:k.y[0]-D,yt:k.y[1]+D,l:Math.max(m.cx-m.r-M.left,0),r:Math.max(M.right-(m.cx+m.r),0),b:Math.max(M.bottom-(m.cy+m.r),0),t:Math.max(m.cy-m.r-M.top,0),pad:5})}}))}));setTimeout((function(){m.selectAll("tspan").each((function(){var e=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:R,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:L,prerenderTitles:_,layoutAreas:I,attachFxHandlers:x,computeTransform:N}},140:function(e,t,r){"use strict";var n=r(5568),a=r(2891),i=r(4102).resizeText;e.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");i(e,t,"pie"),t.each((function(t){var r=t[0].trace,i=n.select(this);i.style({opacity:r.opacity}),i.selectAll("path.surface").each((function(t){n.select(this).call(a,t,r,e)}))}))}},2891:function(e,t,r){"use strict";var n=r(8766),a=r(7252).castOption,i=r(5067);e.exports=function(e,t,r,o){var l=r.marker.line,s=a(l.color,t.pts)||n.defaultLine,c=a(l.width,t.pts)||0;e.call(i,t,r,o).style("stroke-width",c).call(n.stroke,s)}},9203:function(e,t,r){"use strict";var n=r(4809);e.exports=function(e,t){for(var r=0;rs&&L[v].gap;)v--;for(x=L[v].s,m=L.length-1;m>v;m--)L[m].s=x;for(;sS[d]&&d=0;d--){var f=e[d];if("scatter"===f.type&&f.xaxis===c.xaxis&&f.yaxis===c.yaxis){f.opacity=void 0;break}}}}}},247:function(e,t,r){"use strict";var n=r(4809),a=r(3626),i=r(6640),o=r(2660),l=r(4726),s=r(9867),c=r(9669),u=r(382),d=r(4272),f=r(8168),h=r(1602),p=r(663),m=r(4114),g=r(4809).coercePattern;e.exports=function(e,t,r,v){function y(r,a){return n.coerce(e,t,i,r,a)}var x=s(e,t,v,y);if(x||(t.visible=!1),t.visible){c(e,t,v,y),y("xhoverformat"),y("yhoverformat"),y("zorder");var b=u(e,t,v,y);"group"===v.scattermode&&void 0===t.orientation&&y("orientation","v");var _=!b&&x=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(f.c2p(e.x)-p);return i=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(h.c2p(e.y)-m);return ir!=(c=a[n][1])>=r&&(o=a[n-1][0],l=a[n][0],c-s&&(i=o+(l-o)*(r-s)/(c-s),d=Math.min(d,i),p=Math.max(p,i)));return{x0:d=Math.max(d,0),x1:p=Math.min(p,f._length),y0:r,y1:r}}(d._polygons);null===D&&(D={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var I=l.defaultLine;return l.opacity(d.fillcolor)?I=d.fillcolor:l.opacity((d.line||{}).color)&&(I=d.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:D.x0,x1:D.x1,y0:D.y0,y1:D.y1,color:I,hovertemplate:!1}),delete e.index,d.text&&!n.isArrayOrTypedArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}},9693:function(e,t,r){"use strict";var n=r(4726);e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(6640),layoutAttributes:r(6667),supplyDefaults:r(247),crossTraceDefaults:r(3044),supplyLayoutDefaults:r(2332),calc:r(6544).calc,crossTraceCalc:r(5603),arraysToCalcdata:r(9203),plot:r(6098),colorbar:r(1146),formatLabels:r(5294),style:r(9408).style,styleOnSelect:r(9408).styleOnSelect,hoverPoints:r(7255),selectPoints:r(2665),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(84),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},6667:function(e){"use strict";e.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},2332:function(e,t,r){"use strict";var n=r(4809),a=r(6667);e.exports=function(e,t){var r,i="group"===t.barmode;"group"===t.scattermode&&(r=i?t.bargap:.2,n.coerce(e,t,a,"scattergap",r))}},8168:function(e,t,r){"use strict";var n=r(4809).isArrayOrTypedArray,a=r(5477).hasColorscale,i=r(9356);e.exports=function(e,t,r,o,l,s){s||(s={});var c=(e.marker||{}).color;c&&c._inputArray&&(c=c._inputArray),l("line.color",r),a(e,"line")?i(e,t,o,l,{prefix:"line.",cLetter:"c"}):l("line.color",!n(c)&&c||r),l("line.width"),s.noDash||l("line.dash"),s.backoff&&l("line.backoff")}},5525:function(e,t,r){"use strict";var n=r(2203),a=r(3821),i=a.BADNUM,o=a.LOG_CLIP,l=o+.5,s=o-.5,c=r(4809),u=c.segmentsIntersect,d=c.constrain,f=r(2660);e.exports=function(e,t){var r,a,o,h,p,m,g,v,y,x,b,_,w,T,A,M,k,S,E=t.trace||{},C=t.xaxis,L=t.yaxis,O="log"===C.type,D="log"===L.type,I=C._length,P=L._length,R=t.backoff,N=E.marker,F=t.connectGaps,B=t.baseTolerance,z=t.shape,$="linear"===z,j=E.fill&&"none"!==E.fill,H=[],U=f.minTolerance,Y=e.length,V=new Array(Y),Z=0;function G(r){var n=e[r];if(!n)return!1;var a=t.linearized?C.l2p(n.x):C.c2p(n.x),o=t.linearized?L.l2p(n.y):L.c2p(n.y);if(a===i){if(O&&(a=C.c2p(n.x,!0)),a===i)return!1;D&&o===i&&(a*=Math.abs(C._m*P*(C._m>0?l:s)/(L._m*I*(L._m>0?l:s)))),a*=1e3}if(o===i){if(D&&(o=L.c2p(n.y,!0)),o===i)return!1;o*=1e3}return[a,o]}function W(e,t,r,n){var a=r-e,i=n-t,o=.5-e,l=.5-t,s=a*a+i*i,c=a*o+i*l;if(c>0&&coe||e[1]se)return[d(e[0],ie,oe),d(e[1],le,se)]}function de(e,t){return e[0]===t[0]&&(e[0]===ie||e[0]===oe)||e[1]===t[1]&&(e[1]===le||e[1]===se)||void 0}function fe(e,t,r){return function(n,a){var i=ue(n),o=ue(a),l=[];if(i&&o&&de(i,o))return l;i&&l.push(i),o&&l.push(o);var s=2*c.constrain((n[e]+a[e])/2,t,r)-((i||n)[e]+(o||a)[e]);return s&&((i&&o?s>0==i[e]>o[e]?i:o:i||o)[e]+=s),l}}function he(e){var t=e[0],r=e[1],n=t===V[Z-1][0],a=r===V[Z-1][1];if(!n||!a)if(Z>1){var i=t===V[Z-2][0],o=r===V[Z-2][1];n&&(t===ie||t===oe)&&i?o?Z--:V[Z-1]=e:a&&(r===le||r===se)&&o?i?Z--:V[Z-1]=e:V[Z++]=e}else V[Z++]=e}function pe(e){V[Z-1][0]!==e[0]&&V[Z-1][1]!==e[1]&&he([Q,ee]),he(e),te=null,Q=ee=0}"linear"===z||"spline"===z?ne=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ce[a],o=u(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&K(o,e)oe?oe:0,J=t[1]se?se:0,X||J){if(Z)if(te){var n=ne(te,t);n.length>1&&(pe(n[0]),V[Z++]=n[1])}else re=ne(V[Z-1],t)[0],V[Z++]=re;else V[Z++]=[X||t[0],J||t[1]];var a=V[Z-1];X&&J&&(a[0]!==X||a[1]!==J)?(te&&(Q!==X&&ee!==J?he(Q&&ee?(i=te,l=(o=t)[0]-i[0],s=(o[1]-i[1])/l,(i[1]*o[0]-o[1]*i[0])/l>0?[s>0?ie:oe,se]:[s>0?oe:ie,le]):[Q||X,ee||J]):Q&&ee&&he([Q,ee])),he([X,J])):Q-X&&ee-J&&he([X||Q,J||ee]),te=t,Q=X,ee=J}else te&&pe(ne(te,t)[0]),V[Z++]=t;var i,o,l,s}for(r=0;rq(m,ve))break;o=m,(w=y[0]*v[0]+y[1]*v[1])>b?(b=w,h=m,g=!1):w<_&&(_=w,p=m,g=!0)}if(g?(ge(h),o!==p&&ge(p)):(p!==a&&ge(p),o!==h&&ge(h)),ge(o),r>=e.length||!m)break;ge(m),a=m}}else ge(h)}te&&he([Q||te[0],ee||te[1]]),H.push(V.slice(0,Z))}var ye=z.slice(z.length-1);if(R&&"h"!==ye&&"v"!==ye){for(var xe=!1,be=-1,_e=[],we=0;we=0?s=h:(s=h=f,f++),s0?Math.max(r,i):0}}},1146:function(e){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},4272:function(e,t,r){"use strict";var n=r(8766),a=r(5477).hasColorscale,i=r(9356),o=r(4726);e.exports=function(e,t,r,l,s,c){var u=o.isBubble(e),d=(e.line||{}).color;c=c||{},d&&(r=d),s("marker.symbol"),s("marker.opacity",u?.7:1),s("marker.size"),c.noAngle||(s("marker.angle"),c.noAngleRef||s("marker.angleref"),c.noStandOff||s("marker.standoff")),s("marker.color",r),a(e,"marker")&&i(e,t,l,s,{prefix:"marker.",cLetter:"c"}),c.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),c.noLine||(s("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?n.background:n.defaultLine),a(e,"marker.line")&&i(e,t,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",u?1:0)),u&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),c.gradient&&"none"!==s("marker.gradient.type")&&s("marker.gradient.color")}},9669:function(e,t,r){"use strict";var n=r(4809).dateTick0,a=r(3821).ONEWEEK;function i(e,t){return n(t,e%a==0?1:0)}e.exports=function(e,t,r,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i(o,t.xcalendar)),n("xperiodalignment"))}if(a.y){var l=n("yperiod");l&&(n("yperiod0",i(l,t.ycalendar)),n("yperiodalignment"))}}},6098:function(e,t,r){"use strict";var n=r(5568),a=r(3626),i=r(4809),o=i.ensureSingle,l=i.identity,s=r(2203),c=r(4726),u=r(5525),d=r(7210),f=r(899).tester;function h(e,t,r,d,h,p,m){var g,v=e._context.staticPlot;!function(e,t,r,a,o){var l=r.xaxis,s=r.yaxis,u=n.extent(i.simpleMap(l.range,l.r2c)),d=n.extent(i.simpleMap(s.range,s.r2c)),f=a[0].trace;if(c.hasMarkers(f)){var h=f.marker.maxdisplayed;if(0!==h){var p=a.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]})),m=Math.ceil(p.length/h),g=0;o.forEach((function(e,r){var n=e[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return y?e.transition():e}var b=r.xaxis,_=r.yaxis,w=d[0].trace,T=w.line,A=n.select(p),M=o(A,"g","errorbars"),k=o(A,"g","lines"),S=o(A,"g","points"),E=o(A,"g","text");if(a.getComponentMethod("errorbars","plot")(e,M,r,m),!0===w.visible){var C,L;x(A).style("opacity",w.opacity);var O,D,I=w.fill.charAt(w.fill.length-1);"x"!==I&&"y"!==I&&(I=""),"y"===I?(O=1,D=_.c2p(0,!0)):"x"===I&&(O=0,D=b.c2p(0,!0)),d[0][r.isRangePlot?"nodeRangePlot3":"node3"]=A;var P,R,N="",F=[],B=w._prevtrace,z=null,$=null;B&&(N=B._prevRevpath||"",L=B._nextFill,F=B._ownPolygons,z=B._fillsegments,$=B._fillElement);var j,H,U,Y,V,Z,G="",W="",q=[];w._polygons=[];var K=[],X=[],J=i.noop;if(C=w._ownFill,c.hasLines(w)||"none"!==w.fill){L&&L.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(j=s.steps(T.shape),H=s.steps(T.shape.split("").reverse().join(""))):j=H="spline"===T.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),T.smoothing):s.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},U=function(e){return H(e.reverse())},X=u(d,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill}),K=new Array(X.length);var Q=0;for(g=0;g0,g=d(e,t,r);(u=a.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(e,t,r){t.each((function(t){var a=o(n.select(this),"g","fills");s.setClipUrl(a,r.layerClipId,e);var i=t[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,l);u.enter().append("g"),u.exit().each((function(e){i[e]=null})).remove(),u.order().each((function(e){i[e]=o(n.select(this),"path","js-fill")}))}))}(e,u,t),m?(c&&(f=c()),n.transition().duration(i.duration).ease(i.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){a.selectAll("g.trace").each((function(r,n){h(e,n,t,r,g,this,i)}))}))):u.each((function(r,n){h(e,n,t,r,g,this,i)})),p&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},2665:function(e,t,r){"use strict";var n=r(4726);e.exports=function(e,t){var r,a,i,o,l=e.cd,s=e.xaxis,c=e.yaxis,u=[],d=l[0].trace;if(!n.hasMarkers(d)&&!n.hasText(d))return[];if(!1===t)for(r=0;ra&&(a=u,o=c)}}return a?i(o):l};case"rms":return function(e,t){for(var r=0,a=0,o=0;o":return function(e){return h(e)>d};case">=":return function(e){return h(e)>=d};case"[]":return function(e){var t=h(e);return t>=d[0]&&t<=d[1]};case"()":return function(e){var t=h(e);return t>d[0]&&t=d[0]&&td[0]&&t<=d[1]};case"][":return function(e){var t=h(e);return t<=d[0]||t>=d[1]};case")(":return function(e){var t=h(e);return td[1]};case"](":return function(e){var t=h(e);return t<=d[0]||t>d[1]};case")[":return function(e){var t=h(e);return t=d[1]};case"{}":return function(e){return-1!==d.indexOf(h(e))};case"}{":return function(e){return-1===d.indexOf(h(e))}}}(r,i.getDataToCoordFunc(e,t,l,a),f),x={},b={},_=0;p?(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set(new Array(d))},v=function(e,t){var r=x[e.astr][t];e.get()[t]=r}):(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set([])},v=function(e,t){var r=x[e.astr][t];e.get().push(r)}),A(g);for(var w=o(t.transforms,r),T=0;T1?"%{group} (%{trace})":"%{group}");var s=e.styles,c=o.styles=[];if(s)for(i=0;i1&&-1!==a.indexOf("Macintosh")&&-1!==a.indexOf("Safari")&&(i=!0),i}},5955:function(e,t,r){"use strict";var n=r(2413),a=r.n(n),i=r(1070),o=r.n(i),l=r(2133),s=r.n(l),c=new URL(r(7035),r.b),u=new URL(r(3470),r.b),d=new URL(r(8164),r.b),f=new URL(r(4665),r.b),h=new URL(r(4890),r.b),p=new URL(r(3363),r.b),m=new URL(r(3490),r.b),g=new URL(r(7603),r.b),v=new URL(r(3913),r.b),y=new URL(r(1413),r.b),x=new URL(r(4643),r.b),b=new URL(r(216),r.b),_=new URL(r(1907),r.b),w=new URL(r(8605),r.b),T=new URL(r(5446),r.b),A=new URL(r(6694),r.b),M=new URL(r(4420),r.b),k=new URL(r(5796),r.b),S=new URL(r(2228),r.b),E=new URL(r(9819),r.b),C=new URL(r(7695),r.b),L=new URL(r(8869),r.b),O=new URL(r(557),r.b),D=new URL(r(8460),r.b),I=new URL(r(8920),r.b),P=new URL(r(3737),r.b),R=new URL(r(7914),r.b),N=new URL(r(6117),r.b),F=new URL(r(6311),r.b),B=o()(a()),z=s()(c),$=s()(u),j=s()(d),H=s()(f),U=s()(h),Y=s()(p),V=s()(m),Z=s()(g),G=s()(v),W=s()(y),q=s()(x),K=s()(b),X=s()(_),J=s()(w),Q=s()(T),ee=s()(A),te=s()(M),re=s()(k),ne=s()(S),ae=s()(E),ie=s()(C),oe=s()(L),le=s()(O),se=s()(D),ce=s()(I),ue=s()(P),de=s()(R),fe=s()(N),he=s()(F);B.push([e.id,".maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("+z+")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("+$+")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("+j+")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("+H+")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("+U+")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("+Y+")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("+V+")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("+Z+")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("+G+")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("+W+")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("+q+")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("+Z+")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("+K+")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("+X+")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("+J+")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("+Q+")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("+ee+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("+te+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("+re+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("+ne+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("+ae+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("+ie+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("+oe+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("+le+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("+se+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("+ne+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("+ae+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("+ie+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("+oe+")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("+ce+")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("+ue+")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("+de+");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("+de+")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("+de+")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("+fe+");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("+he+")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("+fe+')}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}',""]),t.A=B},5568:function(e,t,r){var n,a;(function(){var i={version:"3.8.2"},o=[].slice,l=function(e){return o.call(e)},s=self.document;function c(e){return e&&(e.ownerDocument||e.document||e).documentElement}function u(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(s)try{l(s.documentElement.childNodes)[0].nodeType}catch(e){l=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),s)try{s.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var d=this.Element.prototype,f=d.setAttribute,h=d.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;d.setAttribute=function(e,t){f.call(this,e,t+"")},d.setAttributeNS=function(e,t,r){h.call(this,e,t,r+"")},p.setProperty=function(e,t,r){m.call(this,e,t+"",r)}}function g(e,t){return et?1:e>=t?0:NaN}function v(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function x(e){return{left:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}i.ascending=g,i.descending=function(e,t){return te?1:t>=e?0:NaN},i.min=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},i.max=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},i.extent=function(e,t){var r,n,a,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=a=n;break}for(;++in&&(r=n),a=n){r=a=n;break}for(;++in&&(r=n),a1)return o/(s-1)},i.deviation=function(){var e=i.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(g);function _(e){return e.length}i.bisectLeft=b.left,i.bisect=i.bisectRight=b.right,i.bisector=function(e){return x(1===e.length?function(t,r){return g(e(t),r)}:e)},i.shuffle=function(e,t,r){(i=arguments.length)<3&&(r=e.length,i<2&&(t=0));for(var n,a,i=r-t;i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},i.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},i.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],a=new Array(r<0?0:r);t=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r};var w=Math.abs;function T(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function A(){this._=Object.create(null)}i.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r==1/0)throw new Error("infinite range");var n,a=[],i=function(e){for(var t=1;e*t%1;)t*=10;return t}(w(r)),o=-1;if(e*=i,t*=i,(r*=i)<0)for(;(n=e+r*++o)>t;)a.push(n/i);else for(;(n=e+r*++o)=n.length)return t?t.call(r,i):e?i.sort(e):i;for(var s,c,u,d,f=-1,h=i.length,p=n[l++],m=new A;++f=n.length)return e;var r=[],i=a[t++];return e.forEach((function(e,n){r.push({key:e,values:l(n,t)})})),i?r.sort((function(e,t){return i(e.key,t.key)})):r}return r.map=function(e,t){return o(t,e,0)},r.entries=function(e){return l(o(i.map,e,0),0)},r.key=function(e){return n.push(e),r},r.sortKeys=function(e){return a[n.length-1]=e,r},r.sortValues=function(t){return e=t,r},r.rollup=function(e){return t=e,r},r},i.set=function(e){var t=new D;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},i.event=null,i.requote=function(e){return e.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Y={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function V(e){return Y(e,q),e}var Z=function(e,t){return t.querySelector(e)},G=function(e,t){return t.querySelectorAll(e)},W=function(e,t){var r=e.matches||e[R(e,"matchesSelector")];return W=function(e,t){return r.call(e,t)},W(e,t)};"function"==typeof Sizzle&&(Z=function(e,t){return Sizzle(e,t)[0]||null},G=Sizzle,W=Sizzle.matchesSelector),i.selection=function(){return i.select(s.documentElement)};var q=i.selection.prototype=[];function K(e){return"function"==typeof e?e:function(){return Z(e,this)}}function X(e){return"function"==typeof e?e:function(){return G(e,this)}}q.select=function(e){var t,r,n,a,i=[];e=K(e);for(var o=-1,l=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),Q.hasOwnProperty(r)?{space:Q[r],local:e}:e}},q.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node();return(e=i.ns.qualify(e)).local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}for(t in e)this.each(ee(t,e[t]));return this}return this.each(ee(e,t))},q.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=ne(e)).length,a=-1;if(t=r.classList){for(;++a=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},q.sort=function(e){e=fe.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(e=e.slice(0,a));var s=ve.get(e);function c(){var t=this[n];t&&(this.removeEventListener(e,t,t.$),delete this[n])}return s&&(e=s,o=xe),a?t?function(){var a=o(t,l(arguments));c.call(this),this.addEventListener(e,this[n]=a,a.$=r),a._=t}:c:t?F:function(){var t,r=new RegExp("^__on([^.]+)"+i.requote(e)+"$");for(var n in this)if(t=n.match(r)){var a=this[n];this.removeEventListener(t[1],a,a.$),delete this[n]}}}i.selection.enter=pe,i.selection.enter.prototype=me,me.append=q.append,me.empty=q.empty,me.node=q.node,me.call=q.call,me.size=q.size,me.select=function(e){for(var t,r,n,a,i,o=[],l=-1,s=this.length;++l=n&&(n=t+1);!(o=l[n])&&++n1?Le:e<-1?-Le:Math.asin(e)}function Pe(e){return((e=Math.exp(e))+1/e)/2}var Re=Math.SQRT2;i.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],l=t[0],s=t[1],c=t[2],u=l-a,d=s-i,f=u*u+d*d;if(f<1e-12)n=Math.log(c/o)/Re,r=function(e){return[a+e*u,i+e*d,o*Math.exp(Re*e*n)]};else{var h=Math.sqrt(f),p=(c*c-o*o+4*f)/(2*o*2*h),m=(c*c-o*o-4*f)/(2*c*2*h),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-g)/Re,r=function(e){var t,r=e*n,l=Pe(g),s=o/(2*h)*(l*(t=Re*r+g,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[a+s*u,i+s*d,o*l/Pe(Re*r+g)]}}return r.duration=1e3*n,r},i.behavior.zoom=function(){var e,t,r,n,a,o,l,c,d,f={x:0,y:0,k:1},h=[960,500],p=Be,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=H(w,"zoomstart","zoom","zoomend");function w(e){e.on(v,O).on(Fe+".zoom",I).on("dblclick.zoom",P).on(b,D)}function T(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function A(e){f.k=Math.max(p[0],Math.min(p[1],e))}function M(e,t){t=function(e){return[e[0]*f.k+f.x,e[1]*f.k+f.y]}(t),f.x+=e[0]-t[0],f.y+=e[1]-t[1]}function k(e,r,n,a){e.__chart__={x:f.x,y:f.y,k:f.k},A(Math.pow(2,a)),M(t=r,n),e=i.select(e),m>0&&(e=e.transition().duration(m)),e.call(w.event)}function S(){l&&l.domain(o.range().map((function(e){return(e-f.x)/f.k})).map(o.invert)),d&&d.domain(c.range().map((function(e){return(e-f.y)/f.k})).map(c.invert))}function E(e){g++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function L(e){--g||(e({type:"zoomend"}),t=null)}function O(){var e=this,t=_.of(e,arguments),r=0,n=i.select(u(e)).on(y,(function(){r=1,M(i.mouse(e),a),C(t)})).on(x,(function(){n.on(y,null).on(x,null),o(r),L(t)})),a=T(i.mouse(e)),o=we(e);Ga.call(e),E(t)}function D(){var e,t=this,r=_.of(t,arguments),n={},o=0,l=".zoom-"+i.event.changedTouches[0].identifier,s="touchmove"+l,c="touchend"+l,u=[],d=i.select(t),h=we(t);function p(){var r=i.touches(t);return e=f.k,r.forEach((function(e){e.identifier in n&&(n[e.identifier]=T(e))})),r}function m(){var e=i.event.target;i.select(e).on(s,g).on(c,y),u.push(e);for(var r=i.event.changedTouches,l=0,d=r.length;l1){v=h[0];var x=h[1],b=v[0]-x[0],_=v[1]-x[1];o=b*b+_*_}}function g(){var l,s,c,u,d=i.touches(t);Ga.call(t);for(var f=0,h=d.length;f360?e-=360:e<0&&(e+=360),e<60?n+(a-n)*e/60:e<180?a:e<240?n+(a-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+t):r+t-r*t),new rt(i(e+120),i(e),i(e-120))}function Ue(e,t,r){return this instanceof Ue?(this.h=+e,this.c=+t,void(this.l=+r)):arguments.length<2?e instanceof Ue?new Ue(e.h,e.c,e.l):function(e,t,r){return e>0?new Ue(Math.atan2(r,t)*De,Math.sqrt(t*t+r*r),e):new Ue(NaN,NaN,e)}(e instanceof Ze?e.l:(e=ct((e=i.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ue(e,t,r)}je.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new $e(this.h,this.s,this.l/e)},je.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new $e(this.h,this.s,e*this.l)},je.rgb=function(){return He(this.h,this.s,this.l)},i.hcl=Ue;var Ye=Ue.prototype=new ze;function Ve(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Ze(r,Math.cos(e*=Oe)*t,Math.sin(e)*t)}function Ze(e,t,r){return this instanceof Ze?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Ze?new Ze(e.l,e.a,e.b):e instanceof Ue?Ve(e.h,e.c,e.l):ct((e=rt(e)).r,e.g,e.b):new Ze(e,t,r)}Ye.brighter=function(e){return new Ue(this.h,this.c,Math.min(100,this.l+Ge*(arguments.length?e:1)))},Ye.darker=function(e){return new Ue(this.h,this.c,Math.max(0,this.l-Ge*(arguments.length?e:1)))},Ye.rgb=function(){return Ve(this.h,this.c,this.l).rgb()},i.lab=Ze;var Ge=18,We=.95047,qe=1,Ke=1.08883,Xe=Ze.prototype=new ze;function Je(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new rt(tt(3.2404542*(a=Qe(a)*We)-1.5371385*(n=Qe(n)*qe)-.4985314*(i=Qe(i)*Ke)),tt(-.969266*a+1.8760108*n+.041556*i),tt(.0556434*a-.2040259*n+1.0572252*i))}function Qe(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function et(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function tt(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function rt(e,t,r){return this instanceof rt?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof rt?new rt(e.r,e.g,e.b):lt(""+e,rt,He):new rt(e,t,r)}function nt(e){return new rt(e>>16,e>>8&255,255&e)}function at(e){return nt(e)+""}Xe.brighter=function(e){return new Ze(Math.min(100,this.l+Ge*(arguments.length?e:1)),this.a,this.b)},Xe.darker=function(e){return new Ze(Math.max(0,this.l-Ge*(arguments.length?e:1)),this.a,this.b)},Xe.rgb=function(){return Je(this.l,this.a,this.b)},i.rgb=rt;var it=rt.prototype=new ze;function ot(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function lt(e,t,r){var n,a,i,o=0,l=0,s=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(dt(a[0]),dt(a[1]),dt(a[2]))}return(i=ft.get(e))?t(i.r,i.g,i.b):(null==e||"#"!==e.charAt(0)||isNaN(i=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&i)>>4,o|=o>>4,l=240&i,l|=l>>4,s=15&i,s|=s<<4):7===e.length&&(o=(16711680&i)>>16,l=(65280&i)>>8,s=255&i)),t(o,l,s))}function st(e,t,r){var n,a,i=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),l=o-i,s=(o+i)/2;return l?(a=s<.5?l/(o+i):l/(2-o-i),n=e==o?(t-r)/l+(t0&&s<1?0:n),new $e(n,a,s)}function ct(e,t,r){var n=et((.4124564*(e=ut(e))+.3575761*(t=ut(t))+.1804375*(r=ut(r)))/We),a=et((.2126729*e+.7151522*t+.072175*r)/qe);return Ze(116*a-16,500*(n-a),200*(a-et((.0193339*e+.119192*t+.9503041*r)/Ke)))}function ut(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function dt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}it.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,a=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=r.call(a,c)}catch(e){return void o.error.call(a,e)}o.load.call(a,e)}else o.error.call(a,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(e)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(e){var t=i.event;i.event=e;try{o.progress.call(a,c)}finally{i.event=t}},a.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",a)},a.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",a):t},a.responseType=function(e){return arguments.length?(u=e,a):u},a.response=function(e){return r=e,a},["get","post"].forEach((function(e){a[e]=function(){return a.send.apply(a,[e].concat(l(arguments)))}})),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),c.open(r,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),c.setRequestHeader)for(var l in s)c.setRequestHeader(l,s[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=u&&(c.responseType=u),null!=i&&a.on("error",i).on("load",(function(e){i(null,e)})),o.beforesend.call(a,c),c.send(null==n?null:n),a},a.abort=function(){return c.abort(),a},i.rebind(a,o,"on"),null==n?a:a.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(n))}ft.forEach((function(e,t){ft.set(e,nt(t))})),i.functor=ht,i.xhr=pt(I),i.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function a(e,r,n){arguments.length<3&&(n=r,r=null);var a=mt(e,t,null==r?i:o(r),n);return a.row=function(e){return arguments.length?a.response(null==(r=e)?i:o(e)):r},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function l(t){return t.map(s).join(e)}function s(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var r;return a.parseRows(e,(function(e,n){if(r)return r(e,n-1);var a=function(t){for(var r={},n=e.length,a=0;a=s)return o;if(a)return a=!1,i;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(xt),xt=setTimeout(wt,t)),yt=0):(yt=1,bt(wt))}function Tt(){for(var e=Date.now(),t=gt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function At(){for(var e,t=gt,r=1/0;t;)t.c?(t.t1&&(t=e[i[o-2]],r=e[i[o-1]],n=e[l],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--o;i[o++]=l}return i.slice(0,o)}function Et(e,t){return e[0]-t[0]||e[1]-t[1]}i.timer=function(){_t.apply(this,arguments)},i.timer.flush=function(){Tt(),At()},i.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},i.geom={},i.geom.hull=function(e){var t=Mt,r=kt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=ht(t),i=ht(r),o=e.length,l=[],s=[];for(n=0;n=0;--n)h.push(e[l[c[n]][2]]);for(n=+d;nke)l=l.L;else{if(!((a=i-Zt(l,o))>ke)){n>-ke?(t=l.P,r=l):a>-ke?(t=l,r=l.N):t=r=l;break}if(!l.R){t=l;break}l=l.R}var s=jt(e);if(Rt.insert(t,s),t||r){if(t===r)return Xt(t),r=jt(t.site),Rt.insert(s,r),s.edge=r.edge=er(t.site,s.site),Kt(t),void Kt(r);if(r){Xt(t),Xt(r);var c=t.site,u=c.x,d=c.y,f=e.x-u,h=e.y-d,p=r.site,m=p.x-u,g=p.y-d,v=2*(f*g-h*m),y=f*f+h*h,x=m*m+g*g,b={x:(g*y-h*x)/v+u,y:(f*x-m*y)/v+d};tr(r.edge,c,p,b),s.edge=er(c,e,null,b),r.edge=er(e,p,null,b),Kt(t),Kt(r)}else s.edge=er(t.site,s.site)}}function Vt(e,t){var r=e.site,n=r.x,a=r.y,i=a-t;if(!i)return n;var o=e.P;if(!o)return-1/0;var l=(r=o.site).x,s=r.y,c=s-t;if(!c)return l;var u=l-n,d=1/i-1/c,f=u/c;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*c)-s+c/2+a-i/2)))/d+n:(n+l)/2}function Zt(e,t){var r=e.N;if(r)return Vt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Gt(e){this.site=e,this.edges=[]}function Wt(e,t){return t.angle-e.angle}function qt(){ar(this),this.x=this.y=this.arc=this.site=this.cy=null}function Kt(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,a=e.site,i=r.site;if(n!==i){var o=a.x,l=a.y,s=n.x-o,c=n.y-l,u=i.x-o,d=2*(s*(g=i.y-l)-c*u);if(!(d>=-1e-12)){var f=s*s+c*c,h=u*u+g*g,p=(g*f-c*h)/d,m=(s*h-u*f)/d,g=m+l,v=zt.pop()||new qt;v.arc=e,v.site=a,v.x=p+o,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,e.circle=v;for(var y=null,x=Ft._;x;)if(v.y=l)return;if(f>p){if(i){if(i.y>=c)return}else i={x:g,y:s};r={x:g,y:c}}else{if(i){if(i.y1)if(f>p){if(i){if(i.y>=c)return}else i={x:(s-a)/n,y:s};r={x:(c-a)/n,y:c}}else{if(i){if(i.y=l)return}else i={x:o,y:n*o+a};r={x:l,y:n*l+a}}else{if(i){if(i.x0)){if(t/=f,f<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=a-s,f||!(t<0)){if(t/=f,f<0){if(t>d)return;t>u&&(u=t)}else if(f>0){if(t0)){if(t/=h,h<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=i-c,h||!(t<0)){if(t/=h,h<0){if(t>d)return;t>u&&(u=t)}else if(h>0){if(t0&&(e.a={x:s+u*f,y:c+u*h}),d<1&&(e.b={x:s+d*f,y:c+d*h}),e}}}}}),s=o.length;s--;)(!Jt(t=o[s],e)||!l(t)||w(t.a.x-t.b.x)ke||w(a-r)>ke)&&(l.splice(o,0,new rr((v=i.site,y=u,x=w(n-d)ke?{x:d,y:w(t-d)ke?{x:w(r-p)ke?{x:f,y:w(t-f)ke?{x:w(r-h)=r&&c.x<=a&&c.y>=n&&c.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=e[l]})),t}function l(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/ke)*ke,y:Math.round(a(e,t)/ke)*ke,i:t}}))}return o.links=function(e){return sr(l(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return sr(l(e)).cells.forEach((function(r,n){for(var a,i,o,l,s=r.site,c=r.edges.sort(Wt),u=-1,d=c.length,f=c[d-1].edge,h=f.l===s?f.r:f.l;++ui&&(a=t.slice(i,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(n=n[0])?l[o]?l[o]+=n:l[++o]=n:(l[++o]=null,s.push({i:o,x:gr(r,n)})),i=xr.lastIndex;return im&&(m=s.x),s.y>g&&(g=s.y),c.push(s.x),u.push(s.y);else for(d=0;dm&&(m=x),b>g&&(g=b),c.push(x),u.push(b)}var _=m-h,T=g-p;function A(e,t,r,n,a,i,o,l){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var s=e.x,c=e.y;if(null!=s)if(w(s-r)+w(c-n)<.01)M(e,t,r,n,a,i,o,l);else{var u=e.point;e.x=e.y=e.point=null,M(e,u,s,c,a,i,o,l),M(e,t,r,n,a,i,o,l)}else e.x=r,e.y=n,e.point=t}else M(e,t,r,n,a,i,o,l)}function M(e,t,r,n,a,i,o,l){var s=.5*(a+o),c=.5*(i+l),u=r>=s,d=n>=c,f=d<<1|u;e.leaf=!1,u?a=s:o=s,d?i=c:l=c,A(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,l)}_>T?g=p+_:m=h+T;var k={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){A(k,e,+v(e,++d),+y(e,d),h,p,m,g)},visit:function(e){hr(e,k,h,p,m,g)},find:function(e){return function(e,t,r,n,a,i,o){var l,s=1/0;return function e(c,u,d,f,h){if(!(u>i||d>o||f=_)<<1|t>=b,T=w+4;w=0&&!(r=i.interpolators[n](e,t)););return r}function _r(e,t){var r,n=[],a=[],i=e.length,o=t.length,l=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Lr(e){return 1-Math.cos(e*Le)}function Or(e){return Math.pow(2,10*(e-1))}function Dr(e){return 1-Math.sqrt(1-e*e)}function Ir(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Pr(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Rr(e){var t,r,n,a=[e.a,e.b],i=[e.c,e.d],o=Fr(a),l=Nr(a,i),s=Fr(((t=i)[0]+=(n=-l)*(r=a)[0],t[1]+=n*r[1],t))||0;a[0]*i[1]=0?e.slice(0,r):e,a=r>=0?e.slice(r+1):"in";return n=Tr.get(n)||wr,a=Ar.get(a)||I,t=a(n.apply(null,o.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},i.interpolateHcl=function(e,t){e=i.hcl(e),t=i.hcl(t);var r=e.h,n=e.c,a=e.l,o=t.h-r,l=t.c-n,s=t.l-a;return isNaN(l)&&(l=0,n=isNaN(n)?t.c:n),isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return Ve(r+o*e,n+l*e,a+s*e)+""}},i.interpolateHsl=function(e,t){e=i.hsl(e),t=i.hsl(t);var r=e.h,n=e.s,a=e.l,o=t.h-r,l=t.s-n,s=t.l-a;return isNaN(l)&&(l=0,n=isNaN(n)?t.s:n),isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return He(r+o*e,n+l*e,a+s*e)+""}},i.interpolateLab=function(e,t){e=i.lab(e),t=i.lab(t);var r=e.l,n=e.a,a=e.b,o=t.l-r,l=t.a-n,s=t.b-a;return function(e){return Je(r+o*e,n+l*e,a+s*e)+""}},i.interpolateRound=Pr,i.transform=function(e){var t=s.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(e){if(null!=e){t.setAttribute("transform",e);var r=t.transform.baseVal.consolidate()}return new Rr(r?r.matrix:Br)})(e)},Rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Br={a:1,b:0,c:0,d:1,e:0,f:0};function zr(e){return e.length?e.pop()+",":""}function $r(e,t){var r=[],n=[];return e=i.transform(e),t=i.transform(t),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:gr(e[0],t[0])},{i:a-2,x:gr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(e.translate,t.translate,r,n),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(zr(r)+"rotate(",null,")")-2,x:gr(e,t)})):t&&r.push(zr(r)+"rotate("+t+")")}(e.rotate,t.rotate,r,n),function(e,t,r,n){e!==t?n.push({i:r.push(zr(r)+"skewX(",null,")")-2,x:gr(e,t)}):t&&r.push(zr(r)+"skewX("+t+")")}(e.skew,t.skew,r,n),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push(zr(r)+"scale(",null,",",null,")");n.push({i:a-4,x:gr(e[0],t[0])},{i:a-2,x:gr(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(zr(r)+"scale("+t+")")}(e.scale,t.scale,r,n),e=t=null,function(e){for(var t,a=-1,i=n.length;++a0?r=t:(e.c=null,e.t=NaN,e=null,s.end({type:"end",alpha:r=0})):t>0&&(s.start({type:"start",alpha:r=t}),e=_t(l.tick)),l):r},l.start=function(){var e,t,r,i=v.length,s=y.length,u=c[0],p=c[1];for(e=0;e=0;)r.push(a[n])}function tn(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o=0;)o.push(u=c[s]),u.parent=i,u.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return tn(a,(function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)})),l}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(en(e,(function(e){e.children&&(e.value=0)})),tn(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},i.layout.partition=function(){var e=i.layout.hierarchy(),t=[1,1];function r(e,t,n,a){var i=e.children;if(e.x=t,e.y=e.depth*a,e.dx=n,e.dy=a,i&&(o=i.length)){var o,l,s,c=-1;for(n=e.value?n/e.value:0;++cl&&(l=n),o.push(n)}for(r=0;ra&&(n=r,a=t);return n}function gn(e){return e.reduce(vn,0)}function vn(e,t){return e+t[1]}function yn(e,t){return xn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xn(e,t){for(var r=-1,n=+e[0],a=(e[1]-n)/t,i=[];++r<=t;)i[r]=a*r+n;return i}function bn(e){return[i.min(e),i.max(e)]}function _n(e,t){return e.value-t.value}function wn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function Tn(e,t){e._pack_next=t,t._pack_prev=e}function An(e,t){var r=t.x-e.x,n=t.y-e.y,a=e.r+t.r;return.999*a*a>r*r+n*n}function Mn(e){if((t=e.children)&&(s=t.length)){var t,r,n,a,i,o,l,s,c=1/0,u=-1/0,d=1/0,f=-1/0;if(t.forEach(kn),(r=t[0]).x=-r.r,r.y=0,x(r),s>1&&((n=t[1]).x=n.r,n.y=0,x(n),s>2))for(Cn(r,n,a=t[2]),x(a),wn(r,a),r._pack_prev=a,wn(a,n),n=r._pack_next,i=3;i0)for(o=-1;++o=d[0]&&s<=d[1]&&((l=c[i.bisect(f,s,1,p)-1]).y+=m,l.push(a[o]));return c}return a.value=function(e){return arguments.length?(t=e,a):t},a.range=function(e){return arguments.length?(r=ht(e),a):r},a.bins=function(e){return arguments.length?(n="number"==typeof e?function(t){return xn(t,e)}:ht(e),a):n},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},i.layout.pack=function(){var e,t=i.layout.hierarchy().sort(_n),r=0,n=[1,1];function a(a,i){var o=t.call(this,a,i),l=o[0],s=n[0],c=n[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(l.x=l.y=0,tn(l,(function(e){e.r=+u(e.value)})),tn(l,Mn),r){var d=r*(e?1:Math.max(2*l.r/s,2*l.r/c))/2;tn(l,(function(e){e.r+=d})),tn(l,Mn),tn(l,(function(e){e.r-=d}))}return En(l,s/2,c/2,e?1:1/Math.max(2*l.r/s,2*l.r/c)),o}return a.size=function(e){return arguments.length?(n=e,a):n},a.radius=function(t){return arguments.length?(e=null==t||"function"==typeof t?t:+t,a):e},a.padding=function(e){return arguments.length?(r=+e,a):r},Qr(a,t)},i.layout.tree=function(){var e=i.layout.hierarchy().sort(null).value(null),t=Ln,r=[1,1],n=null;function a(a,i){var c=e.call(this,a,i),u=c[0],d=function(e){for(var t,r={A:null,children:[e]},n=[r];null!=(t=n.pop());)for(var a,i=t.children,o=0,l=i.length;oh.x&&(h=e),e.depth>p.depth&&(p=e)}));var m=t(f,h)/2-f.x,g=r[0]/(h.x+t(h,f)/2+m),v=r[1]/(p.depth||1);en(u,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return c}function o(e){var r=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(r.length){!function(e){for(var t,r=0,n=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var i=(r[0].z+r[r.length-1].z)/2;a?(e.z=a.z+t(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+t(e._,a._));e.parent.A=function(e,r,n){if(r){for(var a,i=e,o=e,l=r,s=i.parent.children[0],c=i.m,u=o.m,d=l.m,f=s.m;l=Dn(l),i=On(i),l&&i;)s=On(s),(o=Dn(o)).a=e,(a=l.z+d-i.z-c+t(l._,i._))>0&&(In(Pn(l,e,n),e,a),c+=a,u+=a),d+=l.m,c+=i.m,f+=s.m,u+=o.m;l&&!Dn(o)&&(o.t=l,o.m+=d-u),i&&!On(s)&&(s.t=i,s.m+=c-f,n=e)}return n}(e,a,e.parent.A||n[0])}function l(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=r[0],e.y=e.depth*r[1]}return a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(e){return arguments.length?(n=null==(r=e)?s:null,a):n?null:r},a.nodeSize=function(e){return arguments.length?(n=null==(r=e)?null:s,a):n?r:null},Qr(a,e)},i.layout.cluster=function(){var e=i.layout.hierarchy().sort(null).value(null),t=Ln,r=[1,1],n=!1;function a(a,o){var l,s=e.call(this,a,o),c=s[0],u=0;tn(c,(function(e){var r=e.children;r&&r.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(r),e.y=function(e){return 1+i.max(e,(function(e){return e.y}))}(r)):(e.x=l?u+=t(e,l):0,e.y=0,l=e)}));var d=Rn(c),f=Nn(c),h=d.x-t(d,f)/2,p=f.x+t(f,d)/2;return tn(c,n?function(e){e.x=(e.x-c.x)*r[0],e.y=(c.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(c.y?e.y/c.y:1))*r[1]}),s}return a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(e){return arguments.length?(n=null==(r=e),a):n?null:r},a.nodeSize=function(e){return arguments.length?(n=null!=(r=e),a):n?r:null},Qr(a,e)},i.layout.treemap=function(){var e,t=i.layout.hierarchy(),r=Math.round,n=[1,1],a=null,o=Fn,l=!1,s="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,a=-1,i=e.length;++a0;)l.push(r=c[a-1]),l.area+=r.area,"squarify"!==s||(n=h(l,m))<=f?(c.pop(),f=n):(l.area-=l.pop().area,p(l,m,i,!1),m=Math.min(i.dx,i.dy),l.length=l.area=0,f=1/0);l.length&&(p(l,m,i,!0),l.length=l.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var r,n=o(e),a=t.slice(),i=[];for(u(a,n.dx*n.dy/e.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(p(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);t.forEach(f)}}function h(e,t){for(var r,n=e.area,a=0,i=1/0,o=-1,l=e.length;++oa&&(a=r));return t*=t,(n*=n)?Math.max(t*a*c/n,n/(t*i*c)):1/0}function p(e,t,n,a){var i,o=-1,l=e.length,s=n.x,c=n.y,u=t?r(e.area/t):0;if(t==n.dx){for((a||u>n.dy)&&(u=n.dy);++on.dx)&&(u=n.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var e=i.random.normal.apply(i,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=i.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Vn:jn,s=n?Hr:jr;return a=o(e,t,s,r),i=o(t,e,s,br),l}function l(e){return a(e)}return l.invert=function(e){return i(e)},l.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},l.range=function(e){return arguments.length?(t=e,o()):t},l.rangeRound=function(e){return l.range(e).interpolate(Pr)},l.clamp=function(e){return arguments.length?(n=e,o()):n},l.interpolate=function(e){return arguments.length?(r=e,o()):r},l.ticks=function(t){return Kn(e,t)},l.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},l.nice=function(t){return Wn(e,t),o()},l.copy=function(){return Zn(e,t,r,n)},o()}function Gn(e,t){return i.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Wn(e,t){return Hn(e,Un(qn(e,t)[2])),Hn(e,Un(qn(e,t)[2])),e}function qn(e,t){null==t&&(t=10);var r=zn(e),n=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),i=t/n*a;return i<=.15?a*=10:i<=.35?a*=5:i<=.75&&(a*=2),r[0]=Math.ceil(r[0]/a)*a,r[1]=Math.floor(r[1]/a)*a+.5*a,r[2]=a,r}function Kn(e,t){return i.range.apply(i,qn(e,t))}function Xn(e,t,r,n){function a(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function i(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(a(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(a)),o):n},o.base=function(r){return arguments.length?(t=+r,e.domain(n.map(a)),o):t},o.nice=function(){var t=Hn(n.map(a),r?Math:Jn);return e.domain(t),n=t.map(i),o},o.ticks=function(){var e=zn(n),o=[],l=e[0],s=e[1],c=Math.floor(a(l)),u=Math.ceil(a(s)),d=t%1?2:t;if(isFinite(u-c)){if(r){for(;c0;f--)o.push(i(c)*f);for(c=0;o[c]s;u--);o=o.slice(c,u)}return o},o.copy=function(){return Xn(e.copy(),t,r,n)},Gn(o,e)}i.scale.linear=function(){return Zn([0,1],[0,1],br,!1)},i.scale.log=function(){return Xn(i.scale.linear().domain([0,1]),10,!0,[1,10])};var Jn={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Qn(e,t,r){var n=ea(t),a=ea(1/t);function i(t){return e(n(t))}return i.invert=function(t){return a(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),i):r},i.ticks=function(e){return Kn(r,e)},i.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},i.nice=function(e){return i.domain(Wn(r,e))},i.exponent=function(o){return arguments.length?(n=ea(t=o),a=ea(1/t),e.domain(r.map(n)),i):t},i.copy=function(){return Qn(e.copy(),t,r)},Gn(i,e)}function ea(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ta(e,t){var r,n,a;function o(a){return n[((r.get(a)||("range"===t.t?r.set(a,e.push(a)):NaN))-1)%n.length]}function l(t,r){return i.range(e.length).map((function(e){return t+r*e}))}return o.domain=function(n){if(!arguments.length)return e;e=[],r=new A;for(var a,i=-1,l=n.length;++i0?r[n-1]:e[0],nd?0:1;if(c=Ce)return s(c,h)+(l?s(l,1-h):"")+"Z";var p,m,g,v,y,x,b,_,w,T,A,M,k=0,S=0,E=[];if((v=(+o.apply(this,arguments)||0)/2)&&(g=n===da?Math.sqrt(l*l+c*c):+n.apply(this,arguments),h||(S*=-1),c&&(S=Ie(g/c*Math.sin(v))),l&&(k=Ie(g/l*Math.sin(v)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(d-S),_=c*Math.sin(d-S);var C=Math.abs(d-u-2*S)<=Se?0:1;if(S&&va(y,x,b,_)===h^C){var L=(u+d)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(l){w=l*Math.cos(d-k),T=l*Math.sin(d-k),A=l*Math.cos(u+k),M=l*Math.sin(u+k);var O=Math.abs(u-d+2*k)<=Se?0:1;if(k&&va(w,T,A,M)===1-h^O){var D=(u+d)/2;w=l*Math.cos(D),T=l*Math.sin(D),A=M=null}}else w=T=0;if(f>ke&&(p=Math.min(Math.abs(c-l)/2,+r.apply(this,arguments)))>.001){m=l0?0:1}function ya(e,t,r,n,a){var i=e[0]-t[0],o=e[1]-t[1],l=(a?n:-n)/Math.sqrt(i*i+o*o),s=l*o,c=-l*i,u=e[0]+s,d=e[1]+c,f=t[0]+s,h=t[1]+c,p=(u+f)/2,m=(d+h)/2,g=f-u,v=h-d,y=g*g+v*v,x=r-n,b=u*h-f*d,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-g*_)/y,T=(-b*g-v*_)/y,A=(b*v+g*_)/y,M=(-b*g+v*_)/y,k=w-p,S=T-m,E=A-p,C=M-m;return k*k+S*S>E*E+C*C&&(w=A,T=M),[[w-s,T-c],[w*r/x,T*r/x]]}function xa(){return!0}function ba(e){var t=Mt,r=kt,n=xa,a=wa,i=a.key,o=.7;function l(i){var l,s=[],c=[],u=-1,d=i.length,f=ht(t),h=ht(r);function p(){s.push("M",a(e(c),o))}for(;++u1&&a.push("H",n[0]),a.join("")},"step-before":Aa,"step-after":Ma,basis:Ea,"basis-open":function(e){if(e.length<4)return wa(e);for(var t,r=[],n=-1,a=e.length,i=[0],o=[0];++n<3;)t=e[n],i.push(t[0]),o.push(t[1]);for(r.push(Ca(Da,i)+","+Ca(Da,o)),--n;++n9&&(a=3*t/Math.sqrt(a),o[l]=a*r,o[l+1]=a*n);for(l=-1;++l<=s;)a=(e[Math.min(s,l+1)][0]-e[Math.max(0,l-1)][0])/(6*(1+o[l]*o[l])),i.push([a||0,o[l]*a||0]);return i}(e))}});function wa(e){return e.length>1?e.join("L"):e+"Z"}function Ta(e){return e.join("L")+"Z"}function Aa(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t1){l=t[1],i=e[s],s++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1];for(var c=2;cSe)+",1 "+t}function s(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=ht(e),i):r},i.source=function(t){return arguments.length?(e=ht(t),i):e},i.target=function(e){return arguments.length?(t=ht(e),i):t},i.startAngle=function(e){return arguments.length?(n=ht(e),i):n},i.endAngle=function(e){return arguments.length?(a=ht(e),i):a},i},i.svg.diagonal=function(){var e=Fa,t=Ba,r=$a;function n(n,a){var i=e.call(this,n,a),o=t.call(this,n,a),l=(i.y+o.y)/2,s=[i,{x:i.x,y:l},{x:o.x,y:l},o];return"M"+(s=s.map(r))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return n.source=function(t){return arguments.length?(e=ht(t),n):e},n.target=function(e){return arguments.length?(t=ht(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},i.svg.diagonal.radial=function(){var e=i.svg.diagonal(),t=$a,r=e.projection;return e.projection=function(e){return arguments.length?r(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Le;return[r*Math.cos(n),r*Math.sin(n)]}}(t=e)):t},e},i.svg.symbol=function(){var e=Ha,t=ja;function r(r,n){return(Ya.get(e.call(this,r,n))||Ua)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=ht(t),r):e},r.size=function(e){return arguments.length?(t=ht(e),r):t},r};var Ya=i.map({circle:Ua,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Za)),r=t*Za;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Va),r=t*Va/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Va),r=t*Va/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});i.svg.symbolTypes=Ya.keys();var Va=Math.sqrt(3),Za=Math.tan(30*Oe);q.transition=function(e){for(var t,r,n=Ka||++Qa,a=ri(e),i=[],o=Xa||{time:Date.now(),ease:Cr,delay:0,duration:250},l=-1,s=this.length;++l0;)c[--f].call(e,o);if(i>=1)return d.event&&d.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}d||(i=a.time,o=_t((function(e){var t=d.delay;if(o.t=t+i,t<=e)return f(e-t);o.c=f}),0,i),d=u[n]={tween:new A,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++u.count)}Ja.call=q.call,Ja.empty=q.empty,Ja.node=q.node,Ja.size=q.size,i.transition=function(e,t){return e&&e.transition?Ka?e.transition(t):e:i.selection().transition(e)},i.transition.prototype=Ja,Ja.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=K(e);for(var l=-1,s=this.length;++lrect,.s>rect").attr("width",o[1]-o[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var d,g,v=this,y=i.select(i.event.target),x=r.of(v,arguments),b=i.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&&n,T=!/^(e|w)$/.test(_)&&a,A=y.classed("extent"),M=we(v),k=i.mouse(v),S=i.select(u(v)).on("keydown.brush",(function(){32==i.event.keyCode&&(A||(d=null,k[0]-=o[1],k[1]-=l[1],A=2),$())})).on("keyup.brush",(function(){32==i.event.keyCode&&2==A&&(k[0]+=o[1],k[1]+=l[1],A=0,$())}));if(i.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",D):S.on("mousemove.brush",L).on("mouseup.brush",D),b.interrupt().selectAll("*").interrupt(),A)k[0]=o[0]-k[0],k[1]=l[0]-k[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);g=[o[1-E]-k[0],l[1-C]-k[1]],k[0]=o[E],k[1]=l[C]}else i.event.altKey&&(d=k.slice());function L(){var e=i.mouse(v),t=!1;g&&(e[0]+=g[0],e[1]+=g[1]),A||(i.event.altKey?(d||(d=[(o[0]+o[1])/2,(l[0]+l[1])/2]),k[0]=o[+(e[0]>2],i+=n[(3&r[t])<<4|r[t+1]>>4],i+=n[(15&r[t+1])<<2|r[t+2]>>6],i+=n[63&r[t+2]];return a%3==2?i=i.substring(0,i.length-1)+"=":a%3==1&&(i=i.substring(0,i.length-2)+"=="),i},l=function(e){var t,r,n,i,o,l=.75*e.length,s=e.length,c=0;"="===e[e.length-1]&&(l--,"="===e[e.length-2]&&l--);var u=new ArrayBuffer(l),d=new Uint8Array(u);for(t=0;t>4,d[c++]=(15&n)<<4|i>>2,d[c++]=(3&i)<<6|63&o;return u}},1070:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,a,i){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var l=0;l0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),a&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=a):u[4]="".concat(a)),t.push(u))}},t}},2133:function(e){"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},2413:function(e){"use strict";e.exports=function(e){return e[1]}},6464:function(e,t,r){"use strict";function n(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}r.d(t,{GP:function(){return f},OE:function(){return m}});var a,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){if(!(t=i.exec(e)))throw new Error("invalid format: "+e);var t;return new l({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function l(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function s(e,t){var r=n(e,t);if(!r)return e+"";var a=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}o.prototype=l.prototype,l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return s(100*e,t)},r:s,s:function(e,t){var r=n(e,t);if(!r)return e+"";var i=r[0],o=r[1],l=o-(a=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return l===s?i:l>s?i+new Array(l-s+1).join("0"):l>0?i.slice(0,l)+"."+i.slice(l):"0."+new Array(1-l).join("0")+n(e,Math.max(0,t+l-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function u(e){return e}var d,f,h=Array.prototype.map,p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function m(e){var t,r,i=void 0===e.grouping||void 0===e.thousands?u:(t=h.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var a=e.length,i=[],o=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>n&&(l=Math.max(1,n-s)),i.push(e.substring(a-=l,a+l)),!((s+=l+1)>n));)l=t[o=(o+1)%t.length];return i.reverse().join(r)}),l=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",d=void 0===e.decimal?".":e.decimal+"",f=void 0===e.numerals?u:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),m=void 0===e.percent?"%":e.percent+"",g=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=o(e)).fill,r=e.align,n=e.sign,u=e.symbol,h=e.zero,y=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):c[w]||(void 0===b&&(b=12),_=!0,w="g"),(h||"0"===t&&"="===r)&&(h=!0,t="0",r="=");var T="$"===u?l:"#"===u&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A="$"===u?s:/[%p]/.test(w)?m:"",M=c[w],k=/[defgprs%]/.test(w);function S(e){var o,l,s,c=T,u=A;if("c"===w)u=M(e)+u,e="";else{var m=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:M(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,a=-1;n0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),m&&0==+e&&"+"!==n&&(m=!1),c=(m?"("===n?n:g:"-"===n||"("===n?"":n)+c,u=("s"===w?p[8+a/3]:"")+u+(m&&"("===n?")":""),k)for(o=-1,l=e.length;++o(s=e.charCodeAt(o))||s>57){u=(46===s?d+e.slice(o+1):e.slice(o))+u,e=e.slice(0,o);break}}x&&!h&&(e=i(e,1/0));var S=c.length+e.length+u.length,E=S>1)+c+e+u+E.slice(S);break;default:e=E+c+e+u}return f(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:y,formatPrefix:function(e,t){var r,a=y(((e=o(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor((r=t,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),l=Math.pow(10,-i),s=p[8+i/3];return function(e){return a(l*e)+s}}}}d=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),f=d.format,d.formatPrefix},2696:function(e,t,r){"use strict";r.d(t,{DC:function(){return p},de:function(){return f},aL:function(){return m}});var n=r(1681),a=r(2543),i=r(5735),o=r(7265),l=r(9830),s=r(9764);function c(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function u(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function d(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function f(e){var t=e.dateTime,r=e.date,l=e.time,s=e.periods,f=e.days,h=e.shortDays,p=e.months,m=e.shortMonths,v=w(s),y=T(s),x=w(f),b=T(f),_=w(h),Se=T(h),Ee=w(p),Ce=T(p),Le=w(m),Oe=T(m),De={a:function(e){return h[e.getDay()]},A:function(e){return f[e.getDay()]},b:function(e){return m[e.getMonth()]},B:function(e){return p[e.getMonth()]},c:null,d:Y,e:Y,f:q,H:V,I:Z,j:G,L:W,m:K,M:X,p:function(e){return s[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Me,s:ke,S:J,u:Q,U:ee,V:te,w:re,W:ne,x:null,X:null,y:ae,Y:ie,Z:oe,"%":Ae},Ie={a:function(e){return h[e.getUTCDay()]},A:function(e){return f[e.getUTCDay()]},b:function(e){return m[e.getUTCMonth()]},B:function(e){return p[e.getUTCMonth()]},c:null,d:le,e:le,f:fe,H:se,I:ce,j:ue,L:de,m:he,M:pe,p:function(e){return s[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Me,s:ke,S:me,u:ge,U:ve,V:ye,w:xe,W:be,x:null,X:null,y:_e,Y:we,Z:Te,"%":Ae},Pe={a:function(e,t,r){var n=_.exec(t.slice(r));return n?(e.w=Se[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=x.exec(t.slice(r));return n?(e.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Le.exec(t.slice(r));return n?(e.m=Oe[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=Ee.exec(t.slice(r));return n?(e.m=Ce[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return Fe(e,t,r,n)},d:P,e:P,f:$,H:N,I:N,j:R,L:z,m:I,M:F,p:function(e,t,r){var n=v.exec(t.slice(r));return n?(e.p=y[n[0].toLowerCase()],r+n[0].length):-1},q:D,Q:H,s:U,S:B,u:M,U:k,V:S,w:A,W:E,x:function(e,t,n){return Fe(e,r,t,n)},X:function(e,t,r){return Fe(e,l,t,r)},y:L,Y:C,Z:O,"%":j};function Re(e,t){return function(r){var n,a,i,o=[],l=-1,s=0,c=e.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in f||(f.w=1),"Z"in f?(s=(l=u(d(f.y,0,1))).getUTCDay(),l=s>4||0===s?n.rt.ceil(l):(0,n.rt)(l),l=a.A.offset(l,7*(f.V-1)),f.y=l.getUTCFullYear(),f.m=l.getUTCMonth(),f.d=l.getUTCDate()+(f.w+6)%7):(s=(l=c(d(f.y,0,1))).getDay(),l=s>4||0===s?i.By.ceil(l):(0,i.By)(l),l=o.A.offset(l,7*(f.V-1)),f.y=l.getFullYear(),f.m=l.getMonth(),f.d=l.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),s="Z"in f?u(d(f.y,0,1)).getUTCDay():c(d(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+7*f.W-(s+5)%7:f.w+7*f.U-(s+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,u(f)):c(f)}}function Fe(e,t,r,n){for(var a,i,o=0,l=t.length,s=r.length;o=s)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=Pe[a in g?t.charAt(o++):a])||(n=i(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}return De.x=Re(r,De),De.X=Re(l,De),De.c=Re(t,De),Ie.x=Re(r,Ie),Ie.X=Re(l,Ie),Ie.c=Re(t,Ie),{format:function(e){var t=Re(e+="",De);return t.toString=function(){return e},t},parse:function(e){var t=Ne(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Re(e+="",Ie);return t.toString=function(){return e},t},utcParse:function(e){var t=Ne(e+="",!0);return t.toString=function(){return e},t}}}var h,p,m,g={"-":"",_:" ",0:"0"},v=/^\s*\d+/,y=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i68?1900:2e3),r+n[0].length):-1}function O(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function D(e,t,r){var n=v.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function I(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function P(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function R(e,t,r){var n=v.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function N(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function F(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function B(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function z(e,t,r){var n=v.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function $(e,t,r){var n=v.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function j(e,t,r){var n=y.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function H(e,t,r){var n=v.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function U(e,t,r){var n=v.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Y(e,t){return b(e.getDate(),t,2)}function V(e,t){return b(e.getHours(),t,2)}function Z(e,t){return b(e.getHours()%12||12,t,2)}function G(e,t){return b(1+o.A.count((0,l.A)(e),e),t,3)}function W(e,t){return b(e.getMilliseconds(),t,3)}function q(e,t){return W(e,t)+"000"}function K(e,t){return b(e.getMonth()+1,t,2)}function X(e,t){return b(e.getMinutes(),t,2)}function J(e,t){return b(e.getSeconds(),t,2)}function Q(e){var t=e.getDay();return 0===t?7:t}function ee(e,t){return b(i.fz.count((0,l.A)(e)-1,e),t,2)}function te(e,t){var r=e.getDay();return e=r>=4||0===r?(0,i.dt)(e):i.dt.ceil(e),b(i.dt.count((0,l.A)(e),e)+(4===(0,l.A)(e).getDay()),t,2)}function re(e){return e.getDay()}function ne(e,t){return b(i.By.count((0,l.A)(e)-1,e),t,2)}function ae(e,t){return b(e.getFullYear()%100,t,2)}function ie(e,t){return b(e.getFullYear()%1e4,t,4)}function oe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+b(t/60|0,"0",2)+b(t%60,"0",2)}function le(e,t){return b(e.getUTCDate(),t,2)}function se(e,t){return b(e.getUTCHours(),t,2)}function ce(e,t){return b(e.getUTCHours()%12||12,t,2)}function ue(e,t){return b(1+a.A.count((0,s.A)(e),e),t,3)}function de(e,t){return b(e.getUTCMilliseconds(),t,3)}function fe(e,t){return de(e,t)+"000"}function he(e,t){return b(e.getUTCMonth()+1,t,2)}function pe(e,t){return b(e.getUTCMinutes(),t,2)}function me(e,t){return b(e.getUTCSeconds(),t,2)}function ge(e){var t=e.getUTCDay();return 0===t?7:t}function ve(e,t){return b(n.Hl.count((0,s.A)(e)-1,e),t,2)}function ye(e,t){var r=e.getUTCDay();return e=r>=4||0===r?(0,n.pT)(e):n.pT.ceil(e),b(n.pT.count((0,s.A)(e),e)+(4===(0,s.A)(e).getUTCDay()),t,2)}function xe(e){return e.getUTCDay()}function be(e,t){return b(n.rt.count((0,s.A)(e)-1,e),t,2)}function _e(e,t){return b(e.getUTCFullYear()%100,t,2)}function we(e,t){return b(e.getUTCFullYear()%1e4,t,4)}function Te(){return"+0000"}function Ae(){return"%"}function Me(e){return+e}function ke(e){return Math.floor(+e/1e3)}h=f({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),p=h.format,h.parse,m=h.utcFormat,h.utcParse},7265:function(e,t,r){"use strict";r.d(t,{_:function(){return o}});var n=r(3398),a=r(6291),i=(0,n.A)((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*a.rR)/a.Nm}),(function(e){return e.getDate()-1}));t.A=i;var o=i.range},6291:function(e,t,r){"use strict";r.d(t,{Fq:function(){return l},JJ:function(){return i},Nm:function(){return o},Tt:function(){return n},rR:function(){return a}});var n=1e3,a=6e4,i=36e5,o=864e5,l=6048e5},936:function(e,t,r){"use strict";r.r(t),r.d(t,{timeDay:function(){return v.A},timeDays:function(){return v._},timeFriday:function(){return y.Sh},timeFridays:function(){return y.tz},timeHour:function(){return m},timeHours:function(){return g},timeInterval:function(){return n.A},timeMillisecond:function(){return i},timeMilliseconds:function(){return o},timeMinute:function(){return f},timeMinutes:function(){return h},timeMonday:function(){return y.By},timeMondays:function(){return y.KP},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return y.kS},timeSaturdays:function(){return y.t$},timeSecond:function(){return c},timeSeconds:function(){return u},timeSunday:function(){return y.fz},timeSundays:function(){return y.se},timeThursday:function(){return y.dt},timeThursdays:function(){return y.Q$},timeTuesday:function(){return y.eQ},timeTuesdays:function(){return y.yW},timeWednesday:function(){return y.l3},timeWednesdays:function(){return y.gf},timeWeek:function(){return y.fz},timeWeeks:function(){return y.se},timeYear:function(){return w.A},timeYears:function(){return w.V},utcDay:function(){return C.A},utcDays:function(){return C.o},utcFriday:function(){return L.a1},utcFridays:function(){return L.Zn},utcHour:function(){return S},utcHours:function(){return E},utcMillisecond:function(){return i},utcMilliseconds:function(){return o},utcMinute:function(){return A},utcMinutes:function(){return M},utcMonday:function(){return L.rt},utcMondays:function(){return L.ON},utcMonth:function(){return D},utcMonths:function(){return I},utcSaturday:function(){return L.c8},utcSaturdays:function(){return L.Xo},utcSecond:function(){return c},utcSeconds:function(){return u},utcSunday:function(){return L.Hl},utcSundays:function(){return L.aZ},utcThursday:function(){return L.pT},utcThursdays:function(){return L.wr},utcTuesday:function(){return L.sr},utcTuesdays:function(){return L.jN},utcWednesday:function(){return L.z2},utcWednesdays:function(){return L.G6},utcWeek:function(){return L.Hl},utcWeeks:function(){return L.aZ},utcYear:function(){return P.A},utcYears:function(){return P.j}});var n=r(3398),a=(0,n.A)((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,n.A)((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):a:null};var i=a,o=a.range,l=r(6291),s=(0,n.A)((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*l.Tt)}),(function(e,t){return(t-e)/l.Tt}),(function(e){return e.getUTCSeconds()})),c=s,u=s.range,d=(0,n.A)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*l.Tt)}),(function(e,t){e.setTime(+e+t*l.rR)}),(function(e,t){return(t-e)/l.rR}),(function(e){return e.getMinutes()})),f=d,h=d.range,p=(0,n.A)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*l.Tt-e.getMinutes()*l.rR)}),(function(e,t){e.setTime(+e+t*l.JJ)}),(function(e,t){return(t-e)/l.JJ}),(function(e){return e.getHours()})),m=p,g=p.range,v=r(7265),y=r(5735),x=(0,n.A)((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),b=x,_=x.range,w=r(9830),T=(0,n.A)((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*l.rR)}),(function(e,t){return(t-e)/l.rR}),(function(e){return e.getUTCMinutes()})),A=T,M=T.range,k=(0,n.A)((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*l.JJ)}),(function(e,t){return(t-e)/l.JJ}),(function(e){return e.getUTCHours()})),S=k,E=k.range,C=r(2543),L=r(1681),O=(0,n.A)((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),D=O,I=O.range,P=r(9764)},3398:function(e,t,r){"use strict";r.d(t,{A:function(){return i}});var n=new Date,a=new Date;function i(e,t,r,o){function l(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return l.floor=function(t){return e(t=new Date(+t)),t},l.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},l.round=function(e){var t=l(e),r=l.ceil(e);return e-t0))return o;do{o.push(i=new Date(+r)),t(r,a),e(r)}while(i=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(l.count=function(t,i){return n.setTime(+t),a.setTime(+i),e(n),e(a),Math.floor(r(n,a))},l.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?l.filter(o?function(t){return o(t)%e==0}:function(t){return l.count(0,t)%e==0}):l:null}),l}},2543:function(e,t,r){"use strict";r.d(t,{o:function(){return o}});var n=r(3398),a=r(6291),i=(0,n.A)((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/a.Nm}),(function(e){return e.getUTCDate()-1}));t.A=i;var o=i.range},1681:function(e,t,r){"use strict";r.d(t,{G6:function(){return g},Hl:function(){return o},ON:function(){return p},Xo:function(){return x},Zn:function(){return y},a1:function(){return d},aZ:function(){return h},c8:function(){return f},jN:function(){return m},pT:function(){return u},rt:function(){return l},sr:function(){return s},wr:function(){return v},z2:function(){return c}});var n=r(3398),a=r(6291);function i(e){return(0,n.A)((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/a.Fq}))}var o=i(0),l=i(1),s=i(2),c=i(3),u=i(4),d=i(5),f=i(6),h=o.range,p=l.range,m=s.range,g=c.range,v=u.range,y=d.range,x=f.range},9764:function(e,t,r){"use strict";r.d(t,{j:function(){return i}});var n=r(3398),a=(0,n.A)((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));a.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.A)((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null},t.A=a;var i=a.range},5735:function(e,t,r){"use strict";r.d(t,{By:function(){return l},KP:function(){return p},Q$:function(){return v},Sh:function(){return d},dt:function(){return u},eQ:function(){return s},fz:function(){return o},gf:function(){return g},kS:function(){return f},l3:function(){return c},se:function(){return h},t$:function(){return x},tz:function(){return y},yW:function(){return m}});var n=r(3398),a=r(6291);function i(e){return(0,n.A)((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*a.rR)/a.Fq}))}var o=i(0),l=i(1),s=i(2),c=i(3),u=i(4),d=i(5),f=i(6),h=o.range,p=l.range,m=s.range,g=c.range,v=u.range,y=d.range,x=f.range},9830:function(e,t,r){"use strict";r.d(t,{V:function(){return i}});var n=r(3398),a=(0,n.A)((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));a.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.A)((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null},t.A=a;var i=a.range},7683:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function a(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,a)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var a,i,o,c;if(l(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(a=s(e))>0&&o.length>a&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=u.bind(n);return a.listener=r,n.wrapFn=a,a}function f(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)n(s,this,t);else{var c=s.length,u=p(s,c);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},721:function(e,t,r){"use strict";var n=r(9914);e.exports=function(e){var t=typeof e;if("string"===t){var r=e;if(0==(e=+e)&&n(r))return!1}else if("number"!==t)return!1;return e-e<1}},4840:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15];return e[0]=l*(f*v-h*g)-d*(s*v-c*g)+m*(s*h-c*f),e[1]=-(n*(f*v-h*g)-d*(a*v-i*g)+m*(a*h-i*f)),e[2]=n*(s*v-c*g)-l*(a*v-i*g)+m*(a*c-i*s),e[3]=-(n*(s*h-c*f)-l*(a*h-i*f)+d*(a*c-i*s)),e[4]=-(o*(f*v-h*g)-u*(s*v-c*g)+p*(s*h-c*f)),e[5]=r*(f*v-h*g)-u*(a*v-i*g)+p*(a*h-i*f),e[6]=-(r*(s*v-c*g)-o*(a*v-i*g)+p*(a*c-i*s)),e[7]=r*(s*h-c*f)-o*(a*h-i*f)+u*(a*c-i*s),e[8]=o*(d*v-h*m)-u*(l*v-c*m)+p*(l*h-c*d),e[9]=-(r*(d*v-h*m)-u*(n*v-i*m)+p*(n*h-i*d)),e[10]=r*(l*v-c*m)-o*(n*v-i*m)+p*(n*c-i*l),e[11]=-(r*(l*h-c*d)-o*(n*h-i*d)+u*(n*c-i*l)),e[12]=-(o*(d*g-f*m)-u*(l*g-s*m)+p*(l*f-s*d)),e[13]=r*(d*g-f*m)-u*(n*g-a*m)+p*(n*f-a*d),e[14]=-(r*(l*g-s*m)-o*(n*g-a*m)+p*(n*s-a*l)),e[15]=r*(l*f-s*d)-o*(n*f-a*d)+u*(n*s-a*l),e}},9698:function(e){e.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},7938:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},7519:function(e){e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6900:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],c=e[8],u=e[9],d=e[10],f=e[11],h=e[12],p=e[13],m=e[14],g=e[15];return(t*o-r*i)*(d*g-f*m)-(t*l-n*i)*(u*g-f*p)+(t*s-a*i)*(u*m-d*p)+(r*l-n*o)*(c*g-f*h)-(r*s-a*o)*(c*m-d*h)+(n*s-a*l)*(c*p-u*h)}},6472:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,l=n+n,s=a+a,c=r*o,u=n*o,d=n*l,f=a*o,h=a*l,p=a*s,m=i*o,g=i*l,v=i*s;return e[0]=1-d-p,e[1]=u+v,e[2]=f-g,e[3]=0,e[4]=u-v,e[5]=1-c-p,e[6]=h+m,e[7]=0,e[8]=f+g,e[9]=h-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},3061:function(e){e.exports=function(e,t,r){var n,a,i,o=r[0],l=r[1],s=r[2],c=Math.sqrt(o*o+l*l+s*s);return Math.abs(c)<1e-6?null:(o*=c=1/c,l*=c,s*=c,n=Math.sin(t),i=1-(a=Math.cos(t)),e[0]=o*o*i+a,e[1]=l*o*i+s*n,e[2]=s*o*i-l*n,e[3]=0,e[4]=o*l*i-s*n,e[5]=l*l*i+a,e[6]=s*l*i+o*n,e[7]=0,e[8]=o*s*i+l*n,e[9]=l*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},3606:function(e){e.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=n+n,s=a+a,c=i+i,u=n*l,d=n*s,f=n*c,h=a*s,p=a*c,m=i*c,g=o*l,v=o*s,y=o*c;return e[0]=1-(h+m),e[1]=d+y,e[2]=f-v,e[3]=0,e[4]=d-y,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=f+v,e[9]=p-g,e[10]=1-(u+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},8698:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6924:function(e){e.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},1181:function(e){e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},5258:function(e){e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},4815:function(e){e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},7301:function(e){e.exports=function(e,t,r,n,a,i,o){var l=1/(r-t),s=1/(a-n),c=1/(i-o);return e[0]=2*i*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(r+t)*l,e[9]=(a+n)*s,e[10]=(o+i)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*c,e[15]=0,e}},7193:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},1191:function(e,t,r){e.exports={create:r(7519),clone:r(9698),copy:r(7938),identity:r(7193),transpose:r(256),invert:r(6559),adjoint:r(4840),determinant:r(6900),multiply:r(4787),translate:r(4165),scale:r(8697),rotate:r(2416),rotateX:r(1066),rotateY:r(4201),rotateZ:r(3920),fromRotation:r(3061),fromRotationTranslation:r(3606),fromScaling:r(8698),fromTranslation:r(6924),fromXRotation:r(1181),fromYRotation:r(5258),fromZRotation:r(4815),fromQuat:r(6472),frustum:r(7301),perspective:r(5313),perspectiveFromFieldOfView:r(2253),ortho:r(4633),lookAt:r(6645),str:r(6992)}},6559:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*l-n*o,x=r*s-a*o,b=r*c-i*o,_=n*s-a*l,w=n*c-i*l,T=a*c-i*s,A=u*m-d*p,M=u*g-f*p,k=u*v-h*p,S=d*g-f*m,E=d*v-h*m,C=f*v-h*g,L=y*C-x*E+b*S+_*k-w*M+T*A;return L?(L=1/L,e[0]=(l*C-s*E+c*S)*L,e[1]=(a*E-n*C-i*S)*L,e[2]=(m*T-g*w+v*_)*L,e[3]=(f*w-d*T-h*_)*L,e[4]=(s*k-o*C-c*M)*L,e[5]=(r*C-a*k+i*M)*L,e[6]=(g*b-p*T-v*x)*L,e[7]=(u*T-f*b+h*x)*L,e[8]=(o*E-l*k+c*A)*L,e[9]=(n*k-r*E-i*A)*L,e[10]=(p*w-m*b+v*y)*L,e[11]=(d*b-u*w-h*y)*L,e[12]=(l*M-o*S-s*A)*L,e[13]=(r*S-n*M+a*A)*L,e[14]=(m*x-p*_-g*y)*L,e[15]=(u*_-d*x+f*y)*L,e):null}},6645:function(e,t,r){var n=r(7193);e.exports=function(e,t,r,a){var i,o,l,s,c,u,d,f,h,p,m=t[0],g=t[1],v=t[2],y=a[0],x=a[1],b=a[2],_=r[0],w=r[1],T=r[2];return Math.abs(m-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-T)<1e-6?n(e):(d=m-_,f=g-w,h=v-T,i=x*(h*=p=1/Math.sqrt(d*d+f*f+h*h))-b*(f*=p),o=b*(d*=p)-y*h,l=y*f-x*d,(p=Math.sqrt(i*i+o*o+l*l))?(i*=p=1/p,o*=p,l*=p):(i=0,o=0,l=0),s=f*l-h*o,c=h*i-d*l,u=d*o-f*i,(p=Math.sqrt(s*s+c*c+u*u))?(s*=p=1/p,c*=p,u*=p):(s=0,c=0,u=0),e[0]=i,e[1]=s,e[2]=d,e[3]=0,e[4]=o,e[5]=c,e[6]=f,e[7]=0,e[8]=l,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*m+o*g+l*v),e[13]=-(s*m+c*g+u*v),e[14]=-(d*m+f*g+h*v),e[15]=1,e)}},4787:function(e){e.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*l+_*d+w*m,e[1]=x*a+b*s+_*f+w*g,e[2]=x*i+b*c+_*h+w*v,e[3]=x*o+b*u+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*l+_*d+w*m,e[5]=x*a+b*s+_*f+w*g,e[6]=x*i+b*c+_*h+w*v,e[7]=x*o+b*u+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*l+_*d+w*m,e[9]=x*a+b*s+_*f+w*g,e[10]=x*i+b*c+_*h+w*v,e[11]=x*o+b*u+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*l+_*d+w*m,e[13]=x*a+b*s+_*f+w*g,e[14]=x*i+b*c+_*h+w*v,e[15]=x*o+b*u+_*p+w*y,e}},4633:function(e){e.exports=function(e,t,r,n,a,i,o){var l=1/(t-r),s=1/(n-a),c=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*l,e[13]=(a+n)*s,e[14]=(o+i)*c,e[15]=1,e}},5313:function(e){e.exports=function(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}},2253:function(e){e.exports=function(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+l),c=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-l)*s*.5,e[9]=(a-i)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}},2416:function(e){e.exports=function(e,t,r,n){var a,i,o,l,s,c,u,d,f,h,p,m,g,v,y,x,b,_,w,T,A,M,k,S,E=n[0],C=n[1],L=n[2],O=Math.sqrt(E*E+C*C+L*L);return Math.abs(O)<1e-6?null:(E*=O=1/O,C*=O,L*=O,a=Math.sin(r),o=1-(i=Math.cos(r)),l=t[0],s=t[1],c=t[2],u=t[3],d=t[4],f=t[5],h=t[6],p=t[7],m=t[8],g=t[9],v=t[10],y=t[11],x=E*E*o+i,b=C*E*o+L*a,_=L*E*o-C*a,w=E*C*o-L*a,T=C*C*o+i,A=L*C*o+E*a,M=E*L*o+C*a,k=C*L*o-E*a,S=L*L*o+i,e[0]=l*x+d*b+m*_,e[1]=s*x+f*b+g*_,e[2]=c*x+h*b+v*_,e[3]=u*x+p*b+y*_,e[4]=l*w+d*T+m*A,e[5]=s*w+f*T+g*A,e[6]=c*w+h*T+v*A,e[7]=u*w+p*T+y*A,e[8]=l*M+d*k+m*S,e[9]=s*M+f*k+g*S,e[10]=c*M+h*k+v*S,e[11]=u*M+p*k+y*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},1066:function(e){e.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],l=t[6],s=t[7],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+c*n,e[5]=o*a+u*n,e[6]=l*a+d*n,e[7]=s*a+f*n,e[8]=c*a-i*n,e[9]=u*a-o*n,e[10]=d*a-l*n,e[11]=f*a-s*n,e}},4201:function(e){e.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-c*n,e[1]=o*a-u*n,e[2]=l*a-d*n,e[3]=s*a-f*n,e[8]=i*n+c*a,e[9]=o*n+u*a,e[10]=l*n+d*a,e[11]=s*n+f*a,e}},3920:function(e){e.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[4],u=t[5],d=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+c*n,e[1]=o*a+u*n,e[2]=l*a+d*n,e[3]=s*a+f*n,e[4]=c*a-i*n,e[5]=u*a-o*n,e[6]=d*a-l*n,e[7]=f*a-s*n,e}},8697:function(e){e.exports=function(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},6992:function(e){e.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},4165:function(e){e.exports=function(e,t,r){var n,a,i,o,l,s,c,u,d,f,h,p,m=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=l,e[5]=s,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=n*m+l*g+d*v+t[12],e[13]=a*m+s*g+f*v+t[13],e[14]=i*m+c*g+h*v+t[14],e[15]=o*m+u*g+p*v+t[15]),e}},256:function(e){e.exports=function(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},9784:function(e,t,r){"use strict";var n,a=r(8253);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:a,e.exports=n},4043:function(e,t,r){"use strict";var n=r(8253);e.exports=n&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e}()},8253:function(e){e.exports=!0},9914:function(e){"use strict";e.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},4039:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var a,i=e.clientX||0,o=e.clientY||0,l=(a=r)===window||a===document||a===document.body?t:a.getBoundingClientRect();return n[0]=i-l.left,n[1]=o-l.top,n}},1116:function(e,t,r){var n,a,i,o;a="Promise",o=function(){"use strict";var e,t,r,n=Object.prototype.toString,a="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(t){e=function(e,t,r){return e[t]=r,e}}function i(e,n){r.add(e,n),t||(t=a(r.drain))}function o(e){var t,r=typeof e;return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function l(){for(var e=0;e0&&i(l,r))}catch(e){u.call(new f(r),e)}}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&i(l,t))}function d(e,t,r,n){for(var a=0;a2&&(a.push([r].concat(i.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(i.length==t[o])return i.unshift(r),a.push(i);if(i.lengthi!=h>i&&a<(f-u)*(i-d)/(h-d)+u&&(o=!o)}return o}},1516:function(e,t,r){var n,a=r(2391),i=r(2990),o=r(6202),l=r(2222),s=r(7527),c=r(4491),u=!1,d=i();function f(e,t,r){var a=n.segments(e),i=n.segments(t),o=r(n.combine(a,i));return n.polygon(o)}n={buildLog:function(e){return!0===e?u=a():!1===e&&(u=!1),!1!==u&&u.list},epsilon:function(e){return d.epsilon(e)},segments:function(e){var t=o(!0,d,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,d,u).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:s.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:s.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:s.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:s.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:s.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:l(e.segments,d,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(n,e)},polygonToGeoJSON:function(e){return c.fromPolygon(n,d,e)},union:function(e,t){return f(e,t,n.selectUnion)},intersect:function(e,t){return f(e,t,n.selectIntersect)},difference:function(e,t){return f(e,t,n.selectDifference)},differenceRev:function(e,t){return f(e,t,n.selectDifferenceRev)},xor:function(e,t){return f(e,t,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),e.exports=n},2391:function(e){e.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}},2990:function(e){e.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var a=r[0],i=r[1],o=n[0],l=n[1],s=t[0];return(o-a)*(t[1]-i)-(l-i)*(s-a)>=-e},pointBetween:function(t,r,n){var a=t[1]-r[1],i=n[0]-r[0],o=t[0]-r[0],l=n[1]-r[1],s=o*i+a*l;return!(s-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-a>e&&(i-c)*(a-u)/(o-u)+c-n>e&&(l=!l),i=c,o=u}return l}};return t}},4491:function(e){var t={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),a=1;a0}))}function u(e,n){var a=e.seg,i=n.seg,o=a.start,l=a.end,c=i.start,u=i.end;r&&r.checkIntersection(a,i);var d=t.linesIntersect(o,l,c,u);if(!1===d){if(!t.pointsCollinear(o,l,c))return!1;if(t.pointsSame(o,u)||t.pointsSame(l,c))return!1;var f=t.pointsSame(o,c),h=t.pointsSame(l,u);if(f&&h)return n;var p=!f&&t.pointBetween(o,c,u),m=!h&&t.pointBetween(l,c,u);if(f)return m?s(n,l):s(e,u),n;p&&(h||(m?s(n,l):s(e,u)),s(n,o))}else 0===d.alongA&&(-1===d.alongB?s(e,c):0===d.alongB?s(e,d.pt):1===d.alongB&&s(e,u)),0===d.alongB&&(-1===d.alongA?s(n,o):0===d.alongA?s(n,d.pt):1===d.alongA&&s(n,l));return!1}for(var d=[];!i.isEmpty();){var f=i.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var h=c(f),p=h.before?h.before.ev:null,m=h.after?h.after.ev:null;function g(){if(p){var e=u(f,p);if(e)return e}return!!m&&u(f,m)}r&&r.tempStatus(f.seg,!!p&&p.seg,!!m&&m.seg);var v,y,x=g();if(x&&(e?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=f.seg.myFill,r&&r.segmentUpdate(x.seg),f.other.remove(),f.remove()),i.getHead()!==f){r&&r.rewind(f.seg);continue}e?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=m?m.seg.myFill.above:a,f.seg.myFill.above=y?!f.seg.myFill.below:f.seg.myFill.below):null===f.seg.otherFill&&(v=m?f.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:f.primary?o:a,f.seg.otherFill={above:v,below:v}),r&&r.status(f.seg,!!p&&p.seg,!!m&&m.seg),f.other.status=h.insert(n.node({ev:f}))}else{var b=f.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(l.exists(b.prev)&&l.exists(b.next)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}d.push(f.seg)}i.getHead().remove()}return r&&r.done(),d}return e?{addRegion:function(e){for(var n,a,i,o=e[e.length-1],s=0;s1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=I(e,360),t=I(t,100),r=I(r,100),0===t)n=a=i=r;else{var l=r<.5?r*(1+t):r+t-r*t,s=2*r-l;n=o(s,l,e+1/3),a=o(s,l,e),i=o(s,l,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,d,h),p=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=D(s),{ok:p,format:e.format||m,r:c(255,u(l.r,0)),g:c(255,u(l.g,0)),b:c(255,u(l.b,0)),a:s}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=s(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=r.ok,this._tc_id=l++}function h(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,a,i=u(e,t,r),o=c(e,t,r),l=(i+o)/2;if(i==o)n=a=0;else{var s=i-o;switch(a=l>.5?s/(2-i-o):s/(i+o),i){case e:n=(t-r)/s+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(f(n));return i}function C(e,t){t=t||6;for(var r=f(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/t;t--;)o.push(f({h:n,s:a,v:i})),i=(i+l)%1;return o}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=D(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=s(360*e.h),r=s(100*e.s),n=s(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),r=s(100*e.s),n=s(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var i=[N(s(e).toString(16)),N(s(t).toString(16)),N(s(r).toString(16)),N(B(n))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*I(this._r,255))+"%",g:s(100*I(this._g,255))+"%",b:s(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*I(this._r,255))+"%, "+s(100*I(this._g,255))+"%, "+s(100*I(this._b,255))+"%)":"rgba("+s(100*I(this._r,255))+"%, "+s(100*I(this._g,255))+"%, "+s(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=f(e);r="#"+g(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(M,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:F(e[n]));e=r}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,r){r=0===r?0:r||50;var n=f(e).toRgb(),a=f(t).toRgb(),i=r/100;return f({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},f.readability=function(e,t){var r=f(e),n=f(t);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},f.isReadable=function(e,t,r){var n,a,i,o,l,s=f.readability(e,t);switch(a=!1,(i=r,"AA"!==(o=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(l=(i.size||"small").toLowerCase())&&"large"!==l&&(l="small"),n={level:o,size:l}).level+n.size){case"AAsmall":case"AAAlarge":a=s>=4.5;break;case"AAlarge":a=s>=3;break;case"AAAsmall":a=s>=7}return a},f.mostReadable=function(e,t,r){var n,a,i,o,l=null,s=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var c=0;cs&&(s=n,l=f(t[c]));return f.isReadable(e,l,{level:i,size:o})||!a?l:(r.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],r))};var L=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=f.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(L);function D(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,u(0,e))}function R(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function B(e){return a.round(255*parseFloat(e)).toString(16)}function z(e){return R(e)/255}var $,j,H,U=(j="[\\s|\\(]+("+($="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+$+")[,|\\s]+("+$+")\\s*\\)?",H="[\\s|\\(]+("+$+")[,|\\s]+("+$+")[,|\\s]+("+$+")[,|\\s]+("+$+")\\s*\\)?",{CSS_UNIT:new RegExp($),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Y(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(n=function(){return f}.call(t,r,t,e))||(e.exports=n)}(Math)},1401:function(e,t,r){var n=r(6834),a=r(7976),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(s);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if("string"==typeof e){var t=e.match(c);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(u);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var a=t[t.length-1];r="i"===a||"I"===a}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var a=this.intercalaryMonth(e);if(r&&t!==a||t<1||t>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&t<=a?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);if(t<0||t>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?t>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,r){var a,o=this._validateYear(e,n.local.invalidyear),l=f[o-f[0]],s=l>>9&4095,c=l>>5&15,u=31&l;(a=i.newDate(s,c,u)).add(4-(a.dayOfWeek()||7),"d");var d=this.toJD(e,t,r)-a.toJD();return 1+Math.floor(d/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=d[e-d[0]];if(t>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-t?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,l,r,n.local.invalidDate);e=this._validateYear(a.year()),t=a.month(),r=a.day();var o=this.isIntercalaryMonth(e,t),l=this.toChineseMonth(e,t),s=function(e,t,r,n){var a,i,o;if("object"==typeof e)i=e,a=t||{};else{var l;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,a=n):(l=!!n,a={}),i={year:e,month:t,day:r,isIntercalary:l}}o=i.day-1;var s,c=d[i.year-d[0]],u=c>>13;s=u&&(i.month>u||i.isIntercalary)?i.month:i.month-1;for(var h=0;h>9&4095,(p>>5&15)-1,(31&p)+o);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.getDate(),a}(e,l,r,o);return i.toJD(s.year,s.month,s.day)},fromJD:function(e){var t=i.fromJD(e),r=function(e,t,r){var n,a;if("object"==typeof e)n=e,a=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");n={year:e,month:t,day:r},a={}}var i=f[n.year-f[0]],o=n.year<<9|n.month<<5|n.day;a.year=o>=i?n.year:n.year-1,i=f[a.year-f[0]];var l,s=new Date(i>>9&4095,(i>>5&15)-1,31&i),c=new Date(n.year,n.month-1,n.day);l=Math.round((c-s)/864e5);var u,h=d[a.year-d[0]];for(u=0;u<13;u++){var p=h&1<<12-u?30:29;if(l>13;return!m||u=2&&n<=6},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year()+(a.year()<0?1:0),t=a.month(),(r=a.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},1133:function(e,t,r){var n=r(6834),a=r(7976);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},8295:function(e,t,r){var n=r(6834),a=r(7976);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return o(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),12===t&&this.leapYear(e)||8===t&&5===o(this.daysInYear(e),10)?30:9===t&&3===o(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e<=0?e+1:e,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var l=7;l<=this.monthsInYear(e);l++)o+=this.daysInMonth(e,l);for(l=1;l=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.hebrew=i},5512:function(e,t,r){var n=r(6834),a=r(7976);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),e=e<=0?e+1:e,(r=a.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.islamic=i},2645:function(e,t,r){var n=r(6834),a=r(7976);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),r=a.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((t-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),l=t-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,l)}}),n.calendars.julian=i},2324:function(e,t,r){var n=r(6834),a=r(7976);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function l(e,t){return o(e-1,t)+1}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate).day()},weekDay:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),!0},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[l(20+(e-=this.jdEpoch),20),l(e+4,13)]},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),n.calendars.mayan=i},1662:function(e,t,r){var n=r(6834),a=r(7976);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.instance("gregorian");a(i.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidMonth);(e=a.year())<0&&e++;for(var i=a.day(),l=1;l=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),n.calendars.nanakshahi=i},6445:function(e,t,r){var n=r(6834),a=r(7976);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,r=this.minMonth;r<=12;r++)t+=this.NEPALI_CALENDAR_DATA[e][r];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=n.instance(),o=0,l=t,s=e;this._createMissingCalendarData(e);var c=e-(l>9||9===l&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(9!==t&&(o=r,l--);9!==l;)l<=0&&(l=12,s--),o+=this.NEPALI_CALENDAR_DATA[s][l],l--;return 9===t?(o+=r-this.NEPALI_CALENDAR_DATA[s][0])<0&&(o+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(e){var t=n.instance().fromJD(e),r=t.year(),a=t.dayOfYear(),i=r+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;a>s;)++o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var c=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e-(e>=0?474:473),l=474+o(i,2820);return r+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*l-110)/2816)+365*(l-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),r=Math.floor(t/1029983),n=o(t,1029983),a=2820;if(1029982!==n){var i=Math.floor(n/366),l=o(n,366);a=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var s=a+2820*r+474;s=s<=0?s-1:s;var c=e-this.toJD(s,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),d=e-this.toJD(s,u,1)+1;return this.newDate(s,u,d)}}),n.calendars.persian=i,n.calendars.jalali=i},4756:function(e,t,r){var n=r(6834),a=r(7976),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},1858:function(e,t,r){var n=r(6834),a=r(7976),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),n.calendars.thai=o},7985:function(e,t,r){var n=r(6834),a=r(7976);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;ir)return o[a]-o[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),l=i+1,s=a-12*i,c=t-o[r-1]+1;return this.newDate(l,s,c)},isValid:function(e,t,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(e=null!=e.year?e.year:e)>=1276&&e<=1500),a},_validate:function(e,t,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.calendars.ummalqura=i;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},6834:function(e,t,r){var n=r(7976);function a(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function l(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}n(a.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),n(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(null==e?this:e,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(l.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);a=e.day(),"y"===r?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)i++,o-=t,t=e.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),a="m"===r?t:e.month(),i="d"===r?t:e.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=a-(s>2.5?4716:4715);return c<=0&&c--,this.newDate(c,s,l)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var c=e.exports=new a;c.cdate=i,c.baseCalendar=l,c.calendars.gregorian=s},3428:function(e,t,r){var n=r(7976),a=r(6834);n(a.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),a.local=a.regionalOptions[""],n(a.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),n(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var n,i,o,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,s=r.dayNames||this.local.dayNames,c=r.monthNumbers||this.local.monthNumbers,u=r.monthNamesShort||this.local.monthNamesShort,d=r.monthNames||this.local.monthNames,f=(r.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;_+n1}),h=function(e,t,r,n){var a=""+t;if(f(e,n))for(;a.length1},x=function(e,r){var n=y(e,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+i+"}"),l=t.substring(M).match(o);if(!l)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=l[0].length,parseInt(l[0],10)},b=this,_=function(){if("function"==typeof s){y("m");var e=s.call(b,t.substring(M));return M+=e.length,e}return x("m")},w=function(e,r,n,i){for(var o=y(e,i)?n:r,l=0;l-1){h=1,p=m;for(var E=this.daysInMonth(f,h);p>E;E=this.daysInMonth(f,h))h++,p-=E}return d>-1?this.fromJD(d):this.newDate(f,h,p)},determineDate:function(e,t,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return t=t?t.newDate():null,null==e?t:"string"==typeof e?function(e){try{return i.parseDate(n,e,a)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,l=o.exec(e);l;)t.add(parseInt(l[1],10),l[2]||"d"),l=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e)}})},6144:function(e,t,r){"use strict";r.r(t);var n=r(5072),a=r.n(n),i=r(7825),o=r.n(i),l=r(7659),s=r.n(l),c=r(5056),u=r.n(c),d=r(540),f=r.n(d),h=r(1113),p=r.n(h),m=r(5955),g={};g.styleTagTransform=p(),g.setAttributes=u(),g.insert=s().bind(null,"head"),g.domAPI=o(),g.insertStyleElement=f(),a()(m.A,g),t.default=m.A&&m.A.locals?m.A.locals:void 0},5072:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n0?" ".concat(r.layer):""," {")),n+=r.css,a&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5446:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2722%27 height=%2722%27 fill=%27%23333%27 viewBox=%270 0 22 22%27%3E%3Cpath d=%27m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0%27/%3E%3C/svg%3E"},6694:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2722%27 height=%2722%27 fill=%27%2333b5e5%27 viewBox=%270 0 22 22%27%3E%3Cpath d=%27m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0%27/%3E%3C/svg%3E"},6117:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill-rule=%27evenodd%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},6311:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill=%27%23fff%27 fill-rule=%27evenodd%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E"},4420:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},7035:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},3470:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},3490:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},216:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},7695:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%2333b5e5%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3C/svg%3E"},2228:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%2333b5e5%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},3737:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23666%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},8460:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23999%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},5796:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23aaa%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E"},8869:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23e54e33%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3C/svg%3E"},9819:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23e58978%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},557:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},8164:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},4665:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},1413:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z%27/%3E%3C/svg%3E"},3913:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},1907:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},8920:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E"},4890:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E"},3363:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E"},7603:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z%27/%3E%3C/svg%3E"},4643:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E"},8605:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E"},7914:function(e){"use strict";e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2788%27 height=%2723%27 fill=%27none%27%3E%3Cpath fill=%27%23000%27 fill-opacity=%27.4%27 fill-rule=%27evenodd%27 d=%27M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%27/%3E%3Cpath fill=%27%23fff%27 d=%27m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z%27/%3E%3Cpath fill=%27%23e1e3e9%27 d=%27M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z%27/%3E%3Cpath d=%27M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z%27 style=%27fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001%27/%3E%3Cg style=%27stroke-width:1.12603545%27%3E%3Cpath d=%27M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%27 style=%27color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3Cpath d=%27M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3%27 style=%27clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3Cpath d=%27M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%27 style=%27clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3C/g%3E%3C/svg%3E"}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={id:n,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}return r.m=e,r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.b=document.baseURI||self.location.href,r.nc=void 0,r(5611)}()},5312:function(e,t){var r,n;r=function(e){"use strict";var t=Object.assign||function(e){for(var t=1;tMath.abs(r[i][o])&&(o=l);for(var s=i;s=i;d--)r[d][u]-=r[d][i]*r[i][u]/r[i][i]}for(var f=n-1;f>=0;f--){for(var h=0,p=f+1;p=0;b--)x+=b>1?g[b]+"x^"+b+" + ":1===b?g[b]+"x + ":g[b];return{string:x,points:y,predict:v,equation:[].concat(r(g)).reverse(),r2:i(a(e,y),t.precision)}}};e.exports=Object.keys(o).reduce((function(e,r){return t({_round:i},e,(s=function(e,a){return o[r](e,t({},n,a))},(l=r)in(a={})?Object.defineProperty(a,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[l]=s,a));var a,l,s}),{})},void 0===(n=r.apply(t,[e]))||(e.exports=n)},71:(e,t)=>{"use strict";function r(e){return JSON.parse(localStorage.getItem(e))}function n(){const e=r("theme");return"dark"===e||"light"===e?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function a(e="dark"){const t="dark"===e?"light":"dark",r=document.getElementsByClassName("border-mode");for(const n of r)n.classList.replace(`border-${e}`,`border-${t}`);const n=document.getElementsByClassName("border-theme");for(const r of n)r.classList.replace(`border-${e}`,`border-${t}`),r.classList.replace(`bg-${e}`,`bg-${t}`)}function i(e){"auto"===e&&window.matchMedia("(prefers-color-scheme: dark)").matches?(document.documentElement.setAttribute("data-bs-theme","dark"),a("dark")):(document.documentElement.setAttribute("data-bs-theme",e),a(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.autoThemeChange=function(){const e=r("theme");if("light"!==e&&"dark"!==e){const e=n();return i(e),e}return e},t.applyTheming=function(){const e=n();return i(e),e}},4482:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SpectrumData=void 0,r(1451),r(6484),r(7960),r(8647),r(8013);const a=n(r(9635)),i=n(r(8451)),o=n(r(653)),l=n(r(8956)),s=r(9340),c=r(7682),u=r(5964),d=r(879),f=r(71);class h{data=[];background=[];dataCps=[];backgroundCps=[];dataTime=1e3;backgroundTime=1e3;getTotalCounts(e,t=0,r=this[e].length-1){const n=this[e];let a=0;if(t<0||t>=n.length||r<0||r>=n.length||t>r)return console.warn("Invalid sum range! Return default 0."),a;for(let e=t;e<=r;e++)a+=n[e];return a}addPulseData(e,t,r){this[e].length||(this[e]=Array(r).fill(0));for(const r of t)this[e][r]+=1}addHist(e,t){this[e].length||(this[e]=t);for(const r in t)this[e][r]+=t[r]}}t.SpectrumData=h;const p=new h,m=new s.SpectrumPlot("plot"),g=new c.RawData(1),v=new Set,y={};let x=[],b=1e3,_=!1,w=18e5,T=[],A="assets/isotopes_energies_min.json";const M={};let k=!1,S=100;const E="2024-05-21",C="localStorage"in self,L="wakeLock"in navigator,O="Notification"in window;let D=O,I=!1,P=!1;const R=["none","none","none"],N={none:"fa-sort",asc:"fa-sort-up",desc:"fa-sort-down"},F={r:"reset-plot",s:"sma-label",x:"xAxis",y:"yAxis",c:"plot-cps",t:"plot-type",i:"iso-hover-label",p:"peak-finder-btn",e:"enhance-eff-label",1:"file-import-tab",2:"serial-tab",3:"sound-tab",4:"calibration-tab",5:"metadata-tab"};let B;async function z(){B.prompt(),await B.userChoice}function $(e){D=e,"granted"!==Notification.permission&&D&&Notification.requestPermission().then((e=>{"granted"===e&&(0,d.launchSysNotification)("Success!","Notifications for Gamma MCA are now enabled.",!0),D=D&&"granted"===e,document.getElementById("notifications-toggle").checked=D;const t=Ge("allowNotifications",D);new d.ToastNotification(t?"settingSuccess":"settingError")})),De("ask-notifications"),document.getElementById("notifications-toggle").checked=D;const t=Ge("allowNotifications",D);new d.ToastNotification(t?"settingSuccess":"settingError")}function j(e){const t=document.getElementById("overwrite-button");t.disabled=!1,t.title=`Overwrite "${e}" with current data.`}window.addEventListener("DOMContentLoaded",(()=>{C&&(m.darkMode="dark"===(0,f.applyTheming)(),ie(!1))})),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(()=>{C&&(m.darkMode="dark"===(0,f.autoThemeChange)(),ie(!1))})),document.body.onload=async function(){if(I=window.FileSystemHandle&&"createWritable"in FileSystemFileHandle.prototype,C?function(){let e=We("allowNotifications");O&&"boolean"==typeof e&&(D=e&&"granted"===Notification.permission),e=We("customURL"),"string"==typeof e&&(A=new URL(e).href),e=We("editMode"),"boolean"==typeof e&&(m.editableMode=e),e=We("fileDelimiter"),"string"==typeof e&&(g.delimiter=e),e=We("fileChannels"),"number"==typeof e&&(g.adcChannels=e),e=We("plotRefreshRate"),"number"==typeof e&&(b=e),e=We("serBufferSize"),"number"==typeof e&&(u.SerialManager.maxSize=e),e=We("timeLimitBool"),"boolean"==typeof e&&(_=e),e=We("timeLimit"),"number"==typeof e&&(w=e),e=We("maxIsoDist"),"number"==typeof e&&(S=e),e=We("baudRate"),"number"==typeof e&&(u.SerialManager.baudRate=e),e=We("eolChar"),"string"==typeof e&&(u.SerialManager.eolChar=e),e=We("serChannels"),"number"==typeof e&&(u.SerialManager.adcChannels=e),e=We("smaLength"),"number"==typeof e&&(m.smaLength=e),e=We("peakThres"),"number"==typeof e&&(m.peakConfig.thres=e),e=We("peakLag"),"number"==typeof e&&(m.peakConfig.lag=e),e=We("seekWidth"),"number"==typeof e&&(s.SeekClosest.seekWidth=e),e=We("plotDownload"),("svg"===e||"png"===e||"jpeg"===e||"webp"===e)&&(m.downloadFormat=e),e=We("gaussSigma"),"number"==typeof e&&(m.gaussSigma=e),e=We("showEnergyRes"),"boolean"==typeof e&&(m.peakConfig.showFWHM=e),e=We("useFWHMFast"),"boolean"==typeof e&&(s.CalculateFWHM.fastMode=e),e=We("newPeakStyle"),"boolean"==typeof e&&(m.peakConfig.newPeakStyle=e)}():console.error("Browser does not support local storage. OOF, it must be ancient. Dude, update your browser. For real."),navigator.serviceWorker){const e=await navigator.serviceWorker.register("/service-worker.js");C&&e.addEventListener("updatefound",(()=>{P||(new d.ToastNotification("updateInstalled"),(0,d.launchSysNotification)("New Update!","An update has been installed and will be applied once you reload Gamma MCA."))}))}if("standalone"in window.navigator||window.matchMedia("(display-mode: standalone)").matches){document.title+=" PWA",document.getElementById("main").classList.remove("p-1");const e=document.getElementsByClassName("border-mode");for(const t of e)t.classList.add("border-0");document.getElementById("plot-tab").classList.add("border-start-0","border-end-0")}else document.getElementById("main").classList.remove("pb-1"),document.title+=" web application";if(A=new URL(A,window.location.origin).href,navigator.serial||navigator.usb)document.getElementById("serial-error")?.remove(),navigator[navigator.serial?"serial":"usb"].addEventListener("connect",Xe),navigator[navigator.serial?"serial":"usb"].addEventListener("disconnect",Je),Qe();else{document.getElementById("serial-div")?.remove();const e=document.getElementsByClassName("ser-settings");for(const t of e)t.disabled=!0;const t=document.getElementsByClassName("serial-controls");for(const e of t)e.disabled=!0}if("launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer((async e=>{if(!e.files.length)return;const t=await e.files[0].getFile(),r=t.name.split("."),n=r[r.length-1].toLowerCase();I&&("json"!==n&&"xml"!==n||(U=e.files[0],j(U.name))),["csv","tka","xml","txt","json"].includes(n)&&W(t,"data"),console.warn("File could not be imported!")})),ie(),document.getElementById("version-tag").innerText+=` ${E}.`,C){const e=We("lastVisit");"number"==typeof e&&e>0||(new d.ToastNotification("welcomeMessage"),O&&Oe("ask-notifications"),P=!0),Ge("lastVisit",Date.now()),Ge("lastUsedVersion",E);const t=We("serialDataMode"),r=We("fileDataMode");if("string"==typeof t){const e=document.getElementById(t);e.checked=!0,Ke(e)}if("string"==typeof r){const e=document.getElementById(r);e.checked=!0,ae(e)}document.getElementById("ls-unavailable")?.remove();const n=We("consoleAutoscrollEnabled");"boolean"==typeof n&&n&&(ct=n,document.getElementById("autoscroll-console").checked=n)}else document.getElementById("ls-available")?.remove(),new d.ToastNotification("welcomeMessage");!function(){O&&(document.getElementById("notifications-toggle").checked=D&&"granted"===Notification.permission),document.getElementById("custom-url").value=A,document.getElementById("edit-plot").checked=m.editableMode,document.getElementById("custom-delimiter").value=g.delimiter,document.getElementById("custom-file-adc").value=g.adcChannels.toString(),document.getElementById("custom-ser-refresh").value=(b/1e3).toString(),document.getElementById("custom-ser-buffer").value=u.SerialManager.maxSize.toString(),document.getElementById("custom-ser-adc").value=u.SerialManager.adcChannels.toString();const e=new Date(w);document.getElementById("ser-limit-h").value=(e.getUTCHours()+24*(e.getUTCDate()-1)).toString(),document.getElementById("ser-limit-m").value=e.getUTCMinutes().toString(),document.getElementById("ser-limit-s").value=e.getUTCSeconds().toString(),document.getElementById("toggle-time-limit").checked=_,document.getElementById("iso-hover-prox").value=S.toString(),document.getElementById("custom-baud").value=u.SerialManager.baudRate.toString(),document.getElementById("eol-char").value=u.SerialManager.eolChar,document.getElementById("sma-val").value=m.smaLength.toString(),document.getElementById("new-flags").checked=m.peakConfig.newPeakStyle,document.getElementById("enable-res").checked=m.peakConfig.showFWHM,document.getElementById("fwhm-fast").checked=s.CalculateFWHM.fastMode,document.getElementById("peak-thres").value=m.peakConfig.thres.toString(),document.getElementById("peak-lag").value=m.peakConfig.lag.toString(),document.getElementById("seek-width").value=s.SeekClosest.seekWidth.toString(),document.getElementById("gauss-sigma").value=m.gaussSigma.toString();const t=document.getElementById("download-format"),r=t.options.length,n=m.downloadFormat;for(let e=0;e{"Enter"===t.key&&qe(r,e)};const n=document.getElementById(`${t}-btn`);n&&(n.onclick=()=>qe(r,e))}document.getElementById("new-flags").onclick=e=>qe("newPeakStyle",e.target),document.getElementById("enable-res").onclick=e=>qe("showEnergyRes",e.target),document.getElementById("fwhm-fast").onclick=e=>qe("useFWHMFast",e.target),document.getElementById("edit-plot").onclick=e=>qe("editMode",e.target),document.getElementById("toggle-time-limit").onclick=e=>qe("timeLimitBool",e.target),document.getElementById("download-format").onchange=e=>qe("plotDownload",e.target),document.getElementById("theme-select").onchange=e=>qe("theme",e.target)}();const e=document.getElementById("main-tabs").getElementsByTagName("button");for(const t of e)t.addEventListener("shown.bs.tab",(()=>{const e=document.getElementById("toggle-calibration-chart"),t=document.getElementById("toggle-evolution-chart");e&&e.checked?(e.checked=!1,ye(!1)):t&&t.checked?(t.checked=!1,xe(!1)):m.updatePlot(p)}));const t=document.getElementById("table"),r=t.querySelectorAll("th[data-sort-by]");r.forEach((e=>{e.addEventListener("click",(()=>{const n=Number(e.dataset.sortBy),a=R[n];R.fill("none"),R[n]="asc"===a?"desc":"asc",r.forEach(((e,t)=>{const r=e.querySelector(".fa-solid");r&&(r.classList.remove(...Object.values(N)),r.classList.add(N[R[t+1]]))})),Ie(t,n,R[n])}))})),O?document.getElementById("notifications-toggle").disabled=!1:console.error("Browser does not support Notifications API."),function(){document.addEventListener("keydown",(e=>{if("escape"===e.key.toLowerCase()){const e=document.getElementById("offcanvas");e&&!e.classList.contains("show")&&(e.classList.contains("showing")||new i.default(e).show())}}));const e=document.getElementById("toggle-menu");e&&(e.title+=" (ESC)");for(const[e,t]of Object.entries(F)){const r=document.getElementById(t);document.addEventListener("keydown",(t=>{t.altKey&&t.key.toLowerCase()===e.toLowerCase()&&(t.preventDefault(),t.repeat||r?.click())})),r&&(r.title+=` (ALT+${e.toUpperCase()})`)}}(),he(2),C&&We("autosave")&&Oe("autosave-dialog"),document.getElementById("loading")?.remove()},window.onbeforeunload=e=>(e.preventDefault(),e.returnValue="Are you sure you want to exit?"),window.onpagehide=()=>{localStorage.removeItem("autosave")},document.body.onresize=()=>{m.updatePlot(p),navigator.userAgent.toLowerCase().match(/mobile|tablet|android|webos|iphone|ipad|ipod|blackberry|bb|playbook|iemobile|windows phone|kindle|silk|opera mini/i)||Q()},window.matchMedia("(display-mode: standalone)").addEventListener("change",(()=>{window.location.reload()})),window.addEventListener("beforeinstallprompt",(e=>{e.preventDefault(),B=e,C&&(We("installPrompt")||(Oe("pwa-installer"),Ge("installPrompt",!0))),document.getElementById("manual-install").classList.remove("d-none")})),document.getElementById("install-pwa-btn").onclick=()=>z(),document.getElementById("install-pwa-toast-btn").onclick=()=>z(),window.addEventListener("onappinstalled",(()=>{B=null,De("pwa-installer"),document.getElementById("manual-install").classList.add("d-none")})),document.getElementById("notifications-toggle").onclick=e=>$(e.target.checked),document.getElementById("notifications-toast-btn").onclick=()=>$(!0),document.getElementById("data").onclick=e=>Z(e,"data"),document.getElementById("background").onclick=e=>Z(e,"background");const H=[{description:"Combination data file",accept:{"application/json":[".json"],"application/xml":[".xml"]}},{description:"Single spectrum file",accept:{"text/csv":[".csv"],"text/txt":[".txt"],"text/TKA":[".TKA"]}}];let U,Y,V;async function Z(e,t){if(window.FileSystemHandle&&window.showOpenFilePicker){e.preventDefault();const r={types:H,multiple:!1};let n;try{[n]=await window.showOpenFilePicker(r)}catch(e){return void console.warn("File Picker error:",e)}const a=await n.getFile();W(a,t);const i=a.name.split("."),o=i[i.length-1].toLowerCase();if("json"!==o&&"xml"!==o)return;"background"===t?Y=n:U=n,I&&j(n.name)}}function G(e,t){e.files?.length&&W(e.files[0],t)}function W(e,t){const r=new FileReader,n=e.name.split("."),i=n[n.length-1].toLowerCase();r.readAsText(e),r.onerror=()=>{new d.ToastNotification("fileError")},r.onload=async()=>{const n=r.result.trim();if("xml"===i){if(!window.DOMParser)return console.error("No DOM parser in this browser!"),void(document.getElementById("overwrite-button").disabled=!0);{const{espectrum:e,bgspectrum:r,coeff:a,meta:i}=g.xmlToArray(n);if(document.getElementById("sample-name").value=i.name,document.getElementById("sample-loc").value=i.location,i.time){const e=new Date(i.time),t=new Date(e.getTime()-60*e.getTimezoneOffset()*1e3);document.getElementById("sample-time").value=t.toISOString().slice(0,16)}if(document.getElementById("sample-vol").value=i.volume?.toString()??"",document.getElementById("sample-weight").value=i.weight?.toString()??"",document.getElementById("device-name").value=i.deviceName,document.getElementById("add-notes").value=i.notes,Be=new Date(i.startTime),ze=new Date(i.endTime),e?.length&&r?.length)p.data=e,p.background=r,p.dataTime=1e3*i.dataMt,p.backgroundTime=1e3*i.backgroundMt,i.dataMt&&(p.dataCps=p.data.map((e=>e/i.dataMt))),i.backgroundMt&&(p.backgroundCps=p.background.map((e=>e/i.backgroundMt))),t="both";else if(e?.length||r?.length){if("both"!==t){const n=e?.length?e:r,a=1e3*(e?.length?i.dataMt:i.backgroundMt),o=t;p[o]=n,p[`${o}Time`]=a,a&&(p[`${o}Cps`]=p[o].map((e=>e/a*1e3)))}}else new d.ToastNotification("fileError");const o=Object.values(a).filter((e=>0!==e)).length;if(o>=2){ve(),he(o),m.calibration.coeff=a,m.calibration.imported=!0,ge();const e=document.getElementsByClassName("cal-setting");for(const t of e)t.disabled=!0;te(),me(!0)}}}else{if("json"===i){const r=await g.jsonToObject(n);if(r.length>1){const n=document.getElementById("file-select-modal"),i=new a.default(n),o=document.getElementById("select-spectrum");o.options.length=0;for(const n of r){if(q(e.name,n))return;const r=document.createElement("option"),a={filename:e.name,package:n,type:t};r.value=JSON.stringify(a),r.text=`${n.sampleInfo?.name} (${n.resultData.startTime??"Undefined Time"})`,o.add(r)}i.show()}else{const n=r[0];if(q(e.name,n))return void(document.getElementById("overwrite-button").disabled=!0);K(e.name,n,t)}return}if("background"===t||"data"===t){p[`${t}Time`]=1e3;const e=g.csvToArray(n);if(p[t]=e.histogramData,e.calibrationCoefficients){ve(),he(e.calibrationCoefficients.length);for(const t in e.calibrationCoefficients)m.calibration.coeff[`c${parseInt(t)+1}`]=e.calibrationCoefficients[t];m.calibration.imported=!0,ge();const t=document.getElementsByClassName("cal-setting");for(const e of t)e.disabled=!0;te(),me(!0)}}else console.error("Could not import file, some kind of critical mistake happened. This is very bad and should not have happened!")}X(e.name,t)}}function q(e,t){if("code"in t&&"description"in t){const r=document.getElementById("import-error-modal"),n=new a.default(r);return document.getElementById("error-filename").innerText=e,document.getElementById("error-code").innerText=t.code,document.getElementById("error-desc").innerText=t.description,n.show(),!0}return!1}function K(e,t,r){if(document.getElementById("device-name").value=t?.deviceData?.deviceName??"",document.getElementById("sample-name").value=t?.sampleInfo?.name??"",document.getElementById("sample-loc").value=t?.sampleInfo?.location??"",t.sampleInfo?.time){const e=new Date(t.sampleInfo.time),r=new Date(e.getTime()-60*e.getTimezoneOffset()*1e3);document.getElementById("sample-time").value=r.toISOString().slice(0,16)}document.getElementById("sample-weight").value=t.sampleInfo?.weight?.toString()??"",document.getElementById("sample-vol").value=t.sampleInfo?.volume?.toString()??"",document.getElementById("add-notes").value=t.sampleInfo?.note??"";const n=t.resultData;n.startTime&&n.endTime&&(Be=new Date(n.startTime),ze=new Date(n.endTime));const a=n.energySpectrum,i=n.backgroundEnergySpectrum;if(a&&i){p.data=a.spectrum,p.background=i.spectrum;const e=a.measurementTime;e&&(p.dataTime=1e3*e,p.dataCps=p.data.map((t=>t/e)));const t=i.measurementTime;t&&(p.backgroundTime=1e3*t,p.backgroundCps=p.background.map((e=>e/t))),r="both"}else if("both"!==r){const e=a??i,t=e?.spectrum??[],n=1e3*(e?.measurementTime??1),o=r;p[o]=t,p[`${o}Time`]=n,n&&(p[`${o}Cps`]=p[o].map((e=>e/n*1e3)))}const o=(a??i)?.energyCalibration;if(o){const e=o.coefficients;ve(),he(e.length);for(const t in e)m.calibration.coeff[`c${parseInt(t)+1}`]=e[t];m.calibration.imported=!0,ge();const t=document.getElementsByClassName("cal-setting");for(const e of t)e.disabled=!0;te(),me(!0)}X(e,r)}function X(e,t){"both"===t?(document.getElementById("data-form-label").innerText=e,document.getElementById("background-form-label").innerText=e):document.getElementById(`${t}-form-label`).innerText=e,re(),ne(),p.background.length!==p.data.length&&p.data.length&&p.background.length&&(new d.ToastNotification("dataError"),ee(t)),m.resetPlot(p),se()}async function J(e){const t=We("autosave");if(t&&(localStorage.removeItem("autosave"),e&&"string"==typeof t)){const e=await g.jsonToObject(t);e.length?K("Autosave Data",e[0],"data"):console.error("Could not load autosaved data!")}}function Q(){(document.documentElement.clientWidth<=1100||document.documentElement.clientHeight<=700)&&console.warn("Small screen detected. Screen should be at least 1100x700 px for the best experience.")}function ee(e){let t;t="both"===e?["data","background"]:[e];for(const e of t)p[e]=[],p[`${e}Time`]=0,document.getElementById(e).value="",document.getElementById(`${e}-form-label`).innerText="No File Chosen","data"===e&&(U=void 0),"background"===e&&(Y=void 0),U?j(U.name):Y?j(Y.name):document.getElementById("overwrite-button").disabled=!0,document.getElementById(e+"-icon").classList.add("d-none");re(),ne(),m.resetPlot(p),se()}function te(){document.getElementById("calibration-title").classList.remove("d-none")}function re(){const e=p.getTotalCounts("data"),t=p.getTotalCounts("background");document.getElementById("total-spec-cts").innerText=e.toString(),document.getElementById("total-bg-cts").innerText=t.toString(),e&&document.getElementById("data-icon").classList.remove("d-none"),t&&document.getElementById("background-icon").classList.remove("d-none")}function ne(){document.getElementById("spec-time").innerText=ft(p.dataTime),document.getElementById("bg-time").innerText=ft(p.backgroundTime)}function ae(e){g.fileType=parseInt(e.value),g.valueIndex=parseInt(e.value),Ge("fileDataMode",e.id)}function ie(e=!0){e&&("log"===m.xAxis&&oe(document.getElementById("xAxis")),"log"===m.yAxis&&oe(document.getElementById("yAxis")),m.sma&&le(!1,document.getElementById("sma"))),m.clearAnnos(),document.getElementById("check-all-isos").checked=!1,He(!0),m.resetPlot(p),se()}function oe(e){const t=e.id;"linear"===m[t]?(m[t]="log",e.innerText="Log",m.resetPlot(p),se()):(m[t]="linear",e.innerText="Linear",m.updatePlot(p))}function le(e,t=null){m.sma=e,t&&(t.checked=!1),m.updatePlot(p)}function se(){if(!m.plotDiv)return;const e=m.plotDiv;e.on("plotly_hover",ce),e.on("plotly_unhover",ue),e.on("plotly_click",de),e.on("plotly_selected",fe),e.addEventListener("contextmenu",(e=>{e.preventDefault()}))}function ce(e){const t=e.points[0].x;if("number"==typeof t){for(const e of v)document.getElementById(`bin-${e}`).value=t.toFixed(2);k&&Ue(t)}}function ue(){for(const e of v)document.getElementById(`bin-${e}`).value=(y[e]??"").toString()}function de(e){const t=e.points[0].x,r=e.points[0].y;if("number"==typeof t&&"number"==typeof r){const n=t.toFixed(2);document.getElementById("click-data").innerText=n+e.points[0].xaxis.ticksuffix+": "+r.toFixed(2)+e.points[0].yaxis.ticksuffix;for(const e of v)document.getElementById(`bin-${e}`).value=n,y[e]=t,v.delete(e),document.getElementById(`select-bin-${e}`).checked=!1;if(V&&m.toggleLine(V,V.toString(),!1),0===e.event.button){const e=Math.round(t);m.toggleLine(e,e.toString(),!0),V=e}else 2===e.event.button&&(V=void 0);m.updatePlot(p)}}function fe(e){const t=document.getElementById("roi-info"),r=document.getElementById("static-info");if(!e?.range?.x.length)return t.classList.add("d-none"),void r.classList.remove("d-none");t.classList.remove("d-none"),r.classList.add("d-none");let n=e.range.x;n=n.map((e=>Math.round(e)));let a=n[0],i=n[1];if(document.getElementById("roi-range").innerText=`${a.toString()} - ${i.toString()}`,document.getElementById("roi-range-unit").innerText=m.calibration.enabled?" keV":"",m.calibration.enabled){const e=Math.max(p.data.length,p.background.length),t=m.getCalAxis(e),r=t.length,n=[a,i],o=n.length,l=[];let s=0;for(let e=0;en[s]&&(l.push(e),s++,s>=o));e++);a=l[0],i=l[1]}const o=p.getTotalCounts("data",a,i),l=p.getTotalCounts("background",a,i),s=o-l;document.getElementById("total-counts").innerText=o.toString(),document.getElementById("net-counts").innerText=s.toString(),document.getElementById("bg-counts").innerText=l.toString(),document.getElementById("bg-ratio").innerText=(s/l*100).toFixed()}function he(e){for(let t=document.getElementById("calibration-input").children.length;t<=e;t++)pe(t)}function pe(e=0){const t=document.getElementById("calibration-input"),r=document.getElementById("energy-cal-coeff-list"),n=Math.round(performance.now())+e,a=document.createElement("div");a.classList.add("hstack","gap-2"),a.id=n.toString();const i=document.createElement("div");i.classList.add("input-group","input-group-sm");const o=document.createElement("label");o.classList.add("input-group-text"),o.htmlFor=`bin-${n}`,o.textContent="Bin:",i.appendChild(o);const l=document.createElement("input");l.classList.add("form-control","form-control-sm","cal-setting"),l.type="number",l.id=`bin-${n}`,l.min="0",l.value="",l.title="Input bin number",l.placeholder="Select Bin Number",i.appendChild(l);const s=document.createElement("input");s.type="checkbox",s.classList.add("btn-check","cal-setting"),s.id=`select-bin-${n}`,i.appendChild(s),s.onclick=()=>{return e=n,t=s.checked,v.delete(e),void(t&&v.add(e));var e,t};const c=document.createElement("label");c.classList.add("btn","btn-outline-primary"),c.htmlFor=`select-bin-${n}`,c.title="Select from plot";const u=document.createElement("i");u.classList.add("fa-solid","fa-arrow-pointer"),c.appendChild(u),i.appendChild(c);const d=document.createElement("span");d.innerHTML='';const f=document.createElement("div");f.classList.add("input-group","input-group-sm");const h=document.createElement("input");h.classList.add("form-control","form-control-sm","cal-setting"),h.type="number",h.id=`cal-${n}`,h.min="1",h.value="",h.title="Target energy for bin",h.placeholder="Target Bin Energy",f.appendChild(h);const p=document.createElement("label");p.classList.add("input-group-text"),p.htmlFor=`cal-${n}`,p.textContent="keV",f.appendChild(p);const m=document.createElement("button");m.classList.add("btn","btn-sm","btn-primary","del-cal-btn"),m.type="button",m.title="Remove bin from calibration",m.innerHTML='',f.appendChild(m),t.children.length<=2?m.disabled=!0:(m.classList.add("cal-setting"),m.onclick=()=>{a?.remove(),v.delete(n),delete y[n],r.lastElementChild?.remove()}),a.appendChild(i),a.appendChild(d),a.appendChild(f),t.insertBefore(a,document.getElementById("add-new-cal-bin").parentElement);const g=document.createElement("p");g.classList.add("mb-1"),g.innerHTML=`c${r.children.length+1}: 0`,r.appendChild(g)}async function me(e){if(document.getElementById("calibration-label").innerHTML=e?' Reset':' Calibrate',document.getElementById("apply-cal").checked=e,e&&!m.calibration.imported){const e=document.getElementById("calibration-input").children,t=[];for(const r of e){const e=r.id;if(!e)continue;const n=document.getElementById(`bin-${e}`).value.trim(),a=document.getElementById(`cal-${e}`).value.trim();if(!n.length||!a.length)continue;const i=parseFloat(n),o=parseFloat(a);isNaN(i)||isNaN(o)||t.push([i,o])}if(t.length<2){new d.ToastNotification("calibrationApplyError");const e=document.getElementById("apply-cal");return e.checked=!1,void me(e.checked)}for(const e in m.calibration.points)delete m.calibration.points[e];for(const e in t){const r=t[e][0],n=t[e][1];m.calibration.points[r]=n}await m.computeCoefficients()}ge(),m.calibration.enabled=e,m.resetPlot(p),se()}function ge(){const e=document.getElementById("energy-cal-coeff-list");for(let t=0;t Hide Chart':' Show Chart',m.setChartType(e?"calibration":"default",p),e||se()}function xe(e){document.getElementById("toggle-evol-chart-label").innerHTML=e?' Hide Evolution':' Show Evolution',m.setChartType(e?"evolution":"default",p,T),e||se()}function be(e){return parseFloat(e)<10?"0"+e:e}function _e(){const e=new Date;return e.getFullYear()+"-"+be((e.getMonth()+1).toString())+"-"+be(e.getDate().toString())+"_"+be(e.getHours().toString())+"-"+be(e.getMinutes().toString())}function we(){const e=new Date;return e.getFullYear()+"-"+be((e.getMonth()+1).toString())+"-"+be(e.getDate().toString())}function Te(e){let t=e.getFullYear()+"-"+be((e.getMonth()+1).toString())+"-"+be(e.getDate().toString())+"T"+be(e.getHours().toString())+":"+be(e.getMinutes().toString())+":"+be(e.getSeconds().toString());t+=-e.getTimezoneOffset()<0?"-":"+";const r=new Date(0);return r.setMinutes(Math.abs(e.getTimezoneOffset())),t+=be(r.getUTCHours().toString())+":"+be(r.getUTCMinutes().toString()),t}function Ae(e,t){const r=document.createElementNS(null,"data"===e?"EnergySpectrum":"BackgroundEnergySpectrum"),n=document.createElementNS(null,"NumberOfChannels");n.textContent=p[e].length.toString(),r.appendChild(n);const a=document.createElementNS(null,"SpectrumName");if(a.textContent=t,r.appendChild(a),m.calibration.enabled){const e=document.createElementNS(null,"EnergyCalibration");r.appendChild(e);const t=document.createElementNS(null,"Coefficients"),n=[];Object.values(m.calibration.coeff).forEach((e=>n.push(e??0)));for(const e of n){const r=document.createElementNS(null,"Coefficient");r.textContent=e.toString(),t.appendChild(r)}e.appendChild(t);const a=document.createElementNS(null,"PolynomialOrder");a.textContent=2..toString(),e.appendChild(a)}const i=document.createElementNS(null,"TotalPulseCount");i.textContent=p.getTotalCounts(e).toString(),r.appendChild(i);const o=document.createElementNS(null,"ValidPulseCount");o.textContent=i.textContent,r.appendChild(o);const l=document.createElementNS(null,"MeasurementTime");l.textContent=Math.round(p[`${e}Time`]/1e3).toString(),r.appendChild(l);const s=document.createElementNS(null,"Spectrum");r.appendChild(s);const c=p[e];for(const e of c){const t=document.createElementNS(null,"DataPoint");t.textContent=e.toString(),s.appendChild(t)}return r}function Me(){const e=we()+" Energy Spectrum",t=we()+" Background Energy Spectrum",r=document.implementation.createDocument(null,"ResultDataFile"),n=r.createProcessingInstruction("xml",'version="1.0" encoding="UTF-8"');r.insertBefore(n,r.firstChild);const a=r.documentElement,i=document.createElementNS(null,"FormatVersion");i.textContent=230124..toString(),a.appendChild(i);const o=document.createElementNS(null,"ResultDataList");a.appendChild(o);const l=document.createElementNS(null,"ResultData");o.appendChild(l);const s=document.createElementNS(null,"DeviceConfigReference");l.appendChild(s);const c=document.createElementNS(null,"Name");if(c.textContent=document.getElementById("device-name").value.trim(),s.appendChild(c),Be){const e=document.createElementNS(null,"StartTime");e.textContent=Te(Be),l.appendChild(e);const t=document.createElementNS(null,"EndTime");l.appendChild(t),ze&&ze.getTime()-Be.getTime()>=0?t.textContent=Te(ze):t.textContent=Te(new Date)}const u=document.createElementNS(null,"SampleInfo");l.appendChild(u);const d=document.createElementNS(null,"Name");d.textContent=document.getElementById("sample-name").value.trim(),u.appendChild(d);const f=document.createElementNS(null,"Location");f.textContent=document.getElementById("sample-loc").value.trim(),u.appendChild(f);const h=document.createElementNS(null,"Time"),m=document.getElementById("sample-time").value.trim();m.length&&(h.textContent=Te(new Date(m)),u.appendChild(h));const g=document.createElementNS(null,"Weight"),v=document.getElementById("sample-weight").value.trim();v.length&&(g.textContent=(parseFloat(v)/1e3).toString(),u.appendChild(g));const y=document.createElementNS(null,"Volume"),x=document.getElementById("sample-vol").value.trim();x.length&&(y.textContent=(parseFloat(x)/1e3).toString(),u.appendChild(y));const b=document.createElementNS(null,"Note");if(b.textContent=document.getElementById("add-notes").value.trim(),u.appendChild(b),p.data.length&&l.appendChild(Ae("data",e)),p.background.length){const e=document.createElementNS(null,"BackgroundSpectrumFile");e.textContent=t,l.appendChild(e),l.appendChild(Ae("background",t))}const _=document.createElementNS(null,"Visible");return _.textContent=(!0).toString(),l.appendChild(_),(new XMLSerializer).serializeToString(r)}function ke(e){const t={numberOfChannels:p[e].length,validPulseCount:p.getTotalCounts(e),measurementTime:0,spectrum:p[e]};if(t.measurementTime=Math.round(p[`${e}Time`]/1e3),m.calibration.enabled){const e={polynomialOrder:0,coefficients:[]};e.polynomialOrder=Object.keys(m.calibration.coeff).length-1,Object.values(m.calibration.coeff).forEach((t=>e.coefficients.push(t??0))),t.energyCalibration=e}return t}function Se(){const e={schemaVersion:"NPESv2",data:[]},t={deviceData:{softwareName:"Gamma MCA, "+E,deviceName:document.getElementById("device-name").value.trim()},sampleInfo:{name:document.getElementById("sample-name").value.trim(),location:document.getElementById("sample-loc").value.trim(),note:document.getElementById("add-notes").value.trim()},resultData:{}};let r=parseFloat(document.getElementById("sample-weight").value.trim());r&&(t.sampleInfo.weight=r),r=parseFloat(document.getElementById("sample-vol").value.trim()),r&&(t.sampleInfo.volume=r);const n=document.getElementById("sample-time").value.trim();if(n.length&&new Date(n)&&(t.sampleInfo.time=Te(new Date(n))),Be&&(t.resultData.startTime=Te(Be),ze&&ze.getTime()-Be.getTime()>=0?t.resultData.endTime=Te(ze):t.resultData.endTime=Te(new Date)),p.data.length&&p.getTotalCounts("data")&&(t.resultData.energySpectrum=ke("data")),p.background.length&&p.getTotalCounts("background")&&(t.resultData.backgroundEnergySpectrum=ke("background")),t.resultData.energySpectrum||t.resultData.backgroundEnergySpectrum)return e.data.push(t),JSON.stringify(e)}function Ee(e,t){e+=`_${_e()}.csv`;let r="";p[t].forEach((e=>r+=e+"\n")),Le(e,r,"CSV")}document.getElementById("data").onchange=e=>G(e.target,"data"),document.getElementById("background").onchange=e=>G(e.target,"background"),document.getElementById("spectrum-select-btn").onclick=()=>function(){const e=JSON.parse(document.getElementById("select-spectrum").value);K(e.filename,e.package,e.type);document.getElementById("file-select-modal").querySelector(".btn-close").click()}(),document.getElementById("restore-data-btn").onclick=()=>J(!0),document.getElementById("discard-data-btn").onclick=()=>J(!1),document.getElementById("clear-data").onclick=()=>ee("data"),document.getElementById("clear-bg").onclick=()=>ee("background"),document.getElementById("r1").onchange=e=>ae(e.target),document.getElementById("r2").onchange=e=>ae(e.target),document.getElementById("reset-plot").onclick=()=>ie(),document.getElementById("xAxis").onclick=e=>oe(e.target),document.getElementById("yAxis").onclick=e=>oe(e.target),document.getElementById("sma").onclick=e=>le(e.target.checked),document.getElementById("sma-val").onkeydown=e=>{"Enter"===e.key&&document.getElementById("sma")?.click()},document.getElementById("sma-val").oninput=e=>function(e){const t=parseInt(e.value);isNaN(t)?new d.ToastNotification("smaError"):(m.smaLength=t,m.updatePlot(p),Ge("smaLength",t))}(e.target),document.getElementById("add-new-cal-bin").onclick=()=>pe(),document.getElementById("apply-cal").onclick=e=>me(e.target.checked),document.getElementById("calibration-reset").onclick=()=>ve(),document.getElementById("plot-type").onclick=()=>function(){const e=document.getElementById("plot-type");m.linePlot?e.innerHTML=' Bar':e.innerHTML=' Line',m.linePlot=!m.linePlot,m.updatePlot(p)}(),document.getElementById("plot-cps").onclick=e=>{return t=e.target,m.cps=!m.cps,t.innerText=m.cps?"CPS":"Total",void m.updatePlot(p);var t},document.getElementById("cal-input").onchange=e=>{return t=e.target,void(t.files?.length&&function(e){const t=new FileReader;t.readAsText(e),t.onload=()=>{try{const e=t.result.trim(),r=JSON.parse(e);if(r.imported){const e=document.getElementsByClassName("cal-setting");for(const t of e)t.disabled=!0;te(),m.calibration.coeff=r.coeff,m.calibration.imported=!0}else{const e=document.getElementById("calibration-input").children;he(Object.keys(r.points).length);let t=0;for(const[n,a]of Object.entries(r.points)){const r=e[t].id;document.getElementById(`bin-${r}`).value=n,document.getElementById(`cal-${r}`).value=a.toString(),y[parseFloat(r)]=parseFloat(n),t++}}}catch(e){console.error("Calibration Import Error:",e),new d.ToastNotification("calibrationImportError")}},t.onerror=()=>{new d.ToastNotification("fileError")}}(t.files[0]));var t},document.getElementById("toggle-calibration-chart").onclick=e=>ye(e.target.checked),document.getElementById("toggle-evolution-chart").onclick=e=>xe(e.target.checked),document.getElementById("evolution-download-btn").onclick=()=>(T.length||console.error("Time evolution is empty. No cps values to export!"),void Le(`evolution_${_e()}.csv`,T.join("\n"),"EVOL")),document.getElementById("calibration-download").onclick=()=>function(){const e=m.calibration;let t=JSON.stringify(e);0===e.coeff.c1&&0===e.coeff.c2&&(t=""),Le(`calibration_${_e()}.json`,t,"CAL")}(),document.getElementById("xml-export-btn").onclick=()=>{Le(`spectrum_${_e()}.xml`,Me(),"XML")},document.getElementById("npes-export-btn").onclick=()=>{Le(`spectrum_${_e()}.json`,Se(),"JSON")},document.getElementById("download-spectrum-btn").onclick=()=>Ee("spectrum","data"),document.getElementById("download-bg-btn").onclick=()=>Ee("background","background"),document.getElementById("overwrite-button").onclick=()=>async function(){if(U&&Y)return void new d.ToastNotification("saveMultipleAtOnce");if(!U&&!Y)return void console.error("No file handlers found to save to!");const e=U??Y,t=await e.createWritable();let r;r="xml"===(await e.getFile()).name.split(".")[1].toLowerCase()?Me():Se(),r?.trim()?(await t.write(r),await t.close(),new d.ToastNotification("saveFile")):new d.ToastNotification("fileEmptyError")}();const Ce={CAL:{description:"Calibration data file",accept:{"application/json":[".json"]}},XML:{description:"Combination data file (XML)",accept:{"application/xml":[".xml"]}},JSON:{description:"Combination data file (NPESv2, smaller size)",accept:{"application/json":[".json"]}},EVOL:{description:"Count rate time evolution file",accept:{"text/csv":[".csv"]}},CSV:{description:"Single spectrum file",accept:{"text/csv":[".csv"]}}};async function Le(e,t,r){if(t?.trim()){if(window.FileSystemHandle&&window.showSaveFilePicker){const n={suggestedName:e,types:[Ce[r]]};let a;try{a=await window.showSaveFilePicker(n)}catch(e){return void console.warn("File SaveAs error:",e)}U?U=a:Y&&(Y=a);const i=await a.createWritable();await i.write(t),await i.close(),new d.ToastNotification("saveFile")}else{const r=document.createElement("a");r.setAttribute("href",`data:text/plain;charset=utf-8,${encodeURIComponent(t)}`),r.setAttribute("download",e),r.style.display="none",r.click()}localStorage.removeItem("autosave"),document.getElementById("export-modal").querySelector(".btn-close").click()}else new d.ToastNotification("fileEmptyError")}function Oe(e){const t=document.getElementById(e);if(t){const e=new o.default(t);e.isShown()||e.show()}}function De(e){const t=document.getElementById(e);if(t){const e=new o.default(t);e.isShown()&&e.hide()}}function Ie(e,t,r){const n=e.tBodies[0],a=Array.from(n.rows);a.sort(((e,n)=>{const a=e.cells[t].textContent?.trim()??"",i=n.cells[t].textContent?.trim()??"",o=parseFloat(a.replace(/[^\d.-]/g,"")),l=parseFloat(i.replace(/[^\d.-]/g,""));if(isNaN(o)||isNaN(l))return a.localeCompare(i);const s=o-l;return"asc"===r?s:-s})),n.append(...a)}document.getElementById("reset-meta-values").onclick=()=>function(){const e=document.getElementsByClassName("sample-info");for(const t of e)t.value=""}(),document.getElementById("print-report").onclick=()=>function(){const e=m.peakConfig.enabled;e||Ze(document.getElementById("peak-finder-btn"));const t=m.computePulseHeightData(p),r=Se();if(e||Ve(document.getElementById("peak-finder-btn")),!t.length||!r)return console.error("Nothing to analyze, no data found. Cannot print report!"),void new d.ToastNotification("reportError");const n=window.open("/print.html","_blank");n?(n.onload=()=>{const e=n.document,a=JSON.parse(r).data[0];e.getElementById("sample-name").innerText=a.sampleInfo?.name||"N/A",e.getElementById("sample-loc").innerText=a.sampleInfo?.location||"N/A",e.getElementById("sample-time").innerText=a.sampleInfo?.time||"N/A",e.getElementById("note").innerText=a.sampleInfo?.note||"N/A",e.getElementById("device-name").innerText=a.deviceData?.deviceName||"N/A",e.getElementById("software-name").innerText=a.deviceData?.softwareName||"N/A",e.getElementById("start-time").innerText=a.resultData.startTime??"N/A",e.getElementById("end-time").innerText=a.resultData.endTime??"N/A",e.getElementById("total-time-gross").innerText=a.resultData.energySpectrum?.measurementTime?.toString()||"N/A",e.getElementById("total-time-bg").innerText=a.resultData.backgroundEnergySpectrum?.measurementTime?.toString()||"N/A",e.getElementById("cal-coeffs").innerText=JSON.stringify(m.calibration.enabled?m.calibration.coeff:{c1:0,c2:0,c3:0})||"N/A";const i=e.getElementById("peak-table-head-row"),o=document.createElement("th");o.innerHTML="Peak Number
[1]",i.appendChild(o);const c=document.createElement("th");c.innerHTML=`Energy
[${m.calibration.enabled?"keV":"bin"}]`,i.appendChild(c);const u=document.createElement("th");u.innerHTML="Net Peak Area
(3σ) [cts]",i.appendChild(u);const d=document.createElement("th");d.innerHTML="Background Peak Area
(3σ) [cts]",i.appendChild(d);const f=document.createElement("th");f.innerHTML=`FWHM
[${m.calibration.enabled?"keV":"bin"}]`,i.appendChild(f);const h=document.createElement("th");h.innerHTML="FWHM
[%]",i.appendChild(h);const p=document.createElement("th");p.innerHTML="Net Peak Counts/s
(3σ) [cps]",i.appendChild(p);const g=e.getElementById("peak-table-body"),v=t[0].x,y=t[0].y,x=m.peakFinder(y);let b=1;for(const e of x){const r=v[Math.round(e)];if(r<0)continue;const n=new s.CalculateFWHM([r],t[1].x,t[1].y).compute()[r],i=new s.CalculateFWHM([r],t[1].x,t[1].y).getResolution()[r],o=2*n/(2*Math.sqrt(2*Math.LN2)),l=r-o,c=r+o;let u=0,d=0;for(const e in v){const r=v[e];r>=l&&r<=c&&(u+=t[1].y[e],t.length>2&&(d+=t[2].y[e]))}const f=g.insertRow(),h=document.createElement("th");h.innerText=b.toString(),f.appendChild(h),f.insertCell().innerText=r.toFixed(2),f.insertCell().innerText=n>0&&n<.9*s.CalculateFWHM.resolutionLimit*r?(u*(m.cps?a.resultData.energySpectrum?.measurementTime??1:1)).toFixed(0):"N/A",f.insertCell().innerText=n>0&&n<.9*s.CalculateFWHM.resolutionLimit*r?(d*(m.cps?a.resultData.backgroundEnergySpectrum?.measurementTime??1:1)).toFixed(0):"N/A",f.insertCell().innerText=n>0&&n<.9*s.CalculateFWHM.resolutionLimit*r?n.toFixed(3):"OVF",f.insertCell().innerText=i>0&&i<.9*s.CalculateFWHM.resolutionLimit?(100*i).toFixed(2):"OVF",f.insertCell().innerText=n>0&&n<.9*s.CalculateFWHM.resolutionLimit*r?(m.cps?u:u/(a.resultData.energySpectrum?.measurementTime??1)).toExponential(3):"N/A",b++}m.plotDiv&&l.default.toImage(m.plotDiv,{format:"png",height:400,width:1e3}).then((function(t){const r=e.getElementById("plot-image");r.src=t,r.onload=()=>n.print()}))},n.onafterprint=()=>n.close()):console.error("Unable to open a new window for printing.")}(),document.getElementById("toggle-menu").onclick=()=>He(),document.getElementById("reload-isos-btn").onclick=()=>He(!0);let Pe,Re,Ne,Fe,Be,ze,$e,je=!1;async function He(e=!1){if(je&&!e)return!0;const t=document.getElementById("iso-loading");t.classList.remove("d-none");const r={cache:"no-cache",headers:{"Content-Type":"text/plain; application/json; charset=UTF-8"}},n=document.getElementById("iso-load-error");n.classList.add("d-none");let a=!0;try{const e=await fetch(A,r);if(e.ok){const t=await e.json();je=!0;const r=document.getElementById("table"),n=r.querySelector("#iso-table");n.innerHTML="";for(const[e,r]of Object.entries(t)){let t=0;const a=e.toLowerCase().replace(/[^a-z0-9 -]/gi,"").trim(),i=a.charAt(0).toUpperCase()+a.slice(1);for(const e of r){if(isNaN(e))continue;M[i]?M[i].push(e):M[i]=[e];const r=i+"-"+t;t++;const a=n.insertRow(),o=a.insertCell(0),l=a.insertCell(1),s=a.insertCell(2);o.onclick=()=>o.firstChild.click(),l.onclick=()=>o.firstChild.click(),s.onclick=()=>o.firstChild.click(),o.style.cursor="pointer",l.style.cursor="pointer",s.style.cursor="pointer",o.innerHTML=``,s.innerText=e.toFixed(2);const c=document.getElementById(r);c.onclick=()=>Ye(c);const u=i.split("-");l.innerHTML=`${u[1]}${u[0]}`}}"asc"!==R[2]?r.querySelector('th[data-sort-by="2"]').click():Ie(r,2,"asc"),m.clearAnnos(),m.updatePlot(p),m.isotopeSeeker=new s.SeekClosest(M),Re=new s.SeekClosest(M)}else n.innerText=`Could not load isotope list! HTTP Error: ${e.status}. Please try again.`,n.classList.remove("d-none"),a=!1}catch(e){console.error(e),n.innerText="Could not load isotope list! Connection refused - you are probably offline.",n.classList.remove("d-none"),a=!1}return t.classList.add("d-none"),a}async function Ue(e){if(!await He())return;Re||(Re=new s.SeekClosest(M)),Pe&&m.toggleLine(Pe[1],Pe[0],!1);const{energy:t,name:r}=Re.seek(e,S);if(t&&r){const e=[r,t];Pe!==e&&(Pe=e),m.toggleLine(t,r)}m.updatePlot(p)}function Ye(e){const t=e.id.split("-");m.toggleLine(parseFloat(e.value),t[0]+"-"+t[1],e.checked),m.updatePlot(p)}function Ve(e){m.clearPeakFinder(),m.peakConfig.enabled=!1,e.innerText="None"}function Ze(e){m.peakConfig.enabled=!0,m.peakConfig.mode="gaussian",e.innerText="Gaussian"}function Ge(e,t){return!!C&&(localStorage.setItem(e,JSON.stringify(t)),!0)}function We(e){return JSON.parse(localStorage.getItem(e))}function qe(e,t){const r=t.value.trim();let n=!1;if(t.checkValidity()&&r){switch(e){case"editMode":{const r=t.checked;m.editableMode=r,m.resetPlot(p),se(),n=Ge(e,r);break}case"customURL":try{A=new URL(r).href,He(!0),n=Ge(e,A)}catch(e){new d.ToastNotification("settingError"),console.error("Custom URL Error",e)}break;case"fileDelimiter":g.delimiter=r,n=Ge(e,r);break;case"fileChannels":{const t=parseInt(r);g.adcChannels=t,n=Ge(e,t);break}case"timeLimitBool":{const r=t.checked;_=r,n=Ge(e,r);break}case"timeLimit":{const r=t.id.split("-"),a=["s","m","h"];let i=0;for(const e in a)i+=parseInt(document.getElementById(`${r[0]}-${r[1]}-${a[e]}`).value.trim())*60**parseInt(e);i*=1e3,w=i,n=Ge(e,w);break}case"maxIsoDist":{const t=parseFloat(r);S=t,n=Ge(e,S);break}case"plotRefreshRate":{const t=parseFloat(r);b=1e3*t,n=Ge(e,b);break}case"serBufferSize":{const t=parseInt(r);u.SerialManager.maxSize=t,n=Ge(e,u.SerialManager.maxSize);break}case"baudRate":{const t=parseInt(r);u.SerialManager.baudRate=t,n=Ge(e,u.SerialManager.baudRate);break}case"eolChar":u.SerialManager.eolChar=r,n=Ge(e,r);break;case"serChannels":{const t=parseInt(r);u.SerialManager.adcChannels=t,n=Ge(e,t);break}case"peakThres":{const t=parseFloat(r);m.peakConfig.thres=t,m.updatePlot(p),n=Ge(e,t);break}case"peakLag":{const t=parseInt(r);m.peakConfig.lag=t,m.updatePlot(p),n=Ge(e,t);break}case"seekWidth":{const t=parseFloat(r);s.SeekClosest.seekWidth=t,m.updatePlot(p),n=Ge(e,t);break}case"plotDownload":m.downloadFormat=r,m.updatePlot(p),n=Ge(e,r);break;case"theme":n=Ge(e,r),m.darkMode="dark"===(0,f.applyTheming)(),ie(!1);break;case"gaussSigma":{const t=parseInt(r);m.gaussSigma=t,m.updatePlot(p),n=Ge(e,t);break}case"showEnergyRes":{const r=t.checked;m.peakConfig.showFWHM=r,m.updatePlot(p),n=Ge(e,r);break}case"useFWHMFast":{const r=t.checked;s.CalculateFWHM.fastMode=r,m.updatePlot(p),n=Ge(e,r);break}case"newPeakStyle":{const r=t.checked;m.peakConfig.newPeakStyle=r,m.updatePlot(p),n=Ge(e,r);break}default:return void new d.ToastNotification("settingError")}n&&new d.ToastNotification("settingSuccess")}else new d.ToastNotification("settingType")}function Ke(e){u.SerialManager.orderType=e.value,Ge("serialDataMode",e.id)}function Xe(){Qe(),new d.ToastNotification("serialConnect")}function Je(e){Ne?.isThisPort(e.target)&&rt(!0),Qe(),new d.ToastNotification("serialDisconnect")}async function Qe(){const e=document.getElementById("port-selector");for(let t=e.options.length;t>=0;t--)e.remove(t);if(x=[],navigator.serial){const e=await navigator.serial.getPorts();for(const t of e)x.push(new u.WebSerial(t))}else if(navigator.usb){const e=await navigator.usb.getDevices();for(const t of e)x.push(new u.WebUSBSerial(t))}let t=0;for(const r in x){const n=document.createElement("option");n.text=`Port ${r} (${x[r]?.getInfo()})`,e.add(n,parseInt(r));const a=x[r]?.getPort();a&&Ne?.isThisPort(a)&&(t=parseInt(r),n.text="> "+n.text)}const r=document.getElementsByClassName("ser-settings");if(e.options.length){e.selectedIndex=t;for(const e of r)e.disabled=!1}else{const t=document.createElement("option");t.text="No Ports Available",e.add(t);for(const e of r)e.disabled=!0}}function et(){const e=document.getElementById("port-selector").selectedIndex,t=x[e];if(t){const e=t.getPort();Ne?.isThisPort(e)||(Ne?.recording&&rt(!0),Ne=new u.SerialManager(t),nt(),Qe())}return e}async function tt(e=!1,t){try{et(),await(Ne?.startRecord(e))}catch(e){return console.error("Connection Error:",e),void new d.ToastNotification("serialConnectError")}if(L)try{$e=await navigator.wakeLock.request("screen"),document.addEventListener("visibilitychange",(async()=>{null!==$e&&"visible"===document.visibilityState&&($e=await navigator.wakeLock.request("screen"))}))}catch(e){console.error("Screen Wake Lock Error:",e)}Fe=t,e||(ee(t),document.getElementById(`${t}-form-label`).innerText="Serial Recording",Be=new Date),document.getElementById("toggle-evolution-chart").disabled=!1,document.getElementById("stop-button").disabled=!1,document.getElementById("pause-button").classList.remove("d-none"),document.getElementById("record-button").classList.add("d-none"),document.getElementById("resume-button").classList.add("d-none");const r=document.getElementsByClassName("recording-spinner");for(const e of r)e.classList.remove("d-none");gt(t,!e),ht(t),dt(),e?T.pop():T=[]}async function rt(e=!1){document.getElementById("pause-button").classList.add("d-none");const t=document.getElementsByClassName("recording-spinner");for(const e of t)e.classList.add("d-none");document.getElementById("resume-button").classList.toggle("d-none",e),e&&(document.getElementById("stop-button").disabled=!0,document.getElementById("record-button").classList.remove("d-none"),ze=new Date),$e?.release().then((()=>{$e=null}));try{clearTimeout(lt),clearTimeout(pt),clearTimeout(st),clearTimeout(ot)}catch(e){console.warn("No timeout to clear. Something might be wrong...",e)}try{await(Ne?.stopRecord())}catch(e){console.error("Misc Serial Read Error:",e),new d.ToastNotification("miscSerialError"),(0,d.launchSysNotification)("Recording Crashed!","A fatal error occured with the connected serial device and the recording has stopped.")}}function nt(){document.getElementById("ser-output").innerText="",Ne?.flushRawData()}async function at(){try{const e=et();document.getElementById("serial-console-title").innerText=`(Port ${e})`,await(Ne?.showConsole())}catch(e){return console.error("Connection Error:",e),void new d.ToastNotification("serialConnectError")}ut()}document.getElementById("iso-hover").onclick=()=>(k=!k,void Ue(-1e5)),document.getElementById("check-all-isos").onclick=e=>function(e){const t=document.getElementById("table").tBodies[0].rows;for(const r of t){const t=r.cells[0].firstChild;if(t.checked=e.checked,e.checked){const e=t.id.split("-");m.toggleLine(parseFloat(t.value),e[0]+"-"+e[1],t.checked)}}e.checked||m.clearAnnos(),m.updatePlot(p)}(e.target),document.getElementById("peak-finder-btn").onclick=e=>async function(e){if(m.peakConfig.enabled)switch(m.peakConfig.mode){case"gaussian":!function(e){m.peakConfig.mode="energy",e.innerText="Energy"}(e);break;case"energy":await async function(e){m.clearPeakFinder(),await He(),m.peakConfig.mode="isotopes",e.innerText="Isotopes"}(e);break;case"isotopes":Ve(e)}else Ze(e);m.updatePlot(p)}(e.target),document.getElementById("enhance-eff").onclick=e=>{return t=e.target,m.enhanceEfficiency=t.checked,void m.updatePlot(p);var t},document.getElementById("reset-gamma-mca").onclick=()=>(C&&localStorage.clear(),void window.location.reload()),document.getElementById("s1").onchange=e=>Ke(e.target),document.getElementById("s2").onchange=e=>Ke(e.target),document.getElementById("serial-list-btn").onclick=()=>Qe(),document.getElementById("serial-add-device").onclick=()=>async function(){try{navigator.serial?await navigator.serial.requestPort():await navigator.usb.requestDevice({filters:u.WebUSBSerial.deviceFilters}),Qe()}catch(e){console.warn("Aborted adding a new port!",e)}}(),document.getElementById("resume-button").onclick=()=>tt(!0,Fe),document.getElementById("record-spectrum-btn").onclick=()=>tt(!1,"data"),document.getElementById("record-bg-btn").onclick=()=>tt(!1,"background"),document.getElementById("pause-button").onclick=()=>rt(),document.getElementById("stop-button").onclick=()=>rt(!0),document.getElementById("clear-console-log").onclick=()=>nt(),document.getElementById("serial-console-modal").addEventListener("show.bs.modal",(()=>{at()})),document.getElementById("serial-console-modal").addEventListener("hide.bs.modal",(async()=>{await(Ne?.hideConsole()),clearTimeout(ot)})),document.getElementById("ser-command").onkeydown=e=>{"Enter"===e.key&&document.getElementById("send-command")?.click(),"ArrowUp"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),function(e){const t=document.getElementById("ser-command");"ArrowUp"===e&&it.currentIndex-1&&it.currentIndex--,it.currentIndex>=0&&it.currentIndexasync function(){const e=document.getElementById("ser-command");try{await(Ne?.sendString(e.value))}catch(e){return console.error("Connection Error:",e),void new d.ToastNotification("serialConnectError")}const t=e.value.trim();t.length&&(it.history.unshift(t),it.currentIndex=-1),e.value=""}(),document.getElementById("reconnect-console-log").onclick=()=>async function(){await(Ne?.hideConsole()),clearTimeout(ot),at()}();let ot,lt,st,ct=!1;function ut(){Ne?.port?.isOpen&&(document.getElementById("ser-output").innerText=Ne.getRawData(),ot=setTimeout(ut,200),ct&&document.getElementById("ser-output").scrollIntoView({behavior:"smooth",block:"end"}))}function dt(){const e=document.getElementById("autosave-badge"),t=Se();if(t&&Ge("autosave",t)){const t={month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1},r=new Intl.DateTimeFormat("en-US",t).format(new Date);e.title=`The data was last saved automatically on ${r}.`,e.innerHTML=` Autosaved ${r}`}e?.classList.toggle("d-none",!t),lt=setTimeout(dt,9e5)}function ft(e){const t=new Date(e);return be((t.getUTCHours()+24*(t.getUTCDate()-1)).toString())+":"+be(t.getUTCMinutes().toString())+":"+be(t.getUTCSeconds().toString())}function ht(e){if(Ne?.port?.isOpen){const t=performance.now(),r=document.getElementById("total-record-time"),n=Ne.getTime();p[`${e}Time`]=n,document.getElementById("record-time").innerText=ft(n);const a=new Date(n),i=document.getElementById("ser-time-progress-bar");if(i.classList.toggle("d-none",!_),_){const e=document.getElementById("ser-time-progress"),t=Math.round(a.getTime()/w*100);e.style.width=t+"%",e.innerText=t+"%",i.setAttribute("aria-valuenow",t.toString()),r.innerText=" / "+ft(w)}else r.innerText="";if(ne(),a.getTime()>=w&&_)rt(!0),new d.ToastNotification("autoStop"),(0,d.launchSysNotification)("Recording Stopped!","Your desired recording time has expired and the recording has automatically stopped.");else{const r=performance.now()-t;st=setTimeout(ht,200-r>0?200-r:1,e)}}}document.getElementById("autoscroll-console").onclick=e=>{return t=e.target.checked,ct=t,void Ge("consoleAutoscrollEnabled",ct);var t};let pt,mt=performance.now();function gt(e,t=!1){if(Ne?.port?.isOpen){const r=performance.now(),n=Ne.getData(),a=Ne.getTime()??1e3;"hist"===u.SerialManager.orderType?p.addHist(e,n):"chron"===u.SerialManager.orderType&&p.addPulseData(e,n,u.SerialManager.adcChannels),p[`${e}Cps`]=p[e].map((e=>e/a*1e3)),t?(m.resetPlot(p,T),se()):m.updatePlot(p,T);const i=a-mt;mt=a;const o=("chron"===u.SerialManager.orderType?n.length:n.reduce(((e,t)=>e+t),0))/i*1e3;T.push(o),document.getElementById("cps").innerText=o.toFixed(1)+" cps";const l=T.reduce(((e,t)=>e+t),0)/T.length,s=Math.sqrt(T.reduce(((e,t)=>e+(t-l)**2),0)/(T.length-1));document.getElementById("avg-cps").innerText="Avg: "+l.toFixed(1),document.getElementById("avg-cps-std").innerHTML=` ± ${s.toFixed(1)} cps (Δ ${Math.round(s/l*100)}%)`,re();const c=performance.now()-r;pt=setTimeout(gt,b-c>0?b-c:1,e)}}},879:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ToastNotification=void 0,t.launchSysNotification=function(e,t,r=!1){("hidden"===document.visibilityState||r)&&new Notification(e,{lang:"en-US",badge:"/assets/notifications/badge.png",body:t,icon:"/assets/notifications/icon.png"})};const a=n(r(653)),i={updateInstalled:{type:"info",icon:"fa-solid fa-cloud-arrow-down fa-beat animation-slow",header:"Installed Update",body:"An update has been found and installed. You must reload Gamma MCA for the changes to take effect.

You can also continue on this page without reloading for now."},fileError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"File Error",body:"Something went wrong, please reload and try again or report this issue."},settingError:{type:"danger",delay:4e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Settings Error",body:"Something went wrong when trying to change a settings value, please reload and try again or report this issue."},settingType:{type:"danger",delay:4e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Wrong Datatype",body:"A settings value cannot be changed because the input value datatype is not correct."},settingSuccess:{type:"success",delay:2e3,icon:"fas fa-check-circle fa-beat animation-slow",header:"Changed Setting",body:"A settings value has been changed successfully."},serialConnectError:{type:"danger",delay:8e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Serial Connection Error",body:"Could not connect to the serial device. Maybe the port is already in use?"},miscSerialError:{type:"danger",delay:8e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Serial Error",body:"Something went terribly wrong when trying to read from the serial port! Did you disconnect the device? Please try again."},serialDisconnect:{type:"info",delay:5e3,icon:"fas fa-info-circle fa-beat animation-slow",header:"Serial Disconnect",body:"A serial device was removed."},autoStop:{type:"info",icon:"fas fa-info-circle fa-beat animation-slow",header:"Recording Stopped",body:"Your set time-limit has run out. The recording has been automatically stopped. Changing this limit can be done in the settings."},dataError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"File Error",body:"Background and spectrum have a different number of channels. They must be same for this to work."},fileEmptyError:{type:"warning",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"No Data",body:"You are trying to export a file, but there is not data to export. Please try again when there is data to export."},smaError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"SMA Error",body:"SMA input is invalid. Input must be an integer!"},calibrationApplyError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Calibration Error",body:"Cannot calibrate. Need at least two calibration points with valid numbers!"},calibrationImportError:{type:"danger",delay:6e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Calibration Import Error",body:"Something went wrong when importing the calibration. Please reload and try again or report this issue."},serialConnect:{type:"info",delay:5e3,icon:"fas fa-info-circle fa-beat animation-slow",header:"Serial Connect",body:"Detected a new serial device."},welcomeMessage:{type:"primary",icon:"fas fa-radiation fa-beat animation-slow",header:"Welcome!",body:'

Thank you for using Gamma MCA, please report any bugs or issues on GitHub/Issues.

If you\'re new to this, you can have a look at the trailer on Youtube.

'},saveMultipleAtOnce:{type:"warning",delay:8e3,icon:"fas fa-exclamation-triangle fa-shake",header:"File Save Error",body:"

You tried to save (overwrite) multiple files at once. This is not supported due to the risk of data loss.

If you want to combine and save data from different files, please use the Save As function.

"},saveFile:{type:"success",delay:3e3,icon:"fas fa-check-circle fa-beat animation-slow",header:"Saved File",body:"Successfully saved data to the file system."},reportError:{type:"warning",delay:5e3,icon:"fas fa-exclamation-triangle fa-shake",header:"Missing Data",body:"Cannot generate a report since there is no data. Please try again when there is data to analyze."}};t.ToastNotification=class{toastElement;toast;toastContainer;constructor(e){if(this.toastContainer=document.getElementById("toast-container"),!this.toastContainer)return void console.error("Toast container does not exist:",this.toastContainer);const t=i[e];if(!t)return void console.error("Not a valid notification:",e,t);const r=document.createElement("div");r.className=`toast text-bg-${t.type}`,r.setAttribute("role","alert"),r.setAttribute("aria-live","assertive"),r.setAttribute("aria-atomic","true"),t.delay?(r.setAttribute("data-bs-autohide","true"),r.setAttribute("data-bs-delay",t.delay.toString())):r.setAttribute("data-bs-autohide","false");const n=document.createElement("div");r.appendChild(n),n.className="toast-header",n.innerHTML=` ${t.header}${(new Date).toLocaleString()}`;const o=document.createElement("div");r.appendChild(o),o.className="toast-body",o.innerHTML=t.body,this.toastContainer.appendChild(r),this.toastElement=r,this.toastElement.addEventListener("hidden.bs.toast",(()=>{this.toastElement&&this.toastElement.remove(),this.toastElement=void 0,this.toast=void 0})),this.toast=new a.default(r),this.toast.show()}}},9340:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SpectrumPlot=t.CalculateFWHM=t.SeekClosest=void 0;const a=n(r(8956)),i=n(r(5312));class o{static seekWidth=2;isoList;constructor(e){const t={},r=Object.keys(e);for(const n of r){const r=e[n];for(const e of r)t[e]=n}this.isoList=t}seek(e,t=o.seekWidth){const r=Object.keys(this.isoList).filter((r=>!!r&&Math.abs(parseFloat(r)-e)<=t)).map((e=>parseFloat(e)));if(r.length){const t=r.reduce(((t,r)=>Math.abs(r-e)e-t)),this.calibratedBins=t,this.yAxis=r}energyToBin(){const e=this.peakList.length,t=this.calibratedBins.length,r=[];let n=0;for(let a=0;athis.peakList[n]&&(r.push(a),n++,n>=e));a++);return r}linearInterp(e,t,r,n,a){const i=(t-n)/(e-r);return(a-(t-i*e))/i}compute(){const e=this.energyToBin(),t={};for(const r in e){const n=e[r],a=this.peakList[r],i=a*l.resolutionLimit,o=a-i/2,s=this.yAxis[n]/2;let c=n,u=this.calibratedBins[c],d=this.yAxis[c];for(;u>o&&d>s;)c--,u=this.calibratedBins[c],d=this.yAxis[c];const f=a-this.linearInterp(u,d,this.calibratedBins[c+1],this.yAxis[c+1],s);if(l.fastMode){t[a]=2*f;continue}const h=a+i/2;let p=n,m=this.calibratedBins[p],g=this.yAxis[p];for(;ms;)p++,m=this.calibratedBins[p],g=this.yAxis[p];const v=this.linearInterp(m,g,this.calibratedBins[p-1],this.yAxis[p-1],s)-a;t[a]=f+v}return t}getResolution(){const e=this.compute(),t={};for(const[r,n]of Object.entries(e)){const e=parseFloat(r);t[e]=n/e}return t}}t.CalculateFWHM=l,t.SpectrumPlot=class{plotDiv;type="default";xAxis="linear";yAxis="linear";linePlot=!1;downloadFormat="png";darkMode=!1;plotBgDark="#3f4448";plotBgLight="#ffffff";paperBgDark="#212529";paperBgLight="#ffffff";fontColorLight="#444444";fontColorDark="#dee2e6";gridColorLight="#eeeeee";gridColorDark="#515151";annoBgLight="rgba(255,255,255,0.4)";annoBgDark="rgba(0,0,0,0.4)";cpsSwitchLimit=1;evolutionPointLimit=1e4;sma=!1;smaLength=8;calibration={enabled:!1,imported:!1,points:{},coeff:{c1:0,c2:0}};cps=!1;enhanceEfficiency=!1;shapes=[];annotations=[];editableMode=!1;isotopeSeeker;peakConfig={enabled:!1,mode:void 0,thres:.008,lag:50,showFWHM:!0,newPeakStyle:!0,lines:[]};gaussSigma=2;customExportButton={name:"exportPlot",title:"Export plot as HTML",icon:a.default.Icons.disk,direction:"up",click:e=>{const t=JSON.parse(JSON.stringify(e.layout));t.images[0].source=new URL("/assets/logo.svg",window.location.origin).href;const r={x:1,y:0,opacity:.9,xref:"paper",yref:"paper",xanchor:"right",yanchor:"bottom",text:window.location.origin,showarrow:!1,font:{size:10}};t.annotations.push(r);const n=` \n \x3c!-- Gamma MCA Interactive Export Version 1.2 by NuclearPhoenix. https://spectrum.nuclearphoenix.xyz. --\x3e\n \n \n \n \n \n
\n \r\n \r\n \r\n \\\r\n `;\r\n\r\n const element = document.createElement('a');\r\n element.setAttribute('href', `data:text/plain;charset=utf-8,${encodeURIComponent(text)}`);\r\n element.setAttribute('download', 'gamma_mca_export.html');\r\n element.style.display = 'none';\r\n element.click();\r\n }};\r\n private customFullscreenButton = {\r\n name: 'fullscreen',\r\n title: 'Toggle Fullscreen',\r\n icon: Plotly.Icons.drawrect,\r\n direction: 'up',\r\n click: (plotElement: PlotlyHTMLElement) => {\r\n plotElement.classList.toggle('fullscreen');\r\n Plotly.update(plotElement, {}, {});\r\n }};\r\n gaussValues: GaussData = {\r\n dataArray: [],\r\n sigma: 0\r\n };\r\n\r\n /*\r\n Constructor\r\n */\r\n constructor(divId: string) {\r\n this.plotDiv = document.getElementById(divId);\r\n }\r\n /*\r\n Get An Array with Length == Data.length containing ascending numbers\r\n */\r\n private getXAxis(len: number, step: number = 1): number[] {\r\n const xArray: number[] = [];\r\n for (let i = 0; i < len; i += step) {\r\n xArray.push(i);\r\n }\r\n return xArray;\r\n }\r\n /*\r\n Delete calibration points and calibration coefficients\r\n */\r\n clearCalibration(): void {\r\n this.calibration.points = {};\r\n this.calibration.coeff = {\r\n c1: 0,\r\n c2: 0,\r\n };\r\n this.calibration.imported = false;\r\n }\r\n /*\r\n Compute the coefficients used for calibration\r\n */\r\n async computeCoefficients(): Promise {\r\n const data: DataPoint[] = [];\r\n\r\n for (const [bin, energy] of Object.entries(this.calibration.points)) {\r\n data.push([parseFloat(bin), energy]);\r\n }\r\n\r\n const result = regression.polynomial(data, { order: data.length - 1, precision: 10 });\r\n const terms = result.equation.reverse();\r\n \r\n for (let i = 0; i < data.length; i++) {\r\n this.calibration.coeff[`c${i+1}`] = terms[i];\r\n }\r\n }\r\n /*\r\n Get the calibrated x-axis using the values in this.calibration\r\n */\r\n getCalAxis(len: number): number[] {\r\n const calArray: number[] = [];\r\n\r\n for (let i = 0; i < len; i++) {\r\n let val = 0;\r\n\r\n for (let j = 0; j < Object.keys(this.calibration.coeff).length; j++) {\r\n const c = this.calibration.coeff[`c${j+1}`] ?? 0;\r\n val += c * i ** j;\r\n }\r\n\r\n calArray.push(val);\r\n }\r\n\r\n return calArray;\r\n }\r\n /*\r\n Get The Moving Average\r\n */\r\n private computeMovingAverage(target: number[], length = this.smaLength): number[] {\r\n const newData: number[] = Array(target.length);\r\n const half = Math.round(length/2);\r\n\r\n for (let i = 0; i < newData.length; i++) { // Compute the central moving average\r\n if (i >= half && i <= target.length - half - 1) { // Shortcut\r\n const remainderIndexFactor = length % 2;\r\n\r\n const addVal = target[i+half-remainderIndexFactor];\r\n const removeVal = target[i-half];\r\n\r\n newData[i] = newData[i - 1] + (addVal - removeVal) / length;\r\n continue; // Skip other computation.\r\n }\r\n\r\n let val = 0;\r\n let divider = 0;\r\n\r\n for (let j = 0; j < length; j++) { // Slightly asymetrical to the right with even numbers of smaLength\r\n if (j < half) {\r\n if ((i - j) >= 0) {\r\n val += target[i - j];\r\n divider++;\r\n }\r\n } else {\r\n if ((i - half+1 + j) < newData.length) {\r\n val += target[i - half+1 + j];\r\n divider++;\r\n }\r\n }\r\n }\r\n newData[i] = val / divider;\r\n }\r\n return newData;\r\n }\r\n /*\r\n Clear all lines placed by the peak finder\r\n */\r\n clearPeakFinder(): void {\r\n if (this.peakConfig.lines.length) {\r\n const lines = this.peakConfig.lines\r\n for (const line of lines) {\r\n this.toggleLine(line, '', false);\r\n }\r\n this.peakConfig.lines = [];\r\n }\r\n }\r\n /*\r\n Show any peaks that have been found by marking in the plot\r\n */\r\n private drawPeakFinder(xAxis: number[], peakArray: number[], heightAxis: number[]): void {\r\n for (let result of peakArray) {\r\n const resultBin = Math.round(result);\r\n const height = heightAxis[resultBin];\r\n if (this.calibration.enabled) result = xAxis[resultBin];\r\n\r\n if (height >= 0) {\r\n if (this.peakConfig.mode === 'energy') {\r\n this.toggleLine(result, Math.round(result).toString(), true, height);\r\n this.peakConfig.lines.push(result);\r\n } else if (this.peakConfig.mode === 'isotopes') { // Isotope Mode\r\n if (!this.isotopeSeeker) throw 'No isotope seeker found!';\r\n\r\n const { energy, name } = this.isotopeSeeker.seek(result/*, size*/);\r\n if (energy && name) {\r\n this.toggleLine(energy, name, true, height);\r\n this.peakConfig.lines.push(energy);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n /*\r\n Find peaks in the height data by using two different moving averages\r\n */\r\n peakFinder(heightData: number[]): number[] {\r\n this.clearPeakFinder();\r\n\r\n const blankXAxis = this.getXAxis(heightData.length);\r\n\r\n const longData = this.computeMovingAverage(heightData, this.peakConfig.lag);\r\n\r\n const maxVal = Math.max(...heightData);\r\n const peakLines: number[] = [];\r\n\r\n const shortLen = heightData.length;\r\n\r\n for (let i = 0; i < shortLen; i++) {\r\n if (heightData[i] - longData[i] > this.peakConfig.thres * maxVal) peakLines.push(blankXAxis[i]);\r\n }\r\n\r\n let values: number[] = [];\r\n peakLines.push(0);\r\n\r\n const peakLen = peakLines.length;\r\n\r\n const peakArray: number[] = [];\r\n\r\n for (let i = 0; i < peakLen; i++) {\r\n values.push(peakLines[i]);\r\n\r\n if (Math.abs(peakLines[i + 1] - peakLines[i]) > 2) { // Check if adjacent bins, i.e. one connected peak\r\n let result = 0;\r\n\r\n if (values.length === 1) {\r\n result = peakLines[i];\r\n } else {\r\n for (const val of values) {\r\n result += val;\r\n }\r\n result /= values.length;\r\n }\r\n\r\n peakArray.push(result);\r\n\r\n values = [];\r\n }\r\n }\r\n\r\n return peakArray;\r\n }\r\n /*\r\n Convenient Wrapper, could do more in the future\r\n */\r\n resetPlot(spectrumData: SpectrumData, cpsValues: number[] = []): void {\r\n if (this.type === 'calibration') this.plotCalibration(spectrumData, false); // Plot calibration chart\r\n if (this.type === 'evolution') this.plotEvolution(cpsValues, false); // Plot radiation evolution chart\r\n\r\n this.plotData(spectrumData, false); // Update the default spectrum plot\r\n }\r\n /*\r\n Convenient Wrapper, could do more in the future\r\n */\r\n updatePlot(spectrumData: SpectrumData, cpsValues: number[] = []): void {\r\n if (this.type === 'calibration') this.plotCalibration(spectrumData, true); // Plot calibration chart\r\n if (this.type === 'evolution') this.plotEvolution(cpsValues, true); // Plot radiation evolution chart\r\n\r\n this.plotData(spectrumData, true); // Update the default spectrum plot\r\n }\r\n /*\r\n Add a line\r\n */\r\n toggleLine(energy: number, name: string, enabled = true, height = -1): void {\r\n //name = name.replaceAll('-',''); // Remove - to save space\r\n const hovertext = energy.toFixed(2);\r\n\r\n if (enabled) {\r\n const newLine: ShapePlus = {\r\n type: 'line',\r\n xref: 'x',\r\n yref: 'paper',\r\n x0: energy,\r\n y0: 0,\r\n x1: energy,\r\n y1: 1,\r\n //fillcolor: 'black',\r\n line: {\r\n color: 'blue',\r\n width: 0.8,\r\n dash: 'dot'\r\n },\r\n opacity: 0.66\r\n };\r\n const newAnno: AnnoPlus = {\r\n x: this.xAxis === 'log' ? Math.log10(energy) : energy,\r\n y: 1,\r\n xref: 'x',\r\n yref: 'paper',\r\n text: name,\r\n showarrow: true,\r\n arrowcolor: this.darkMode ? this.fontColorDark : this.fontColorLight,\r\n arrowhead: 7,\r\n ax: 0,\r\n ay: -20,\r\n hovertext: hovertext,\r\n font: {\r\n size: 11,\r\n },\r\n };\r\n\r\n if (height >= 0 && this.peakConfig.newPeakStyle) {\r\n //newLine.yref = 'y';\r\n newLine.y0 = 0;\r\n //newLine.y1 = height;\r\n newLine.y1 = 0;\r\n newLine.line.width = 0;\r\n //newLine.line.width = 2;\r\n\r\n newAnno.y = (this.yAxis === 'log' ? Math.log10(height) : height) * 1.03;\r\n newAnno.yref = 'y';\r\n newAnno.arrowhead = 1;\r\n newAnno.arrowsize = 0.8;\r\n newAnno.ay = -40;\r\n newAnno.bgcolor = this.darkMode ? this.annoBgDark : this.annoBgLight;\r\n }\r\n\r\n for (const shape of this.shapes) {\r\n if (shape.x0 === newLine.x0) return;\r\n }\r\n\r\n for (const anno of this.annotations) {\r\n if (anno.hovertext === newAnno.hovertext) return;\r\n }\r\n\r\n // Not a duplicate\r\n this.shapes.push(newLine);\r\n this.annotations.push(newAnno);\r\n } else {\r\n for (const i in this.shapes) {\r\n if (this.shapes[i].x0 === energy) this.shapes.splice(parseInt(i),1);\r\n }\r\n for (const i in this.annotations) {\r\n if (this.annotations[i].hovertext === hovertext) this.annotations.splice(parseInt(i),1);\r\n }\r\n }\r\n }\r\n /*\r\n Clear annotations and shapes\r\n */\r\n clearAnnos(): void {\r\n this.shapes = [];\r\n this.annotations = [];\r\n }\r\n /*\r\n Switch between different chart types\r\n */\r\n setChartType(type: ChartType, dataObj: SpectrumData, cpsValues: number[] = []): void {\r\n this.type = type;\r\n\r\n switch (type) {\r\n case 'evolution': {\r\n this.plotEvolution(cpsValues, false)\r\n break;\r\n }\r\n case 'calibration': {\r\n this.plotCalibration(dataObj, false)\r\n break;\r\n }\r\n default: {\r\n this.plotData(dataObj, false);\r\n }\r\n }\r\n }\r\n /*\r\n Compute gaussValues for the Gaussian correlation filter\r\n */\r\n computeGaussValues(index: number, xMin: number, xMax: number): number[] {\r\n const gaussValues: number[] = [];\r\n for (let k = xMin; k < xMax; k++) {\r\n gaussValues.push(Math.exp(- k * k / (2 * index)));\r\n }\r\n\r\n let avg = 0;\r\n for (const value of gaussValues) {\r\n avg += value;\r\n }\r\n avg /= (xMax - xMin);\r\n\r\n let squaredSum = 0;\r\n for (const value of gaussValues) {\r\n squaredSum += (value - avg) * (value - avg);\r\n }\r\n\r\n for (const index in gaussValues) {\r\n gaussValues[index] = (gaussValues[index] - avg) / squaredSum;\r\n }\r\n\r\n return gaussValues;\r\n }\r\n /*\r\n Gaussian correlation filter using the PRA algorithm\r\n */\r\n private gaussianCorrel(data: number[], sigma = 2): number[] {\r\n const correlValues = Array(data.length);\r\n let computeNew = false;\r\n\r\n // Only compute values once, until other factors change\r\n if (data.length !== this.gaussValues.dataArray.length || sigma !== this.gaussValues.sigma) {\r\n this.gaussValues.dataArray = Array(data.length);\r\n this.gaussValues.sigma = sigma;\r\n computeNew = true;\r\n }\r\n\r\n for (let index = 0; index < data.length; index++) {\r\n const std = Math.sqrt(index);\r\n const xMin = - Math.round(sigma * std);\r\n const xMax = Math.round(sigma * std);\r\n\r\n if (computeNew) this.gaussValues.dataArray[index] = this.computeGaussValues(index, xMin, xMax);\r\n\r\n const gaussValues = this.gaussValues.dataArray[index];\r\n\r\n let resultVal = 0;\r\n\r\n for (let k = xMin; k < xMax; k++) {\r\n resultVal += data[index + k] * gaussValues[k - xMin];\r\n }\r\n\r\n const value = (resultVal && resultVal > 0 ) ? resultVal : 0;\r\n correlValues[index] = value;\r\n }\r\n\r\n const scalingFactor = .8 * Math.max(...data) / Math.max(...correlValues); // Scale GCF values depending on the spectrum data\r\n correlValues.forEach((value, index, array) => array[index] = value * scalingFactor);\r\n\r\n return correlValues;\r\n }\r\n /*\r\n Limit array size by decreasing resolution/number of points to boost performance of plot refreshs\r\n */\r\n private limitArraySize(originalArray: number[], targetSize: number): number[] {\r\n if (targetSize <= 1) {\r\n return originalArray; // The original array is small enough to be printed without reducing resolution\r\n }\r\n \r\n const resultArray: number[] = [];\r\n const originalSize = originalArray.length;\r\n \r\n for (let i = 0; i < originalSize; i += targetSize) {\r\n const chunk = originalArray.slice(i, i + targetSize);\r\n const average = chunk.reduce((sum, value) => sum + value, 0) / chunk.length;\r\n resultArray.push(average);\r\n }\r\n \r\n return resultArray;\r\n }\r\n /*\r\n Plot Radiation Evolution Chart\r\n */\r\n private plotEvolution(cpsValues: number[], update: boolean): void {\r\n if (!this.plotDiv) return; // No valid HTMLElement for the plot to show\r\n\r\n const targetSize = Math.ceil(cpsValues.length / this.evolutionPointLimit);\r\n const xAxis = this.getXAxis(cpsValues.length, targetSize);\r\n const yAxis = this.limitArraySize(cpsValues, targetSize);\r\n\r\n const trace: Trace = {\r\n name: 'Radiation Evolution',\r\n x: xAxis,\r\n y: yAxis,\r\n mode: 'lines',\r\n type: 'scatter',\r\n //fill: 'tozeroy',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'orangered',\r\n width: 1.5,\r\n shape: 'spline'\r\n }\r\n };\r\n\r\n const averageTrace: Trace = {\r\n name: 'Moving Average',\r\n x: xAxis,\r\n y: this.computeMovingAverage(yAxis),\r\n mode: 'lines',\r\n type: 'scatter',\r\n //fill: 'tozeroy',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'darkblue',\r\n width: 2,\r\n shape: 'spline'\r\n }\r\n };\r\n\r\n const layout: LayoutPlus = {\r\n uirevision: 1,\r\n autosize: true, // Needed for resizing on update\r\n title: 'Radiation Evolution',\r\n hovermode: 'x',\r\n legend: {\r\n orientation: 'h',\r\n y: -0.35,\r\n },\r\n xaxis: {\r\n title: 'Measurement Point [1]',\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n autorangeoptions: {\r\n minallowed: 0\r\n },\r\n rangeslider: {\r\n borderwidth: 1\r\n },\r\n showspikes: true, //Show spike line for X-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n ticksuffix: '',\r\n hoverformat: ',.2~f',\r\n exponentformat: 'none',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n yaxis: {\r\n title: 'Counts Per Second [s-1]',\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n showspikes: true, //Show spike line for Y-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n showticksuffix: 'last',\r\n ticksuffix: 'cps',\r\n //tickformat: '.02s',\r\n hoverformat: '.4~s',\r\n //showexponent: 'last',\r\n exponentformat: 'SI',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n plot_bgcolor: this.darkMode ? this.plotBgDark : this.plotBgLight,\r\n paper_bgcolor: this.darkMode ? this.paperBgDark : this.paperBgLight,\r\n font: {\r\n color: this.darkMode ? this.fontColorDark : this.fontColorLight,\r\n },\r\n margin: {\r\n l: 40,\r\n r: 40,\r\n b: 50,\r\n t: 55,\r\n //pad: 4,\r\n },\r\n images: [{\r\n x: 0.99,\r\n y: 0.99,\r\n opacity: 0.4,\r\n sizex: 0.15,\r\n sizey: 0.15,\r\n source: '/assets/logo.svg',\r\n xanchor: 'right',\r\n xref: 'paper',\r\n yanchor: 'top',\r\n yref: 'paper',\r\n }],\r\n annotations: []\r\n };\r\n\r\n const config: Partial = {\r\n responsive: true,\r\n scrollZoom: false,\r\n //displayModeBar: true,\r\n displaylogo: false,\r\n toImageButtonOptions: {\r\n format: this.downloadFormat,\r\n filename: 'gamma_mca_evolution',\r\n },\r\n editable: this.editableMode,\r\n modeBarButtons: [\r\n ['zoom2d'],\r\n ['zoomIn2d', 'zoomOut2d'],\r\n ['autoScale2d', 'resetScale2d'],\r\n ['toImage'],\r\n [this.customExportButton],\r\n [this.customFullscreenButton]\r\n ]\r\n };\r\n\r\n Plotly[update ? 'react' : 'newPlot'](this.plotDiv, [trace, averageTrace], layout, config);\r\n }\r\n /*\r\n Plot Calibration Chart\r\n */\r\n private plotCalibration(dataObj: SpectrumData, update: boolean): void {\r\n if (!this.plotDiv) return; // No valid HTMLElement for the plot to show\r\n\r\n let axisSize = dataObj.data.length;\r\n\r\n if (Object.keys(this.calibration.points).length) {\r\n const maxBin = Object.keys(this.calibration.points).reduce((max, c) => parseFloat(c) > parseFloat(max) ? c : max);\r\n axisSize = Math.max(dataObj.data.length, parseFloat(maxBin)) + 1;\r\n }\r\n\r\n const trace: Trace = {\r\n name: 'Calibration',\r\n x: this.getXAxis(axisSize),\r\n y: this.getCalAxis(axisSize),\r\n mode: 'lines', // Remove lines, \"lines\", \"none\"\r\n type: 'scatter',\r\n fill: 'tozeroy',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'orangered',\r\n width: 1,\r\n }\r\n };\r\n\r\n const markersTrace: Trace = {\r\n name: 'Calibration Points',\r\n x: [],\r\n y: [],\r\n mode: 'text+markers',\r\n type: 'scatter',\r\n marker: {\r\n //symbol: 'cross-thin',\r\n size: 8,\r\n color: '#444444',\r\n //line: {\r\n // color: 'black',\r\n // width: 2\r\n //}\r\n },\r\n text: [],\r\n textposition: 'top center',\r\n };\r\n\r\n let index = 0;\r\n\r\n for (const [bin, energy] of Object.entries(this.calibration.points)) {\r\n markersTrace.x.push(parseFloat(bin));\r\n markersTrace.y.push(energy);\r\n markersTrace.text?.push(`Point ${index+1}`);\r\n index++;\r\n }\r\n\r\n const layout: LayoutPlus = {\r\n uirevision: 1,\r\n autosize: true, // Needed for resizing on update\r\n title: 'Calibration',\r\n hovermode: 'x',\r\n legend: {\r\n orientation: 'h',\r\n y: -0.35,\r\n },\r\n xaxis: {\r\n title: 'Bin [1]',\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n autorangeoptions: {\r\n minallowed: 0\r\n },\r\n rangeslider: {\r\n borderwidth: 1\r\n },\r\n showspikes: true, //Show spike line for X-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n ticksuffix: '',\r\n hoverformat: ',.2~f',\r\n exponentformat: 'none',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n yaxis: {\r\n title: 'Energy [keV]',\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true, //'max',\r\n autorangeoptions: {\r\n minallowed: 0\r\n },\r\n //range: [0, null],\r\n showspikes: true, //Show spike line for Y-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n showticksuffix: 'last',\r\n ticksuffix: ' keV',\r\n showexponent: 'last',\r\n exponentformat: 'none',\r\n hoverformat: ',.2~f',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n plot_bgcolor: this.darkMode ? this.plotBgDark : this.plotBgLight,\r\n paper_bgcolor: this.darkMode ? this.paperBgDark : this.paperBgLight,\r\n font: {\r\n color: this.darkMode ? this.fontColorDark : this.fontColorLight,\r\n },\r\n margin: {\r\n l: 40,\r\n r: 40,\r\n b: 50,\r\n t: 55,\r\n //pad: 4,\r\n },\r\n images: [{\r\n x: 0.99,\r\n y: 0.99,\r\n opacity: 0.4,\r\n sizex: 0.15,\r\n sizey: 0.15,\r\n source: '/assets/logo.svg',\r\n xanchor: 'right',\r\n xref: 'paper',\r\n yanchor: 'top',\r\n yref: 'paper',\r\n }],\r\n annotations: []\r\n };\r\n\r\n const config: Partial = {\r\n responsive: true,\r\n scrollZoom: false,\r\n //displayModeBar: true,\r\n displaylogo: false,\r\n toImageButtonOptions: {\r\n format: this.downloadFormat,\r\n filename: 'gamma_mca_calibration',\r\n },\r\n editable: this.editableMode,\r\n modeBarButtons: [\r\n ['zoom2d'],\r\n ['zoomIn2d', 'zoomOut2d'],\r\n ['autoScale2d', 'resetScale2d'],\r\n ['toImage'],\r\n [this.customExportButton],\r\n [this.customFullscreenButton]\r\n ]\r\n };\r\n\r\n Plotly[update ? 'react' : 'newPlot'](this.plotDiv, [trace, markersTrace], layout, config);\r\n }\r\n /*\r\n Compute data for pulse height histogram with cps, sma, gauss filter and others\r\n */\r\n computePulseHeightData(dataObj: SpectrumData): Trace[] {\r\n const data: Trace[] = [];\r\n\r\n if (dataObj.data.length) {\r\n const trace: Trace = {\r\n name: 'Spectrum',\r\n stackgroup: 'data', // Stack line charts on top of each other\r\n\r\n x: this.getXAxis(dataObj.data.length),\r\n y: dataObj.data,\r\n type: 'scatter',\r\n mode: 'lines', // Remove lines, \"lines\", \"none\"\r\n fill: this.linePlot ? 'none' : 'tonexty',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'orangered',\r\n width: 1,\r\n shape: this.linePlot ? 'linear' : 'hvh',\r\n }\r\n };\r\n\r\n if (this.cps) trace.y = dataObj.dataCps;\r\n data.push(trace);\r\n }\r\n\r\n /*\r\n Compute Background and Corrected Spectrum\r\n */\r\n if (dataObj.background.length) { //== dataObj.data.length)\r\n const bgTrace: Trace = {\r\n name: 'Background',\r\n stackgroup: 'data', // Stack line charts on top of each other\r\n\r\n x: this.getXAxis(dataObj.background.length),\r\n y: dataObj.background,\r\n type: 'scatter',\r\n mode: 'lines', // Remove lines, \"lines\", \"none\"\r\n fill: this.linePlot ? 'none' : 'tonexty',\r\n //opacity: 1,\r\n line: {\r\n color: 'slategrey',\r\n width: 1,\r\n shape: this.linePlot ? 'linear' : 'hvh',\r\n }\r\n };\r\n\r\n if (this.cps) bgTrace.y = dataObj.backgroundCps;\r\n\r\n if (data.length) {\r\n const newData: number[] = []; // Compute the corrected data, i.e. data - background\r\n\r\n const dataLen = data[0].y.length;\r\n for (let i = 0; i < dataLen; i++) {\r\n newData.push(data[0].y[i] - bgTrace.y[i]);\r\n }\r\n\r\n data[0].y = newData;\r\n //data[0].fill = this.linePlot ? 'none' : 'tonexty'; //'tonextx'\r\n data[0].name = 'Net Spectrum';\r\n }\r\n\r\n //data.unshift(bgTrace);\r\n data.push(bgTrace);\r\n }\r\n\r\n /*\r\n Set Simple Moving Average\r\n */\r\n if (this.sma) { // SIMPLE MOVING AVERAGE. MAYBE PLOT IT AS DIFFERENT LINE?\r\n for (const element of data) {\r\n element.y = this.computeMovingAverage(element.y);\r\n }\r\n }\r\n\r\n /*\r\n Energy calibration enabled\r\n */\r\n if (this.calibration.enabled) {\r\n for (const element of data) {\r\n element.x = this.getCalAxis(element.x.length);\r\n }\r\n }\r\n\r\n /*\r\n Qualitative enhancement of detector efficiency\r\n */\r\n if (this.enhanceEfficiency) {\r\n for (const element of data) {\r\n const coeffArr: number[] = [];\r\n for (const value of element.x) {\r\n coeffArr.push(0.00002 * value ** 2 + 0.0045 * value + 0.22);\r\n }\r\n\r\n const newData: number[] = [];\r\n for (const index in element.y) {\r\n newData.push(element.y[index] * coeffArr[index]);\r\n }\r\n\r\n element.y = newData;\r\n }\r\n }\r\n\r\n /*\r\n Peak Detection Stuff\r\n */\r\n if (this.peakConfig.enabled && data.length) {\r\n // Gaussian Correlation Filter\r\n const gaussData = this.gaussianCorrel(data[0].y, this.gaussSigma);\r\n\r\n const eTrace: Trace = {\r\n name: 'Gaussian Correlation',\r\n //stackgroup: 'data', // Stack line charts on top of each other\r\n x: data[0].x,\r\n y: gaussData,\r\n //yaxis: 'y2',\r\n type: 'scatter',\r\n mode: 'lines', // Remove lines, \"lines\", \"none\"\r\n //fill: 'tozeroy',\r\n //opacity: 0.8,\r\n line: {\r\n color: 'black',\r\n width: 0.6,\r\n shape: this.linePlot ? 'linear' : 'hvh',\r\n },\r\n marker: {\r\n color: 'black',\r\n }\r\n };\r\n\r\n data.unshift(eTrace);\r\n }\r\n\r\n return data;\r\n }\r\n /*\r\n Plot All The Data\r\n */\r\n private plotData(dataObj: SpectrumData, update: boolean): void {\r\n if (!this.plotDiv) return; // No valid HTMLElement for the plot to show\r\n if (this.type !== 'default') return; // Ignore this if the calibration chart is currently shown\r\n\r\n /*\r\n All The Layout Stuff\r\n */\r\n const layout: LayoutPlus = {\r\n uirevision: 1,\r\n autosize: true, // Needed for resizing on update\r\n title: 'Energy Spectrum',\r\n hovermode: 'x',\r\n legend: {\r\n orientation: 'h',\r\n y: -0.35,\r\n },\r\n selectdirection: 'h',\r\n activeselection: {\r\n fillcolor: 'blue',\r\n opacity: 0.01\r\n },\r\n newselection: {\r\n line: {\r\n color: 'blue',\r\n width: 1,\r\n dash: 'solid'\r\n }\r\n },\r\n xaxis: {\r\n title: 'Bin [1]',\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n autorangeoptions: {\r\n minallowed: 0\r\n },\r\n type: this.xAxis, // 'linear' or 'log'\r\n rangeslider: {\r\n borderwidth: 1\r\n },\r\n showspikes: true, //Show spike line for X-axis\r\n spikethickness: 1,\r\n spikedash: 'solid',\r\n spikecolor: 'blue',\r\n spikemode: 'across',\r\n //nticks: 20,\r\n //tickformat: '.01f',\r\n hoverformat: ',.2~f',\r\n ticksuffix: '',\r\n exponentformat: 'none',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n yaxis: {\r\n title: 'Counts [1]',\r\n mirror: true,\r\n linewidth: 2,\r\n autorange: true,\r\n fixedrange: false,\r\n type: this.yAxis, // 'linear' or 'log'\r\n //showspikes: true, //Show spike line for Y-axis\r\n //spikethickness: 1,\r\n //spikedash: 'solid',\r\n //spikecolor: 'blue',\r\n //spikemode: 'across',\r\n showticksuffix: 'last',\r\n ticksuffix: 'cts',\r\n //tickformat: '.02s',\r\n hoverformat: '.4~s',\r\n //showexponent: 'last',\r\n exponentformat: 'SI',\r\n automargin: true,\r\n gridcolor: this.darkMode ? this.gridColorDark : this.gridColorLight\r\n },\r\n /*\r\n yaxis2: {\r\n overlaying: 'y',\r\n side: 'right'\r\n },\r\n */\r\n plot_bgcolor: this.darkMode ? this.plotBgDark : this.plotBgLight,\r\n paper_bgcolor: this.darkMode ? this.paperBgDark : this.paperBgLight,\r\n font: {\r\n color: this.darkMode ? this.fontColorDark : this.fontColorLight,\r\n },\r\n margin: {\r\n l: 40,\r\n r: 40,\r\n b: 50,\r\n t: this.peakConfig.newPeakStyle ? 55 : 80,\r\n //autoexpand: true\r\n },\r\n images: [{\r\n x: 0.99,\r\n y: 0.99,\r\n opacity: 0.4,\r\n sizex: 0.15,\r\n sizey: 0.15,\r\n source: '/assets/logo.svg',\r\n xanchor: 'right',\r\n xref: 'paper',\r\n yanchor: 'top',\r\n yref: 'paper',\r\n }],\r\n shapes: [],\r\n annotations: [],\r\n //shapes: this.shapes,\r\n //annotations: JSON.parse(JSON.stringify(this.annotations)), // Copy array but do not reference\r\n };\r\n /*\r\n Set calibrated x-axis\r\n */\r\n if (this.calibration.enabled) {\r\n layout.xaxis.title = 'Energy [keV]';\r\n layout.xaxis.ticksuffix = ' keV';\r\n }\r\n\r\n const config: Partial = {\r\n responsive: true,\r\n scrollZoom: false,\r\n //displayModeBar: true,\r\n displaylogo: false,\r\n toImageButtonOptions: {\r\n format: this.downloadFormat,\r\n filename: 'gamma_mca_spectrum',\r\n },\r\n editable: this.editableMode,\r\n modeBarButtons: [\r\n ['select2d'],\r\n ['zoom2d'],\r\n ['zoomIn2d', 'zoomOut2d'],\r\n ['autoScale2d', 'resetScale2d'],\r\n ['toImage'],\r\n [this.customExportButton],\r\n [this.customFullscreenButton]\r\n ]\r\n };\r\n\r\n const data = this.computePulseHeightData(dataObj); // Get all trace data\r\n\r\n /*\r\n CPS enabled\r\n */\r\n if (this.cps) {\r\n if (data.length > 0) { // Check before, otherwise it will crash recordings instantly when they start!\r\n if (Math.max(...data[0].y) < this.cpsSwitchLimit) { // Less than 1 cps at max, switch to cpm\r\n for (const trace of data) {\r\n trace.y = trace.y.map(value => value * 60);\r\n }\r\n layout.yaxis.title = 'Counts Per Minute [60 s-1]';\r\n layout.yaxis.ticksuffix = 'cpm';\r\n } else { // Enough counts for cpm\r\n layout.yaxis.title = 'Counts Per Second [s-1]';\r\n layout.yaxis.ticksuffix = 'cps';\r\n }\r\n }\r\n }\r\n\r\n /*\r\n Peak Detection Stuff\r\n */\r\n if (this.peakConfig.enabled && data.length > 1) {\r\n const gaussDataX = data[0].x; // Gauss data will always be the first trace\r\n const gaussDataY = data[0].y;\r\n\r\n const peaks = this.peakFinder(gaussDataY);\r\n this.drawPeakFinder(gaussDataX, peaks, data[1].y);\r\n\r\n if (this.peakConfig.showFWHM) {\r\n const peakResolutions = new CalculateFWHM(this.peakConfig.lines, data[1].x, data[1].y).getResolution();\r\n \r\n for (const anno of this.annotations) {\r\n const fwhmValue = peakResolutions[anno.x];\r\n \r\n if (fwhmValue > 0 && fwhmValue < 0.9 * CalculateFWHM.resolutionLimit) anno.text += `
${(fwhmValue * 100).toFixed(1)}%`;\r\n }\r\n }\r\n }\r\n\r\n if (!this.peakConfig.enabled || !data.length || data.length >= 3) data.reverse(); // Change/Fix data order\r\n\r\n layout.shapes = this.shapes;\r\n layout.annotations = JSON.parse(JSON.stringify(this.annotations)); //layout.annotations.concat(JSON.parse(JSON.stringify(this.annotations))); // Copy array but do not reference\r\n\r\n if (this.calibration.enabled) {\r\n for (const anno of layout.annotations) {\r\n anno.hovertext += layout.xaxis.ticksuffix;\r\n }\r\n }\r\n\r\n //setTimeout(Plotly[update ? 'react' : 'newPlot'], 1, this.plotDiv, data, layout, config); // Make plot update async\r\n Plotly[update ? 'react' : 'newPlot'](this.plotDiv, data, layout, config);\r\n }\r\n}\r\n","/*\r\n\r\n Load and process many different file formats to get usable data.\r\n\r\n Gamma MCA: free, open-source web-MCA for gamma spectroscopy\r\n 2022, NuclearPhoenix.- Phoenix1747\r\n https://nuclearphoenix.xyz\r\n\r\n Do not touch my garbage. All the CSV-related stuff is ugly asf.\r\n\r\n*/\r\n\r\n// Import Regression JS\r\nimport regression, { DataPoint } from 'regression';\r\n\r\n// Import all of z-schema's JS\r\nimport ZSchema from 'z-schema';\r\n\r\n// Import other TS modules\r\nimport { CoeffObj } from './plot';\r\n\r\nexport interface JSONParseError {\r\n code: string;\r\n description: string;\r\n}\r\n\r\nexport interface NPESv2 {\r\n schemaVersion: 'NPESv2';\r\n data: NPESv1[];\r\n}\r\n\r\nexport interface NPESv1 {\r\n schemaVersion?: 'NPESv1';\r\n deviceData?: NPESv1DeviceData;\r\n sampleInfo?: NPESv1SampleInfo;\r\n resultData: NPESv1ResultData;\r\n}\r\n\r\nexport interface NPESv1Spectrum {\r\n numberOfChannels: number;\r\n validPulseCount?: number;\r\n measurementTime?: number;\r\n energyCalibration?: {\r\n polynomialOrder: number;\r\n coefficients: number[];\r\n };\r\n spectrum: number[];\r\n}\r\n\r\ninterface NPESv1ResultData {\r\n startTime?: string;\r\n endTime?: string;\r\n energySpectrum?: NPESv1Spectrum;\r\n backgroundEnergySpectrum?: NPESv1Spectrum;\r\n}\r\n\r\ninterface NPESv1DeviceData {\r\n deviceName?: string;\r\n softwareName: string;\r\n}\r\n\r\ninterface NPESv1SampleInfo {\r\n name?: string;\r\n location?: string;\r\n time?: string;\r\n weight?: number;\r\n volume?: number;\r\n note?: string;\r\n}\r\n\r\ninterface XMLImportData {\r\n espectrum: number[];\r\n bgspectrum: number[];\r\n coeff: CoeffObj;\r\n meta: ImportDataMeta;\r\n}\r\n\r\ninterface ImportDataMeta {\r\n name: string;\r\n location: string;\r\n time: string;\r\n weight?: number;\r\n volume?: number;\r\n notes: string;\r\n deviceName: string;\r\n startTime: string;\r\n endTime: string;\r\n dataMt: number; // Measurement time for the energy spectrum\r\n backgroundMt: number; // Measurement time for the background energy spectrum\r\n}\r\n\r\ninterface SchemaJSONStorage {\r\n NPESv1: NPESv1 | undefined;\r\n NPESv2: NPESv2 | undefined;\r\n}\r\n\r\ninterface CSVData {\r\n histogramData: number[];\r\n calibrationCoefficients: number[] | undefined;\r\n}\r\n\r\nexport class RawData {\r\n valueIndex: number;\r\n delimiter: string;\r\n adcChannels = 4096; // For OGD\r\n fileType: number;\r\n private tempValIndex: number;\r\n private schemaURLTable = {\r\n NPESv1: '/assets/npes-1.schema.json',\r\n NPESv2: '/assets/npes-2.schema.json'\r\n };\r\n private schemaJSON: SchemaJSONStorage = {\r\n NPESv1: undefined,\r\n NPESv2: undefined\r\n };\r\n\r\n constructor(valueIndex: number, delimiter = ',') {\r\n this.valueIndex = valueIndex;\r\n this.delimiter = delimiter;\r\n this.fileType = valueIndex;\r\n this.tempValIndex = valueIndex;\r\n }\r\n\r\n private checkLines(value: string): boolean {\r\n const values = value.split(this.delimiter);\r\n\r\n if (isNaN(parseFloat(values[0].trim()))) return false;\r\n if (values.length === 1) this.tempValIndex = 0; // Work-Around for files with only one column\r\n\r\n return values.length > this.tempValIndex;\r\n }\r\n\r\n private parseLines(value: string): number {\r\n const values = value.split(this.delimiter);\r\n return parseFloat(values[this.tempValIndex].trim());\r\n }\r\n\r\n private histConverter(dataArr: number[]): number[] {\r\n const xArray: number[] = Array(this.adcChannels).fill(0);\r\n\r\n for (const element of dataArr) {\r\n xArray[element] += 1;\r\n }\r\n return xArray;\r\n }\r\n\r\n private parseCalibration(valueArray: string[]): number[] | undefined {\r\n if (!this.tempValIndex) return undefined; // Only one column, return no calibration\r\n if (valueArray.length < 3) return undefined; // Not enough data to get the coefficients, return no calibration\r\n\r\n const xEnergyData = valueArray.map((value) => parseFloat(value.split(this.delimiter)[0].trim())/*, this*/);\r\n const regressionArray: DataPoint[] = [];\r\n\r\n for (const index in xEnergyData) {\r\n regressionArray.push([parseInt(index), xEnergyData[index]]);\r\n }\r\n\r\n const result = regression.polynomial(regressionArray, { order: 4, precision: 10 }); // Use degree 4 for a good default calibration\r\n\r\n return result.equation.reverse();\r\n }\r\n\r\n csvToArray(data: string): CSVData {\r\n this.tempValIndex = this.valueIndex; // RESET VALUE INDEX\r\n\r\n const returnData: CSVData = {\r\n histogramData: [],\r\n calibrationCoefficients: undefined\r\n };\r\n\r\n if (this.fileType === 1) { // HISTOGRAM\r\n const dataLines = data.split('\\n').filter(this.checkLines, this);\r\n\r\n returnData.calibrationCoefficients = this.parseCalibration(dataLines); // Get linear calibration data\r\n returnData.histogramData = dataLines.map(this.parseLines, this);\r\n } else { // CHRONOLOGICAL STREAM\r\n const dataEvents = data.split(this.delimiter).filter(this.checkLines, this);\r\n\r\n returnData.histogramData = this.histConverter(dataEvents.map(this.parseLines, this));\r\n }\r\n\r\n return returnData;\r\n }\r\n\r\n xmlToArray(data: string): XMLImportData {\r\n const coeff: CoeffObj = {\r\n c1: 0,\r\n c2: 0,\r\n c3: 0\r\n };\r\n const meta: ImportDataMeta = {\r\n name: '',\r\n location: '',\r\n time: '',\r\n notes: '',\r\n deviceName: '',\r\n startTime: '',\r\n endTime: '',\r\n dataMt: 0,\r\n backgroundMt: 0\r\n };\r\n\r\n try {\r\n const xmlDoc = new DOMParser().parseFromString(data, 'text/xml');\r\n const especTop = xmlDoc.getElementsByTagName('EnergySpectrum');\r\n let espectrum = [];\r\n let bgspectrum = [];\r\n\r\n if (especTop[0]) {\r\n const espec = especTop[0].getElementsByTagName('DataPoint');\r\n\r\n espectrum = Array.from(espec).map(item => parseFloat(item.textContent ?? '-1'));\r\n\r\n meta.dataMt = parseFloat(especTop[0].getElementsByTagName('MeasurementTime')[0]?.textContent?.trim() ?? '1');\r\n }\r\n\r\n const bgspecTop = xmlDoc.getElementsByTagName('BackgroundEnergySpectrum');\r\n\r\n if (bgspecTop[0]) {\r\n const bgspec = bgspecTop[0].getElementsByTagName('DataPoint');\r\n\r\n bgspectrum = Array.from(bgspec).map(item => parseFloat(item.textContent ?? '-1'));\r\n\r\n meta.backgroundMt = parseFloat(bgspecTop[0].getElementsByTagName('MeasurementTime')[0]?.textContent?.trim() ?? '1');\r\n }\r\n\r\n const calCoeffsTop = xmlDoc.getElementsByTagName('EnergySpectrum')[0];\r\n\r\n if (calCoeffsTop) {\r\n const calCoeffs = calCoeffsTop.getElementsByTagName('Coefficient');\r\n\r\n const coeffNumArray = Array.from(calCoeffs).map(item => parseFloat((item.textContent ?? '0')));\r\n\r\n for (const i in coeffNumArray) {\r\n coeff['c' + (parseInt(i) + 1).toString()] = coeffNumArray[parseInt(i)];\r\n }\r\n }\r\n\r\n const rdl = xmlDoc.getElementsByTagName('SampleInfo')[0];\r\n\r\n meta.name = rdl?.getElementsByTagName('Name')[0]?.textContent?.trim() ?? '';\r\n meta.location = rdl?.getElementsByTagName('Location')[0]?.textContent?.trim() ?? '';\r\n meta.time = rdl?.getElementsByTagName('Time')[0]?.textContent?.trim() ?? '';\r\n meta.notes = rdl?.getElementsByTagName('Note')[0]?.textContent?.trim() ?? '';\r\n\r\n let val = parseFloat(rdl?.getElementsByTagName('Weight')[0]?.textContent?.trim() ?? '0');\r\n if (val > 0) meta.weight = val*1000; // Convert from kg to g\r\n\r\n val = parseFloat(rdl?.getElementsByTagName('Volume')[0]?.textContent?.trim() ?? '0'); // Convert from L to ml\r\n if (val > 0) meta.volume = val*1000;\r\n\r\n meta.deviceName = xmlDoc.getElementsByTagName('DeviceConfigReference')[0]?.getElementsByTagName('Name')[0]?.textContent?.trim() ?? '';\r\n\r\n meta.startTime = xmlDoc.getElementsByTagName('StartTime')[0]?.textContent?.trim() ?? '';\r\n meta.endTime = xmlDoc.getElementsByTagName('EndTime')[0]?.textContent?.trim() ?? '';\r\n\r\n return {espectrum, bgspectrum, coeff, meta};\r\n } catch (e) {\r\n console.error(e);\r\n return {espectrum: [], bgspectrum: [], coeff, meta};\r\n }\r\n }\r\n\r\n async jsonToObject(data: string): Promise {\r\n let json: unknown;\r\n\r\n try {\r\n json = JSON.parse(data);\r\n\r\n if (!json || typeof json !== 'object') {\r\n throw 'Not a valid object!';\r\n }\r\n } catch (e) {\r\n console.error(e);\r\n return [{code: 'JSON_PARSE_ERROR', description: `A problem with the JSON formatting occured when trying to parse the contents of the file: ${e}`}];\r\n }\r\n\r\n let version: 'NPESv1' | 'NPESv2';\r\n\r\n try {\r\n if ('schemaVersion' in json) {\r\n // Detect schemaVersion (either NPESv1 or NPESv2)\r\n if (json.schemaVersion === 'NPESv1' || json.schemaVersion === 'NPESv2') {\r\n version = json.schemaVersion;\r\n } else {\r\n throw `schemaVersion is neither NPESv1 nor NPESv2, but ${json.schemaVersion}!`;\r\n }\r\n } else {\r\n throw 'No schemaVersion was supplied, cannot parse data!';\r\n }\r\n } catch(e) {\r\n console.error(e);\r\n return [{code: 'NPES_VERSION_ERROR', description: `An error occured when trying to parse the schema version: ${e}`}];\r\n }\r\n \r\n try {\r\n // Load the correct schema if if hasn't been loaded before\r\n if (!this.schemaJSON[version]) {\r\n const response = await fetch(this.schemaURLTable[version]);\r\n\r\n if (response.ok) {\r\n const schema = await response.json();\r\n delete schema['$schema']; // Remove, otherwise it will crash because it cannot resolve the schema URI, wow...\r\n this.schemaJSON[version] = schema;\r\n } else {\r\n throw 'Could not load the schema file!';\r\n }\r\n }\r\n\r\n const validator = new ZSchema({}); // Use empty default options/config\r\n validator.validate(json, this.schemaJSON[version]);\r\n const errors = validator.getLastErrors();\r\n\r\n if (errors) {\r\n //throw errors; // Catch validation errors\r\n const errorMessages: JSONParseError[] = [];\r\n\r\n for (const error of errors) {\r\n errorMessages.push({\r\n 'code': error.code,\r\n 'description': error.message\r\n });\r\n }\r\n\r\n console.error(errorMessages);\r\n return errorMessages;\r\n }\r\n\r\n if (version === 'NPESv1') {\r\n return [json]; // Only a single data package available\r\n } else { // NPESv2\r\n return (json).data; // Return all data packages from the file\r\n }\r\n\r\n } catch(e) {\r\n console.error(e);\r\n return [{code: 'UNDEFINED_ERROR', description: `Some undefined error occured: ${e}`}];\r\n }\r\n }\r\n}\r\n","/*\r\n\r\n Serial device connection, recording of spectra and serial console.\r\n\r\n Gamma MCA: free, open-source web-MCA for gamma spectroscopy\r\n 2022, NuclearPhoenix.- Phoenix1747\r\n https://nuclearphoenix.xyz\r\n\r\n*/\r\n\r\nimport { WebUSBSerialPort } from './lib/webusbserial-min';\r\n\r\nexport class WebUSBSerial {\r\n private port: WebUSBSerialPort | undefined;\r\n private device: USBDevice;\r\n isOpen = false;\r\n \r\n static deviceFilters = [{ 'vendorId': 0x0403 }]; // Allow ALL FTDI chips //, 'productId': 0x6015 }]; // Filter FTDx Chips\r\n\r\n constructor(device: USBDevice) {\r\n this.device = device;\r\n\r\n console.info('WebUSB product name:', device.productName);\r\n console.info('WebUSB manufacturer name:', device.manufacturerName);\r\n }\r\n\r\n async sendString(value: string): Promise {\r\n const enc = new TextEncoder(); \r\n this.port?.send(enc.encode(`${value}\\n`));\r\n }\r\n\r\n private buffer = new Uint8Array(102400); // Is 100kB enough?\r\n private pos = 0;\r\n \r\n async read(): Promise {\r\n if (this.pos === 0) {\r\n await new Promise(resolve => setTimeout(resolve, 100)); // Cooldown delay\r\n return new Uint8Array();\r\n }\r\n const ret = this.buffer.subarray(0, this.pos);\r\n this.pos = 0;\r\n return ret; \r\n }\r\n\r\n serOptions = {\r\n overridePortSettings: true,\r\n baudrate: 115200,\r\n };\r\n\r\n async open(baudRate: number): Promise { \r\n this.serOptions.baudrate = baudRate;\r\n this.port = new WebUSBSerialPort(this.device, this.serOptions);\r\n\r\n this.pos = 0;\r\n \r\n this.port.connect(data => {\r\n //console.log(data);\r\n this.buffer.set(data,this.pos);\r\n this.pos += data.length;\r\n }, error => {\r\n console.error('Error receiving data! ' + error)\r\n this.isOpen = false;\r\n });\r\n this.isOpen = true;\r\n }\r\n\r\n async close(): Promise {\r\n if (!this.isOpen) return;\r\n this.isOpen = false;\r\n this.port?.disconnect();\r\n }\r\n\r\n isThisPort(port: SerialPort | USBDevice): boolean {\r\n return (this.device === port);\r\n }\r\n\r\n getInfo(): string {\r\n return this.device.productName ?? 'Undefined';\r\n //return 'WebUSB';\r\n }\r\n\r\n getPort(): USBDevice {\r\n return this.device;\r\n }\r\n}\r\n\r\n\r\nexport class WebSerial {\r\n private port: SerialPort;\r\n isOpen = false;\r\n\r\n constructor(port: SerialPort) {\r\n this.port = port;\r\n }\r\n\r\n isThisPort(port: SerialPort | USBDevice): boolean {\r\n return this.port === port;\r\n }\r\n\r\n async sendString(value: string): Promise {\r\n if (!this.isOpen) return;\r\n \r\n if (!this.port?.writable) throw 'Port is not writable!';\r\n\r\n const textEncoder = new TextEncoderStream();\r\n const writer = textEncoder.writable.getWriter();\r\n const writableStreamClosed = textEncoder.readable.pipeTo(this.port.writable);\r\n\r\n writer.write(value.trim() + '\\n');\r\n //writer.write('\\x03\\n');\r\n\r\n //writer.releaseLock();\r\n await writer.close();\r\n await writableStreamClosed;\r\n }\r\n\r\n private reader: ReadableStreamDefaultReader | undefined;\r\n\r\n async read(): Promise{\r\n let ret = new Uint8Array();\r\n if (!this.isOpen) return ret;\r\n \r\n if (this.port.readable) {\r\n try {\r\n this.reader = this.port.readable.getReader();\r\n const {value} = await this.reader.read();\r\n if (value) {\r\n ret = value;\r\n } else {\r\n //await new Promise(resolve => setTimeout(resolve, 10));\r\n }\r\n } finally {\r\n this.reader?.releaseLock();\r\n this.reader = undefined;\r\n //await new Promise(resolve => setTimeout(resolve, 100));\r\n }\r\n } else {\r\n await this.close();\r\n }\r\n return ret;\r\n }\r\n\r\n serOptions: SerialOptions = { baudRate: 9600 } // Default 9600 baud rate\r\n\r\n async open(baudRate: number): Promise {\r\n this.serOptions.baudRate = baudRate;\r\n await this.port.open(this.serOptions);\r\n this.isOpen = true;\r\n }\r\n\r\n async close(): Promise {\r\n if (!this.isOpen) return;\r\n if (this.reader) await this.reader?.cancel();\r\n\r\n await this.port?.close();\r\n this.isOpen = false;\r\n }\r\n\r\n getInfo(): string {\r\n return `ID: 0x${this.port.getInfo().usbProductId?.toString(16).toUpperCase()}`;\r\n }\r\n\r\n getPort(): SerialPort {\r\n return this.port;\r\n }\r\n}\r\n\r\n\r\nimport { DataOrder } from './main';\r\n\r\nexport class SerialManager {\r\n // SECTION: Serial Manager\r\n readonly port: WebSerial | WebUSBSerial;\r\n recording = false;\r\n\r\n //private reader: ReadableStreamDefaultReader | undefined;\r\n private closed: Promise | undefined;\r\n private onlyConsole = true;\r\n private startTime = 0;\r\n private timeDone = 0;\r\n\r\n static orderType: DataOrder = 'chron'; // Chronological data order;\r\n static baudRate = 9600; // Default 9600 baud rate\r\n\r\n // SECTION: Serial Data\r\n private consoleMemory = 1000; // Number of newlines saved before the first newlines gets removed again\r\n private consoleMemoryTotal = 100_000; // Number of chars saved before the first chars get removed again\r\n private rawConsoleData = '';\r\n private rawData = ''; // Raw String Input from Serial Reading\r\n private maxHistLength = 2**18 * 2 * 10; // Maximum number of characters for a valid histogram string/number\r\n private maxLength = 20; // Maximum number of characters for a valid string/number\r\n private bufferPulseData = []; // Ready to use Integer Pulse Heights, could use a setget meh\r\n private baseHist = []; // Baseline histogram that will be subtracted from every other newer hist\r\n\r\n static maxSize = 200_000; // Maximum number of pulses/events to hold in the buffer\r\n static adcChannels = 4096; // Default 12-bit ADC\r\n static eolChar = ';'; // End of Line/Data character\r\n\r\n constructor(port: WebSerial | WebUSBSerial) {\r\n this.port = port;\r\n }\r\n\r\n isThisPort(port: SerialPort | USBDevice): boolean {\r\n return this.port.isThisPort(port);\r\n }\r\n\r\n /*\r\n\r\n SERIAL CONSOLE CONTROL\r\n\r\n */\r\n async sendString(value: string): Promise {\r\n await this.port.sendString(value);\r\n }\r\n\r\n async showConsole(): Promise {\r\n if (this.recording) return; // Port is already being read, nothing to do\r\n if (!this.port.isOpen) await this.port.open(SerialManager.baudRate); // Only try to open port if not open already\r\n\r\n this.recording = true;\r\n this.onlyConsole = true;\r\n this.closed = this.readUntilClosed();\r\n }\r\n\r\n async hideConsole(): Promise {\r\n if (!this.recording || !this.onlyConsole) return; // Not recording or currently in a measurement so don't do anything...\r\n\r\n this.onlyConsole = false;\r\n this.recording = false;\r\n\r\n try {\r\n await this.port.close();\r\n } catch(err) {\r\n console.warn('Nothing to disconnect.', err);\r\n }\r\n\r\n await this.closed;\r\n }\r\n /*\r\n\r\n RECORDING CONTROL\r\n\r\n */\r\n async stopRecord(): Promise {\r\n if (!this.recording) return;\r\n\r\n this.recording = false;\r\n this.timeDone += performance.now() - this.startTime;\r\n\r\n try {\r\n await this.port.close();\r\n } catch(err) {\r\n console.warn('Nothing to disconnect.', err);\r\n }\r\n\r\n await this.closed;\r\n }\r\n\r\n async startRecord(resume = false): Promise {\r\n if (this.recording) return;\r\n if (!this.port.isOpen) await this.port.open(SerialManager.baudRate); // Only try to open port if not open already\r\n\r\n if (!resume) {\r\n //this.flushRawData();\r\n this.flushData();\r\n this.clearBaseHist();\r\n this.timeDone = 0;\r\n }\r\n\r\n this.startTime = performance.now();\r\n\r\n this.recording = true;\r\n this.onlyConsole = false;\r\n this.closed = this.readUntilClosed();\r\n }\r\n\r\n private async readUntilClosed(): Promise {\r\n while (this.port.isOpen && this.recording) {\r\n const data = await this.port.read();\r\n if (data.length) this.addRaw(data); // Only submit non-empty arrays\r\n }\r\n await this.port.close();\r\n }\r\n /*\r\n\r\n DATA CONTROL\r\n\r\n */\r\n private addRaw(uintArray: Uint8Array): void {\r\n const string = new TextDecoder('utf-8').decode(uintArray); //String.fromCharCode(...uintArray);\r\n this.rawConsoleData += string;\r\n\r\n const rawLines = this.rawConsoleData.split('\\n'); // Split newlines\r\n rawLines.pop(); // Last line will always be empty\r\n\r\n if (rawLines.length > this.consoleMemory || this.rawConsoleData.length > this.consoleMemoryTotal) {\r\n //console.warn('Serial console log is out of memory, deleting old history...');\r\n this.rawConsoleData = this.rawConsoleData.replace(rawLines[0] + '\\n', '');\r\n }\r\n if (this.onlyConsole) return;\r\n\r\n if (this.bufferPulseData.length > SerialManager.maxSize) { // Protect from overflow and crashes\r\n console.warn('Warning: Serial buffer is saturating!');\r\n return;\r\n }\r\n this.rawData += string;\r\n\r\n if (SerialManager.orderType === 'chron') { // CHRONOLOGICAL EVENTS\r\n\r\n const stringArr = this.rawData.split(SerialManager.eolChar); //('\\r\\n');\r\n stringArr.pop(); // Delete last entry to avoid counting unfinished transmissions\r\n stringArr.shift(); // Delete first entry. !FIX SERIAL COMMUNICATION ERRORS!\r\n\r\n if (stringArr.length <= 1) {\r\n if (this.rawData.length > this.maxLength) this.rawData = ''; // String too long without an EOL char, obvious error, delete.\r\n return;\r\n } else {\r\n for (const element of stringArr) {\r\n //this.rawData = this.rawData.replaceAll(element + '\\r\\n', '');\r\n this.rawData = this.rawData.replace(element + SerialManager.eolChar, '');\r\n const trimString = element.trim(); // Delete whitespace and line breaks\r\n\r\n if (!trimString.length || trimString.length >= this.maxLength) continue; // String is empty or longer than maxLength --> Invalid, disregard\r\n\r\n const parsedInt = parseInt(trimString);\r\n\r\n if (isNaN(parsedInt)) {\r\n continue; // Not an integer -> throw away\r\n } else {\r\n if (parsedInt < 0 || parsedInt > SerialManager.adcChannels) continue; // Fixed value range. !FIX SERIAL COMMUNICATION ERRORS!\r\n this.bufferPulseData.push(parsedInt);\r\n }\r\n }\r\n }\r\n\r\n } else if (SerialManager.orderType === 'hist') { // HISTOGRAM DATA\r\n\r\n const stringArr = this.rawData.split('\\n');\r\n\r\n stringArr.pop(); // Delete last entry to avoid counting unfinished transmissions\r\n //stringArr.shift(); // Delete first entry. !FIX SERIAL COMMUNICATION ERRORS!\r\n\r\n if (!stringArr.length) {\r\n if (this.rawData.length > this.maxHistLength) this.rawData = ''; // String too long without an EOL char, obvious error, delete.\r\n return;\r\n } else {\r\n for (const element of stringArr) {\r\n this.rawData = this.rawData.replace(element + '\\n', '');\r\n const trimString = element.trim(); // Delete whitespace and line breaks\r\n\r\n if (!trimString.length || trimString.length >= this.maxHistLength) continue; // String is empty or longer than maxHistLength --> Invalid, disregard\r\n\r\n const stringHist = trimString.split(SerialManager.eolChar);\r\n stringHist.pop();\r\n\r\n if (stringHist.length !== SerialManager.adcChannels) continue; // Something is wrong with this histogram\r\n\r\n const numHist = stringHist.map(x => { // Parse ints from strings and check if NaN\r\n const parsed = parseInt(x);\r\n return isNaN(parsed) ? 0 : parsed;\r\n });\r\n\r\n if (!this.baseHist.length) {\r\n this.baseHist = numHist;\r\n this.startTime = performance.now(); // Reset because we only acquired the differential comparison hist\r\n return;\r\n }\r\n\r\n const diffHist = numHist.map((item, index) => item - this.baseHist[index]);\r\n\r\n if (!this.bufferPulseData.length) this.bufferPulseData = Array(SerialManager.adcChannels).fill(0);\r\n\r\n for (const index in this.bufferPulseData) {\r\n this.bufferPulseData[index] += diffHist[index];\r\n }\r\n\r\n this.baseHist = numHist; // Update baseline to the current array\r\n }\r\n }\r\n }\r\n }\r\n /*\r\n\r\n DATA INTERFACING\r\n\r\n */\r\n private flushData(): void {\r\n this.rawData = '';\r\n this.bufferPulseData = [];\r\n }\r\n\r\n private clearBaseHist(): void {\r\n this.baseHist = [];\r\n }\r\n\r\n flushRawData(): void {\r\n this.rawConsoleData = '';\r\n }\r\n\r\n getRawData(): string {\r\n return this.rawConsoleData;\r\n }\r\n\r\n getData(): number[] {\r\n const copyArr = [...this.bufferPulseData];\r\n this.bufferPulseData = [];\r\n return copyArr;\r\n }\r\n\r\n getTime(): number {\r\n return (this.recording ? (performance.now() - this.startTime + this.timeDone) : this.timeDone);\r\n }\r\n}\r\n","\"use strict\";\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _toDate = _interopRequireDefault(require(\"./lib/toDate\"));\nvar _toFloat = _interopRequireDefault(require(\"./lib/toFloat\"));\nvar _toInt = _interopRequireDefault(require(\"./lib/toInt\"));\nvar _toBoolean = _interopRequireDefault(require(\"./lib/toBoolean\"));\nvar _equals = _interopRequireDefault(require(\"./lib/equals\"));\nvar _contains = _interopRequireDefault(require(\"./lib/contains\"));\nvar _matches = _interopRequireDefault(require(\"./lib/matches\"));\nvar _isEmail = _interopRequireDefault(require(\"./lib/isEmail\"));\nvar _isURL = _interopRequireDefault(require(\"./lib/isURL\"));\nvar _isMACAddress = _interopRequireDefault(require(\"./lib/isMACAddress\"));\nvar _isIP = _interopRequireDefault(require(\"./lib/isIP\"));\nvar _isIPRange = _interopRequireDefault(require(\"./lib/isIPRange\"));\nvar _isFQDN = _interopRequireDefault(require(\"./lib/isFQDN\"));\nvar _isDate = _interopRequireDefault(require(\"./lib/isDate\"));\nvar _isTime = _interopRequireDefault(require(\"./lib/isTime\"));\nvar _isBoolean = _interopRequireDefault(require(\"./lib/isBoolean\"));\nvar _isLocale = _interopRequireDefault(require(\"./lib/isLocale\"));\nvar _isAbaRouting = _interopRequireDefault(require(\"./lib/isAbaRouting\"));\nvar _isAlpha = _interopRequireWildcard(require(\"./lib/isAlpha\"));\nvar _isAlphanumeric = _interopRequireWildcard(require(\"./lib/isAlphanumeric\"));\nvar _isNumeric = _interopRequireDefault(require(\"./lib/isNumeric\"));\nvar _isPassportNumber = _interopRequireDefault(require(\"./lib/isPassportNumber\"));\nvar _isPort = _interopRequireDefault(require(\"./lib/isPort\"));\nvar _isLowercase = _interopRequireDefault(require(\"./lib/isLowercase\"));\nvar _isUppercase = _interopRequireDefault(require(\"./lib/isUppercase\"));\nvar _isIMEI = _interopRequireDefault(require(\"./lib/isIMEI\"));\nvar _isAscii = _interopRequireDefault(require(\"./lib/isAscii\"));\nvar _isFullWidth = _interopRequireDefault(require(\"./lib/isFullWidth\"));\nvar _isHalfWidth = _interopRequireDefault(require(\"./lib/isHalfWidth\"));\nvar _isVariableWidth = _interopRequireDefault(require(\"./lib/isVariableWidth\"));\nvar _isMultibyte = _interopRequireDefault(require(\"./lib/isMultibyte\"));\nvar _isSemVer = _interopRequireDefault(require(\"./lib/isSemVer\"));\nvar _isSurrogatePair = _interopRequireDefault(require(\"./lib/isSurrogatePair\"));\nvar _isInt = _interopRequireDefault(require(\"./lib/isInt\"));\nvar _isFloat = _interopRequireWildcard(require(\"./lib/isFloat\"));\nvar _isDecimal = _interopRequireDefault(require(\"./lib/isDecimal\"));\nvar _isHexadecimal = _interopRequireDefault(require(\"./lib/isHexadecimal\"));\nvar _isOctal = _interopRequireDefault(require(\"./lib/isOctal\"));\nvar _isDivisibleBy = _interopRequireDefault(require(\"./lib/isDivisibleBy\"));\nvar _isHexColor = _interopRequireDefault(require(\"./lib/isHexColor\"));\nvar _isRgbColor = _interopRequireDefault(require(\"./lib/isRgbColor\"));\nvar _isHSL = _interopRequireDefault(require(\"./lib/isHSL\"));\nvar _isISRC = _interopRequireDefault(require(\"./lib/isISRC\"));\nvar _isIBAN = _interopRequireWildcard(require(\"./lib/isIBAN\"));\nvar _isBIC = _interopRequireDefault(require(\"./lib/isBIC\"));\nvar _isMD = _interopRequireDefault(require(\"./lib/isMD5\"));\nvar _isHash = _interopRequireDefault(require(\"./lib/isHash\"));\nvar _isJWT = _interopRequireDefault(require(\"./lib/isJWT\"));\nvar _isJSON = _interopRequireDefault(require(\"./lib/isJSON\"));\nvar _isEmpty = _interopRequireDefault(require(\"./lib/isEmpty\"));\nvar _isLength = _interopRequireDefault(require(\"./lib/isLength\"));\nvar _isByteLength = _interopRequireDefault(require(\"./lib/isByteLength\"));\nvar _isUUID = _interopRequireDefault(require(\"./lib/isUUID\"));\nvar _isMongoId = _interopRequireDefault(require(\"./lib/isMongoId\"));\nvar _isAfter = _interopRequireDefault(require(\"./lib/isAfter\"));\nvar _isBefore = _interopRequireDefault(require(\"./lib/isBefore\"));\nvar _isIn = _interopRequireDefault(require(\"./lib/isIn\"));\nvar _isLuhnNumber = _interopRequireDefault(require(\"./lib/isLuhnNumber\"));\nvar _isCreditCard = _interopRequireDefault(require(\"./lib/isCreditCard\"));\nvar _isIdentityCard = _interopRequireDefault(require(\"./lib/isIdentityCard\"));\nvar _isEAN = _interopRequireDefault(require(\"./lib/isEAN\"));\nvar _isISIN = _interopRequireDefault(require(\"./lib/isISIN\"));\nvar _isISBN = _interopRequireDefault(require(\"./lib/isISBN\"));\nvar _isISSN = _interopRequireDefault(require(\"./lib/isISSN\"));\nvar _isTaxID = _interopRequireDefault(require(\"./lib/isTaxID\"));\nvar _isMobilePhone = _interopRequireWildcard(require(\"./lib/isMobilePhone\"));\nvar _isEthereumAddress = _interopRequireDefault(require(\"./lib/isEthereumAddress\"));\nvar _isCurrency = _interopRequireDefault(require(\"./lib/isCurrency\"));\nvar _isBtcAddress = _interopRequireDefault(require(\"./lib/isBtcAddress\"));\nvar _isISO = require(\"./lib/isISO6346\");\nvar _isISO2 = _interopRequireDefault(require(\"./lib/isISO6391\"));\nvar _isISO3 = _interopRequireDefault(require(\"./lib/isISO8601\"));\nvar _isRFC = _interopRequireDefault(require(\"./lib/isRFC3339\"));\nvar _isISO31661Alpha = _interopRequireDefault(require(\"./lib/isISO31661Alpha2\"));\nvar _isISO31661Alpha2 = _interopRequireDefault(require(\"./lib/isISO31661Alpha3\"));\nvar _isISO4 = _interopRequireDefault(require(\"./lib/isISO4217\"));\nvar _isBase = _interopRequireDefault(require(\"./lib/isBase32\"));\nvar _isBase2 = _interopRequireDefault(require(\"./lib/isBase58\"));\nvar _isBase3 = _interopRequireDefault(require(\"./lib/isBase64\"));\nvar _isDataURI = _interopRequireDefault(require(\"./lib/isDataURI\"));\nvar _isMagnetURI = _interopRequireDefault(require(\"./lib/isMagnetURI\"));\nvar _isMailtoURI = _interopRequireDefault(require(\"./lib/isMailtoURI\"));\nvar _isMimeType = _interopRequireDefault(require(\"./lib/isMimeType\"));\nvar _isLatLong = _interopRequireDefault(require(\"./lib/isLatLong\"));\nvar _isPostalCode = _interopRequireWildcard(require(\"./lib/isPostalCode\"));\nvar _ltrim = _interopRequireDefault(require(\"./lib/ltrim\"));\nvar _rtrim = _interopRequireDefault(require(\"./lib/rtrim\"));\nvar _trim = _interopRequireDefault(require(\"./lib/trim\"));\nvar _escape = _interopRequireDefault(require(\"./lib/escape\"));\nvar _unescape = _interopRequireDefault(require(\"./lib/unescape\"));\nvar _stripLow = _interopRequireDefault(require(\"./lib/stripLow\"));\nvar _whitelist = _interopRequireDefault(require(\"./lib/whitelist\"));\nvar _blacklist = _interopRequireDefault(require(\"./lib/blacklist\"));\nvar _isWhitelisted = _interopRequireDefault(require(\"./lib/isWhitelisted\"));\nvar _normalizeEmail = _interopRequireDefault(require(\"./lib/normalizeEmail\"));\nvar _isSlug = _interopRequireDefault(require(\"./lib/isSlug\"));\nvar _isLicensePlate = _interopRequireDefault(require(\"./lib/isLicensePlate\"));\nvar _isStrongPassword = _interopRequireDefault(require(\"./lib/isStrongPassword\"));\nvar _isVAT = _interopRequireDefault(require(\"./lib/isVAT\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar version = '13.12.0';\nvar validator = {\n version: version,\n toDate: _toDate.default,\n toFloat: _toFloat.default,\n toInt: _toInt.default,\n toBoolean: _toBoolean.default,\n equals: _equals.default,\n contains: _contains.default,\n matches: _matches.default,\n isEmail: _isEmail.default,\n isURL: _isURL.default,\n isMACAddress: _isMACAddress.default,\n isIP: _isIP.default,\n isIPRange: _isIPRange.default,\n isFQDN: _isFQDN.default,\n isBoolean: _isBoolean.default,\n isIBAN: _isIBAN.default,\n isBIC: _isBIC.default,\n isAbaRouting: _isAbaRouting.default,\n isAlpha: _isAlpha.default,\n isAlphaLocales: _isAlpha.locales,\n isAlphanumeric: _isAlphanumeric.default,\n isAlphanumericLocales: _isAlphanumeric.locales,\n isNumeric: _isNumeric.default,\n isPassportNumber: _isPassportNumber.default,\n isPort: _isPort.default,\n isLowercase: _isLowercase.default,\n isUppercase: _isUppercase.default,\n isAscii: _isAscii.default,\n isFullWidth: _isFullWidth.default,\n isHalfWidth: _isHalfWidth.default,\n isVariableWidth: _isVariableWidth.default,\n isMultibyte: _isMultibyte.default,\n isSemVer: _isSemVer.default,\n isSurrogatePair: _isSurrogatePair.default,\n isInt: _isInt.default,\n isIMEI: _isIMEI.default,\n isFloat: _isFloat.default,\n isFloatLocales: _isFloat.locales,\n isDecimal: _isDecimal.default,\n isHexadecimal: _isHexadecimal.default,\n isOctal: _isOctal.default,\n isDivisibleBy: _isDivisibleBy.default,\n isHexColor: _isHexColor.default,\n isRgbColor: _isRgbColor.default,\n isHSL: _isHSL.default,\n isISRC: _isISRC.default,\n isMD5: _isMD.default,\n isHash: _isHash.default,\n isJWT: _isJWT.default,\n isJSON: _isJSON.default,\n isEmpty: _isEmpty.default,\n isLength: _isLength.default,\n isLocale: _isLocale.default,\n isByteLength: _isByteLength.default,\n isUUID: _isUUID.default,\n isMongoId: _isMongoId.default,\n isAfter: _isAfter.default,\n isBefore: _isBefore.default,\n isIn: _isIn.default,\n isLuhnNumber: _isLuhnNumber.default,\n isCreditCard: _isCreditCard.default,\n isIdentityCard: _isIdentityCard.default,\n isEAN: _isEAN.default,\n isISIN: _isISIN.default,\n isISBN: _isISBN.default,\n isISSN: _isISSN.default,\n isMobilePhone: _isMobilePhone.default,\n isMobilePhoneLocales: _isMobilePhone.locales,\n isPostalCode: _isPostalCode.default,\n isPostalCodeLocales: _isPostalCode.locales,\n isEthereumAddress: _isEthereumAddress.default,\n isCurrency: _isCurrency.default,\n isBtcAddress: _isBtcAddress.default,\n isISO6346: _isISO.isISO6346,\n isFreightContainerID: _isISO.isFreightContainerID,\n isISO6391: _isISO2.default,\n isISO8601: _isISO3.default,\n isRFC3339: _isRFC.default,\n isISO31661Alpha2: _isISO31661Alpha.default,\n isISO31661Alpha3: _isISO31661Alpha2.default,\n isISO4217: _isISO4.default,\n isBase32: _isBase.default,\n isBase58: _isBase2.default,\n isBase64: _isBase3.default,\n isDataURI: _isDataURI.default,\n isMagnetURI: _isMagnetURI.default,\n isMailtoURI: _isMailtoURI.default,\n isMimeType: _isMimeType.default,\n isLatLong: _isLatLong.default,\n ltrim: _ltrim.default,\n rtrim: _rtrim.default,\n trim: _trim.default,\n escape: _escape.default,\n unescape: _unescape.default,\n stripLow: _stripLow.default,\n whitelist: _whitelist.default,\n blacklist: _blacklist.default,\n isWhitelisted: _isWhitelisted.default,\n normalizeEmail: _normalizeEmail.default,\n toString: toString,\n isSlug: _isSlug.default,\n isStrongPassword: _isStrongPassword.default,\n isTaxID: _isTaxID.default,\n isDate: _isDate.default,\n isTime: _isTime.default,\n isLicensePlate: _isLicensePlate.default,\n isVAT: _isVAT.default,\n ibanLocales: _isIBAN.locales\n};\nvar _default = exports.default = validator;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.farsiLocales = exports.englishLocales = exports.dotDecimal = exports.decimal = exports.commaDecimal = exports.bengaliLocales = exports.arabicLocales = exports.alphanumeric = exports.alpha = void 0;\nvar alpha = exports.alpha = {\n 'en-US': /^[A-Z]+$/i,\n 'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,\n 'bg-BG': /^[А-Я]+$/i,\n 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,\n 'da-DK': /^[A-ZÆØÅ]+$/i,\n 'de-DE': /^[A-ZÄÖÜß]+$/i,\n 'el-GR': /^[Α-ώ]+$/i,\n 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i,\n 'fa-IR': /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,\n 'fi-FI': /^[A-ZÅÄÖ]+$/i,\n 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,\n 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,\n 'ja-JP': /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,\n 'nb-NO': /^[A-ZÆØÅ]+$/i,\n 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i,\n 'nn-NO': /^[A-ZÆØÅ]+$/i,\n 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,\n 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,\n 'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,\n 'ru-RU': /^[А-ЯЁ]+$/i,\n 'kk-KZ': /^[А-ЯЁ\\u04D8\\u04B0\\u0406\\u04A2\\u0492\\u04AE\\u049A\\u04E8\\u04BA]+$/i,\n 'sl-SI': /^[A-ZČĆĐŠŽ]+$/i,\n 'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,\n 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i,\n 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i,\n 'sv-SE': /^[A-ZÅÄÖ]+$/i,\n 'th-TH': /^[ก-๐\\s]+$/i,\n 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,\n 'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,\n 'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,\n 'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,\n 'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,\n ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,\n he: /^[א-ת]+$/,\n fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,\n bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,\n eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,\n 'hi-IN': /^[\\u0900-\\u0961]+[\\u0972-\\u097F]*$/i,\n 'si-LK': /^[\\u0D80-\\u0DFF]+$/\n};\nvar alphanumeric = exports.alphanumeric = {\n 'en-US': /^[0-9A-Z]+$/i,\n 'az-AZ': /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,\n 'bg-BG': /^[0-9А-Я]+$/i,\n 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,\n 'da-DK': /^[0-9A-ZÆØÅ]+$/i,\n 'de-DE': /^[0-9A-ZÄÖÜß]+$/i,\n 'el-GR': /^[0-9Α-ω]+$/i,\n 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,\n 'fi-FI': /^[0-9A-ZÅÄÖ]+$/i,\n 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,\n 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,\n 'ja-JP': /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,\n 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,\n 'nb-NO': /^[0-9A-ZÆØÅ]+$/i,\n 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,\n 'nn-NO': /^[0-9A-ZÆØÅ]+$/i,\n 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,\n 'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,\n 'ru-RU': /^[0-9А-ЯЁ]+$/i,\n 'kk-KZ': /^[0-9А-ЯЁ\\u04D8\\u04B0\\u0406\\u04A2\\u0492\\u04AE\\u049A\\u04E8\\u04BA]+$/i,\n 'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i,\n 'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,\n 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i,\n 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,\n 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i,\n 'th-TH': /^[ก-๙\\s]+$/i,\n 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,\n 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,\n 'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,\n 'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,\n 'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,\n ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,\n he: /^[0-9א-ת]+$/,\n fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,\n bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,\n eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,\n 'hi-IN': /^[\\u0900-\\u0963]+[\\u0966-\\u097F]*$/i,\n 'si-LK': /^[0-9\\u0D80-\\u0DFF]+$/\n};\nvar decimal = exports.decimal = {\n 'en-US': '.',\n ar: '٫'\n};\nvar englishLocales = exports.englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM'];\nfor (var locale, i = 0; i < englishLocales.length; i++) {\n locale = \"en-\".concat(englishLocales[i]);\n alpha[locale] = alpha['en-US'];\n alphanumeric[locale] = alphanumeric['en-US'];\n decimal[locale] = decimal['en-US'];\n}\n\n// Source: http://www.localeplanet.com/java/\nvar arabicLocales = exports.arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE'];\nfor (var _locale, _i = 0; _i < arabicLocales.length; _i++) {\n _locale = \"ar-\".concat(arabicLocales[_i]);\n alpha[_locale] = alpha.ar;\n alphanumeric[_locale] = alphanumeric.ar;\n decimal[_locale] = decimal.ar;\n}\nvar farsiLocales = exports.farsiLocales = ['IR', 'AF'];\nfor (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) {\n _locale2 = \"fa-\".concat(farsiLocales[_i2]);\n alphanumeric[_locale2] = alphanumeric.fa;\n decimal[_locale2] = decimal.ar;\n}\nvar bengaliLocales = exports.bengaliLocales = ['BD', 'IN'];\nfor (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) {\n _locale3 = \"bn-\".concat(bengaliLocales[_i3]);\n alpha[_locale3] = alpha.bn;\n alphanumeric[_locale3] = alphanumeric.bn;\n decimal[_locale3] = decimal['en-US'];\n}\n\n// Source: https://en.wikipedia.org/wiki/Decimal_mark\nvar dotDecimal = exports.dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY'];\nvar commaDecimal = exports.commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'eo', 'es-ES', 'fr-CA', 'fr-FR', 'id-ID', 'it-IT', 'ku-IQ', 'hi-IN', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'kk-KZ', 'si-LK', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN'];\nfor (var _i4 = 0; _i4 < dotDecimal.length; _i4++) {\n decimal[dotDecimal[_i4]] = decimal['en-US'];\n}\nfor (var _i5 = 0; _i5 < commaDecimal.length; _i5++) {\n decimal[commaDecimal[_i5]] = ',';\n}\nalpha['fr-CA'] = alpha['fr-FR'];\nalphanumeric['fr-CA'] = alphanumeric['fr-FR'];\nalpha['pt-BR'] = alpha['pt-PT'];\nalphanumeric['pt-BR'] = alphanumeric['pt-PT'];\ndecimal['pt-BR'] = decimal['pt-PT'];\n\n// see #862\nalpha['pl-Pl'] = alpha['pl-PL'];\nalphanumeric['pl-Pl'] = alphanumeric['pl-PL'];\ndecimal['pl-Pl'] = decimal['pl-PL'];\n\n// see #1455\nalpha['fa-AF'] = alpha.fa;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = blacklist;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction blacklist(str, chars) {\n (0, _assertString.default)(str);\n return str.replace(new RegExp(\"[\".concat(chars, \"]+\"), 'g'), '');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = contains;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _toString = _interopRequireDefault(require(\"./util/toString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar defaulContainsOptions = {\n ignoreCase: false,\n minOccurrences: 1\n};\nfunction contains(str, elem, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, defaulContainsOptions);\n if (options.ignoreCase) {\n return str.toLowerCase().split((0, _toString.default)(elem).toLowerCase()).length > options.minOccurrences;\n }\n return str.split((0, _toString.default)(elem)).length > options.minOccurrences;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = equals;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction equals(str, comparison) {\n (0, _assertString.default)(str);\n return str === comparison;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = escape;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction escape(str) {\n (0, _assertString.default)(str);\n return str.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\\//g, '/').replace(/\\\\/g, '\').replace(/`/g, '`');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isAbaRouting;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// http://www.brainjar.com/js/validation/\n// https://www.aba.com/news-research/research-analysis/routing-number-policy-procedures\n// series reserved for future use are excluded\nvar isRoutingReg = /^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;\nfunction isAbaRouting(str) {\n (0, _assertString.default)(str);\n if (!isRoutingReg.test(str)) return false;\n var checkSumVal = 0;\n for (var i = 0; i < str.length; i++) {\n if (i % 3 === 0) checkSumVal += str[i] * 3;else if (i % 3 === 1) checkSumVal += str[i] * 7;else checkSumVal += str[i] * 1;\n }\n return checkSumVal % 10 === 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isAfter;\nvar _toDate = _interopRequireDefault(require(\"./toDate\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isAfter(date, options) {\n // For backwards compatibility:\n // isAfter(str [, date]), i.e. `options` could be used as argument for the legacy `date`\n var comparisonDate = (options === null || options === void 0 ? void 0 : options.comparisonDate) || options || Date().toString();\n var comparison = (0, _toDate.default)(comparisonDate);\n var original = (0, _toDate.default)(date);\n return !!(original && comparison && original > comparison);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isAlpha;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isAlpha(_str) {\n var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n (0, _assertString.default)(_str);\n var str = _str;\n var ignore = options.ignore;\n if (ignore) {\n if (ignore instanceof RegExp) {\n str = str.replace(ignore, '');\n } else if (typeof ignore === 'string') {\n str = str.replace(new RegExp(\"[\".concat(ignore.replace(/[-[\\]{}()*+?.,\\\\^$|#\\\\s]/g, '\\\\$&'), \"]\"), 'g'), ''); // escape regex for ignore\n } else {\n throw new Error('ignore should be instance of a String or RegExp');\n }\n }\n if (locale in _alpha.alpha) {\n return _alpha.alpha[locale].test(str);\n }\n throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nvar locales = exports.locales = Object.keys(_alpha.alpha);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isAlphanumeric;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isAlphanumeric(_str) {\n var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n (0, _assertString.default)(_str);\n var str = _str;\n var ignore = options.ignore;\n if (ignore) {\n if (ignore instanceof RegExp) {\n str = str.replace(ignore, '');\n } else if (typeof ignore === 'string') {\n str = str.replace(new RegExp(\"[\".concat(ignore.replace(/[-[\\]{}()*+?.,\\\\^$|#\\\\s]/g, '\\\\$&'), \"]\"), 'g'), ''); // escape regex for ignore\n } else {\n throw new Error('ignore should be instance of a String or RegExp');\n }\n }\n if (locale in _alpha.alphanumeric) {\n return _alpha.alphanumeric[locale].test(str);\n }\n throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nvar locales = exports.locales = Object.keys(_alpha.alphanumeric);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isAscii;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* eslint-disable no-control-regex */\nvar ascii = /^[\\x00-\\x7F]+$/;\n/* eslint-enable no-control-regex */\n\nfunction isAscii(str) {\n (0, _assertString.default)(str);\n return ascii.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isBIC;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isISO31661Alpha = require(\"./isISO31661Alpha2\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// https://en.wikipedia.org/wiki/ISO_9362\nvar isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;\nfunction isBIC(str) {\n (0, _assertString.default)(str);\n\n // toUpperCase() should be removed when a new major version goes out that changes\n // the regex to [A-Z] (per the spec).\n var countryCode = str.slice(4, 6).toUpperCase();\n if (!_isISO31661Alpha.CountryCodes.has(countryCode) && countryCode !== 'XK') {\n return false;\n }\n return isBICReg.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isBase32;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar base32 = /^[A-Z2-7]+=*$/;\nvar crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/;\nvar defaultBase32Options = {\n crockford: false\n};\nfunction isBase32(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, defaultBase32Options);\n if (options.crockford) {\n return crockfordBase32.test(str);\n }\n var len = str.length;\n if (len % 8 === 0 && base32.test(str)) {\n return true;\n }\n return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isBase58;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// Accepted chars - 123456789ABCDEFGH JKLMN PQRSTUVWXYZabcdefghijk mnopqrstuvwxyz\nvar base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/;\nfunction isBase58(str) {\n (0, _assertString.default)(str);\n if (base58Reg.test(str)) {\n return true;\n }\n return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isBase64;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar notBase64 = /[^A-Z0-9+\\/=]/i;\nvar urlSafeBase64 = /^[A-Z0-9_\\-]*$/i;\nvar defaultBase64Options = {\n urlSafe: false\n};\nfunction isBase64(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, defaultBase64Options);\n var len = str.length;\n if (options.urlSafe) {\n return urlSafeBase64.test(str);\n }\n if (len % 4 !== 0 || notBase64.test(str)) {\n return false;\n }\n var firstPaddingChar = str.indexOf('=');\n return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '=';\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isBefore;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _toDate = _interopRequireDefault(require(\"./toDate\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isBefore(str) {\n var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());\n (0, _assertString.default)(str);\n var comparison = (0, _toDate.default)(date);\n var original = (0, _toDate.default)(str);\n return !!(original && comparison && original < comparison);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isBoolean;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar defaultOptions = {\n loose: false\n};\nvar strictBooleans = ['true', 'false', '1', '0'];\nvar looseBooleans = [].concat(strictBooleans, ['yes', 'no']);\nfunction isBoolean(str) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;\n (0, _assertString.default)(str);\n if (options.loose) {\n return looseBooleans.includes(str.toLowerCase());\n }\n return strictBooleans.includes(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isBtcAddress;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar bech32 = /^(bc1)[a-z0-9]{25,39}$/;\nvar base58 = /^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;\nfunction isBtcAddress(str) {\n (0, _assertString.default)(str);\n return bech32.test(str) || base58.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isByteLength;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/* eslint-disable prefer-rest-params */\nfunction isByteLength(str, options) {\n (0, _assertString.default)(str);\n var min;\n var max;\n if (_typeof(options) === 'object') {\n min = options.min || 0;\n max = options.max;\n } else {\n // backwards compatibility: isByteLength(str, min [, max])\n min = arguments[1];\n max = arguments[2];\n }\n var len = encodeURI(str).split(/%..|./).length - 1;\n return len >= min && (typeof max === 'undefined' || len <= max);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isCreditCard;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isLuhnNumber = _interopRequireDefault(require(\"./isLuhnNumber\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar cards = {\n amex: /^3[47][0-9]{13}$/,\n dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,\n discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,\n jcb: /^(?:2131|1800|35\\d{3})\\d{11}$/,\n mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,\n // /^[25][1-7][0-9]{14}$/;\n unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,\n visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/\n};\nvar allCards = function () {\n var tmpCardsArray = [];\n for (var cardProvider in cards) {\n // istanbul ignore else\n if (cards.hasOwnProperty(cardProvider)) {\n tmpCardsArray.push(cards[cardProvider]);\n }\n }\n return tmpCardsArray;\n}();\nfunction isCreditCard(card) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _assertString.default)(card);\n var provider = options.provider;\n var sanitized = card.replace(/[- ]+/g, '');\n if (provider && provider.toLowerCase() in cards) {\n // specific provider in the list\n if (!cards[provider.toLowerCase()].test(sanitized)) {\n return false;\n }\n } else if (provider && !(provider.toLowerCase() in cards)) {\n /* specific provider not in the list */\n throw new Error(\"\".concat(provider, \" is not a valid credit card provider.\"));\n } else if (!allCards.some(function (cardProvider) {\n return cardProvider.test(sanitized);\n })) {\n // no specific provider\n return false;\n }\n return (0, _isLuhnNumber.default)(card);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isCurrency;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction currencyRegex(options) {\n var decimal_digits = \"\\\\d{\".concat(options.digits_after_decimal[0], \"}\");\n options.digits_after_decimal.forEach(function (digit, index) {\n if (index !== 0) decimal_digits = \"\".concat(decimal_digits, \"|\\\\d{\").concat(digit, \"}\");\n });\n var symbol = \"(\".concat(options.symbol.replace(/\\W/, function (m) {\n return \"\\\\\".concat(m);\n }), \")\").concat(options.require_symbol ? '' : '?'),\n negative = '-?',\n whole_dollar_amount_without_sep = '[1-9]\\\\d*',\n whole_dollar_amount_with_sep = \"[1-9]\\\\d{0,2}(\\\\\".concat(options.thousands_separator, \"\\\\d{3})*\"),\n valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep],\n whole_dollar_amount = \"(\".concat(valid_whole_dollar_amounts.join('|'), \")?\"),\n decimal_amount = \"(\\\\\".concat(options.decimal_separator, \"(\").concat(decimal_digits, \"))\").concat(options.require_decimal ? '' : '?');\n var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : '');\n\n // default is negative sign before symbol, but there are two other options (besides parens)\n if (options.allow_negatives && !options.parens_for_negatives) {\n if (options.negative_sign_after_digits) {\n pattern += negative;\n } else if (options.negative_sign_before_digits) {\n pattern = negative + pattern;\n }\n }\n\n // South African Rand, for example, uses R 123 (space) and R-123 (no space)\n if (options.allow_negative_sign_placeholder) {\n pattern = \"( (?!\\\\-))?\".concat(pattern);\n } else if (options.allow_space_after_symbol) {\n pattern = \" ?\".concat(pattern);\n } else if (options.allow_space_after_digits) {\n pattern += '( (?!$))?';\n }\n if (options.symbol_after_digits) {\n pattern += symbol;\n } else {\n pattern = symbol + pattern;\n }\n if (options.allow_negatives) {\n if (options.parens_for_negatives) {\n pattern = \"(\\\\(\".concat(pattern, \"\\\\)|\").concat(pattern, \")\");\n } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) {\n pattern = negative + pattern;\n }\n }\n\n // ensure there's a dollar and/or decimal amount, and that\n // it doesn't start with a space or a negative sign followed by a space\n return new RegExp(\"^(?!-? )(?=.*\\\\d)\".concat(pattern, \"$\"));\n}\nvar default_currency_options = {\n symbol: '$',\n require_symbol: false,\n allow_space_after_symbol: false,\n symbol_after_digits: false,\n allow_negatives: true,\n parens_for_negatives: false,\n negative_sign_before_digits: false,\n negative_sign_after_digits: false,\n allow_negative_sign_placeholder: false,\n thousands_separator: ',',\n decimal_separator: '.',\n allow_decimal: true,\n require_decimal: false,\n digits_after_decimal: [2],\n allow_space_after_digits: false\n};\nfunction isCurrency(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_currency_options);\n return currencyRegex(options).test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isDataURI;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar validMediaType = /^[a-z]+\\/[a-z0-9\\-\\+\\._]+$/i;\nvar validAttribute = /^[a-z\\-]+=[a-z0-9\\-]+$/i;\nvar validData = /^[a-z0-9!\\$&'\\(\\)\\*\\+,;=\\-\\._~:@\\/\\?%\\s]*$/i;\nfunction isDataURI(str) {\n (0, _assertString.default)(str);\n var data = str.split(',');\n if (data.length < 2) {\n return false;\n }\n var attributes = data.shift().trim().split(';');\n var schemeAndMediaType = attributes.shift();\n if (schemeAndMediaType.slice(0, 5) !== 'data:') {\n return false;\n }\n var mediaType = schemeAndMediaType.slice(5);\n if (mediaType !== '' && !validMediaType.test(mediaType)) {\n return false;\n }\n for (var i = 0; i < attributes.length; i++) {\n if (!(i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') && !validAttribute.test(attributes[i])) {\n return false;\n }\n }\n for (var _i = 0; _i < data.length; _i++) {\n if (!validData.test(data[_i])) {\n return false;\n }\n }\n return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isDate;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nvar default_date_options = {\n format: 'YYYY/MM/DD',\n delimiters: ['/', '-'],\n strictMode: false\n};\nfunction isValidFormat(format) {\n return /(^(y{4}|y{2})[.\\/-](m{1,2})[.\\/-](d{1,2})$)|(^(m{1,2})[.\\/-](d{1,2})[.\\/-]((y{4}|y{2})$))|(^(d{1,2})[.\\/-](m{1,2})[.\\/-]((y{4}|y{2})$))/gi.test(format);\n}\nfunction zip(date, format) {\n var zippedArr = [],\n len = Math.min(date.length, format.length);\n for (var i = 0; i < len; i++) {\n zippedArr.push([date[i], format[i]]);\n }\n return zippedArr;\n}\nfunction isDate(input, options) {\n if (typeof options === 'string') {\n // Allow backward compatibility for old format isDate(input [, format])\n options = (0, _merge.default)({\n format: options\n }, default_date_options);\n } else {\n options = (0, _merge.default)(options, default_date_options);\n }\n if (typeof input === 'string' && isValidFormat(options.format)) {\n var formatDelimiter = options.delimiters.find(function (delimiter) {\n return options.format.indexOf(delimiter) !== -1;\n });\n var dateDelimiter = options.strictMode ? formatDelimiter : options.delimiters.find(function (delimiter) {\n return input.indexOf(delimiter) !== -1;\n });\n var dateAndFormat = zip(input.split(dateDelimiter), options.format.toLowerCase().split(formatDelimiter));\n var dateObj = {};\n var _iterator = _createForOfIteratorHelper(dateAndFormat),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n dateWord = _step$value[0],\n formatWord = _step$value[1];\n if (dateWord.length !== formatWord.length) {\n return false;\n }\n dateObj[formatWord.charAt(0)] = dateWord;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n var fullYear = dateObj.y;\n\n // Check if the year starts with a hyphen\n if (fullYear.startsWith('-')) {\n return false; // Hyphen before year is not allowed\n }\n if (dateObj.y.length === 2) {\n var parsedYear = parseInt(dateObj.y, 10);\n if (isNaN(parsedYear)) {\n return false;\n }\n var currentYearLastTwoDigits = new Date().getFullYear() % 100;\n if (parsedYear < currentYearLastTwoDigits) {\n fullYear = \"20\".concat(dateObj.y);\n } else {\n fullYear = \"19\".concat(dateObj.y);\n }\n }\n var month = dateObj.m;\n if (dateObj.m.length === 1) {\n month = \"0\".concat(dateObj.m);\n }\n var day = dateObj.d;\n if (dateObj.d.length === 1) {\n day = \"0\".concat(dateObj.d);\n }\n return new Date(\"\".concat(fullYear, \"-\").concat(month, \"-\").concat(day, \"T00:00:00.000Z\")).getUTCDate() === +dateObj.d;\n }\n if (!options.strictMode) {\n return Object.prototype.toString.call(input) === '[object Date]' && isFinite(input);\n }\n return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isDecimal;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _includes = _interopRequireDefault(require(\"./util/includes\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction decimalRegExp(options) {\n var regExp = new RegExp(\"^[-+]?([0-9]+)?(\\\\\".concat(_alpha.decimal[options.locale], \"[0-9]{\").concat(options.decimal_digits, \"})\").concat(options.force_decimal ? '' : '?', \"$\"));\n return regExp;\n}\nvar default_decimal_options = {\n force_decimal: false,\n decimal_digits: '1,',\n locale: 'en-US'\n};\nvar blacklist = ['', '-', '+'];\nfunction isDecimal(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_decimal_options);\n if (options.locale in _alpha.decimal) {\n return !(0, _includes.default)(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str);\n }\n throw new Error(\"Invalid locale '\".concat(options.locale, \"'\"));\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isDivisibleBy;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _toFloat = _interopRequireDefault(require(\"./toFloat\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isDivisibleBy(str, num) {\n (0, _assertString.default)(str);\n return (0, _toFloat.default)(str) % parseInt(num, 10) === 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isEAN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * The most commonly used EAN standard is\n * the thirteen-digit EAN-13, while the\n * less commonly used 8-digit EAN-8 barcode was\n * introduced for use on small packages.\n * Also EAN/UCC-14 is used for Grouping of individual\n * trade items above unit level(Intermediate, Carton or Pallet).\n * For more info about EAN-14 checkout: https://www.gtin.info/itf-14-barcodes/\n * EAN consists of:\n * GS1 prefix, manufacturer code, product code and check digit\n * Reference: https://en.wikipedia.org/wiki/International_Article_Number\n * Reference: https://www.gtin.info/\n */\n\n/**\n * Define EAN Lenghts; 8 for EAN-8; 13 for EAN-13; 14 for EAN-14\n * and Regular Expression for valid EANs (EAN-8, EAN-13, EAN-14),\n * with exact numberic matching of 8 or 13 or 14 digits [0-9]\n */\nvar LENGTH_EAN_8 = 8;\nvar LENGTH_EAN_14 = 14;\nvar validEanRegex = /^(\\d{8}|\\d{13}|\\d{14})$/;\n\n/**\n * Get position weight given:\n * EAN length and digit index/position\n *\n * @param {number} length\n * @param {number} index\n * @return {number}\n */\nfunction getPositionWeightThroughLengthAndIndex(length, index) {\n if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) {\n return index % 2 === 0 ? 3 : 1;\n }\n return index % 2 === 0 ? 1 : 3;\n}\n\n/**\n * Calculate EAN Check Digit\n * Reference: https://en.wikipedia.org/wiki/International_Article_Number#Calculation_of_checksum_digit\n *\n * @param {string} ean\n * @return {number}\n */\nfunction calculateCheckDigit(ean) {\n var checksum = ean.slice(0, -1).split('').map(function (char, index) {\n return Number(char) * getPositionWeightThroughLengthAndIndex(ean.length, index);\n }).reduce(function (acc, partialSum) {\n return acc + partialSum;\n }, 0);\n var remainder = 10 - checksum % 10;\n return remainder < 10 ? remainder : 0;\n}\n\n/**\n * Check if string is valid EAN:\n * Matches EAN-8/EAN-13/EAN-14 regex\n * Has valid check digit.\n *\n * @param {string} str\n * @return {boolean}\n */\nfunction isEAN(str) {\n (0, _assertString.default)(str);\n var actualCheckDigit = Number(str.slice(-1));\n return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isEmail;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isByteLength = _interopRequireDefault(require(\"./isByteLength\"));\nvar _isFQDN = _interopRequireDefault(require(\"./isFQDN\"));\nvar _isIP = _interopRequireDefault(require(\"./isIP\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_email_options = {\n allow_display_name: false,\n allow_underscores: false,\n require_display_name: false,\n allow_utf8_local_part: true,\n require_tld: true,\n blacklisted_chars: '',\n ignore_max_length: false,\n host_blacklist: [],\n host_whitelist: []\n};\n\n/* eslint-disable max-len */\n/* eslint-disable no-control-regex */\nvar splitNameAddress = /^([^\\x00-\\x1F\\x7F-\\x9F\\cX]+)]/.test(display_name_without_quotes);\n if (contains_illegal) {\n // if contains illegal characters,\n // must to be enclosed in double-quotes, otherwise it's not a valid display name\n if (display_name_without_quotes === display_name) {\n return false;\n }\n\n // the quotes in display name must start with character symbol \\\n var all_start_with_back_slash = display_name_without_quotes.split('\"').length === display_name_without_quotes.split('\\\\\"').length;\n if (!all_start_with_back_slash) {\n return false;\n }\n }\n return true;\n}\nfunction isEmail(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_email_options);\n if (options.require_display_name || options.allow_display_name) {\n var display_email = str.match(splitNameAddress);\n if (display_email) {\n var display_name = display_email[1];\n\n // Remove display name and angle brackets to get email address\n // Can be done in the regex but will introduce a ReDOS (See #1597 for more info)\n str = str.replace(display_name, '').replace(/(^<|>$)/g, '');\n\n // sometimes need to trim the last space to get the display name\n // because there may be a space between display name and email address\n // eg. myname \n // the display name is `myname` instead of `myname `, so need to trim the last space\n if (display_name.endsWith(' ')) {\n display_name = display_name.slice(0, -1);\n }\n if (!validateDisplayName(display_name)) {\n return false;\n }\n } else if (options.require_display_name) {\n return false;\n }\n }\n if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {\n return false;\n }\n var parts = str.split('@');\n var domain = parts.pop();\n var lower_domain = domain.toLowerCase();\n if (options.host_blacklist.includes(lower_domain)) {\n return false;\n }\n if (options.host_whitelist.length > 0 && !options.host_whitelist.includes(lower_domain)) {\n return false;\n }\n var user = parts.join('@');\n if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {\n /*\n Previously we removed dots for gmail addresses before validating.\n This was removed because it allows `multiple..dots@gmail.com`\n to be reported as valid, but it is not.\n Gmail only normalizes single dots, removing them from here is pointless,\n should be done in normalizeEmail\n */\n user = user.toLowerCase();\n\n // Removing sub-address from username before gmail validation\n var username = user.split('+')[0];\n\n // Dots are not included in gmail length restriction\n if (!(0, _isByteLength.default)(username.replace(/\\./g, ''), {\n min: 6,\n max: 30\n })) {\n return false;\n }\n var _user_parts = username.split('.');\n for (var i = 0; i < _user_parts.length; i++) {\n if (!gmailUserPart.test(_user_parts[i])) {\n return false;\n }\n }\n }\n if (options.ignore_max_length === false && (!(0, _isByteLength.default)(user, {\n max: 64\n }) || !(0, _isByteLength.default)(domain, {\n max: 254\n }))) {\n return false;\n }\n if (!(0, _isFQDN.default)(domain, {\n require_tld: options.require_tld,\n ignore_max_length: options.ignore_max_length,\n allow_underscores: options.allow_underscores\n })) {\n if (!options.allow_ip_domain) {\n return false;\n }\n if (!(0, _isIP.default)(domain)) {\n if (!domain.startsWith('[') || !domain.endsWith(']')) {\n return false;\n }\n var noBracketdomain = domain.slice(1, -1);\n if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) {\n return false;\n }\n }\n }\n if (user[0] === '\"') {\n user = user.slice(1, user.length - 1);\n return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);\n }\n var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;\n var user_parts = user.split('.');\n for (var _i = 0; _i < user_parts.length; _i++) {\n if (!pattern.test(user_parts[_i])) {\n return false;\n }\n }\n if (options.blacklisted_chars) {\n if (user.search(new RegExp(\"[\".concat(options.blacklisted_chars, \"]+\"), 'g')) !== -1) return false;\n }\n return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isEmpty;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_is_empty_options = {\n ignore_whitespace: false\n};\nfunction isEmpty(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_is_empty_options);\n return (options.ignore_whitespace ? str.trim().length : str.length) === 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isEthereumAddress;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar eth = /^(0x)[0-9a-f]{40}$/i;\nfunction isEthereumAddress(str) {\n (0, _assertString.default)(str);\n return eth.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isFQDN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_fqdn_options = {\n require_tld: true,\n allow_underscores: false,\n allow_trailing_dot: false,\n allow_numeric_tld: false,\n allow_wildcard: false,\n ignore_max_length: false\n};\nfunction isFQDN(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_fqdn_options);\n\n /* Remove the optional trailing dot before checking validity */\n if (options.allow_trailing_dot && str[str.length - 1] === '.') {\n str = str.substring(0, str.length - 1);\n }\n\n /* Remove the optional wildcard before checking validity */\n if (options.allow_wildcard === true && str.indexOf('*.') === 0) {\n str = str.substring(2);\n }\n var parts = str.split('.');\n var tld = parts[parts.length - 1];\n if (options.require_tld) {\n // disallow fqdns without tld\n if (parts.length < 2) {\n return false;\n }\n if (!options.allow_numeric_tld && !/^([a-z\\u00A1-\\u00A8\\u00AA-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n return false;\n }\n\n // disallow spaces\n if (/\\s/.test(tld)) {\n return false;\n }\n }\n\n // reject numeric TLDs\n if (!options.allow_numeric_tld && /^\\d+$/.test(tld)) {\n return false;\n }\n return parts.every(function (part) {\n if (part.length > 63 && !options.ignore_max_length) {\n return false;\n }\n if (!/^[a-z_\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n return false;\n }\n\n // disallow full-width chars\n if (/[\\uff01-\\uff5e]/.test(part)) {\n return false;\n }\n\n // disallow parts starting or ending with hyphen\n if (/^-|-$/.test(part)) {\n return false;\n }\n if (!options.allow_underscores && /_/.test(part)) {\n return false;\n }\n return true;\n });\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isFloat;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isFloat(str, options) {\n (0, _assertString.default)(str);\n options = options || {};\n var float = new RegExp(\"^(?:[-+])?(?:[0-9]+)?(?:\\\\\".concat(options.locale ? _alpha.decimal[options.locale] : '.', \"[0-9]*)?(?:[eE][\\\\+\\\\-]?(?:[0-9]+))?$\"));\n if (str === '' || str === '.' || str === ',' || str === '-' || str === '+') {\n return false;\n }\n var value = parseFloat(str.replace(',', '.'));\n return float.test(str) && (!options.hasOwnProperty('min') || value >= options.min) && (!options.hasOwnProperty('max') || value <= options.max) && (!options.hasOwnProperty('lt') || value < options.lt) && (!options.hasOwnProperty('gt') || value > options.gt);\n}\nvar locales = exports.locales = Object.keys(_alpha.decimal);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isFullWidth;\nexports.fullWidth = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar fullWidth = exports.fullWidth = /[^\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/;\nfunction isFullWidth(str) {\n (0, _assertString.default)(str);\n return fullWidth.test(str);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isHSL;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar hslComma = /^hsla?\\(((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%){2}(,((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%?))?\\)$/i;\nvar hslSpace = /^hsla?\\(((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?))(deg|grad|rad|turn)?(\\s(\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%){2}\\s?(\\/\\s((\\+|\\-)?([0-9]+(\\.[0-9]+)?(e(\\+|\\-)?[0-9]+)?|\\.[0-9]+(e(\\+|\\-)?[0-9]+)?)%?)\\s?)?\\)$/i;\nfunction isHSL(str) {\n (0, _assertString.default)(str);\n\n // Strip duplicate spaces before calling the validation regex (See #1598 for more info)\n var strippedStr = str.replace(/\\s+/g, ' ').replace(/\\s?(hsla?\\(|\\)|,)\\s?/ig, '$1');\n if (strippedStr.indexOf(',') !== -1) {\n return hslComma.test(strippedStr);\n }\n return hslSpace.test(strippedStr);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isHalfWidth;\nexports.halfWidth = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar halfWidth = exports.halfWidth = /[\\u0020-\\u007E\\uFF61-\\uFF9F\\uFFA0-\\uFFDC\\uFFE8-\\uFFEE0-9a-zA-Z]/;\nfunction isHalfWidth(str) {\n (0, _assertString.default)(str);\n return halfWidth.test(str);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isHash;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar lengths = {\n md5: 32,\n md4: 32,\n sha1: 40,\n sha256: 64,\n sha384: 96,\n sha512: 128,\n ripemd128: 32,\n ripemd160: 40,\n tiger128: 32,\n tiger160: 40,\n tiger192: 48,\n crc32: 8,\n crc32b: 8\n};\nfunction isHash(str, algorithm) {\n (0, _assertString.default)(str);\n var hash = new RegExp(\"^[a-fA-F0-9]{\".concat(lengths[algorithm], \"}$\"));\n return hash.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isHexColor;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;\nfunction isHexColor(str) {\n (0, _assertString.default)(str);\n return hexcolor.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isHexadecimal;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar hexadecimal = /^(0x|0h)?[0-9A-F]+$/i;\nfunction isHexadecimal(str) {\n (0, _assertString.default)(str);\n return hexadecimal.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIBAN;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * List of country codes with\n * corresponding IBAN regular expression\n * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n */\nvar ibanRegexThroughCountryCode = {\n AD: /^(AD[0-9]{2})\\d{8}[A-Z0-9]{12}$/,\n AE: /^(AE[0-9]{2})\\d{3}\\d{16}$/,\n AL: /^(AL[0-9]{2})\\d{8}[A-Z0-9]{16}$/,\n AT: /^(AT[0-9]{2})\\d{16}$/,\n AZ: /^(AZ[0-9]{2})[A-Z0-9]{4}\\d{20}$/,\n BA: /^(BA[0-9]{2})\\d{16}$/,\n BE: /^(BE[0-9]{2})\\d{12}$/,\n BG: /^(BG[0-9]{2})[A-Z]{4}\\d{6}[A-Z0-9]{8}$/,\n BH: /^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,\n BR: /^(BR[0-9]{2})\\d{23}[A-Z]{1}[A-Z0-9]{1}$/,\n BY: /^(BY[0-9]{2})[A-Z0-9]{4}\\d{20}$/,\n CH: /^(CH[0-9]{2})\\d{5}[A-Z0-9]{12}$/,\n CR: /^(CR[0-9]{2})\\d{18}$/,\n CY: /^(CY[0-9]{2})\\d{8}[A-Z0-9]{16}$/,\n CZ: /^(CZ[0-9]{2})\\d{20}$/,\n DE: /^(DE[0-9]{2})\\d{18}$/,\n DK: /^(DK[0-9]{2})\\d{14}$/,\n DO: /^(DO[0-9]{2})[A-Z]{4}\\d{20}$/,\n DZ: /^(DZ\\d{24})$/,\n EE: /^(EE[0-9]{2})\\d{16}$/,\n EG: /^(EG[0-9]{2})\\d{25}$/,\n ES: /^(ES[0-9]{2})\\d{20}$/,\n FI: /^(FI[0-9]{2})\\d{14}$/,\n FO: /^(FO[0-9]{2})\\d{14}$/,\n FR: /^(FR[0-9]{2})\\d{10}[A-Z0-9]{11}\\d{2}$/,\n GB: /^(GB[0-9]{2})[A-Z]{4}\\d{14}$/,\n GE: /^(GE[0-9]{2})[A-Z0-9]{2}\\d{16}$/,\n GI: /^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,\n GL: /^(GL[0-9]{2})\\d{14}$/,\n GR: /^(GR[0-9]{2})\\d{7}[A-Z0-9]{16}$/,\n GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,\n HR: /^(HR[0-9]{2})\\d{17}$/,\n HU: /^(HU[0-9]{2})\\d{24}$/,\n IE: /^(IE[0-9]{2})[A-Z0-9]{4}\\d{14}$/,\n IL: /^(IL[0-9]{2})\\d{19}$/,\n IQ: /^(IQ[0-9]{2})[A-Z]{4}\\d{15}$/,\n IR: /^(IR[0-9]{2})0\\d{2}0\\d{18}$/,\n IS: /^(IS[0-9]{2})\\d{22}$/,\n IT: /^(IT[0-9]{2})[A-Z]{1}\\d{10}[A-Z0-9]{12}$/,\n JO: /^(JO[0-9]{2})[A-Z]{4}\\d{22}$/,\n KW: /^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,\n KZ: /^(KZ[0-9]{2})\\d{3}[A-Z0-9]{13}$/,\n LB: /^(LB[0-9]{2})\\d{4}[A-Z0-9]{20}$/,\n LC: /^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,\n LI: /^(LI[0-9]{2})\\d{5}[A-Z0-9]{12}$/,\n LT: /^(LT[0-9]{2})\\d{16}$/,\n LU: /^(LU[0-9]{2})\\d{3}[A-Z0-9]{13}$/,\n LV: /^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,\n MA: /^(MA[0-9]{26})$/,\n MC: /^(MC[0-9]{2})\\d{10}[A-Z0-9]{11}\\d{2}$/,\n MD: /^(MD[0-9]{2})[A-Z0-9]{20}$/,\n ME: /^(ME[0-9]{2})\\d{18}$/,\n MK: /^(MK[0-9]{2})\\d{3}[A-Z0-9]{10}\\d{2}$/,\n MR: /^(MR[0-9]{2})\\d{23}$/,\n MT: /^(MT[0-9]{2})[A-Z]{4}\\d{5}[A-Z0-9]{18}$/,\n MU: /^(MU[0-9]{2})[A-Z]{4}\\d{19}[A-Z]{3}$/,\n MZ: /^(MZ[0-9]{2})\\d{21}$/,\n NL: /^(NL[0-9]{2})[A-Z]{4}\\d{10}$/,\n NO: /^(NO[0-9]{2})\\d{11}$/,\n PK: /^(PK[0-9]{2})[A-Z0-9]{4}\\d{16}$/,\n PL: /^(PL[0-9]{2})\\d{24}$/,\n PS: /^(PS[0-9]{2})[A-Z0-9]{4}\\d{21}$/,\n PT: /^(PT[0-9]{2})\\d{21}$/,\n QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,\n RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,\n RS: /^(RS[0-9]{2})\\d{18}$/,\n SA: /^(SA[0-9]{2})\\d{2}[A-Z0-9]{18}$/,\n SC: /^(SC[0-9]{2})[A-Z]{4}\\d{20}[A-Z]{3}$/,\n SE: /^(SE[0-9]{2})\\d{20}$/,\n SI: /^(SI[0-9]{2})\\d{15}$/,\n SK: /^(SK[0-9]{2})\\d{20}$/,\n SM: /^(SM[0-9]{2})[A-Z]{1}\\d{10}[A-Z0-9]{12}$/,\n SV: /^(SV[0-9]{2})[A-Z0-9]{4}\\d{20}$/,\n TL: /^(TL[0-9]{2})\\d{19}$/,\n TN: /^(TN[0-9]{2})\\d{20}$/,\n TR: /^(TR[0-9]{2})\\d{5}[A-Z0-9]{17}$/,\n UA: /^(UA[0-9]{2})\\d{6}[A-Z0-9]{19}$/,\n VA: /^(VA[0-9]{2})\\d{18}$/,\n VG: /^(VG[0-9]{2})[A-Z0-9]{4}\\d{16}$/,\n XK: /^(XK[0-9]{2})\\d{16}$/\n};\n\n/**\n * Check if the country codes passed are valid using the\n * ibanRegexThroughCountryCode as a reference\n *\n * @param {array} countryCodeArray\n * @return {boolean}\n */\n\nfunction hasOnlyValidCountryCodes(countryCodeArray) {\n var countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray.filter(function (countryCode) {\n return !(countryCode in ibanRegexThroughCountryCode);\n });\n if (countryCodeArrayFilteredWithObjectIbanCode.length > 0) {\n return false;\n }\n return true;\n}\n\n/**\n * Check whether string has correct universal IBAN format\n * The IBAN consists of up to 34 alphanumeric characters, as follows:\n * Country Code using ISO 3166-1 alpha-2, two letters\n * check digits, two digits and\n * Basic Bank Account Number (BBAN), up to 30 alphanumeric characters.\n * NOTE: Permitted IBAN characters are: digits [0-9] and the 26 latin alphabetic [A-Z]\n *\n * @param {string} str - string under validation\n * @param {object} options - object to pass the countries to be either whitelisted or blacklisted\n * @return {boolean}\n */\nfunction hasValidIbanFormat(str, options) {\n // Strip white spaces and hyphens\n var strippedStr = str.replace(/[\\s\\-]+/gi, '').toUpperCase();\n var isoCountryCode = strippedStr.slice(0, 2).toUpperCase();\n var isoCountryCodeInIbanRegexCodeObject = (isoCountryCode in ibanRegexThroughCountryCode);\n if (options.whitelist) {\n if (!hasOnlyValidCountryCodes(options.whitelist)) {\n return false;\n }\n var isoCountryCodeInWhiteList = options.whitelist.includes(isoCountryCode);\n if (!isoCountryCodeInWhiteList) {\n return false;\n }\n }\n if (options.blacklist) {\n var isoCountryCodeInBlackList = options.blacklist.includes(isoCountryCode);\n if (isoCountryCodeInBlackList) {\n return false;\n }\n }\n return isoCountryCodeInIbanRegexCodeObject && ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr);\n}\n\n/**\n * Check whether string has valid IBAN Checksum\n * by performing basic mod-97 operation and\n * the remainder should equal 1\n * -- Start by rearranging the IBAN by moving the four initial characters to the end of the string\n * -- Replace each letter in the string with two digits, A -> 10, B = 11, Z = 35\n * -- Interpret the string as a decimal integer and\n * -- compute the remainder on division by 97 (mod 97)\n * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n *\n * @param {string} str\n * @return {boolean}\n */\nfunction hasValidIbanChecksum(str) {\n var strippedStr = str.replace(/[^A-Z0-9]+/gi, '').toUpperCase(); // Keep only digits and A-Z latin alphabetic\n var rearranged = strippedStr.slice(4) + strippedStr.slice(0, 4);\n var alphaCapsReplacedWithDigits = rearranged.replace(/[A-Z]/g, function (char) {\n return char.charCodeAt(0) - 55;\n });\n var remainder = alphaCapsReplacedWithDigits.match(/\\d{1,7}/g).reduce(function (acc, value) {\n return Number(acc + value) % 97;\n }, '');\n return remainder === 1;\n}\nfunction isIBAN(str) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _assertString.default)(str);\n return hasValidIbanFormat(str, options) && hasValidIbanChecksum(str);\n}\nvar locales = exports.locales = Object.keys(ibanRegexThroughCountryCode);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIMEI;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar imeiRegexWithoutHypens = /^[0-9]{15}$/;\nvar imeiRegexWithHypens = /^\\d{2}-\\d{6}-\\d{6}-\\d{1}$/;\nfunction isIMEI(str, options) {\n (0, _assertString.default)(str);\n options = options || {};\n\n // default regex for checking imei is the one without hyphens\n\n var imeiRegex = imeiRegexWithoutHypens;\n if (options.allow_hyphens) {\n imeiRegex = imeiRegexWithHypens;\n }\n if (!imeiRegex.test(str)) {\n return false;\n }\n str = str.replace(/-/g, '');\n var sum = 0,\n mul = 2,\n l = 14;\n for (var i = 0; i < l; i++) {\n var digit = str.substring(l - i - 1, l - i);\n var tp = parseInt(digit, 10) * mul;\n if (tp >= 10) {\n sum += tp % 10 + 1;\n } else {\n sum += tp;\n }\n if (mul === 1) {\n mul += 1;\n } else {\n mul -= 1;\n }\n }\n var chk = (10 - sum % 10) % 10;\n if (chk !== parseInt(str.substring(14, 15), 10)) {\n return false;\n }\n return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIP;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n11.3. Examples\n\n The following addresses\n\n fe80::1234 (on the 1st link of the node)\n ff02::5678 (on the 5th link of the node)\n ff08::9abc (on the 10th organization of the node)\n\n would be represented as follows:\n\n fe80::1234%1\n ff02::5678%5\n ff08::9abc%10\n\n (Here we assume a natural translation from a zone index to the\n part, where the Nth zone of any scope is translated into\n \"N\".)\n\n If we use interface names as , those addresses could also be\n represented as follows:\n\n fe80::1234%ne0\n ff02::5678%pvc1.3\n ff08::9abc%interface10\n\n where the interface \"ne0\" belongs to the 1st link, \"pvc1.3\" belongs\n to the 5th link, and \"interface10\" belongs to the 10th organization.\n * * */\nvar IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';\nvar IPv4AddressFormat = \"(\".concat(IPv4SegmentFormat, \"[.]){3}\").concat(IPv4SegmentFormat);\nvar IPv4AddressRegExp = new RegExp(\"^\".concat(IPv4AddressFormat, \"$\"));\nvar IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})';\nvar IPv6AddressRegExp = new RegExp('^(' + \"(?:\".concat(IPv6SegmentFormat, \":){7}(?:\").concat(IPv6SegmentFormat, \"|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){6}(?:\").concat(IPv4AddressFormat, \"|:\").concat(IPv6SegmentFormat, \"|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){5}(?::\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,2}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){4}(?:(:\").concat(IPv6SegmentFormat, \"){0,1}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,3}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){3}(?:(:\").concat(IPv6SegmentFormat, \"){0,2}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,4}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){2}(?:(:\").concat(IPv6SegmentFormat, \"){0,3}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,5}|:)|\") + \"(?:\".concat(IPv6SegmentFormat, \":){1}(?:(:\").concat(IPv6SegmentFormat, \"){0,4}:\").concat(IPv4AddressFormat, \"|(:\").concat(IPv6SegmentFormat, \"){1,6}|:)|\") + \"(?::((?::\".concat(IPv6SegmentFormat, \"){0,5}:\").concat(IPv4AddressFormat, \"|(?::\").concat(IPv6SegmentFormat, \"){1,7}|:))\") + ')(%[0-9a-zA-Z-.:]{1,})?$');\nfunction isIP(str) {\n var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n (0, _assertString.default)(str);\n version = String(version);\n if (!version) {\n return isIP(str, 4) || isIP(str, 6);\n }\n if (version === '4') {\n return IPv4AddressRegExp.test(str);\n }\n if (version === '6') {\n return IPv6AddressRegExp.test(str);\n }\n return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIPRange;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isIP = _interopRequireDefault(require(\"./isIP\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar subnetMaybe = /^\\d{1,3}$/;\nvar v4Subnet = 32;\nvar v6Subnet = 128;\nfunction isIPRange(str) {\n var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n (0, _assertString.default)(str);\n var parts = str.split('/');\n\n // parts[0] -> ip, parts[1] -> subnet\n if (parts.length !== 2) {\n return false;\n }\n if (!subnetMaybe.test(parts[1])) {\n return false;\n }\n\n // Disallow preceding 0 i.e. 01, 02, ...\n if (parts[1].length > 1 && parts[1].startsWith('0')) {\n return false;\n }\n var isValidIP = (0, _isIP.default)(parts[0], version);\n if (!isValidIP) {\n return false;\n }\n\n // Define valid subnet according to IP's version\n var expectedSubnet = null;\n switch (String(version)) {\n case '4':\n expectedSubnet = v4Subnet;\n break;\n case '6':\n expectedSubnet = v6Subnet;\n break;\n default:\n expectedSubnet = (0, _isIP.default)(parts[0], '6') ? v6Subnet : v4Subnet;\n }\n return parts[1] <= expectedSubnet && parts[1] >= 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isISBN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/;\nvar possibleIsbn13 = /^(?:[0-9]{13})$/;\nvar factor = [1, 3];\nfunction isISBN(isbn, options) {\n (0, _assertString.default)(isbn);\n\n // For backwards compatibility:\n // isISBN(str [, version]), i.e. `options` could be used as argument for the legacy `version`\n var version = String((options === null || options === void 0 ? void 0 : options.version) || options);\n if (!(options !== null && options !== void 0 && options.version || options)) {\n return isISBN(isbn, {\n version: 10\n }) || isISBN(isbn, {\n version: 13\n });\n }\n var sanitizedIsbn = isbn.replace(/[\\s-]+/g, '');\n var checksum = 0;\n if (version === '10') {\n if (!possibleIsbn10.test(sanitizedIsbn)) {\n return false;\n }\n for (var i = 0; i < version - 1; i++) {\n checksum += (i + 1) * sanitizedIsbn.charAt(i);\n }\n if (sanitizedIsbn.charAt(9) === 'X') {\n checksum += 10 * 10;\n } else {\n checksum += 10 * sanitizedIsbn.charAt(9);\n }\n if (checksum % 11 === 0) {\n return true;\n }\n } else if (version === '13') {\n if (!possibleIsbn13.test(sanitizedIsbn)) {\n return false;\n }\n for (var _i = 0; _i < 12; _i++) {\n checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i);\n }\n if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) {\n return true;\n }\n }\n return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isISIN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;\n\n// this link details how the check digit is calculated:\n// https://www.isin.org/isin-format/. it is a little bit\n// odd in that it works with digits, not numbers. in order\n// to make only one pass through the ISIN characters, the\n// each alpha character is handled as 2 characters within\n// the loop.\n\nfunction isISIN(str) {\n (0, _assertString.default)(str);\n if (!isin.test(str)) {\n return false;\n }\n var double = true;\n var sum = 0;\n // convert values\n for (var i = str.length - 2; i >= 0; i--) {\n if (str[i] >= 'A' && str[i] <= 'Z') {\n var value = str[i].charCodeAt(0) - 55;\n var lo = value % 10;\n var hi = Math.trunc(value / 10);\n // letters have two digits, so handle the low order\n // and high order digits separately.\n for (var _i = 0, _arr = [lo, hi]; _i < _arr.length; _i++) {\n var digit = _arr[_i];\n if (double) {\n if (digit >= 5) {\n sum += 1 + (digit - 5) * 2;\n } else {\n sum += digit * 2;\n }\n } else {\n sum += digit;\n }\n double = !double;\n }\n } else {\n var _digit = str[i].charCodeAt(0) - '0'.charCodeAt(0);\n if (double) {\n if (_digit >= 5) {\n sum += 1 + (_digit - 5) * 2;\n } else {\n sum += _digit * 2;\n }\n } else {\n sum += _digit;\n }\n double = !double;\n }\n }\n var check = Math.trunc((sum + 9) / 10) * 10 - sum;\n return +str[str.length - 1] === check;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CountryCodes = void 0;\nexports.default = isISO31661Alpha2;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\nvar validISO31661Alpha2CountriesCodes = new Set(['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW']);\nfunction isISO31661Alpha2(str) {\n (0, _assertString.default)(str);\n return validISO31661Alpha2CountriesCodes.has(str.toUpperCase());\n}\nvar CountryCodes = exports.CountryCodes = validISO31661Alpha2CountriesCodes;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isISO31661Alpha3;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3\nvar validISO31661Alpha3CountriesCodes = new Set(['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE']);\nfunction isISO31661Alpha3(str) {\n (0, _assertString.default)(str);\n return validISO31661Alpha3CountriesCodes.has(str.toUpperCase());\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CurrencyCodes = void 0;\nexports.default = isISO4217;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// from https://en.wikipedia.org/wiki/ISO_4217\nvar validISO4217CurrencyCodes = new Set(['AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLE', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'USN', 'UYI', 'UYU', 'UYW', 'UZS', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XAG', 'XAU', 'XBA', 'XBB', 'XBC', 'XBD', 'XCD', 'XDR', 'XOF', 'XPD', 'XPF', 'XPT', 'XSU', 'XTS', 'XUA', 'XXX', 'YER', 'ZAR', 'ZMW', 'ZWL']);\nfunction isISO4217(str) {\n (0, _assertString.default)(str);\n return validISO4217CurrencyCodes.has(str.toUpperCase());\n}\nvar CurrencyCodes = exports.CurrencyCodes = validISO4217CurrencyCodes;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isFreightContainerID = void 0;\nexports.isISO6346 = isISO6346;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// https://en.wikipedia.org/wiki/ISO_6346\n// according to ISO6346 standard, checksum digit is mandatory for freight container but recommended\n// for other container types (J and Z)\nvar isISO6346Str = /^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/;\nvar isDigit = /^[0-9]$/;\nfunction isISO6346(str) {\n (0, _assertString.default)(str);\n str = str.toUpperCase();\n if (!isISO6346Str.test(str)) return false;\n if (str.length === 11) {\n var sum = 0;\n for (var i = 0; i < str.length - 1; i++) {\n if (!isDigit.test(str[i])) {\n var convertedCode = void 0;\n var letterCode = str.charCodeAt(i) - 55;\n if (letterCode < 11) convertedCode = letterCode;else if (letterCode >= 11 && letterCode <= 20) convertedCode = 12 + letterCode % 11;else if (letterCode >= 21 && letterCode <= 30) convertedCode = 23 + letterCode % 21;else convertedCode = 34 + letterCode % 31;\n sum += convertedCode * Math.pow(2, i);\n } else sum += str[i] * Math.pow(2, i);\n }\n var checkSumDigit = sum % 11;\n return Number(str[str.length - 1]) === checkSumDigit;\n }\n return true;\n}\nvar isFreightContainerID = exports.isFreightContainerID = isISO6346;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isISO6391;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar isISO6391Set = new Set(['aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu', 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'io', 'is', 'it', 'iu', 'ja', 'jv', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny', 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc', 'sd', 'se', 'sg', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've', 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu']);\nfunction isISO6391(str) {\n (0, _assertString.default)(str);\n return isISO6391Set.has(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isISO8601;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* eslint-disable max-len */\n// from http://goo.gl/0ejHHW\nvar iso8601 = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\n// same as above, except with a strict 'T' separator between date and time\nvar iso8601StrictSeparator = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\n/* eslint-enable max-len */\nvar isValidDate = function isValidDate(str) {\n // str must have passed the ISO8601 check\n // this check is meant to catch invalid dates\n // like 2009-02-31\n // first check for ordinal dates\n var ordinalMatch = str.match(/^(\\d{4})-?(\\d{3})([ T]{1}\\.*|$)/);\n if (ordinalMatch) {\n var oYear = Number(ordinalMatch[1]);\n var oDay = Number(ordinalMatch[2]);\n // if is leap year\n if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0) return oDay <= 366;\n return oDay <= 365;\n }\n var match = str.match(/(\\d{4})-?(\\d{0,2})-?(\\d*)/).map(Number);\n var year = match[1];\n var month = match[2];\n var day = match[3];\n var monthString = month ? \"0\".concat(month).slice(-2) : month;\n var dayString = day ? \"0\".concat(day).slice(-2) : day;\n\n // create a date object and compare\n var d = new Date(\"\".concat(year, \"-\").concat(monthString || '01', \"-\").concat(dayString || '01'));\n if (month && day) {\n return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day;\n }\n return true;\n};\nfunction isISO8601(str) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _assertString.default)(str);\n var check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str);\n if (check && options.strict) return isValidDate(str);\n return check;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isISRC;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// see http://isrc.ifpi.org/en/isrc-standard/code-syntax\nvar isrc = /^[A-Z]{2}[0-9A-Z]{3}\\d{2}\\d{5}$/;\nfunction isISRC(str) {\n (0, _assertString.default)(str);\n return isrc.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isISSN;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar issn = '^\\\\d{4}-?\\\\d{3}[\\\\dX]$';\nfunction isISSN(str) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _assertString.default)(str);\n var testIssn = issn;\n testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn;\n testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i');\n if (!testIssn.test(str)) {\n return false;\n }\n var digits = str.replace('-', '').toUpperCase();\n var checksum = 0;\n for (var i = 0; i < digits.length; i++) {\n var digit = digits[i];\n checksum += (digit === 'X' ? 10 : +digit) * (8 - i);\n }\n return checksum % 11 === 0;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIdentityCard;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isInt = _interopRequireDefault(require(\"./isInt\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar validators = {\n PL: function PL(str) {\n (0, _assertString.default)(str);\n var weightOfDigits = {\n 1: 1,\n 2: 3,\n 3: 7,\n 4: 9,\n 5: 1,\n 6: 3,\n 7: 7,\n 8: 9,\n 9: 1,\n 10: 3,\n 11: 0\n };\n if (str != null && str.length === 11 && (0, _isInt.default)(str, {\n allow_leading_zeroes: true\n })) {\n var digits = str.split('').slice(0, -1);\n var sum = digits.reduce(function (acc, digit, index) {\n return acc + Number(digit) * weightOfDigits[index + 1];\n }, 0);\n var modulo = sum % 10;\n var lastDigit = Number(str.charAt(str.length - 1));\n if (modulo === 0 && lastDigit === 0 || lastDigit === 10 - modulo) {\n return true;\n }\n }\n return false;\n },\n ES: function ES(str) {\n (0, _assertString.default)(str);\n var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/;\n var charsValue = {\n X: 0,\n Y: 1,\n Z: 2\n };\n var controlDigits = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E'];\n\n // sanitize user input\n var sanitized = str.trim().toUpperCase();\n\n // validate the data structure\n if (!DNI.test(sanitized)) {\n return false;\n }\n\n // validate the control digit\n var number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function (char) {\n return charsValue[char];\n });\n return sanitized.endsWith(controlDigits[number % 23]);\n },\n FI: function FI(str) {\n // https://dvv.fi/en/personal-identity-code#:~:text=control%20character%20for%20a-,personal,-identity%20code%20calculated\n (0, _assertString.default)(str);\n if (str.length !== 11) {\n return false;\n }\n if (!str.match(/^\\d{6}[\\-A\\+]\\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)) {\n return false;\n }\n var checkDigits = '0123456789ABCDEFHJKLMNPRSTUVWXY';\n var idAsNumber = parseInt(str.slice(0, 6), 10) * 1000 + parseInt(str.slice(7, 10), 10);\n var remainder = idAsNumber % 31;\n var checkDigit = checkDigits[remainder];\n return checkDigit === str.slice(10, 11);\n },\n IN: function IN(str) {\n var DNI = /^[1-9]\\d{3}\\s?\\d{4}\\s?\\d{4}$/;\n\n // multiplication table\n var d = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]];\n\n // permutation table\n var p = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]];\n\n // sanitize user input\n var sanitized = str.trim();\n\n // validate the data structure\n if (!DNI.test(sanitized)) {\n return false;\n }\n var c = 0;\n var invertedArray = sanitized.replace(/\\s/g, '').split('').map(Number).reverse();\n invertedArray.forEach(function (val, i) {\n c = d[c][p[i % 8][val]];\n });\n return c === 0;\n },\n IR: function IR(str) {\n if (!str.match(/^\\d{10}$/)) return false;\n str = \"0000\".concat(str).slice(str.length - 6);\n if (parseInt(str.slice(3, 9), 10) === 0) return false;\n var lastNumber = parseInt(str.slice(9, 10), 10);\n var sum = 0;\n for (var i = 0; i < 9; i++) {\n sum += parseInt(str.slice(i, i + 1), 10) * (10 - i);\n }\n sum %= 11;\n return sum < 2 && lastNumber === sum || sum >= 2 && lastNumber === 11 - sum;\n },\n IT: function IT(str) {\n if (str.length !== 9) return false;\n if (str === 'CA00000AA') return false; // https://it.wikipedia.org/wiki/Carta_d%27identit%C3%A0_elettronica_italiana\n return str.search(/C[A-Z]\\d{5}[A-Z]{2}/i) > -1;\n },\n NO: function NO(str) {\n var sanitized = str.trim();\n if (isNaN(Number(sanitized))) return false;\n if (sanitized.length !== 11) return false;\n if (sanitized === '00000000000') return false;\n\n // https://no.wikipedia.org/wiki/F%C3%B8dselsnummer\n var f = sanitized.split('').map(Number);\n var k1 = (11 - (3 * f[0] + 7 * f[1] + 6 * f[2] + 1 * f[3] + 8 * f[4] + 9 * f[5] + 4 * f[6] + 5 * f[7] + 2 * f[8]) % 11) % 11;\n var k2 = (11 - (5 * f[0] + 4 * f[1] + 3 * f[2] + 2 * f[3] + 7 * f[4] + 6 * f[5] + 5 * f[6] + 4 * f[7] + 3 * f[8] + 2 * k1) % 11) % 11;\n if (k1 !== f[9] || k2 !== f[10]) return false;\n return true;\n },\n TH: function TH(str) {\n if (!str.match(/^[1-8]\\d{12}$/)) return false;\n\n // validate check digit\n var sum = 0;\n for (var i = 0; i < 12; i++) {\n sum += parseInt(str[i], 10) * (13 - i);\n }\n return str[12] === ((11 - sum % 11) % 10).toString();\n },\n LK: function LK(str) {\n var old_nic = /^[1-9]\\d{8}[vx]$/i;\n var new_nic = /^[1-9]\\d{11}$/i;\n if (str.length === 10 && old_nic.test(str)) return true;else if (str.length === 12 && new_nic.test(str)) return true;\n return false;\n },\n 'he-IL': function heIL(str) {\n var DNI = /^\\d{9}$/;\n\n // sanitize user input\n var sanitized = str.trim();\n\n // validate the data structure\n if (!DNI.test(sanitized)) {\n return false;\n }\n var id = sanitized;\n var sum = 0,\n incNum;\n for (var i = 0; i < id.length; i++) {\n incNum = Number(id[i]) * (i % 2 + 1); // Multiply number by 1 or 2\n sum += incNum > 9 ? incNum - 9 : incNum; // Sum the digits up and add to total\n }\n return sum % 10 === 0;\n },\n 'ar-LY': function arLY(str) {\n // Libya National Identity Number NIN is 12 digits, the first digit is either 1 or 2\n var NIN = /^(1|2)\\d{11}$/;\n\n // sanitize user input\n var sanitized = str.trim();\n\n // validate the data structure\n if (!NIN.test(sanitized)) {\n return false;\n }\n return true;\n },\n 'ar-TN': function arTN(str) {\n var DNI = /^\\d{8}$/;\n\n // sanitize user input\n var sanitized = str.trim();\n\n // validate the data structure\n if (!DNI.test(sanitized)) {\n return false;\n }\n return true;\n },\n 'zh-CN': function zhCN(str) {\n var provincesAndCities = ['11',\n // 北京\n '12',\n // 天津\n '13',\n // 河北\n '14',\n // 山西\n '15',\n // 内蒙古\n '21',\n // 辽宁\n '22',\n // 吉林\n '23',\n // 黑龙江\n '31',\n // 上海\n '32',\n // 江苏\n '33',\n // 浙江\n '34',\n // 安徽\n '35',\n // 福建\n '36',\n // 江西\n '37',\n // 山东\n '41',\n // 河南\n '42',\n // 湖北\n '43',\n // 湖南\n '44',\n // 广东\n '45',\n // 广西\n '46',\n // 海南\n '50',\n // 重庆\n '51',\n // 四川\n '52',\n // 贵州\n '53',\n // 云南\n '54',\n // 西藏\n '61',\n // 陕西\n '62',\n // 甘肃\n '63',\n // 青海\n '64',\n // 宁夏\n '65',\n // 新疆\n '71',\n // 台湾\n '81',\n // 香港\n '82',\n // 澳门\n '91' // 国外\n ];\n var powers = ['7', '9', '10', '5', '8', '4', '2', '1', '6', '3', '7', '9', '10', '5', '8', '4', '2'];\n var parityBit = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];\n var checkAddressCode = function checkAddressCode(addressCode) {\n return provincesAndCities.includes(addressCode);\n };\n var checkBirthDayCode = function checkBirthDayCode(birDayCode) {\n var yyyy = parseInt(birDayCode.substring(0, 4), 10);\n var mm = parseInt(birDayCode.substring(4, 6), 10);\n var dd = parseInt(birDayCode.substring(6), 10);\n var xdata = new Date(yyyy, mm - 1, dd);\n if (xdata > new Date()) {\n return false;\n // eslint-disable-next-line max-len\n } else if (xdata.getFullYear() === yyyy && xdata.getMonth() === mm - 1 && xdata.getDate() === dd) {\n return true;\n }\n return false;\n };\n var getParityBit = function getParityBit(idCardNo) {\n var id17 = idCardNo.substring(0, 17);\n var power = 0;\n for (var i = 0; i < 17; i++) {\n power += parseInt(id17.charAt(i), 10) * parseInt(powers[i], 10);\n }\n var mod = power % 11;\n return parityBit[mod];\n };\n var checkParityBit = function checkParityBit(idCardNo) {\n return getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase();\n };\n var check15IdCardNo = function check15IdCardNo(idCardNo) {\n var check = /^[1-9]\\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\\d{3}$/.test(idCardNo);\n if (!check) return false;\n var addressCode = idCardNo.substring(0, 2);\n check = checkAddressCode(addressCode);\n if (!check) return false;\n var birDayCode = \"19\".concat(idCardNo.substring(6, 12));\n check = checkBirthDayCode(birDayCode);\n if (!check) return false;\n return true;\n };\n var check18IdCardNo = function check18IdCardNo(idCardNo) {\n var check = /^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\\d{3}(\\d|x|X)$/.test(idCardNo);\n if (!check) return false;\n var addressCode = idCardNo.substring(0, 2);\n check = checkAddressCode(addressCode);\n if (!check) return false;\n var birDayCode = idCardNo.substring(6, 14);\n check = checkBirthDayCode(birDayCode);\n if (!check) return false;\n return checkParityBit(idCardNo);\n };\n var checkIdCardNo = function checkIdCardNo(idCardNo) {\n var check = /^\\d{15}|(\\d{17}(\\d|x|X))$/.test(idCardNo);\n if (!check) return false;\n if (idCardNo.length === 15) {\n return check15IdCardNo(idCardNo);\n }\n return check18IdCardNo(idCardNo);\n };\n return checkIdCardNo(str);\n },\n 'zh-HK': function zhHK(str) {\n // sanitize user input\n str = str.trim();\n\n // HKID number starts with 1 or 2 letters, followed by 6 digits,\n // then a checksum contained in square / round brackets or nothing\n var regexHKID = /^[A-Z]{1,2}[0-9]{6}((\\([0-9A]\\))|(\\[[0-9A]\\])|([0-9A]))$/;\n var regexIsDigit = /^[0-9]$/;\n\n // convert the user input to all uppercase and apply regex\n str = str.toUpperCase();\n if (!regexHKID.test(str)) return false;\n str = str.replace(/\\[|\\]|\\(|\\)/g, '');\n if (str.length === 8) str = \"3\".concat(str);\n var checkSumVal = 0;\n for (var i = 0; i <= 7; i++) {\n var convertedChar = void 0;\n if (!regexIsDigit.test(str[i])) convertedChar = (str[i].charCodeAt(0) - 55) % 11;else convertedChar = str[i];\n checkSumVal += convertedChar * (9 - i);\n }\n checkSumVal %= 11;\n var checkSumConverted;\n if (checkSumVal === 0) checkSumConverted = '0';else if (checkSumVal === 1) checkSumConverted = 'A';else checkSumConverted = String(11 - checkSumVal);\n if (checkSumConverted === str[str.length - 1]) return true;\n return false;\n },\n 'zh-TW': function zhTW(str) {\n var ALPHABET_CODES = {\n A: 10,\n B: 11,\n C: 12,\n D: 13,\n E: 14,\n F: 15,\n G: 16,\n H: 17,\n I: 34,\n J: 18,\n K: 19,\n L: 20,\n M: 21,\n N: 22,\n O: 35,\n P: 23,\n Q: 24,\n R: 25,\n S: 26,\n T: 27,\n U: 28,\n V: 29,\n W: 32,\n X: 30,\n Y: 31,\n Z: 33\n };\n var sanitized = str.trim().toUpperCase();\n if (!/^[A-Z][0-9]{9}$/.test(sanitized)) return false;\n return Array.from(sanitized).reduce(function (sum, number, index) {\n if (index === 0) {\n var code = ALPHABET_CODES[number];\n return code % 10 * 9 + Math.floor(code / 10);\n }\n if (index === 9) {\n return (10 - sum % 10 - Number(number)) % 10 === 0;\n }\n return sum + Number(number) * (9 - index);\n }, 0);\n }\n};\nfunction isIdentityCard(str, locale) {\n (0, _assertString.default)(str);\n if (locale in validators) {\n return validators[locale](str);\n } else if (locale === 'any') {\n for (var key in validators) {\n // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n // istanbul ignore else\n if (validators.hasOwnProperty(key)) {\n var validator = validators[key];\n if (validator(str)) {\n return true;\n }\n }\n }\n return false;\n }\n throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIn;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _toString = _interopRequireDefault(require(\"./util/toString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction isIn(str, options) {\n (0, _assertString.default)(str);\n var i;\n if (Object.prototype.toString.call(options) === '[object Array]') {\n var array = [];\n for (i in options) {\n // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n // istanbul ignore else\n if ({}.hasOwnProperty.call(options, i)) {\n array[i] = (0, _toString.default)(options[i]);\n }\n }\n return array.indexOf(str) >= 0;\n } else if (_typeof(options) === 'object') {\n return options.hasOwnProperty(str);\n } else if (options && typeof options.indexOf === 'function') {\n return options.indexOf(str) >= 0;\n }\n return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isInt;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/;\nvar intLeadingZeroes = /^[-+]?[0-9]+$/;\nfunction isInt(str, options) {\n (0, _assertString.default)(str);\n options = options || {};\n\n // Get the regex to use for testing, based on whether\n // leading zeroes are allowed or not.\n var regex = options.allow_leading_zeroes === false ? int : intLeadingZeroes;\n\n // Check min/max/lt/gt\n var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min;\n var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max;\n var ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt;\n var gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt;\n return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isJSON;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar default_json_options = {\n allow_primitives: false\n};\nfunction isJSON(str, options) {\n (0, _assertString.default)(str);\n try {\n options = (0, _merge.default)(options, default_json_options);\n var primitives = [];\n if (options.allow_primitives) {\n primitives = [null, false, true];\n }\n var obj = JSON.parse(str);\n return primitives.includes(obj) || !!obj && _typeof(obj) === 'object';\n } catch (e) {/* ignore */}\n return false;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isJWT;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isBase = _interopRequireDefault(require(\"./isBase64\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isJWT(str) {\n (0, _assertString.default)(str);\n var dotSplit = str.split('.');\n var len = dotSplit.length;\n if (len !== 3) {\n return false;\n }\n return dotSplit.reduce(function (acc, currElem) {\n return acc && (0, _isBase.default)(currElem, {\n urlSafe: true\n });\n }, true);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isLatLong;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar lat = /^\\(?[+-]?(90(\\.0+)?|[1-8]?\\d(\\.\\d+)?)$/;\nvar long = /^\\s?[+-]?(180(\\.0+)?|1[0-7]\\d(\\.\\d+)?|\\d{1,2}(\\.\\d+)?)\\)?$/;\nvar latDMS = /^(([1-8]?\\d)\\D+([1-5]?\\d|60)\\D+([1-5]?\\d|60)(\\.\\d+)?|90\\D+0\\D+0)\\D+[NSns]?$/i;\nvar longDMS = /^\\s*([1-7]?\\d{1,2}\\D+([1-5]?\\d|60)\\D+([1-5]?\\d|60)(\\.\\d+)?|180\\D+0\\D+0)\\D+[EWew]?$/i;\nvar defaultLatLongOptions = {\n checkDMS: false\n};\nfunction isLatLong(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, defaultLatLongOptions);\n if (!str.includes(',')) return false;\n var pair = str.split(',');\n if (pair[0].startsWith('(') && !pair[1].endsWith(')') || pair[1].endsWith(')') && !pair[0].startsWith('(')) return false;\n if (options.checkDMS) {\n return latDMS.test(pair[0]) && longDMS.test(pair[1]);\n }\n return lat.test(pair[0]) && long.test(pair[1]);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isLength;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/* eslint-disable prefer-rest-params */\nfunction isLength(str, options) {\n (0, _assertString.default)(str);\n var min;\n var max;\n if (_typeof(options) === 'object') {\n min = options.min || 0;\n max = options.max;\n } else {\n // backwards compatibility: isLength(str, min [, max])\n min = arguments[1] || 0;\n max = arguments[2];\n }\n var presentationSequences = str.match(/(\\uFE0F|\\uFE0E)/g) || [];\n var surrogatePairs = str.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g) || [];\n var len = str.length - presentationSequences.length - surrogatePairs.length;\n return len >= min && (typeof max === 'undefined' || len <= max);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isLicensePlate;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar validators = {\n 'cs-CZ': function csCZ(str) {\n return /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str);\n },\n 'de-DE': function deDE(str) {\n return /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\\d{1,4})|([A-Z]{2}[- ]?\\d{1,3})))[- ]?(E|H)?$/.test(str);\n },\n 'de-LI': function deLI(str) {\n return /^FL[- ]?\\d{1,5}[UZ]?$/.test(str);\n },\n 'en-IN': function enIN(str) {\n return /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(str);\n },\n 'es-AR': function esAR(str) {\n return /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str);\n },\n 'fi-FI': function fiFI(str) {\n return /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(str);\n },\n 'hu-HU': function huHU(str) {\n return /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\\d{3})|(M\\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \\d{2}-\\d{2})|(CD \\d{3}-\\d{3})|(C-(C|X) \\d{4})|(X-(A|B|C) \\d{4})|(([EPVZ]-\\d{5}))|(S A[A-Z]{2} \\d{2})|(SP \\d{2}-\\d{2}))$/.test(str);\n },\n 'pt-BR': function ptBR(str) {\n return /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str);\n },\n 'pt-PT': function ptPT(str) {\n return /^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(str);\n },\n 'sq-AL': function sqAL(str) {\n return /^[A-Z]{2}[- ]?((\\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\\d{3}))$/.test(str);\n },\n 'sv-SE': function svSE(str) {\n return /^[A-HJ-PR-UW-Z]{3} ?[\\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(str.trim());\n },\n 'en-PK': function enPK(str) {\n return /(^[A-Z]{2}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\\s|-){0,1})[0-9]{3,4}((\\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\\s|-){0,1})[0-9]{4}((\\s|-)[0-9]{2}){0,1}$)/.test(str.trim());\n }\n};\nfunction isLicensePlate(str, locale) {\n (0, _assertString.default)(str);\n if (locale in validators) {\n return validators[locale](str);\n } else if (locale === 'any') {\n for (var key in validators) {\n /* eslint guard-for-in: 0 */\n var validator = validators[key];\n if (validator(str)) {\n return true;\n }\n }\n return false;\n }\n throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isLocale;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/*\n = 3ALPHA ; selected ISO 639 codes\n *2(\"-\" 3ALPHA) ; permanently reserved\n */\nvar extlang = '([A-Za-z]{3}(-[A-Za-z]{3}){0,2})';\n\n/*\n = 2*3ALPHA ; shortest ISO 639 code\n [\"-\" extlang] ; sometimes followed by\n ; extended language subtags\n / 4ALPHA ; or reserved for future use\n / 5*8ALPHA ; or registered language subtag\n */\nvar language = \"(([a-zA-Z]{2,3}(-\".concat(extlang, \")?)|([a-zA-Z]{5,8}))\");\n\n/*\n = 4ALPHA ; ISO 15924 code\n */\nvar script = '([A-Za-z]{4})';\n\n/*\n = 2ALPHA ; ISO 3166-1 code\n / 3DIGIT ; UN M.49 code\n */\nvar region = '([A-Za-z]{2}|\\\\d{3})';\n\n/*\n = 5*8alphanum ; registered variants\n / (DIGIT 3alphanum)\n */\nvar variant = '([A-Za-z0-9]{5,8}|(\\\\d[A-Z-a-z0-9]{3}))';\n\n/*\n = DIGIT ; 0 - 9\n / %x41-57 ; A - W\n / %x59-5A ; Y - Z\n / %x61-77 ; a - w\n / %x79-7A ; y - z\n */\nvar singleton = '(\\\\d|[A-W]|[Y-Z]|[a-w]|[y-z])';\n\n/*\n = singleton 1*(\"-\" (2*8alphanum))\n ; Single alphanumerics\n ; \"x\" reserved for private use\n */\nvar extension = \"(\".concat(singleton, \"(-[A-Za-z0-9]{2,8})+)\");\n\n/*\n = \"x\" 1*(\"-\" (1*8alphanum))\n */\nvar privateuse = '(x(-[A-Za-z0-9]{1,8})+)';\n\n// irregular tags do not match the 'langtag' production and would not\n// otherwise be considered 'well-formed'. These tags are all valid, but\n// most are deprecated in favor of more modern subtags or subtag combination\n\nvar irregular = '((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|' + '(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|' + '(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))';\n\n// regular tags match the 'langtag' production, but their subtags are not\n// extended language or variant subtags: their meaning is defined by\n// their registration and all of these are deprecated in favor of a more\n// modern subtag or sequence of subtags\n\nvar regular = '((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|' + '(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))';\n\n/*\n = irregular ; non-redundant tags registered\n / regular ; during the RFC 3066 era\n\n */\nvar grandfathered = \"(\".concat(irregular, \"|\").concat(regular, \")\");\n\n/*\n RFC 5646 defines delimitation of subtags via a hyphen:\n\n \"Subtag\" refers to a specific section of a tag, delimited by a\n hyphen, such as the subtags 'zh', 'Hant', and 'CN' in the tag \"zh-\n Hant-CN\". Examples of subtags in this document are enclosed in\n single quotes ('Hant')\n\n However, we need to add \"_\" to maintain the existing behaviour.\n */\nvar delimiter = '(-|_)';\n\n/*\n = language\n [\"-\" script]\n [\"-\" region]\n *(\"-\" variant)\n *(\"-\" extension)\n [\"-\" privateuse]\n */\nvar langtag = \"\".concat(language, \"(\").concat(delimiter).concat(script, \")?(\").concat(delimiter).concat(region, \")?(\").concat(delimiter).concat(variant, \")*(\").concat(delimiter).concat(extension, \")*(\").concat(delimiter).concat(privateuse, \")?\");\n\n/*\n Regex implementation based on BCP RFC 5646\n Tags for Identifying Languages\n https://www.rfc-editor.org/rfc/rfc5646.html\n */\nvar languageTagRegex = new RegExp(\"(^\".concat(privateuse, \"$)|(^\").concat(grandfathered, \"$)|(^\").concat(langtag, \"$)\"));\nfunction isLocale(str) {\n (0, _assertString.default)(str);\n return languageTagRegex.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isLowercase;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isLowercase(str) {\n (0, _assertString.default)(str);\n return str === str.toLowerCase();\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isLuhnNumber;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isLuhnNumber(str) {\n (0, _assertString.default)(str);\n var sanitized = str.replace(/[- ]+/g, '');\n var sum = 0;\n var digit;\n var tmpNum;\n var shouldDouble;\n for (var i = sanitized.length - 1; i >= 0; i--) {\n digit = sanitized.substring(i, i + 1);\n tmpNum = parseInt(digit, 10);\n if (shouldDouble) {\n tmpNum *= 2;\n if (tmpNum >= 10) {\n sum += tmpNum % 10 + 1;\n } else {\n sum += tmpNum;\n }\n } else {\n sum += tmpNum;\n }\n shouldDouble = !shouldDouble;\n }\n return !!(sum % 10 === 0 ? sanitized : false);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMACAddress;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar macAddress48 = /^(?:[0-9a-fA-F]{2}([-:\\s]))([0-9a-fA-F]{2}\\1){4}([0-9a-fA-F]{2})$/;\nvar macAddress48NoSeparators = /^([0-9a-fA-F]){12}$/;\nvar macAddress48WithDots = /^([0-9a-fA-F]{4}\\.){2}([0-9a-fA-F]{4})$/;\nvar macAddress64 = /^(?:[0-9a-fA-F]{2}([-:\\s]))([0-9a-fA-F]{2}\\1){6}([0-9a-fA-F]{2})$/;\nvar macAddress64NoSeparators = /^([0-9a-fA-F]){16}$/;\nvar macAddress64WithDots = /^([0-9a-fA-F]{4}\\.){3}([0-9a-fA-F]{4})$/;\nfunction isMACAddress(str, options) {\n (0, _assertString.default)(str);\n if (options !== null && options !== void 0 && options.eui) {\n options.eui = String(options.eui);\n }\n /**\n * @deprecated `no_colons` TODO: remove it in the next major\n */\n if (options !== null && options !== void 0 && options.no_colons || options !== null && options !== void 0 && options.no_separators) {\n if (options.eui === '48') {\n return macAddress48NoSeparators.test(str);\n }\n if (options.eui === '64') {\n return macAddress64NoSeparators.test(str);\n }\n return macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str);\n }\n if ((options === null || options === void 0 ? void 0 : options.eui) === '48') {\n return macAddress48.test(str) || macAddress48WithDots.test(str);\n }\n if ((options === null || options === void 0 ? void 0 : options.eui) === '64') {\n return macAddress64.test(str) || macAddress64WithDots.test(str);\n }\n return isMACAddress(str, {\n eui: '48'\n }) || isMACAddress(str, {\n eui: '64'\n });\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMD5;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar md5 = /^[a-f0-9]{32}$/;\nfunction isMD5(str) {\n (0, _assertString.default)(str);\n return md5.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMagnetURI;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar magnetURIComponent = /(?:^magnet:\\?|[^?&]&)xt(?:\\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;\nfunction isMagnetURI(url) {\n (0, _assertString.default)(url);\n if (url.indexOf('magnet:?') !== 0) {\n return false;\n }\n return magnetURIComponent.test(url);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMailtoURI;\nvar _trim = _interopRequireDefault(require(\"./trim\"));\nvar _isEmail = _interopRequireDefault(require(\"./isEmail\"));\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction parseMailtoQueryString(queryString) {\n var allowedParams = new Set(['subject', 'body', 'cc', 'bcc']),\n query = {\n cc: '',\n bcc: ''\n };\n var isParseFailed = false;\n var queryParams = queryString.split('&');\n if (queryParams.length > 4) {\n return false;\n }\n var _iterator = _createForOfIteratorHelper(queryParams),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var q = _step.value;\n var _q$split = q.split('='),\n _q$split2 = _slicedToArray(_q$split, 2),\n key = _q$split2[0],\n value = _q$split2[1];\n\n // checked for invalid and duplicated query params\n if (key && !allowedParams.has(key)) {\n isParseFailed = true;\n break;\n }\n if (value && (key === 'cc' || key === 'bcc')) {\n query[key] = value;\n }\n if (key) {\n allowedParams.delete(key);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return isParseFailed ? false : query;\n}\nfunction isMailtoURI(url, options) {\n (0, _assertString.default)(url);\n if (url.indexOf('mailto:') !== 0) {\n return false;\n }\n var _url$replace$split = url.replace('mailto:', '').split('?'),\n _url$replace$split2 = _slicedToArray(_url$replace$split, 2),\n to = _url$replace$split2[0],\n _url$replace$split2$ = _url$replace$split2[1],\n queryString = _url$replace$split2$ === void 0 ? '' : _url$replace$split2$;\n if (!to && !queryString) {\n return true;\n }\n var query = parseMailtoQueryString(queryString);\n if (!query) {\n return false;\n }\n return \"\".concat(to, \",\").concat(query.cc, \",\").concat(query.bcc).split(',').every(function (email) {\n email = (0, _trim.default)(email, ' ');\n if (email) {\n return (0, _isEmail.default)(email, options);\n }\n return true;\n });\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMimeType;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/*\n Checks if the provided string matches to a correct Media type format (MIME type)\n\n This function only checks is the string format follows the\n etablished rules by the according RFC specifications.\n This function supports 'charset' in textual media types\n (https://tools.ietf.org/html/rfc6657).\n\n This function does not check against all the media types listed\n by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml)\n because of lightness purposes : it would require to include\n all these MIME types in this librairy, which would weigh it\n significantly. This kind of effort maybe is not worth for the use that\n this function has in this entire librairy.\n\n More informations in the RFC specifications :\n - https://tools.ietf.org/html/rfc2045\n - https://tools.ietf.org/html/rfc2046\n - https://tools.ietf.org/html/rfc7231#section-3.1.1.1\n - https://tools.ietf.org/html/rfc7231#section-3.1.1.5\n*/\n\n// Match simple MIME types\n// NB :\n// Subtype length must not exceed 100 characters.\n// This rule does not comply to the RFC specs (what is the max length ?).\nvar mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\\/[a-zA-Z0-9\\.\\-\\+_]{1,100}$/i; // eslint-disable-line max-len\n\n// Handle \"charset\" in \"text/*\"\nvar mimeTypeText = /^text\\/[a-zA-Z0-9\\.\\-\\+]{1,100};\\s?charset=(\"[a-zA-Z0-9\\.\\-\\+\\s]{0,70}\"|[a-zA-Z0-9\\.\\-\\+]{0,70})(\\s?\\([a-zA-Z0-9\\.\\-\\+\\s]{1,20}\\))?$/i; // eslint-disable-line max-len\n\n// Handle \"boundary\" in \"multipart/*\"\nvar mimeTypeMultipart = /^multipart\\/[a-zA-Z0-9\\.\\-\\+]{1,100}(;\\s?(boundary|charset)=(\"[a-zA-Z0-9\\.\\-\\+\\s]{0,70}\"|[a-zA-Z0-9\\.\\-\\+]{0,70})(\\s?\\([a-zA-Z0-9\\.\\-\\+\\s]{1,20}\\))?){0,2}$/i; // eslint-disable-line max-len\n\nfunction isMimeType(str) {\n (0, _assertString.default)(str);\n return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMobilePhone;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* eslint-disable max-len */\nvar phones = {\n 'am-AM': /^(\\+?374|0)(33|4[134]|55|77|88|9[13-689])\\d{6}$/,\n 'ar-AE': /^((\\+?971)|0)?5[024568]\\d{7}$/,\n 'ar-BH': /^(\\+?973)?(3|6)\\d{7}$/,\n 'ar-DZ': /^(\\+?213|0)(5|6|7)\\d{8}$/,\n 'ar-LB': /^(\\+?961)?((3|81)\\d{6}|7\\d{7})$/,\n 'ar-EG': /^((\\+?20)|0)?1[0125]\\d{8}$/,\n 'ar-IQ': /^(\\+?964|0)?7[0-9]\\d{8}$/,\n 'ar-JO': /^(\\+?962|0)?7[789]\\d{7}$/,\n 'ar-KW': /^(\\+?965)([569]\\d{7}|41\\d{6})$/,\n 'ar-LY': /^((\\+?218)|0)?(9[1-6]\\d{7}|[1-8]\\d{7,9})$/,\n 'ar-MA': /^(?:(?:\\+|00)212|0)[5-7]\\d{8}$/,\n 'ar-OM': /^((\\+|00)968)?(9[1-9])\\d{6}$/,\n 'ar-PS': /^(\\+?970|0)5[6|9](\\d{7})$/,\n 'ar-SA': /^(!?(\\+?966)|0)?5\\d{8}$/,\n 'ar-SD': /^((\\+?249)|0)?(9[012369]|1[012])\\d{7}$/,\n 'ar-SY': /^(!?(\\+?963)|0)?9\\d{8}$/,\n 'ar-TN': /^(\\+?216)?[2459]\\d{7}$/,\n 'az-AZ': /^(\\+994|0)(10|5[015]|7[07]|99)\\d{7}$/,\n 'bs-BA': /^((((\\+|00)3876)|06))((([0-3]|[5-6])\\d{6})|(4\\d{7}))$/,\n 'be-BY': /^(\\+?375)?(24|25|29|33|44)\\d{7}$/,\n 'bg-BG': /^(\\+?359|0)?8[789]\\d{7}$/,\n 'bn-BD': /^(\\+?880|0)1[13456789][0-9]{8}$/,\n 'ca-AD': /^(\\+376)?[346]\\d{5}$/,\n 'cs-CZ': /^(\\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\n 'da-DK': /^(\\+?45)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'de-DE': /^((\\+49|0)1)(5[0-25-9]\\d|6([23]|0\\d?)|7([0-57-9]|6\\d))\\d{7,9}$/,\n 'de-AT': /^(\\+43|0)\\d{1,4}\\d{3,12}$/,\n 'de-CH': /^(\\+41|0)([1-9])\\d{1,9}$/,\n 'de-LU': /^(\\+352)?((6\\d1)\\d{6})$/,\n 'dv-MV': /^(\\+?960)?(7[2-9]|9[1-9])\\d{5}$/,\n 'el-GR': /^(\\+?30|0)?6(8[5-9]|9(?![26])[0-9])\\d{7}$/,\n 'el-CY': /^(\\+?357?)?(9(9|6)\\d{6})$/,\n 'en-AI': /^(\\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\\d{4}$/,\n 'en-AU': /^(\\+?61|0)4\\d{8}$/,\n 'en-AG': /^(?:\\+1|1)268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}$/,\n 'en-BM': /^(\\+?1)?441(((3|7)\\d{6}$)|(5[0-3][0-9]\\d{4}$)|(59\\d{5}$))/,\n 'en-BS': /^(\\+?1[-\\s]?|0)?\\(?242\\)?[-\\s]?\\d{3}[-\\s]?\\d{4}$/,\n 'en-GB': /^(\\+?44|0)7\\d{9}$/,\n 'en-GG': /^(\\+?44|0)1481\\d{6}$/,\n 'en-GH': /^(\\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\\d{7}$/,\n 'en-GY': /^(\\+592|0)6\\d{6}$/,\n 'en-HK': /^(\\+?852[-\\s]?)?[456789]\\d{3}[-\\s]?\\d{4}$/,\n 'en-MO': /^(\\+?853[-\\s]?)?[6]\\d{3}[-\\s]?\\d{4}$/,\n 'en-IE': /^(\\+?353|0)8[356789]\\d{7}$/,\n 'en-IN': /^(\\+?91|0)?[6789]\\d{9}$/,\n 'en-JM': /^(\\+?876)?\\d{7}$/,\n 'en-KE': /^(\\+?254|0)(7|1)\\d{8}$/,\n 'fr-CF': /^(\\+?236| ?)(70|75|77|72|21|22)\\d{6}$/,\n 'en-SS': /^(\\+?211|0)(9[1257])\\d{7}$/,\n 'en-KI': /^((\\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,\n 'en-KN': /^(?:\\+1|1)869(?:46\\d|48[89]|55[6-8]|66\\d|76[02-7])\\d{4}$/,\n 'en-LS': /^(\\+?266)(22|28|57|58|59|27|52)\\d{6}$/,\n 'en-MT': /^(\\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,\n 'en-MU': /^(\\+?230|0)?\\d{8}$/,\n 'en-MW': /^(\\+?265|0)(((77|88|31|99|98|21)\\d{7})|(((111)|1)\\d{6})|(32000\\d{4}))$/,\n 'en-NA': /^(\\+?264|0)(6|8)\\d{7}$/,\n 'en-NG': /^(\\+?234|0)?[789]\\d{9}$/,\n 'en-NZ': /^(\\+?64|0)[28]\\d{7,9}$/,\n 'en-PG': /^(\\+?675|0)?(7\\d|8[18])\\d{6}$/,\n 'en-PK': /^((00|\\+)?92|0)3[0-6]\\d{8}$/,\n 'en-PH': /^(09|\\+639)\\d{9}$/,\n 'en-RW': /^(\\+?250|0)?[7]\\d{8}$/,\n 'en-SG': /^(\\+65)?[3689]\\d{7}$/,\n 'en-SL': /^(\\+?232|0)\\d{8}$/,\n 'en-TZ': /^(\\+?255|0)?[67]\\d{8}$/,\n 'en-UG': /^(\\+?256|0)?[7]\\d{8}$/,\n 'en-US': /^((\\+1|1)?( |-)?)?(\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,\n 'en-ZA': /^(\\+?27|0)\\d{9}$/,\n 'en-ZM': /^(\\+?26)?09[567]\\d{7}$/,\n 'en-ZW': /^(\\+263)[0-9]{9}$/,\n 'en-BW': /^(\\+?267)?(7[1-8]{1})\\d{6}$/,\n 'es-AR': /^\\+?549(11|[2368]\\d)\\d{8}$/,\n 'es-BO': /^(\\+?591)?(6|7)\\d{7}$/,\n 'es-CO': /^(\\+?57)?3(0(0|1|2|4|5)|1\\d|2[0-4]|5(0|1))\\d{7}$/,\n 'es-CL': /^(\\+?56|0)[2-9]\\d{1}\\d{7}$/,\n 'es-CR': /^(\\+506)?[2-8]\\d{7}$/,\n 'es-CU': /^(\\+53|0053)?5\\d{7}$/,\n 'es-DO': /^(\\+?1)?8[024]9\\d{7}$/,\n 'es-HN': /^(\\+?504)?[9|8|3|2]\\d{7}$/,\n 'es-EC': /^(\\+?593|0)([2-7]|9[2-9])\\d{7}$/,\n 'es-ES': /^(\\+?34)?[6|7]\\d{8}$/,\n 'es-PE': /^(\\+?51)?9\\d{8}$/,\n 'es-MX': /^(\\+?52)?(1|01)?\\d{10,11}$/,\n 'es-NI': /^(\\+?505)\\d{7,8}$/,\n 'es-PA': /^(\\+?507)\\d{7,8}$/,\n 'es-PY': /^(\\+?595|0)9[9876]\\d{7}$/,\n 'es-SV': /^(\\+?503)?[67]\\d{7}$/,\n 'es-UY': /^(\\+598|0)9[1-9][\\d]{6}$/,\n 'es-VE': /^(\\+?58)?(2|4)\\d{9}$/,\n 'et-EE': /^(\\+?372)?\\s?(5|8[1-4])\\s?([0-9]\\s?){6,7}$/,\n 'fa-IR': /^(\\+?98[\\-\\s]?|0)9[0-39]\\d[\\-\\s]?\\d{3}[\\-\\s]?\\d{4}$/,\n 'fi-FI': /^(\\+?358|0)\\s?(4[0-6]|50)\\s?(\\d\\s?){4,8}$/,\n 'fj-FJ': /^(\\+?679)?\\s?\\d{3}\\s?\\d{4}$/,\n 'fo-FO': /^(\\+?298)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'fr-BF': /^(\\+226|0)[67]\\d{7}$/,\n 'fr-BJ': /^(\\+229)\\d{8}$/,\n 'fr-CD': /^(\\+?243|0)?(8|9)\\d{8}$/,\n 'fr-CM': /^(\\+?237)6[0-9]{8}$/,\n 'fr-FR': /^(\\+?33|0)[67]\\d{8}$/,\n 'fr-GF': /^(\\+?594|0|00594)[67]\\d{8}$/,\n 'fr-GP': /^(\\+?590|0|00590)[67]\\d{8}$/,\n 'fr-MQ': /^(\\+?596|0|00596)[67]\\d{8}$/,\n 'fr-PF': /^(\\+?689)?8[789]\\d{6}$/,\n 'fr-RE': /^(\\+?262|0|00262)[67]\\d{8}$/,\n 'fr-WF': /^(\\+681)?\\d{6}$/,\n 'he-IL': /^(\\+972|0)([23489]|5[012345689]|77)[1-9]\\d{6}$/,\n 'hu-HU': /^(\\+?36|06)(20|30|31|50|70)\\d{7}$/,\n 'id-ID': /^(\\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\\s?|\\d]{5,11})$/,\n 'ir-IR': /^(\\+98|0)?9\\d{9}$/,\n 'it-IT': /^(\\+?39)?\\s?3\\d{2} ?\\d{6,7}$/,\n 'it-SM': /^((\\+378)|(0549)|(\\+390549)|(\\+3780549))?6\\d{5,9}$/,\n 'ja-JP': /^(\\+81[ \\-]?(\\(0\\))?|0)[6789]0[ \\-]?\\d{4}[ \\-]?\\d{4}$/,\n 'ka-GE': /^(\\+?995)?(79\\d{7}|5\\d{8})$/,\n 'kk-KZ': /^(\\+?7|8)?7\\d{9}$/,\n 'kl-GL': /^(\\+?299)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'ko-KR': /^((\\+?82)[ \\-]?)?0?1([0|1|6|7|8|9]{1})[ \\-]?\\d{3,4}[ \\-]?\\d{4}$/,\n 'ky-KG': /^(\\+?7\\s?\\+?7|0)\\s?\\d{2}\\s?\\d{3}\\s?\\d{4}$/,\n 'lt-LT': /^(\\+370|8)\\d{8}$/,\n 'lv-LV': /^(\\+?371)2\\d{7}$/,\n 'mg-MG': /^((\\+?261|0)(2|3)\\d)?\\d{7}$/,\n 'mn-MN': /^(\\+|00|011)?976(77|81|88|91|94|95|96|99)\\d{6}$/,\n 'my-MM': /^(\\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,\n 'ms-MY': /^(\\+?60|0)1(([0145](-|\\s)?\\d{7,8})|([236-9](-|\\s)?\\d{7}))$/,\n 'mz-MZ': /^(\\+?258)?8[234567]\\d{7}$/,\n 'nb-NO': /^(\\+?47)?[49]\\d{7}$/,\n 'ne-NP': /^(\\+?977)?9[78]\\d{8}$/,\n 'nl-BE': /^(\\+?32|0)4\\d{8}$/,\n 'nl-NL': /^(((\\+|00)?31\\(0\\))|((\\+|00)?31)|0)6{1}\\d{8}$/,\n 'nl-AW': /^(\\+)?297(56|59|64|73|74|99)\\d{5}$/,\n 'nn-NO': /^(\\+?47)?[49]\\d{7}$/,\n 'pl-PL': /^(\\+?48)? ?([5-8]\\d|45) ?\\d{3} ?\\d{2} ?\\d{2}$/,\n 'pt-BR': /^((\\+?55\\ ?[1-9]{2}\\ ?)|(\\+?55\\ ?\\([1-9]{2}\\)\\ ?)|(0[1-9]{2}\\ ?)|(\\([1-9]{2}\\)\\ ?)|([1-9]{2}\\ ?))((\\d{4}\\-?\\d{4})|(9[1-9]{1}\\d{3}\\-?\\d{4}))$/,\n 'pt-PT': /^(\\+?351)?9[1236]\\d{7}$/,\n 'pt-AO': /^(\\+244)\\d{9}$/,\n 'ro-MD': /^(\\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\\d{6}$/,\n 'ro-RO': /^(\\+?40|0)\\s?7\\d{2}(\\/|\\s|\\.|-)?\\d{3}(\\s|\\.|-)?\\d{3}$/,\n 'ru-RU': /^(\\+?7|8)?9\\d{9}$/,\n 'si-LK': /^(?:0|94|\\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\\d{7}$/,\n 'sl-SI': /^(\\+386\\s?|0)(\\d{1}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2}|\\d{2}\\s?\\d{3}\\s?\\d{3})$/,\n 'sk-SK': /^(\\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\n 'so-SO': /^(\\+?252|0)((6[0-9])\\d{7}|(7[1-9])\\d{7})$/,\n 'sq-AL': /^(\\+355|0)6[789]\\d{6}$/,\n 'sr-RS': /^(\\+3816|06)[- \\d]{5,9}$/,\n 'sv-SE': /^(\\+?46|0)[\\s\\-]?7[\\s\\-]?[02369]([\\s\\-]?\\d){7}$/,\n 'tg-TJ': /^(\\+?992)?[5][5]\\d{7}$/,\n 'th-TH': /^(\\+66|66|0)\\d{9}$/,\n 'tr-TR': /^(\\+?90|0)?5\\d{9}$/,\n 'tk-TM': /^(\\+993|993|8)\\d{8}$/,\n 'uk-UA': /^(\\+?38|8)?0\\d{9}$/,\n 'uz-UZ': /^(\\+?998)?(6[125-79]|7[1-69]|88|9\\d)\\d{7}$/,\n 'vi-VN': /^((\\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,\n 'zh-CN': /^((\\+|00)86)?(1[3-9]|9[28])\\d{9}$/,\n 'zh-TW': /^(\\+?886\\-?|0)?9\\d{8}$/,\n 'dz-BT': /^(\\+?975|0)?(17|16|77|02)\\d{6}$/,\n 'ar-YE': /^(((\\+|00)9677|0?7)[0137]\\d{7}|((\\+|00)967|0)[1-7]\\d{6})$/,\n 'ar-EH': /^(\\+?212|0)[\\s\\-]?(5288|5289)[\\s\\-]?\\d{5}$/,\n 'fa-AF': /^(\\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\\d{7})$/\n};\n/* eslint-enable max-len */\n\n// aliases\nphones['en-CA'] = phones['en-US'];\nphones['fr-CA'] = phones['en-CA'];\nphones['fr-BE'] = phones['nl-BE'];\nphones['zh-HK'] = phones['en-HK'];\nphones['zh-MO'] = phones['en-MO'];\nphones['ga-IE'] = phones['en-IE'];\nphones['fr-CH'] = phones['de-CH'];\nphones['it-CH'] = phones['fr-CH'];\nfunction isMobilePhone(str, locale, options) {\n (0, _assertString.default)(str);\n if (options && options.strictMode && !str.startsWith('+')) {\n return false;\n }\n if (Array.isArray(locale)) {\n return locale.some(function (key) {\n // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n // istanbul ignore else\n if (phones.hasOwnProperty(key)) {\n var phone = phones[key];\n if (phone.test(str)) {\n return true;\n }\n }\n return false;\n });\n } else if (locale in phones) {\n return phones[locale].test(str);\n // alias falsey locale as 'any'\n } else if (!locale || locale === 'any') {\n for (var key in phones) {\n // istanbul ignore else\n if (phones.hasOwnProperty(key)) {\n var phone = phones[key];\n if (phone.test(str)) {\n return true;\n }\n }\n }\n return false;\n }\n throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nvar locales = exports.locales = Object.keys(phones);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMongoId;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isHexadecimal = _interopRequireDefault(require(\"./isHexadecimal\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isMongoId(str) {\n (0, _assertString.default)(str);\n return (0, _isHexadecimal.default)(str) && str.length === 24;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isMultibyte;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* eslint-disable no-control-regex */\nvar multibyte = /[^\\x00-\\x7F]/;\n/* eslint-enable no-control-regex */\n\nfunction isMultibyte(str) {\n (0, _assertString.default)(str);\n return multibyte.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isNumeric;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _alpha = require(\"./alpha\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar numericNoSymbols = /^[0-9]+$/;\nfunction isNumeric(str, options) {\n (0, _assertString.default)(str);\n if (options && options.no_symbols) {\n return numericNoSymbols.test(str);\n }\n return new RegExp(\"^[+-]?([0-9]*[\".concat((options || {}).locale ? _alpha.decimal[options.locale] : '.', \"])?[0-9]+$\")).test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isOctal;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar octal = /^(0o)?[0-7]+$/i;\nfunction isOctal(str) {\n (0, _assertString.default)(str);\n return octal.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isPassportNumber;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * Reference:\n * https://en.wikipedia.org/ -- Wikipedia\n * https://docs.microsoft.com/en-us/microsoft-365/compliance/eu-passport-number -- EU Passport Number\n * https://countrycode.org/ -- Country Codes\n */\nvar passportRegexByCountryCode = {\n AM: /^[A-Z]{2}\\d{7}$/,\n // ARMENIA\n AR: /^[A-Z]{3}\\d{6}$/,\n // ARGENTINA\n AT: /^[A-Z]\\d{7}$/,\n // AUSTRIA\n AU: /^[A-Z]\\d{7}$/,\n // AUSTRALIA\n AZ: /^[A-Z]{1}\\d{8}$/,\n // AZERBAIJAN\n BE: /^[A-Z]{2}\\d{6}$/,\n // BELGIUM\n BG: /^\\d{9}$/,\n // BULGARIA\n BR: /^[A-Z]{2}\\d{6}$/,\n // BRAZIL\n BY: /^[A-Z]{2}\\d{7}$/,\n // BELARUS\n CA: /^[A-Z]{2}\\d{6}$/,\n // CANADA\n CH: /^[A-Z]\\d{7}$/,\n // SWITZERLAND\n CN: /^G\\d{8}$|^E(?![IO])[A-Z0-9]\\d{7}$/,\n // CHINA [G=Ordinary, E=Electronic] followed by 8-digits, or E followed by any UPPERCASE letter (except I and O) followed by 7 digits\n CY: /^[A-Z](\\d{6}|\\d{8})$/,\n // CYPRUS\n CZ: /^\\d{8}$/,\n // CZECH REPUBLIC\n DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,\n // GERMANY\n DK: /^\\d{9}$/,\n // DENMARK\n DZ: /^\\d{9}$/,\n // ALGERIA\n EE: /^([A-Z]\\d{7}|[A-Z]{2}\\d{7})$/,\n // ESTONIA (K followed by 7-digits), e-passports have 2 UPPERCASE followed by 7 digits\n ES: /^[A-Z0-9]{2}([A-Z0-9]?)\\d{6}$/,\n // SPAIN\n FI: /^[A-Z]{2}\\d{7}$/,\n // FINLAND\n FR: /^\\d{2}[A-Z]{2}\\d{5}$/,\n // FRANCE\n GB: /^\\d{9}$/,\n // UNITED KINGDOM\n GR: /^[A-Z]{2}\\d{7}$/,\n // GREECE\n HR: /^\\d{9}$/,\n // CROATIA\n HU: /^[A-Z]{2}(\\d{6}|\\d{7})$/,\n // HUNGARY\n IE: /^[A-Z0-9]{2}\\d{7}$/,\n // IRELAND\n IN: /^[A-Z]{1}-?\\d{7}$/,\n // INDIA\n ID: /^[A-C]\\d{7}$/,\n // INDONESIA\n IR: /^[A-Z]\\d{8}$/,\n // IRAN\n IS: /^(A)\\d{7}$/,\n // ICELAND\n IT: /^[A-Z0-9]{2}\\d{7}$/,\n // ITALY\n JM: /^[Aa]\\d{7}$/,\n // JAMAICA\n JP: /^[A-Z]{2}\\d{7}$/,\n // JAPAN\n KR: /^[MS]\\d{8}$/,\n // SOUTH KOREA, REPUBLIC OF KOREA, [S=PS Passports, M=PM Passports]\n KZ: /^[a-zA-Z]\\d{7}$/,\n // KAZAKHSTAN\n LI: /^[a-zA-Z]\\d{5}$/,\n // LIECHTENSTEIN\n LT: /^[A-Z0-9]{8}$/,\n // LITHUANIA\n LU: /^[A-Z0-9]{8}$/,\n // LUXEMBURG\n LV: /^[A-Z0-9]{2}\\d{7}$/,\n // LATVIA\n LY: /^[A-Z0-9]{8}$/,\n // LIBYA\n MT: /^\\d{7}$/,\n // MALTA\n MZ: /^([A-Z]{2}\\d{7})|(\\d{2}[A-Z]{2}\\d{5})$/,\n // MOZAMBIQUE\n MY: /^[AHK]\\d{8}$/,\n // MALAYSIA\n MX: /^\\d{10,11}$/,\n // MEXICO\n NL: /^[A-Z]{2}[A-Z0-9]{6}\\d$/,\n // NETHERLANDS\n NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\\d{6}$/,\n // NEW ZEALAND\n PH: /^([A-Z](\\d{6}|\\d{7}[A-Z]))|([A-Z]{2}(\\d{6}|\\d{7}))$/,\n // PHILIPPINES\n PK: /^[A-Z]{2}\\d{7}$/,\n // PAKISTAN\n PL: /^[A-Z]{2}\\d{7}$/,\n // POLAND\n PT: /^[A-Z]\\d{6}$/,\n // PORTUGAL\n RO: /^\\d{8,9}$/,\n // ROMANIA\n RU: /^\\d{9}$/,\n // RUSSIAN FEDERATION\n SE: /^\\d{8}$/,\n // SWEDEN\n SL: /^(P)[A-Z]\\d{7}$/,\n // SLOVENIA\n SK: /^[0-9A-Z]\\d{7}$/,\n // SLOVAKIA\n TH: /^[A-Z]{1,2}\\d{6,7}$/,\n // THAILAND\n TR: /^[A-Z]\\d{8}$/,\n // TURKEY\n UA: /^[A-Z]{2}\\d{6}$/,\n // UKRAINE\n US: /^\\d{9}$/,\n // UNITED STATES\n ZA: /^[TAMD]\\d{8}$/ // SOUTH AFRICA\n};\n\n/**\n * Check if str is a valid passport number\n * relative to provided ISO Country Code.\n *\n * @param {string} str\n * @param {string} countryCode\n * @return {boolean}\n */\nfunction isPassportNumber(str, countryCode) {\n (0, _assertString.default)(str);\n /** Remove All Whitespaces, Convert to UPPERCASE */\n var normalizedStr = str.replace(/\\s/g, '').toUpperCase();\n return countryCode.toUpperCase() in passportRegexByCountryCode && passportRegexByCountryCode[countryCode].test(normalizedStr);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isPort;\nvar _isInt = _interopRequireDefault(require(\"./isInt\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isPort(str) {\n return (0, _isInt.default)(str, {\n allow_leading_zeroes: false,\n min: 0,\n max: 65535\n });\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isPostalCode;\nexports.locales = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n// common patterns\nvar threeDigit = /^\\d{3}$/;\nvar fourDigit = /^\\d{4}$/;\nvar fiveDigit = /^\\d{5}$/;\nvar sixDigit = /^\\d{6}$/;\nvar patterns = {\n AD: /^AD\\d{3}$/,\n AT: fourDigit,\n AU: fourDigit,\n AZ: /^AZ\\d{4}$/,\n BA: /^([7-8]\\d{4}$)/,\n BE: fourDigit,\n BG: fourDigit,\n BR: /^\\d{5}-\\d{3}$/,\n BY: /^2[1-4]\\d{4}$/,\n CA: /^[ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][\\s\\-]?\\d[ABCEGHJ-NPRSTV-Z]\\d$/i,\n CH: fourDigit,\n CN: /^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\\d{4}$/,\n CZ: /^\\d{3}\\s?\\d{2}$/,\n DE: fiveDigit,\n DK: fourDigit,\n DO: fiveDigit,\n DZ: fiveDigit,\n EE: fiveDigit,\n ES: /^(5[0-2]{1}|[0-4]{1}\\d{1})\\d{3}$/,\n FI: fiveDigit,\n FR: /^\\d{2}\\s?\\d{3}$/,\n GB: /^(gir\\s?0aa|[a-z]{1,2}\\d[\\da-z]?\\s?(\\d[a-z]{2})?)$/i,\n GR: /^\\d{3}\\s?\\d{2}$/,\n HR: /^([1-5]\\d{4}$)/,\n HT: /^HT\\d{4}$/,\n HU: fourDigit,\n ID: fiveDigit,\n IE: /^(?!.*(?:o))[A-Za-z]\\d[\\dw]\\s\\w{4}$/i,\n IL: /^(\\d{5}|\\d{7})$/,\n IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,\n IR: /^(?!(\\d)\\1{3})[13-9]{4}[1346-9][013-9]{5}$/,\n IS: threeDigit,\n IT: fiveDigit,\n JP: /^\\d{3}\\-\\d{4}$/,\n KE: fiveDigit,\n KR: /^(\\d{5}|\\d{6})$/,\n LI: /^(948[5-9]|949[0-7])$/,\n LT: /^LT\\-\\d{5}$/,\n LU: fourDigit,\n LV: /^LV\\-\\d{4}$/,\n LK: fiveDigit,\n MG: threeDigit,\n MX: fiveDigit,\n MT: /^[A-Za-z]{3}\\s{0,1}\\d{4}$/,\n MY: fiveDigit,\n NL: /^[1-9]\\d{3}\\s?(?!sa|sd|ss)[a-z]{2}$/i,\n NO: fourDigit,\n NP: /^(10|21|22|32|33|34|44|45|56|57)\\d{3}$|^(977)$/i,\n NZ: fourDigit,\n PL: /^\\d{2}\\-\\d{3}$/,\n PR: /^00[679]\\d{2}([ -]\\d{4})?$/,\n PT: /^\\d{4}\\-\\d{3}?$/,\n RO: sixDigit,\n RU: sixDigit,\n SA: fiveDigit,\n SE: /^[1-9]\\d{2}\\s?\\d{2}$/,\n SG: sixDigit,\n SI: fourDigit,\n SK: /^\\d{3}\\s?\\d{2}$/,\n TH: fiveDigit,\n TN: fourDigit,\n TW: /^\\d{3}(\\d{2})?$/,\n UA: fiveDigit,\n US: /^\\d{5}(-\\d{4})?$/,\n ZA: fourDigit,\n ZM: fiveDigit\n};\nvar locales = exports.locales = Object.keys(patterns);\nfunction isPostalCode(str, locale) {\n (0, _assertString.default)(str);\n if (locale in patterns) {\n return patterns[locale].test(str);\n } else if (locale === 'any') {\n for (var key in patterns) {\n // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n // istanbul ignore else\n if (patterns.hasOwnProperty(key)) {\n var pattern = patterns[key];\n if (pattern.test(str)) {\n return true;\n }\n }\n }\n return false;\n }\n throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isRFC3339;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */\n\nvar dateFullYear = /[0-9]{4}/;\nvar dateMonth = /(0[1-9]|1[0-2])/;\nvar dateMDay = /([12]\\d|0[1-9]|3[01])/;\nvar timeHour = /([01][0-9]|2[0-3])/;\nvar timeMinute = /[0-5][0-9]/;\nvar timeSecond = /([0-5][0-9]|60)/;\nvar timeSecFrac = /(\\.[0-9]+)?/;\nvar timeNumOffset = new RegExp(\"[-+]\".concat(timeHour.source, \":\").concat(timeMinute.source));\nvar timeOffset = new RegExp(\"([zZ]|\".concat(timeNumOffset.source, \")\"));\nvar partialTime = new RegExp(\"\".concat(timeHour.source, \":\").concat(timeMinute.source, \":\").concat(timeSecond.source).concat(timeSecFrac.source));\nvar fullDate = new RegExp(\"\".concat(dateFullYear.source, \"-\").concat(dateMonth.source, \"-\").concat(dateMDay.source));\nvar fullTime = new RegExp(\"\".concat(partialTime.source).concat(timeOffset.source));\nvar rfc3339 = new RegExp(\"^\".concat(fullDate.source, \"[ tT]\").concat(fullTime.source, \"$\"));\nfunction isRFC3339(str) {\n (0, _assertString.default)(str);\n return rfc3339.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isRgbColor;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar rgbColor = /^rgb\\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\)$/;\nvar rgbaColor = /^rgba\\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\\.\\d|1(\\.0)?|0(\\.0)?)\\)$/;\nvar rgbColorPercent = /^rgb\\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\\)$/;\nvar rgbaColorPercent = /^rgba\\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\\.\\d|1(\\.0)?|0(\\.0)?)\\)$/;\nfunction isRgbColor(str) {\n var includePercentValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n (0, _assertString.default)(str);\n if (!includePercentValues) {\n return rgbColor.test(str) || rgbaColor.test(str);\n }\n return rgbColor.test(str) || rgbaColor.test(str) || rgbColorPercent.test(str) || rgbaColorPercent.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isSemVer;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _multilineRegex = _interopRequireDefault(require(\"./util/multilineRegex\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * Regular Expression to match\n * semantic versioning (SemVer)\n * built from multi-line, multi-parts regexp\n * Reference: https://semver.org/\n */\nvar semanticVersioningRegex = (0, _multilineRegex.default)(['^(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)', '(?:-((?:0|[1-9]\\\\d*|\\\\d*[a-z-][0-9a-z-]*)(?:\\\\.(?:0|[1-9]\\\\d*|\\\\d*[a-z-][0-9a-z-]*))*))', '?(?:\\\\+([0-9a-z-]+(?:\\\\.[0-9a-z-]+)*))?$'], 'i');\nfunction isSemVer(str) {\n (0, _assertString.default)(str);\n return semanticVersioningRegex.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isSlug;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar charsetRegex = /^[^\\s-_](?!.*?[-_]{2,})[a-z0-9-\\\\][^\\s]*[^-_\\s]$/;\nfunction isSlug(str) {\n (0, _assertString.default)(str);\n return charsetRegex.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isStrongPassword;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar upperCaseRegex = /^[A-Z]$/;\nvar lowerCaseRegex = /^[a-z]$/;\nvar numberRegex = /^[0-9]$/;\nvar symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\\[\\]:\";'<>?,.\\/\\\\ ]$/;\nvar defaultOptions = {\n minLength: 8,\n minLowercase: 1,\n minUppercase: 1,\n minNumbers: 1,\n minSymbols: 1,\n returnScore: false,\n pointsPerUnique: 1,\n pointsPerRepeat: 0.5,\n pointsForContainingLower: 10,\n pointsForContainingUpper: 10,\n pointsForContainingNumber: 10,\n pointsForContainingSymbol: 10\n};\n\n/* Counts number of occurrences of each char in a string\n * could be moved to util/ ?\n*/\nfunction countChars(str) {\n var result = {};\n Array.from(str).forEach(function (char) {\n var curVal = result[char];\n if (curVal) {\n result[char] += 1;\n } else {\n result[char] = 1;\n }\n });\n return result;\n}\n\n/* Return information about a password */\nfunction analyzePassword(password) {\n var charMap = countChars(password);\n var analysis = {\n length: password.length,\n uniqueChars: Object.keys(charMap).length,\n uppercaseCount: 0,\n lowercaseCount: 0,\n numberCount: 0,\n symbolCount: 0\n };\n Object.keys(charMap).forEach(function (char) {\n /* istanbul ignore else */\n if (upperCaseRegex.test(char)) {\n analysis.uppercaseCount += charMap[char];\n } else if (lowerCaseRegex.test(char)) {\n analysis.lowercaseCount += charMap[char];\n } else if (numberRegex.test(char)) {\n analysis.numberCount += charMap[char];\n } else if (symbolRegex.test(char)) {\n analysis.symbolCount += charMap[char];\n }\n });\n return analysis;\n}\nfunction scorePassword(analysis, scoringOptions) {\n var points = 0;\n points += analysis.uniqueChars * scoringOptions.pointsPerUnique;\n points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat;\n if (analysis.lowercaseCount > 0) {\n points += scoringOptions.pointsForContainingLower;\n }\n if (analysis.uppercaseCount > 0) {\n points += scoringOptions.pointsForContainingUpper;\n }\n if (analysis.numberCount > 0) {\n points += scoringOptions.pointsForContainingNumber;\n }\n if (analysis.symbolCount > 0) {\n points += scoringOptions.pointsForContainingSymbol;\n }\n return points;\n}\nfunction isStrongPassword(str) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n (0, _assertString.default)(str);\n var analysis = analyzePassword(str);\n options = (0, _merge.default)(options || {}, defaultOptions);\n if (options.returnScore) {\n return scorePassword(analysis, options);\n }\n return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isSurrogatePair;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar surrogatePair = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/;\nfunction isSurrogatePair(str) {\n (0, _assertString.default)(str);\n return surrogatePair.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isTaxID;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar algorithms = _interopRequireWildcard(require(\"./util/algorithms\"));\nvar _isDate = _interopRequireDefault(require(\"./isDate\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n/**\n * TIN Validation\n * Validates Tax Identification Numbers (TINs) from the US, EU member states and the United Kingdom.\n *\n * EU-UK:\n * National TIN validity is calculated using public algorithms as made available by DG TAXUD.\n *\n * See `https://ec.europa.eu/taxation_customs/tin/specs/FS-TIN%20Algorithms-Public.docx` for more information.\n *\n * US:\n * An Employer Identification Number (EIN), also known as a Federal Tax Identification Number,\n * is used to identify a business entity.\n *\n * NOTES:\n * - Prefix 47 is being reserved for future use\n * - Prefixes 26, 27, 45, 46 and 47 were previously assigned by the Philadelphia campus.\n *\n * See `http://www.irs.gov/Businesses/Small-Businesses-&-Self-Employed/How-EINs-are-Assigned-and-Valid-EIN-Prefixes`\n * for more information.\n */\n\n// Locale functions\n\n/*\n * bg-BG validation function\n * (Edinen graždanski nomer (EGN/ЕГН), persons only)\n * Checks if birth date (first six digits) is valid and calculates check (last) digit\n */\nfunction bgBgCheck(tin) {\n // Extract full year, normalize month and check birth date validity\n var century_year = tin.slice(0, 2);\n var month = parseInt(tin.slice(2, 4), 10);\n if (month > 40) {\n month -= 40;\n century_year = \"20\".concat(century_year);\n } else if (month > 20) {\n month -= 20;\n century_year = \"18\".concat(century_year);\n } else {\n century_year = \"19\".concat(century_year);\n }\n if (month < 10) {\n month = \"0\".concat(month);\n }\n var date = \"\".concat(century_year, \"/\").concat(month, \"/\").concat(tin.slice(4, 6));\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n\n // split digits into an array for further processing\n var digits = tin.split('').map(function (a) {\n return parseInt(a, 10);\n });\n\n // Calculate checksum by multiplying digits with fixed values\n var multip_lookup = [2, 4, 8, 5, 10, 9, 7, 3, 6];\n var checksum = 0;\n for (var i = 0; i < multip_lookup.length; i++) {\n checksum += digits[i] * multip_lookup[i];\n }\n checksum = checksum % 11 === 10 ? 0 : checksum % 11;\n return checksum === digits[9];\n}\n\n/**\n * Check if an input is a valid Canadian SIN (Social Insurance Number)\n *\n * The Social Insurance Number (SIN) is a 9 digit number that\n * you need to work in Canada or to have access to government programs and benefits.\n *\n * https://en.wikipedia.org/wiki/Social_Insurance_Number\n * https://www.canada.ca/en/employment-social-development/services/sin.html\n * https://www.codercrunch.com/challenge/819302488/sin-validator\n *\n * @param {string} input\n * @return {boolean}\n */\nfunction isCanadianSIN(input) {\n var digitsArray = input.split('');\n var even = digitsArray.filter(function (_, idx) {\n return idx % 2;\n }).map(function (i) {\n return Number(i) * 2;\n }).join('').split('');\n var total = digitsArray.filter(function (_, idx) {\n return !(idx % 2);\n }).concat(even).map(function (i) {\n return Number(i);\n }).reduce(function (acc, cur) {\n return acc + cur;\n });\n return total % 10 === 0;\n}\n\n/*\n * cs-CZ validation function\n * (Rodné číslo (RČ), persons only)\n * Checks if birth date (first six digits) is valid and divisibility by 11\n * Material not in DG TAXUD document sourced from:\n * -`https://lorenc.info/3MA381/overeni-spravnosti-rodneho-cisla.htm`\n * -`https://www.mvcr.cz/clanek/rady-a-sluzby-dokumenty-rodne-cislo.aspx`\n */\nfunction csCzCheck(tin) {\n tin = tin.replace(/\\W/, '');\n\n // Extract full year from TIN length\n var full_year = parseInt(tin.slice(0, 2), 10);\n if (tin.length === 10) {\n if (full_year < 54) {\n full_year = \"20\".concat(full_year);\n } else {\n full_year = \"19\".concat(full_year);\n }\n } else {\n if (tin.slice(6) === '000') {\n return false;\n } // Three-zero serial not assigned before 1954\n if (full_year < 54) {\n full_year = \"19\".concat(full_year);\n } else {\n return false; // No 18XX years seen in any of the resources\n }\n }\n // Add missing zero if needed\n if (full_year.length === 3) {\n full_year = [full_year.slice(0, 2), '0', full_year.slice(2)].join('');\n }\n\n // Extract month from TIN and normalize\n var month = parseInt(tin.slice(2, 4), 10);\n if (month > 50) {\n month -= 50;\n }\n if (month > 20) {\n // Month-plus-twenty was only introduced in 2004\n if (parseInt(full_year, 10) < 2004) {\n return false;\n }\n month -= 20;\n }\n if (month < 10) {\n month = \"0\".concat(month);\n }\n\n // Check date validity\n var date = \"\".concat(full_year, \"/\").concat(month, \"/\").concat(tin.slice(4, 6));\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n\n // Verify divisibility by 11\n if (tin.length === 10) {\n if (parseInt(tin, 10) % 11 !== 0) {\n // Some numbers up to and including 1985 are still valid if\n // check (last) digit equals 0 and modulo of first 9 digits equals 10\n var checkdigit = parseInt(tin.slice(0, 9), 10) % 11;\n if (parseInt(full_year, 10) < 1986 && checkdigit === 10) {\n if (parseInt(tin.slice(9), 10) !== 0) {\n return false;\n }\n } else {\n return false;\n }\n }\n }\n return true;\n}\n\n/*\n * de-AT validation function\n * (Abgabenkontonummer, persons/entities)\n * Verify TIN validity by calling luhnCheck()\n */\nfunction deAtCheck(tin) {\n return algorithms.luhnCheck(tin);\n}\n\n/*\n * de-DE validation function\n * (Steueridentifikationsnummer (Steuer-IdNr.), persons only)\n * Tests for single duplicate/triplicate value, then calculates ISO 7064 check (last) digit\n * Partial implementation of spec (same result with both algorithms always)\n */\nfunction deDeCheck(tin) {\n // Split digits into an array for further processing\n var digits = tin.split('').map(function (a) {\n return parseInt(a, 10);\n });\n\n // Fill array with strings of number positions\n var occurences = [];\n for (var i = 0; i < digits.length - 1; i++) {\n occurences.push('');\n for (var j = 0; j < digits.length - 1; j++) {\n if (digits[i] === digits[j]) {\n occurences[i] += j;\n }\n }\n }\n\n // Remove digits with one occurence and test for only one duplicate/triplicate\n occurences = occurences.filter(function (a) {\n return a.length > 1;\n });\n if (occurences.length !== 2 && occurences.length !== 3) {\n return false;\n }\n\n // In case of triplicate value only two digits are allowed next to each other\n if (occurences[0].length === 3) {\n var trip_locations = occurences[0].split('').map(function (a) {\n return parseInt(a, 10);\n });\n var recurrent = 0; // Amount of neighbour occurences\n for (var _i = 0; _i < trip_locations.length - 1; _i++) {\n if (trip_locations[_i] + 1 === trip_locations[_i + 1]) {\n recurrent += 1;\n }\n }\n if (recurrent === 2) {\n return false;\n }\n }\n return algorithms.iso7064Check(tin);\n}\n\n/*\n * dk-DK validation function\n * (CPR-nummer (personnummer), persons only)\n * Checks if birth date (first six digits) is valid and assigned to century (seventh) digit,\n * and calculates check (last) digit\n */\nfunction dkDkCheck(tin) {\n tin = tin.replace(/\\W/, '');\n\n // Extract year, check if valid for given century digit and add century\n var year = parseInt(tin.slice(4, 6), 10);\n var century_digit = tin.slice(6, 7);\n switch (century_digit) {\n case '0':\n case '1':\n case '2':\n case '3':\n year = \"19\".concat(year);\n break;\n case '4':\n case '9':\n if (year < 37) {\n year = \"20\".concat(year);\n } else {\n year = \"19\".concat(year);\n }\n break;\n default:\n if (year < 37) {\n year = \"20\".concat(year);\n } else if (year > 58) {\n year = \"18\".concat(year);\n } else {\n return false;\n }\n break;\n }\n // Add missing zero if needed\n if (year.length === 3) {\n year = [year.slice(0, 2), '0', year.slice(2)].join('');\n }\n // Check date validity\n var date = \"\".concat(year, \"/\").concat(tin.slice(2, 4), \"/\").concat(tin.slice(0, 2));\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n\n // Split digits into an array for further processing\n var digits = tin.split('').map(function (a) {\n return parseInt(a, 10);\n });\n var checksum = 0;\n var weight = 4;\n // Multiply by weight and add to checksum\n for (var i = 0; i < 9; i++) {\n checksum += digits[i] * weight;\n weight -= 1;\n if (weight === 1) {\n weight = 7;\n }\n }\n checksum %= 11;\n if (checksum === 1) {\n return false;\n }\n return checksum === 0 ? digits[9] === 0 : digits[9] === 11 - checksum;\n}\n\n/*\n * el-CY validation function\n * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons only)\n * Verify TIN validity by calculating ASCII value of check (last) character\n */\nfunction elCyCheck(tin) {\n // split digits into an array for further processing\n var digits = tin.slice(0, 8).split('').map(function (a) {\n return parseInt(a, 10);\n });\n var checksum = 0;\n // add digits in even places\n for (var i = 1; i < digits.length; i += 2) {\n checksum += digits[i];\n }\n\n // add digits in odd places\n for (var _i2 = 0; _i2 < digits.length; _i2 += 2) {\n if (digits[_i2] < 2) {\n checksum += 1 - digits[_i2];\n } else {\n checksum += 2 * (digits[_i2] - 2) + 5;\n if (digits[_i2] > 4) {\n checksum += 2;\n }\n }\n }\n return String.fromCharCode(checksum % 26 + 65) === tin.charAt(8);\n}\n\n/*\n * el-GR validation function\n * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons/entities)\n * Verify TIN validity by calculating check (last) digit\n * Algorithm not in DG TAXUD document- sourced from:\n * - `http://epixeirisi.gr/%CE%9A%CE%A1%CE%99%CE%A3%CE%99%CE%9C%CE%91-%CE%98%CE%95%CE%9C%CE%91%CE%A4%CE%91-%CE%A6%CE%9F%CE%A1%CE%9F%CE%9B%CE%9F%CE%93%CE%99%CE%91%CE%A3-%CE%9A%CE%91%CE%99-%CE%9B%CE%9F%CE%93%CE%99%CE%A3%CE%A4%CE%99%CE%9A%CE%97%CE%A3/23791/%CE%91%CF%81%CE%B9%CE%B8%CE%BC%CF%8C%CF%82-%CE%A6%CE%BF%CF%81%CE%BF%CE%BB%CE%BF%CE%B3%CE%B9%CE%BA%CE%BF%CF%8D-%CE%9C%CE%B7%CF%84%CF%81%CF%8E%CE%BF%CF%85`\n */\nfunction elGrCheck(tin) {\n // split digits into an array for further processing\n var digits = tin.split('').map(function (a) {\n return parseInt(a, 10);\n });\n var checksum = 0;\n for (var i = 0; i < 8; i++) {\n checksum += digits[i] * Math.pow(2, 8 - i);\n }\n return checksum % 11 % 10 === digits[8];\n}\n\n/*\n * en-GB validation function (should go here if needed)\n * (National Insurance Number (NINO) or Unique Taxpayer Reference (UTR),\n * persons/entities respectively)\n */\n\n/*\n * en-IE validation function\n * (Personal Public Service Number (PPS No), persons only)\n * Verify TIN validity by calculating check (second to last) character\n */\nfunction enIeCheck(tin) {\n var checksum = algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) {\n return parseInt(a, 10);\n }), 8);\n if (tin.length === 9 && tin[8] !== 'W') {\n checksum += (tin[8].charCodeAt(0) - 64) * 9;\n }\n checksum %= 23;\n if (checksum === 0) {\n return tin[7].toUpperCase() === 'W';\n }\n return tin[7].toUpperCase() === String.fromCharCode(64 + checksum);\n}\n\n// Valid US IRS campus prefixes\nvar enUsCampusPrefix = {\n andover: ['10', '12'],\n atlanta: ['60', '67'],\n austin: ['50', '53'],\n brookhaven: ['01', '02', '03', '04', '05', '06', '11', '13', '14', '16', '21', '22', '23', '25', '34', '51', '52', '54', '55', '56', '57', '58', '59', '65'],\n cincinnati: ['30', '32', '35', '36', '37', '38', '61'],\n fresno: ['15', '24'],\n internet: ['20', '26', '27', '45', '46', '47'],\n kansas: ['40', '44'],\n memphis: ['94', '95'],\n ogden: ['80', '90'],\n philadelphia: ['33', '39', '41', '42', '43', '46', '48', '62', '63', '64', '66', '68', '71', '72', '73', '74', '75', '76', '77', '81', '82', '83', '84', '85', '86', '87', '88', '91', '92', '93', '98', '99'],\n sba: ['31']\n};\n\n// Return an array of all US IRS campus prefixes\nfunction enUsGetPrefixes() {\n var prefixes = [];\n for (var location in enUsCampusPrefix) {\n // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n // istanbul ignore else\n if (enUsCampusPrefix.hasOwnProperty(location)) {\n prefixes.push.apply(prefixes, _toConsumableArray(enUsCampusPrefix[location]));\n }\n }\n return prefixes;\n}\n\n/*\n * en-US validation function\n * Verify that the TIN starts with a valid IRS campus prefix\n */\nfunction enUsCheck(tin) {\n return enUsGetPrefixes().indexOf(tin.slice(0, 2)) !== -1;\n}\n\n/*\n * es-AR validation function\n * Clave Única de Identificación Tributaria (CUIT/CUIL)\n * Sourced from:\n * - https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id_nivel1=3036&id_nivel2=3040&p=Conceptos%20b%C3%A1sicos\n * - https://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Identificaci%C3%B3n_Tributaria\n */\n\nfunction esArCheck(tin) {\n var accum = 0;\n var digits = tin.split('');\n var digit = parseInt(digits.pop(), 10);\n for (var i = 0; i < digits.length; i++) {\n accum += digits[9 - i] * (2 + i % 6);\n }\n var verif = 11 - accum % 11;\n if (verif === 11) {\n verif = 0;\n } else if (verif === 10) {\n verif = 9;\n }\n return digit === verif;\n}\n\n/*\n * es-ES validation function\n * (Documento Nacional de Identidad (DNI)\n * or Número de Identificación de Extranjero (NIE), persons only)\n * Verify TIN validity by calculating check (last) character\n */\nfunction esEsCheck(tin) {\n // Split characters into an array for further processing\n var chars = tin.toUpperCase().split('');\n\n // Replace initial letter if needed\n if (isNaN(parseInt(chars[0], 10)) && chars.length > 1) {\n var lead_replace = 0;\n switch (chars[0]) {\n case 'Y':\n lead_replace = 1;\n break;\n case 'Z':\n lead_replace = 2;\n break;\n default:\n }\n chars.splice(0, 1, lead_replace);\n // Fill with zeros if smaller than proper\n } else {\n while (chars.length < 9) {\n chars.unshift(0);\n }\n }\n\n // Calculate checksum and check according to lookup\n var lookup = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E'];\n chars = chars.join('');\n var checksum = parseInt(chars.slice(0, 8), 10) % 23;\n return chars[8] === lookup[checksum];\n}\n\n/*\n * et-EE validation function\n * (Isikukood (IK), persons only)\n * Checks if birth date (century digit and six following) is valid and calculates check (last) digit\n * Material not in DG TAXUD document sourced from:\n * - `https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Estonia-TIN.pdf`\n */\nfunction etEeCheck(tin) {\n // Extract year and add century\n var full_year = tin.slice(1, 3);\n var century_digit = tin.slice(0, 1);\n switch (century_digit) {\n case '1':\n case '2':\n full_year = \"18\".concat(full_year);\n break;\n case '3':\n case '4':\n full_year = \"19\".concat(full_year);\n break;\n default:\n full_year = \"20\".concat(full_year);\n break;\n }\n // Check date validity\n var date = \"\".concat(full_year, \"/\").concat(tin.slice(3, 5), \"/\").concat(tin.slice(5, 7));\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n\n // Split digits into an array for further processing\n var digits = tin.split('').map(function (a) {\n return parseInt(a, 10);\n });\n var checksum = 0;\n var weight = 1;\n // Multiply by weight and add to checksum\n for (var i = 0; i < 10; i++) {\n checksum += digits[i] * weight;\n weight += 1;\n if (weight === 10) {\n weight = 1;\n }\n }\n // Do again if modulo 11 of checksum is 10\n if (checksum % 11 === 10) {\n checksum = 0;\n weight = 3;\n for (var _i3 = 0; _i3 < 10; _i3++) {\n checksum += digits[_i3] * weight;\n weight += 1;\n if (weight === 10) {\n weight = 1;\n }\n }\n if (checksum % 11 === 10) {\n return digits[10] === 0;\n }\n }\n return checksum % 11 === digits[10];\n}\n\n/*\n * fi-FI validation function\n * (Henkilötunnus (HETU), persons only)\n * Checks if birth date (first six digits plus century symbol) is valid\n * and calculates check (last) digit\n */\nfunction fiFiCheck(tin) {\n // Extract year and add century\n var full_year = tin.slice(4, 6);\n var century_symbol = tin.slice(6, 7);\n switch (century_symbol) {\n case '+':\n full_year = \"18\".concat(full_year);\n break;\n case '-':\n full_year = \"19\".concat(full_year);\n break;\n default:\n full_year = \"20\".concat(full_year);\n break;\n }\n // Check date validity\n var date = \"\".concat(full_year, \"/\").concat(tin.slice(2, 4), \"/\").concat(tin.slice(0, 2));\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n\n // Calculate check character\n var checksum = parseInt(tin.slice(0, 6) + tin.slice(7, 10), 10) % 31;\n if (checksum < 10) {\n return checksum === parseInt(tin.slice(10), 10);\n }\n checksum -= 10;\n var letters_lookup = ['A', 'B', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y'];\n return letters_lookup[checksum] === tin.slice(10);\n}\n\n/*\n * fr/nl-BE validation function\n * (Numéro national (N.N.), persons only)\n * Checks if birth date (first six digits) is valid and calculates check (last two) digits\n */\nfunction frBeCheck(tin) {\n // Zero month/day value is acceptable\n if (tin.slice(2, 4) !== '00' || tin.slice(4, 6) !== '00') {\n // Extract date from first six digits of TIN\n var date = \"\".concat(tin.slice(0, 2), \"/\").concat(tin.slice(2, 4), \"/\").concat(tin.slice(4, 6));\n if (!(0, _isDate.default)(date, 'YY/MM/DD')) {\n return false;\n }\n }\n var checksum = 97 - parseInt(tin.slice(0, 9), 10) % 97;\n var checkdigits = parseInt(tin.slice(9, 11), 10);\n if (checksum !== checkdigits) {\n checksum = 97 - parseInt(\"2\".concat(tin.slice(0, 9)), 10) % 97;\n if (checksum !== checkdigits) {\n return false;\n }\n }\n return true;\n}\n\n/*\n * fr-FR validation function\n * (Numéro fiscal de référence (numéro SPI), persons only)\n * Verify TIN validity by calculating check (last three) digits\n */\nfunction frFrCheck(tin) {\n tin = tin.replace(/\\s/g, '');\n var checksum = parseInt(tin.slice(0, 10), 10) % 511;\n var checkdigits = parseInt(tin.slice(10, 13), 10);\n return checksum === checkdigits;\n}\n\n/*\n * fr/lb-LU validation function\n * (numéro d’identification personnelle, persons only)\n * Verify birth date validity and run Luhn and Verhoeff checks\n */\nfunction frLuCheck(tin) {\n // Extract date and check validity\n var date = \"\".concat(tin.slice(0, 4), \"/\").concat(tin.slice(4, 6), \"/\").concat(tin.slice(6, 8));\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n\n // Run Luhn check\n if (!algorithms.luhnCheck(tin.slice(0, 12))) {\n return false;\n }\n // Remove Luhn check digit and run Verhoeff check\n return algorithms.verhoeffCheck(\"\".concat(tin.slice(0, 11)).concat(tin[12]));\n}\n\n/*\n * hr-HR validation function\n * (Osobni identifikacijski broj (OIB), persons/entities)\n * Verify TIN validity by calling iso7064Check(digits)\n */\nfunction hrHrCheck(tin) {\n return algorithms.iso7064Check(tin);\n}\n\n/*\n * hu-HU validation function\n * (Adóazonosító jel, persons only)\n * Verify TIN validity by calculating check (last) digit\n */\nfunction huHuCheck(tin) {\n // split digits into an array for further processing\n var digits = tin.split('').map(function (a) {\n return parseInt(a, 10);\n });\n var checksum = 8;\n for (var i = 1; i < 9; i++) {\n checksum += digits[i] * (i + 1);\n }\n return checksum % 11 === digits[9];\n}\n\n/*\n * lt-LT validation function (should go here if needed)\n * (Asmens kodas, persons/entities respectively)\n * Current validation check is alias of etEeCheck- same format applies\n */\n\n/*\n * it-IT first/last name validity check\n * Accepts it-IT TIN-encoded names as a three-element character array and checks their validity\n * Due to lack of clarity between resources (\"Are only Italian consonants used?\n * What happens if a person has X in their name?\" etc.) only two test conditions\n * have been implemented:\n * Vowels may only be followed by other vowels or an X character\n * and X characters after vowels may only be followed by other X characters.\n */\nfunction itItNameCheck(name) {\n // true at the first occurence of a vowel\n var vowelflag = false;\n\n // true at the first occurence of an X AFTER vowel\n // (to properly handle last names with X as consonant)\n var xflag = false;\n for (var i = 0; i < 3; i++) {\n if (!vowelflag && /[AEIOU]/.test(name[i])) {\n vowelflag = true;\n } else if (!xflag && vowelflag && name[i] === 'X') {\n xflag = true;\n } else if (i > 0) {\n if (vowelflag && !xflag) {\n if (!/[AEIOU]/.test(name[i])) {\n return false;\n }\n }\n if (xflag) {\n if (!/X/.test(name[i])) {\n return false;\n }\n }\n }\n }\n return true;\n}\n\n/*\n * it-IT validation function\n * (Codice fiscale (TIN-IT), persons only)\n * Verify name, birth date and codice catastale validity\n * and calculate check character.\n * Material not in DG-TAXUD document sourced from:\n * `https://en.wikipedia.org/wiki/Italian_fiscal_code`\n */\nfunction itItCheck(tin) {\n // Capitalize and split characters into an array for further processing\n var chars = tin.toUpperCase().split('');\n\n // Check first and last name validity calling itItNameCheck()\n if (!itItNameCheck(chars.slice(0, 3))) {\n return false;\n }\n if (!itItNameCheck(chars.slice(3, 6))) {\n return false;\n }\n\n // Convert letters in number spaces back to numbers if any\n var number_locations = [6, 7, 9, 10, 12, 13, 14];\n var number_replace = {\n L: '0',\n M: '1',\n N: '2',\n P: '3',\n Q: '4',\n R: '5',\n S: '6',\n T: '7',\n U: '8',\n V: '9'\n };\n for (var _i4 = 0, _number_locations = number_locations; _i4 < _number_locations.length; _i4++) {\n var i = _number_locations[_i4];\n if (chars[i] in number_replace) {\n chars.splice(i, 1, number_replace[chars[i]]);\n }\n }\n\n // Extract month and day, and check date validity\n var month_replace = {\n A: '01',\n B: '02',\n C: '03',\n D: '04',\n E: '05',\n H: '06',\n L: '07',\n M: '08',\n P: '09',\n R: '10',\n S: '11',\n T: '12'\n };\n var month = month_replace[chars[8]];\n var day = parseInt(chars[9] + chars[10], 10);\n if (day > 40) {\n day -= 40;\n }\n if (day < 10) {\n day = \"0\".concat(day);\n }\n var date = \"\".concat(chars[6]).concat(chars[7], \"/\").concat(month, \"/\").concat(day);\n if (!(0, _isDate.default)(date, 'YY/MM/DD')) {\n return false;\n }\n\n // Calculate check character by adding up even and odd characters as numbers\n var checksum = 0;\n for (var _i5 = 1; _i5 < chars.length - 1; _i5 += 2) {\n var char_to_int = parseInt(chars[_i5], 10);\n if (isNaN(char_to_int)) {\n char_to_int = chars[_i5].charCodeAt(0) - 65;\n }\n checksum += char_to_int;\n }\n var odd_convert = {\n // Maps of characters at odd places\n A: 1,\n B: 0,\n C: 5,\n D: 7,\n E: 9,\n F: 13,\n G: 15,\n H: 17,\n I: 19,\n J: 21,\n K: 2,\n L: 4,\n M: 18,\n N: 20,\n O: 11,\n P: 3,\n Q: 6,\n R: 8,\n S: 12,\n T: 14,\n U: 16,\n V: 10,\n W: 22,\n X: 25,\n Y: 24,\n Z: 23,\n 0: 1,\n 1: 0\n };\n for (var _i6 = 0; _i6 < chars.length - 1; _i6 += 2) {\n var _char_to_int = 0;\n if (chars[_i6] in odd_convert) {\n _char_to_int = odd_convert[chars[_i6]];\n } else {\n var multiplier = parseInt(chars[_i6], 10);\n _char_to_int = 2 * multiplier + 1;\n if (multiplier > 4) {\n _char_to_int += 2;\n }\n }\n checksum += _char_to_int;\n }\n if (String.fromCharCode(65 + checksum % 26) !== chars[15]) {\n return false;\n }\n return true;\n}\n\n/*\n * lv-LV validation function\n * (Personas kods (PK), persons only)\n * Check validity of birth date and calculate check (last) digit\n * Support only for old format numbers (not starting with '32', issued before 2017/07/01)\n * Material not in DG TAXUD document sourced from:\n * `https://boot.ritakafija.lv/forums/index.php?/topic/88314-personas-koda-algoritms-%C4%8Deksumma/`\n */\nfunction lvLvCheck(tin) {\n tin = tin.replace(/\\W/, '');\n // Extract date from TIN\n var day = tin.slice(0, 2);\n if (day !== '32') {\n // No date/checksum check if new format\n var month = tin.slice(2, 4);\n if (month !== '00') {\n // No date check if unknown month\n var full_year = tin.slice(4, 6);\n switch (tin[6]) {\n case '0':\n full_year = \"18\".concat(full_year);\n break;\n case '1':\n full_year = \"19\".concat(full_year);\n break;\n default:\n full_year = \"20\".concat(full_year);\n break;\n }\n // Check date validity\n var date = \"\".concat(full_year, \"/\").concat(tin.slice(2, 4), \"/\").concat(day);\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n }\n\n // Calculate check digit\n var checksum = 1101;\n var multip_lookup = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2];\n for (var i = 0; i < tin.length - 1; i++) {\n checksum -= parseInt(tin[i], 10) * multip_lookup[i];\n }\n return parseInt(tin[10], 10) === checksum % 11;\n }\n return true;\n}\n\n/*\n * mt-MT validation function\n * (Identity Card Number or Unique Taxpayer Reference, persons/entities)\n * Verify Identity Card Number structure (no other tests found)\n */\nfunction mtMtCheck(tin) {\n if (tin.length !== 9) {\n // No tests for UTR\n var chars = tin.toUpperCase().split('');\n // Fill with zeros if smaller than proper\n while (chars.length < 8) {\n chars.unshift(0);\n }\n // Validate format according to last character\n switch (tin[7]) {\n case 'A':\n case 'P':\n if (parseInt(chars[6], 10) === 0) {\n return false;\n }\n break;\n default:\n {\n var first_part = parseInt(chars.join('').slice(0, 5), 10);\n if (first_part > 32000) {\n return false;\n }\n var second_part = parseInt(chars.join('').slice(5, 7), 10);\n if (first_part === second_part) {\n return false;\n }\n }\n }\n }\n return true;\n}\n\n/*\n * nl-NL validation function\n * (Burgerservicenummer (BSN) or Rechtspersonen Samenwerkingsverbanden Informatie Nummer (RSIN),\n * persons/entities respectively)\n * Verify TIN validity by calculating check (last) digit (variant of MOD 11)\n */\nfunction nlNlCheck(tin) {\n return algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) {\n return parseInt(a, 10);\n }), 9) % 11 === parseInt(tin[8], 10);\n}\n\n/*\n * pl-PL validation function\n * (Powszechny Elektroniczny System Ewidencji Ludności (PESEL)\n * or Numer identyfikacji podatkowej (NIP), persons/entities)\n * Verify TIN validity by validating birth date (PESEL) and calculating check (last) digit\n */\nfunction plPlCheck(tin) {\n // NIP\n if (tin.length === 10) {\n // Calculate last digit by multiplying with lookup\n var lookup = [6, 5, 7, 2, 3, 4, 5, 6, 7];\n var _checksum = 0;\n for (var i = 0; i < lookup.length; i++) {\n _checksum += parseInt(tin[i], 10) * lookup[i];\n }\n _checksum %= 11;\n if (_checksum === 10) {\n return false;\n }\n return _checksum === parseInt(tin[9], 10);\n }\n\n // PESEL\n // Extract full year using month\n var full_year = tin.slice(0, 2);\n var month = parseInt(tin.slice(2, 4), 10);\n if (month > 80) {\n full_year = \"18\".concat(full_year);\n month -= 80;\n } else if (month > 60) {\n full_year = \"22\".concat(full_year);\n month -= 60;\n } else if (month > 40) {\n full_year = \"21\".concat(full_year);\n month -= 40;\n } else if (month > 20) {\n full_year = \"20\".concat(full_year);\n month -= 20;\n } else {\n full_year = \"19\".concat(full_year);\n }\n // Add leading zero to month if needed\n if (month < 10) {\n month = \"0\".concat(month);\n }\n // Check date validity\n var date = \"\".concat(full_year, \"/\").concat(month, \"/\").concat(tin.slice(4, 6));\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n\n // Calculate last digit by mulitplying with odd one-digit numbers except 5\n var checksum = 0;\n var multiplier = 1;\n for (var _i7 = 0; _i7 < tin.length - 1; _i7++) {\n checksum += parseInt(tin[_i7], 10) * multiplier % 10;\n multiplier += 2;\n if (multiplier > 10) {\n multiplier = 1;\n } else if (multiplier === 5) {\n multiplier += 2;\n }\n }\n checksum = 10 - checksum % 10;\n return checksum === parseInt(tin[10], 10);\n}\n\n/*\n* pt-BR validation function\n* (Cadastro de Pessoas Físicas (CPF, persons)\n* Cadastro Nacional de Pessoas Jurídicas (CNPJ, entities)\n* Both inputs will be validated\n*/\n\nfunction ptBrCheck(tin) {\n if (tin.length === 11) {\n var _sum;\n var remainder;\n _sum = 0;\n if (\n // Reject known invalid CPFs\n tin === '11111111111' || tin === '22222222222' || tin === '33333333333' || tin === '44444444444' || tin === '55555555555' || tin === '66666666666' || tin === '77777777777' || tin === '88888888888' || tin === '99999999999' || tin === '00000000000') return false;\n for (var i = 1; i <= 9; i++) _sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i);\n remainder = _sum * 10 % 11;\n if (remainder === 10) remainder = 0;\n if (remainder !== parseInt(tin.substring(9, 10), 10)) return false;\n _sum = 0;\n for (var _i8 = 1; _i8 <= 10; _i8++) _sum += parseInt(tin.substring(_i8 - 1, _i8), 10) * (12 - _i8);\n remainder = _sum * 10 % 11;\n if (remainder === 10) remainder = 0;\n if (remainder !== parseInt(tin.substring(10, 11), 10)) return false;\n return true;\n }\n if (\n // Reject know invalid CNPJs\n tin === '00000000000000' || tin === '11111111111111' || tin === '22222222222222' || tin === '33333333333333' || tin === '44444444444444' || tin === '55555555555555' || tin === '66666666666666' || tin === '77777777777777' || tin === '88888888888888' || tin === '99999999999999') {\n return false;\n }\n var length = tin.length - 2;\n var identifiers = tin.substring(0, length);\n var verificators = tin.substring(length);\n var sum = 0;\n var pos = length - 7;\n for (var _i9 = length; _i9 >= 1; _i9--) {\n sum += identifiers.charAt(length - _i9) * pos;\n pos -= 1;\n if (pos < 2) {\n pos = 9;\n }\n }\n var result = sum % 11 < 2 ? 0 : 11 - sum % 11;\n if (result !== parseInt(verificators.charAt(0), 10)) {\n return false;\n }\n length += 1;\n identifiers = tin.substring(0, length);\n sum = 0;\n pos = length - 7;\n for (var _i10 = length; _i10 >= 1; _i10--) {\n sum += identifiers.charAt(length - _i10) * pos;\n pos -= 1;\n if (pos < 2) {\n pos = 9;\n }\n }\n result = sum % 11 < 2 ? 0 : 11 - sum % 11;\n if (result !== parseInt(verificators.charAt(1), 10)) {\n return false;\n }\n return true;\n}\n\n/*\n * pt-PT validation function\n * (Número de identificação fiscal (NIF), persons/entities)\n * Verify TIN validity by calculating check (last) digit (variant of MOD 11)\n */\nfunction ptPtCheck(tin) {\n var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) {\n return parseInt(a, 10);\n }), 9) % 11;\n if (checksum > 9) {\n return parseInt(tin[8], 10) === 0;\n }\n return checksum === parseInt(tin[8], 10);\n}\n\n/*\n * ro-RO validation function\n * (Cod Numeric Personal (CNP) or Cod de înregistrare fiscală (CIF),\n * persons only)\n * Verify CNP validity by calculating check (last) digit (test not found for CIF)\n * Material not in DG TAXUD document sourced from:\n * `https://en.wikipedia.org/wiki/National_identification_number#Romania`\n */\nfunction roRoCheck(tin) {\n if (tin.slice(0, 4) !== '9000') {\n // No test found for this format\n // Extract full year using century digit if possible\n var full_year = tin.slice(1, 3);\n switch (tin[0]) {\n case '1':\n case '2':\n full_year = \"19\".concat(full_year);\n break;\n case '3':\n case '4':\n full_year = \"18\".concat(full_year);\n break;\n case '5':\n case '6':\n full_year = \"20\".concat(full_year);\n break;\n default:\n }\n\n // Check date validity\n var date = \"\".concat(full_year, \"/\").concat(tin.slice(3, 5), \"/\").concat(tin.slice(5, 7));\n if (date.length === 8) {\n if (!(0, _isDate.default)(date, 'YY/MM/DD')) {\n return false;\n }\n } else if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n\n // Calculate check digit\n var digits = tin.split('').map(function (a) {\n return parseInt(a, 10);\n });\n var multipliers = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9];\n var checksum = 0;\n for (var i = 0; i < multipliers.length; i++) {\n checksum += digits[i] * multipliers[i];\n }\n if (checksum % 11 === 10) {\n return digits[12] === 1;\n }\n return digits[12] === checksum % 11;\n }\n return true;\n}\n\n/*\n * sk-SK validation function\n * (Rodné číslo (RČ) or bezvýznamové identifikačné číslo (BIČ), persons only)\n * Checks validity of pre-1954 birth numbers (rodné číslo) only\n * Due to the introduction of the pseudo-random BIČ it is not possible to test\n * post-1954 birth numbers without knowing whether they are BIČ or RČ beforehand\n */\nfunction skSkCheck(tin) {\n if (tin.length === 9) {\n tin = tin.replace(/\\W/, '');\n if (tin.slice(6) === '000') {\n return false;\n } // Three-zero serial not assigned before 1954\n\n // Extract full year from TIN length\n var full_year = parseInt(tin.slice(0, 2), 10);\n if (full_year > 53) {\n return false;\n }\n if (full_year < 10) {\n full_year = \"190\".concat(full_year);\n } else {\n full_year = \"19\".concat(full_year);\n }\n\n // Extract month from TIN and normalize\n var month = parseInt(tin.slice(2, 4), 10);\n if (month > 50) {\n month -= 50;\n }\n if (month < 10) {\n month = \"0\".concat(month);\n }\n\n // Check date validity\n var date = \"\".concat(full_year, \"/\").concat(month, \"/\").concat(tin.slice(4, 6));\n if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n }\n return true;\n}\n\n/*\n * sl-SI validation function\n * (Davčna številka, persons/entities)\n * Verify TIN validity by calculating check (last) digit (variant of MOD 11)\n */\nfunction slSiCheck(tin) {\n var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) {\n return parseInt(a, 10);\n }), 8) % 11;\n if (checksum === 10) {\n return parseInt(tin[7], 10) === 0;\n }\n return checksum === parseInt(tin[7], 10);\n}\n\n/*\n * sv-SE validation function\n * (Personnummer or samordningsnummer, persons only)\n * Checks validity of birth date and calls luhnCheck() to validate check (last) digit\n */\nfunction svSeCheck(tin) {\n // Make copy of TIN and normalize to two-digit year form\n var tin_copy = tin.slice(0);\n if (tin.length > 11) {\n tin_copy = tin_copy.slice(2);\n }\n\n // Extract date of birth\n var full_year = '';\n var month = tin_copy.slice(2, 4);\n var day = parseInt(tin_copy.slice(4, 6), 10);\n if (tin.length > 11) {\n full_year = tin.slice(0, 4);\n } else {\n full_year = tin.slice(0, 2);\n if (tin.length === 11 && day < 60) {\n // Extract full year from centenarian symbol\n // Should work just fine until year 10000 or so\n var current_year = new Date().getFullYear().toString();\n var current_century = parseInt(current_year.slice(0, 2), 10);\n current_year = parseInt(current_year, 10);\n if (tin[6] === '-') {\n if (parseInt(\"\".concat(current_century).concat(full_year), 10) > current_year) {\n full_year = \"\".concat(current_century - 1).concat(full_year);\n } else {\n full_year = \"\".concat(current_century).concat(full_year);\n }\n } else {\n full_year = \"\".concat(current_century - 1).concat(full_year);\n if (current_year - parseInt(full_year, 10) < 100) {\n return false;\n }\n }\n }\n }\n\n // Normalize day and check date validity\n if (day > 60) {\n day -= 60;\n }\n if (day < 10) {\n day = \"0\".concat(day);\n }\n var date = \"\".concat(full_year, \"/\").concat(month, \"/\").concat(day);\n if (date.length === 8) {\n if (!(0, _isDate.default)(date, 'YY/MM/DD')) {\n return false;\n }\n } else if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) {\n return false;\n }\n return algorithms.luhnCheck(tin.replace(/\\W/, ''));\n}\n\n/**\n * uk-UA validation function\n * Verify TIN validity by calculating check (last) digit (variant of MOD 11)\n */\nfunction ukUaCheck(tin) {\n // Calculate check digit\n var digits = tin.split('').map(function (a) {\n return parseInt(a, 10);\n });\n var multipliers = [-1, 5, 7, 9, 4, 6, 10, 5, 7];\n var checksum = 0;\n for (var i = 0; i < multipliers.length; i++) {\n checksum += digits[i] * multipliers[i];\n }\n return checksum % 11 === 10 ? digits[9] === 0 : digits[9] === checksum % 11;\n}\n\n// Locale lookup objects\n\n/*\n * Tax id regex formats for various locales\n *\n * Where not explicitly specified in DG-TAXUD document both\n * uppercase and lowercase letters are acceptable.\n */\nvar taxIdFormat = {\n 'bg-BG': /^\\d{10}$/,\n 'cs-CZ': /^\\d{6}\\/{0,1}\\d{3,4}$/,\n 'de-AT': /^\\d{9}$/,\n 'de-DE': /^[1-9]\\d{10}$/,\n 'dk-DK': /^\\d{6}-{0,1}\\d{4}$/,\n 'el-CY': /^[09]\\d{7}[A-Z]$/,\n 'el-GR': /^([0-4]|[7-9])\\d{8}$/,\n 'en-CA': /^\\d{9}$/,\n 'en-GB': /^\\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\\d{6}[ABCD ]$/i,\n 'en-IE': /^\\d{7}[A-W][A-IW]{0,1}$/i,\n 'en-US': /^\\d{2}[- ]{0,1}\\d{7}$/,\n 'es-AR': /(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,\n 'es-ES': /^(\\d{0,8}|[XYZKLM]\\d{7})[A-HJ-NP-TV-Z]$/i,\n 'et-EE': /^[1-6]\\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\\d$/,\n 'fi-FI': /^\\d{6}[-+A]\\d{3}[0-9A-FHJ-NPR-Y]$/i,\n 'fr-BE': /^\\d{11}$/,\n 'fr-FR': /^[0-3]\\d{12}$|^[0-3]\\d\\s\\d{2}(\\s\\d{3}){3}$/,\n // Conforms both to official spec and provided example\n 'fr-LU': /^\\d{13}$/,\n 'hr-HR': /^\\d{11}$/,\n 'hu-HU': /^8\\d{9}$/,\n 'it-IT': /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,\n 'lv-LV': /^\\d{6}-{0,1}\\d{5}$/,\n // Conforms both to DG TAXUD spec and original research\n 'mt-MT': /^\\d{3,7}[APMGLHBZ]$|^([1-8])\\1\\d{7}$/i,\n 'nl-NL': /^\\d{9}$/,\n 'pl-PL': /^\\d{10,11}$/,\n 'pt-BR': /(?:^\\d{11}$)|(?:^\\d{14}$)/,\n 'pt-PT': /^\\d{9}$/,\n 'ro-RO': /^\\d{13}$/,\n 'sk-SK': /^\\d{6}\\/{0,1}\\d{3,4}$/,\n 'sl-SI': /^[1-9]\\d{7}$/,\n 'sv-SE': /^(\\d{6}[-+]{0,1}\\d{4}|(18|19|20)\\d{6}[-+]{0,1}\\d{4})$/,\n 'uk-UA': /^\\d{10}$/\n};\n// taxIdFormat locale aliases\ntaxIdFormat['lb-LU'] = taxIdFormat['fr-LU'];\ntaxIdFormat['lt-LT'] = taxIdFormat['et-EE'];\ntaxIdFormat['nl-BE'] = taxIdFormat['fr-BE'];\ntaxIdFormat['fr-CA'] = taxIdFormat['en-CA'];\n\n// Algorithmic tax id check functions for various locales\nvar taxIdCheck = {\n 'bg-BG': bgBgCheck,\n 'cs-CZ': csCzCheck,\n 'de-AT': deAtCheck,\n 'de-DE': deDeCheck,\n 'dk-DK': dkDkCheck,\n 'el-CY': elCyCheck,\n 'el-GR': elGrCheck,\n 'en-CA': isCanadianSIN,\n 'en-IE': enIeCheck,\n 'en-US': enUsCheck,\n 'es-AR': esArCheck,\n 'es-ES': esEsCheck,\n 'et-EE': etEeCheck,\n 'fi-FI': fiFiCheck,\n 'fr-BE': frBeCheck,\n 'fr-FR': frFrCheck,\n 'fr-LU': frLuCheck,\n 'hr-HR': hrHrCheck,\n 'hu-HU': huHuCheck,\n 'it-IT': itItCheck,\n 'lv-LV': lvLvCheck,\n 'mt-MT': mtMtCheck,\n 'nl-NL': nlNlCheck,\n 'pl-PL': plPlCheck,\n 'pt-BR': ptBrCheck,\n 'pt-PT': ptPtCheck,\n 'ro-RO': roRoCheck,\n 'sk-SK': skSkCheck,\n 'sl-SI': slSiCheck,\n 'sv-SE': svSeCheck,\n 'uk-UA': ukUaCheck\n};\n// taxIdCheck locale aliases\ntaxIdCheck['lb-LU'] = taxIdCheck['fr-LU'];\ntaxIdCheck['lt-LT'] = taxIdCheck['et-EE'];\ntaxIdCheck['nl-BE'] = taxIdCheck['fr-BE'];\ntaxIdCheck['fr-CA'] = taxIdCheck['en-CA'];\n\n// Regexes for locales where characters should be omitted before checking format\nvar allsymbols = /[-\\\\\\/!@#$%\\^&\\*\\(\\)\\+\\=\\[\\]]+/g;\nvar sanitizeRegexes = {\n 'de-AT': allsymbols,\n 'de-DE': /[\\/\\\\]/g,\n 'fr-BE': allsymbols\n};\n// sanitizeRegexes locale aliases\nsanitizeRegexes['nl-BE'] = sanitizeRegexes['fr-BE'];\n\n/*\n * Validator function\n * Return true if the passed string is a valid tax identification number\n * for the specified locale.\n * Throw an error exception if the locale is not supported.\n */\nfunction isTaxID(str) {\n var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';\n (0, _assertString.default)(str);\n // Copy TIN to avoid replacement if sanitized\n var strcopy = str.slice(0);\n if (locale in taxIdFormat) {\n if (locale in sanitizeRegexes) {\n strcopy = strcopy.replace(sanitizeRegexes[locale], '');\n }\n if (!taxIdFormat[locale].test(strcopy)) {\n return false;\n }\n if (locale in taxIdCheck) {\n return taxIdCheck[locale](strcopy);\n }\n // Fallthrough; not all locales have algorithmic checks\n return true;\n }\n throw new Error(\"Invalid locale '\".concat(locale, \"'\"));\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isTime;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_time_options = {\n hourFormat: 'hour24',\n mode: 'default'\n};\nvar formats = {\n hour24: {\n default: /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,\n withSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/\n },\n hour12: {\n default: /^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,\n withSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/\n }\n};\nfunction isTime(input, options) {\n options = (0, _merge.default)(options, default_time_options);\n if (typeof input !== 'string') return false;\n return formats[options.hourFormat][options.mode].test(input);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isURL;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isFQDN = _interopRequireDefault(require(\"./isFQDN\"));\nvar _isIP = _interopRequireDefault(require(\"./isIP\"));\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/*\noptions for isURL method\n\nrequire_protocol - if set as true isURL will return false if protocol is not present in the URL\nrequire_valid_protocol - isURL will check if the URL's protocol is present in the protocols option\nprotocols - valid protocols can be modified with this option\nrequire_host - if set as false isURL will not check if host is present in the URL\nrequire_port - if set as true isURL will check if port is present in the URL\nallow_protocol_relative_urls - if set as true protocol relative URLs will be allowed\nvalidate_length - if set as false isURL will skip string length validation (IE maximum is 2083)\n\n*/\n\nvar default_url_options = {\n protocols: ['http', 'https', 'ftp'],\n require_tld: true,\n require_protocol: false,\n require_host: true,\n require_port: false,\n require_valid_protocol: true,\n allow_underscores: false,\n allow_trailing_dot: false,\n allow_protocol_relative_urls: false,\n allow_fragments: true,\n allow_query_components: true,\n validate_length: true\n};\nvar wrapped_ipv6 = /^\\[([^\\]]+)\\](?::([0-9]+))?$/;\nfunction isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n}\nfunction checkHost(host, matches) {\n for (var i = 0; i < matches.length; i++) {\n var match = matches[i];\n if (host === match || isRegExp(match) && match.test(host)) {\n return true;\n }\n }\n return false;\n}\nfunction isURL(url, options) {\n (0, _assertString.default)(url);\n if (!url || /[\\s<>]/.test(url)) {\n return false;\n }\n if (url.indexOf('mailto:') === 0) {\n return false;\n }\n options = (0, _merge.default)(options, default_url_options);\n if (options.validate_length && url.length >= 2083) {\n return false;\n }\n if (!options.allow_fragments && url.includes('#')) {\n return false;\n }\n if (!options.allow_query_components && (url.includes('?') || url.includes('&'))) {\n return false;\n }\n var protocol, auth, host, hostname, port, port_str, split, ipv6;\n split = url.split('#');\n url = split.shift();\n split = url.split('?');\n url = split.shift();\n split = url.split('://');\n if (split.length > 1) {\n protocol = split.shift().toLowerCase();\n if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {\n return false;\n }\n } else if (options.require_protocol) {\n return false;\n } else if (url.slice(0, 2) === '//') {\n if (!options.allow_protocol_relative_urls) {\n return false;\n }\n split[0] = url.slice(2);\n }\n url = split.join('://');\n if (url === '') {\n return false;\n }\n split = url.split('/');\n url = split.shift();\n if (url === '' && !options.require_host) {\n return true;\n }\n split = url.split('@');\n if (split.length > 1) {\n if (options.disallow_auth) {\n return false;\n }\n if (split[0] === '') {\n return false;\n }\n auth = split.shift();\n if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {\n return false;\n }\n var _auth$split = auth.split(':'),\n _auth$split2 = _slicedToArray(_auth$split, 2),\n user = _auth$split2[0],\n password = _auth$split2[1];\n if (user === '' && password === '') {\n return false;\n }\n }\n hostname = split.join('@');\n port_str = null;\n ipv6 = null;\n var ipv6_match = hostname.match(wrapped_ipv6);\n if (ipv6_match) {\n host = '';\n ipv6 = ipv6_match[1];\n port_str = ipv6_match[2] || null;\n } else {\n split = hostname.split(':');\n host = split.shift();\n if (split.length) {\n port_str = split.join(':');\n }\n }\n if (port_str !== null && port_str.length > 0) {\n port = parseInt(port_str, 10);\n if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {\n return false;\n }\n } else if (options.require_port) {\n return false;\n }\n if (options.host_whitelist) {\n return checkHost(host, options.host_whitelist);\n }\n if (host === '' && !options.require_host) {\n return true;\n }\n if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) {\n return false;\n }\n host = host || ipv6;\n if (options.host_blacklist && checkHost(host, options.host_blacklist)) {\n return false;\n }\n return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isUUID;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar uuid = {\n 1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,\n 2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,\n 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,\n 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,\n 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,\n 7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,\n all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i\n};\nfunction isUUID(str, version) {\n (0, _assertString.default)(str);\n var pattern = uuid[![undefined, null].includes(version) ? version : 'all'];\n return !!pattern && pattern.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isUppercase;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isUppercase(str) {\n (0, _assertString.default)(str);\n return str === str.toUpperCase();\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isVAT;\nexports.vatMatchers = void 0;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar algorithms = _interopRequireWildcard(require(\"./util/algorithms\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar AU = function AU(str) {\n var match = str.match(/^(AU)?(\\d{11})$/);\n if (!match) {\n return false;\n }\n // @see {@link https://abr.business.gov.au/Help/AbnFormat}\n var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];\n str = str.replace(/^AU/, '');\n var ABN = (parseInt(str.slice(0, 1), 10) - 1).toString() + str.slice(1);\n var total = 0;\n for (var i = 0; i < 11; i++) {\n total += weights[i] * ABN.charAt(i);\n }\n return total !== 0 && total % 89 === 0;\n};\nvar CH = function CH(str) {\n // @see {@link https://www.ech.ch/de/ech/ech-0097/5.2.0}\n var hasValidCheckNumber = function hasValidCheckNumber(digits) {\n var lastDigit = digits.pop(); // used as check number\n var weights = [5, 4, 3, 2, 7, 6, 5, 4];\n var calculatedCheckNumber = (11 - digits.reduce(function (acc, el, idx) {\n return acc + el * weights[idx];\n }, 0) % 11) % 11;\n return lastDigit === calculatedCheckNumber;\n };\n\n // @see {@link https://www.estv.admin.ch/estv/de/home/mehrwertsteuer/uid/mwst-uid-nummer.html}\n return /^(CHE[- ]?)?(\\d{9}|(\\d{3}\\.\\d{3}\\.\\d{3})|(\\d{3} \\d{3} \\d{3})) ?(TVA|MWST|IVA)?$/.test(str) && hasValidCheckNumber(str.match(/\\d/g).map(function (el) {\n return +el;\n }));\n};\nvar PT = function PT(str) {\n var match = str.match(/^(PT)?(\\d{9})$/);\n if (!match) {\n return false;\n }\n var tin = match[2];\n var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) {\n return parseInt(a, 10);\n }), 9) % 11;\n if (checksum > 9) {\n return parseInt(tin[8], 10) === 0;\n }\n return checksum === parseInt(tin[8], 10);\n};\nvar vatMatchers = exports.vatMatchers = {\n /**\r\n * European Union VAT identification numbers\r\n */\n AT: function AT(str) {\n return /^(AT)?U\\d{8}$/.test(str);\n },\n BE: function BE(str) {\n return /^(BE)?\\d{10}$/.test(str);\n },\n BG: function BG(str) {\n return /^(BG)?\\d{9,10}$/.test(str);\n },\n HR: function HR(str) {\n return /^(HR)?\\d{11}$/.test(str);\n },\n CY: function CY(str) {\n return /^(CY)?\\w{9}$/.test(str);\n },\n CZ: function CZ(str) {\n return /^(CZ)?\\d{8,10}$/.test(str);\n },\n DK: function DK(str) {\n return /^(DK)?\\d{8}$/.test(str);\n },\n EE: function EE(str) {\n return /^(EE)?\\d{9}$/.test(str);\n },\n FI: function FI(str) {\n return /^(FI)?\\d{8}$/.test(str);\n },\n FR: function FR(str) {\n return /^(FR)?\\w{2}\\d{9}$/.test(str);\n },\n DE: function DE(str) {\n return /^(DE)?\\d{9}$/.test(str);\n },\n EL: function EL(str) {\n return /^(EL)?\\d{9}$/.test(str);\n },\n HU: function HU(str) {\n return /^(HU)?\\d{8}$/.test(str);\n },\n IE: function IE(str) {\n return /^(IE)?\\d{7}\\w{1}(W)?$/.test(str);\n },\n IT: function IT(str) {\n return /^(IT)?\\d{11}$/.test(str);\n },\n LV: function LV(str) {\n return /^(LV)?\\d{11}$/.test(str);\n },\n LT: function LT(str) {\n return /^(LT)?\\d{9,12}$/.test(str);\n },\n LU: function LU(str) {\n return /^(LU)?\\d{8}$/.test(str);\n },\n MT: function MT(str) {\n return /^(MT)?\\d{8}$/.test(str);\n },\n NL: function NL(str) {\n return /^(NL)?\\d{9}B\\d{2}$/.test(str);\n },\n PL: function PL(str) {\n return /^(PL)?(\\d{10}|(\\d{3}-\\d{3}-\\d{2}-\\d{2})|(\\d{3}-\\d{2}-\\d{2}-\\d{3}))$/.test(str);\n },\n PT: PT,\n RO: function RO(str) {\n return /^(RO)?\\d{2,10}$/.test(str);\n },\n SK: function SK(str) {\n return /^(SK)?\\d{10}$/.test(str);\n },\n SI: function SI(str) {\n return /^(SI)?\\d{8}$/.test(str);\n },\n ES: function ES(str) {\n return /^(ES)?\\w\\d{7}[A-Z]$/.test(str);\n },\n SE: function SE(str) {\n return /^(SE)?\\d{12}$/.test(str);\n },\n /**\r\n * VAT numbers of non-EU countries\r\n */\n AL: function AL(str) {\n return /^(AL)?\\w{9}[A-Z]$/.test(str);\n },\n MK: function MK(str) {\n return /^(MK)?\\d{13}$/.test(str);\n },\n AU: AU,\n BY: function BY(str) {\n return /^(УНП )?\\d{9}$/.test(str);\n },\n CA: function CA(str) {\n return /^(CA)?\\d{9}$/.test(str);\n },\n IS: function IS(str) {\n return /^(IS)?\\d{5,6}$/.test(str);\n },\n IN: function IN(str) {\n return /^(IN)?\\d{15}$/.test(str);\n },\n ID: function ID(str) {\n return /^(ID)?(\\d{15}|(\\d{2}.\\d{3}.\\d{3}.\\d{1}-\\d{3}.\\d{3}))$/.test(str);\n },\n IL: function IL(str) {\n return /^(IL)?\\d{9}$/.test(str);\n },\n KZ: function KZ(str) {\n return /^(KZ)?\\d{12}$/.test(str);\n },\n NZ: function NZ(str) {\n return /^(NZ)?\\d{9}$/.test(str);\n },\n NG: function NG(str) {\n return /^(NG)?(\\d{12}|(\\d{8}-\\d{4}))$/.test(str);\n },\n NO: function NO(str) {\n return /^(NO)?\\d{9}MVA$/.test(str);\n },\n PH: function PH(str) {\n return /^(PH)?(\\d{12}|\\d{3} \\d{3} \\d{3} \\d{3})$/.test(str);\n },\n RU: function RU(str) {\n return /^(RU)?(\\d{10}|\\d{12})$/.test(str);\n },\n SM: function SM(str) {\n return /^(SM)?\\d{5}$/.test(str);\n },\n SA: function SA(str) {\n return /^(SA)?\\d{15}$/.test(str);\n },\n RS: function RS(str) {\n return /^(RS)?\\d{9}$/.test(str);\n },\n CH: CH,\n TR: function TR(str) {\n return /^(TR)?\\d{10}$/.test(str);\n },\n UA: function UA(str) {\n return /^(UA)?\\d{12}$/.test(str);\n },\n GB: function GB(str) {\n return /^GB((\\d{3} \\d{4} ([0-8][0-9]|9[0-6]))|(\\d{9} \\d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(str);\n },\n UZ: function UZ(str) {\n return /^(UZ)?\\d{9}$/.test(str);\n },\n /**\r\n * VAT numbers of Latin American countries\r\n */\n AR: function AR(str) {\n return /^(AR)?\\d{11}$/.test(str);\n },\n BO: function BO(str) {\n return /^(BO)?\\d{7}$/.test(str);\n },\n BR: function BR(str) {\n return /^(BR)?((\\d{2}.\\d{3}.\\d{3}\\/\\d{4}-\\d{2})|(\\d{3}.\\d{3}.\\d{3}-\\d{2}))$/.test(str);\n },\n CL: function CL(str) {\n return /^(CL)?\\d{8}-\\d{1}$/.test(str);\n },\n CO: function CO(str) {\n return /^(CO)?\\d{10}$/.test(str);\n },\n CR: function CR(str) {\n return /^(CR)?\\d{9,12}$/.test(str);\n },\n EC: function EC(str) {\n return /^(EC)?\\d{13}$/.test(str);\n },\n SV: function SV(str) {\n return /^(SV)?\\d{4}-\\d{6}-\\d{3}-\\d{1}$/.test(str);\n },\n GT: function GT(str) {\n return /^(GT)?\\d{7}-\\d{1}$/.test(str);\n },\n HN: function HN(str) {\n return /^(HN)?$/.test(str);\n },\n MX: function MX(str) {\n return /^(MX)?\\w{3,4}\\d{6}\\w{3}$/.test(str);\n },\n NI: function NI(str) {\n return /^(NI)?\\d{3}-\\d{6}-\\d{4}\\w{1}$/.test(str);\n },\n PA: function PA(str) {\n return /^(PA)?$/.test(str);\n },\n PY: function PY(str) {\n return /^(PY)?\\d{6,8}-\\d{1}$/.test(str);\n },\n PE: function PE(str) {\n return /^(PE)?\\d{11}$/.test(str);\n },\n DO: function DO(str) {\n return /^(DO)?(\\d{11}|(\\d{3}-\\d{7}-\\d{1})|[1,4,5]{1}\\d{8}|([1,4,5]{1})-\\d{2}-\\d{5}-\\d{1})$/.test(str);\n },\n UY: function UY(str) {\n return /^(UY)?\\d{12}$/.test(str);\n },\n VE: function VE(str) {\n return /^(VE)?[J,G,V,E]{1}-(\\d{9}|(\\d{8}-\\d{1}))$/.test(str);\n }\n};\nfunction isVAT(str, countryCode) {\n (0, _assertString.default)(str);\n (0, _assertString.default)(countryCode);\n if (countryCode in vatMatchers) {\n return vatMatchers[countryCode](str);\n }\n throw new Error(\"Invalid country code: '\".concat(countryCode, \"'\"));\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isVariableWidth;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _isFullWidth = require(\"./isFullWidth\");\nvar _isHalfWidth = require(\"./isHalfWidth\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isVariableWidth(str) {\n (0, _assertString.default)(str);\n return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isWhitelisted;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction isWhitelisted(str, chars) {\n (0, _assertString.default)(str);\n for (var i = str.length - 1; i >= 0; i--) {\n if (chars.indexOf(str[i]) === -1) {\n return false;\n }\n }\n return true;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = ltrim;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction ltrim(str, chars) {\n (0, _assertString.default)(str);\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping\n var pattern = chars ? new RegExp(\"^[\".concat(chars.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), \"]+\"), 'g') : /^\\s+/g;\n return str.replace(pattern, '');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = matches;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction matches(str, pattern, modifiers) {\n (0, _assertString.default)(str);\n if (Object.prototype.toString.call(pattern) !== '[object RegExp]') {\n pattern = new RegExp(pattern, modifiers);\n }\n return !!str.match(pattern);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = normalizeEmail;\nvar _merge = _interopRequireDefault(require(\"./util/merge\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar default_normalize_email_options = {\n // The following options apply to all email addresses\n // Lowercases the local part of the email address.\n // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024).\n // The domain is always lowercased, as per RFC 1035\n all_lowercase: true,\n // The following conversions are specific to GMail\n // Lowercases the local part of the GMail address (known to be case-insensitive)\n gmail_lowercase: true,\n // Removes dots from the local part of the email address, as that's ignored by GMail\n gmail_remove_dots: true,\n // Removes the subaddress (e.g. \"+foo\") from the email address\n gmail_remove_subaddress: true,\n // Conversts the googlemail.com domain to gmail.com\n gmail_convert_googlemaildotcom: true,\n // The following conversions are specific to Outlook.com / Windows Live / Hotmail\n // Lowercases the local part of the Outlook.com address (known to be case-insensitive)\n outlookdotcom_lowercase: true,\n // Removes the subaddress (e.g. \"+foo\") from the email address\n outlookdotcom_remove_subaddress: true,\n // The following conversions are specific to Yahoo\n // Lowercases the local part of the Yahoo address (known to be case-insensitive)\n yahoo_lowercase: true,\n // Removes the subaddress (e.g. \"-foo\") from the email address\n yahoo_remove_subaddress: true,\n // The following conversions are specific to Yandex\n // Lowercases the local part of the Yandex address (known to be case-insensitive)\n yandex_lowercase: true,\n // The following conversions are specific to iCloud\n // Lowercases the local part of the iCloud address (known to be case-insensitive)\n icloud_lowercase: true,\n // Removes the subaddress (e.g. \"+foo\") from the email address\n icloud_remove_subaddress: true\n};\n\n// List of domains used by iCloud\nvar icloud_domains = ['icloud.com', 'me.com'];\n\n// List of domains used by Outlook.com and its predecessors\n// This list is likely incomplete.\n// Partial reference:\n// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/\nvar outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com'];\n\n// List of domains used by Yahoo Mail\n// This list is likely incomplete\nvar yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com'];\n\n// List of domains used by yandex.ru\nvar yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru'];\n\n// replace single dots, but not multiple consecutive dots\nfunction dotsReplacer(match) {\n if (match.length > 1) {\n return match;\n }\n return '';\n}\nfunction normalizeEmail(email, options) {\n options = (0, _merge.default)(options, default_normalize_email_options);\n var raw_parts = email.split('@');\n var domain = raw_parts.pop();\n var user = raw_parts.join('@');\n var parts = [user, domain];\n\n // The domain is always lowercased, as it's case-insensitive per RFC 1035\n parts[1] = parts[1].toLowerCase();\n if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') {\n // Address is GMail\n if (options.gmail_remove_subaddress) {\n parts[0] = parts[0].split('+')[0];\n }\n if (options.gmail_remove_dots) {\n // this does not replace consecutive dots like example..email@gmail.com\n parts[0] = parts[0].replace(/\\.+/g, dotsReplacer);\n }\n if (!parts[0].length) {\n return false;\n }\n if (options.all_lowercase || options.gmail_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1];\n } else if (icloud_domains.indexOf(parts[1]) >= 0) {\n // Address is iCloud\n if (options.icloud_remove_subaddress) {\n parts[0] = parts[0].split('+')[0];\n }\n if (!parts[0].length) {\n return false;\n }\n if (options.all_lowercase || options.icloud_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) {\n // Address is Outlook.com\n if (options.outlookdotcom_remove_subaddress) {\n parts[0] = parts[0].split('+')[0];\n }\n if (!parts[0].length) {\n return false;\n }\n if (options.all_lowercase || options.outlookdotcom_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n } else if (yahoo_domains.indexOf(parts[1]) >= 0) {\n // Address is Yahoo\n if (options.yahoo_remove_subaddress) {\n var components = parts[0].split('-');\n parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0];\n }\n if (!parts[0].length) {\n return false;\n }\n if (options.all_lowercase || options.yahoo_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n } else if (yandex_domains.indexOf(parts[1]) >= 0) {\n if (options.all_lowercase || options.yandex_lowercase) {\n parts[0] = parts[0].toLowerCase();\n }\n parts[1] = 'yandex.ru'; // all yandex domains are equal, 1st preferred\n } else if (options.all_lowercase) {\n // Any other address\n parts[0] = parts[0].toLowerCase();\n }\n return parts.join('@');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rtrim;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction rtrim(str, chars) {\n (0, _assertString.default)(str);\n if (chars) {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping\n var pattern = new RegExp(\"[\".concat(chars.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'), \"]+$\"), 'g');\n return str.replace(pattern, '');\n }\n // Use a faster and more safe than regex trim method https://blog.stevenlevithan.com/archives/faster-trim-javascript\n var strIndex = str.length - 1;\n while (/\\s/.test(str.charAt(strIndex))) {\n strIndex -= 1;\n }\n return str.slice(0, strIndex + 1);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = stripLow;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nvar _blacklist = _interopRequireDefault(require(\"./blacklist\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction stripLow(str, keep_new_lines) {\n (0, _assertString.default)(str);\n var chars = keep_new_lines ? '\\\\x00-\\\\x09\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F' : '\\\\x00-\\\\x1F\\\\x7F';\n return (0, _blacklist.default)(str, chars);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toBoolean;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction toBoolean(str, strict) {\n (0, _assertString.default)(str);\n if (strict) {\n return str === '1' || /^true$/i.test(str);\n }\n return str !== '0' && !/^false$/i.test(str) && str !== '';\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toDate;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction toDate(date) {\n (0, _assertString.default)(date);\n date = Date.parse(date);\n return !isNaN(date) ? new Date(date) : null;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toFloat;\nvar _isFloat = _interopRequireDefault(require(\"./isFloat\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction toFloat(str) {\n if (!(0, _isFloat.default)(str)) return NaN;\n return parseFloat(str);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toInt;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction toInt(str, radix) {\n (0, _assertString.default)(str);\n return parseInt(str, radix || 10);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = trim;\nvar _rtrim = _interopRequireDefault(require(\"./rtrim\"));\nvar _ltrim = _interopRequireDefault(require(\"./ltrim\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction trim(str, chars) {\n return (0, _rtrim.default)((0, _ltrim.default)(str, chars), chars);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = unescape;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction unescape(str) {\n (0, _assertString.default)(str);\n return str.replace(/"/g, '\"').replace(/'/g, \"'\").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/\/g, '\\\\').replace(/`/g, '`').replace(/&/g, '&');\n // & replacement has to be the last one to prevent\n // bugs with intermediate strings containing escape sequences\n // See: https://github.com/validatorjs/validator.js/issues/1827\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.iso7064Check = iso7064Check;\nexports.luhnCheck = luhnCheck;\nexports.reverseMultiplyAndSum = reverseMultiplyAndSum;\nexports.verhoeffCheck = verhoeffCheck;\n/**\n * Algorithmic validation functions\n * May be used as is or implemented in the workflow of other validators.\n */\n\n/*\n * ISO 7064 validation function\n * Called with a string of numbers (incl. check digit)\n * to validate according to ISO 7064 (MOD 11, 10).\n */\nfunction iso7064Check(str) {\n var checkvalue = 10;\n for (var i = 0; i < str.length - 1; i++) {\n checkvalue = (parseInt(str[i], 10) + checkvalue) % 10 === 0 ? 10 * 2 % 11 : (parseInt(str[i], 10) + checkvalue) % 10 * 2 % 11;\n }\n checkvalue = checkvalue === 1 ? 0 : 11 - checkvalue;\n return checkvalue === parseInt(str[10], 10);\n}\n\n/*\n * Luhn (mod 10) validation function\n * Called with a string of numbers (incl. check digit)\n * to validate according to the Luhn algorithm.\n */\nfunction luhnCheck(str) {\n var checksum = 0;\n var second = false;\n for (var i = str.length - 1; i >= 0; i--) {\n if (second) {\n var product = parseInt(str[i], 10) * 2;\n if (product > 9) {\n // sum digits of product and add to checksum\n checksum += product.toString().split('').map(function (a) {\n return parseInt(a, 10);\n }).reduce(function (a, b) {\n return a + b;\n }, 0);\n } else {\n checksum += product;\n }\n } else {\n checksum += parseInt(str[i], 10);\n }\n second = !second;\n }\n return checksum % 10 === 0;\n}\n\n/*\n * Reverse TIN multiplication and summation helper function\n * Called with an array of single-digit integers and a base multiplier\n * to calculate the sum of the digits multiplied in reverse.\n * Normally used in variations of MOD 11 algorithmic checks.\n */\nfunction reverseMultiplyAndSum(digits, base) {\n var total = 0;\n for (var i = 0; i < digits.length; i++) {\n total += digits[i] * (base - i);\n }\n return total;\n}\n\n/*\n * Verhoeff validation helper function\n * Called with a string of numbers\n * to validate according to the Verhoeff algorithm.\n */\nfunction verhoeffCheck(str) {\n var d_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]];\n var p_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]];\n\n // Copy (to prevent replacement) and reverse\n var str_copy = str.split('').reverse().join('');\n var checksum = 0;\n for (var i = 0; i < str_copy.length; i++) {\n checksum = d_table[checksum][p_table[i % 8][parseInt(str_copy[i], 10)]];\n }\n return checksum === 0;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = assertString;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction assertString(input) {\n var isString = typeof input === 'string' || input instanceof String;\n if (!isString) {\n var invalidType = _typeof(input);\n if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;\n throw new TypeError(\"Expected a string but received a \".concat(invalidType));\n }\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar includes = function includes(arr, val) {\n return arr.some(function (arrVal) {\n return val === arrVal;\n });\n};\nvar _default = exports.default = includes;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = merge;\nfunction merge() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaults = arguments.length > 1 ? arguments[1] : undefined;\n for (var key in defaults) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = defaults[key];\n }\n }\n return obj;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = multilineRegexp;\n/**\n * Build RegExp object from an array\n * of multiple/multi-line regexp parts\n *\n * @param {string[]} parts\n * @param {string} flags\n * @return {object} - RegExp object\n */\nfunction multilineRegexp(parts, flags) {\n var regexpAsStringLiteral = parts.join('');\n return new RegExp(regexpAsStringLiteral, flags);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toString;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction toString(input) {\n if (_typeof(input) === 'object' && input !== null) {\n if (typeof input.toString === 'function') {\n input = input.toString();\n } else {\n input = '[object Object]';\n }\n } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) {\n input = '';\n }\n return String(input);\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = whitelist;\nvar _assertString = _interopRequireDefault(require(\"./util/assertString\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction whitelist(str, chars) {\n (0, _assertString.default)(str);\n return str.replace(new RegExp(\"[^\".concat(chars, \"]+\"), 'g'), '');\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;","\"use strict\";\n\nmodule.exports = {\n\n INVALID_TYPE: \"Expected type {0} but found type {1}\",\n INVALID_FORMAT: \"Object didn't pass validation for format {0}: {1}\",\n ENUM_MISMATCH: \"No enum match for: {0}\",\n ENUM_CASE_MISMATCH: \"Enum does not match case for: {0}\",\n ANY_OF_MISSING: \"Data does not match any schemas from 'anyOf'\",\n ONE_OF_MISSING: \"Data does not match any schemas from 'oneOf'\",\n ONE_OF_MULTIPLE: \"Data is valid against more than one schema from 'oneOf'\",\n NOT_PASSED: \"Data matches schema from 'not'\",\n\n // Array errors\n ARRAY_LENGTH_SHORT: \"Array is too short ({0}), minimum {1}\",\n ARRAY_LENGTH_LONG: \"Array is too long ({0}), maximum {1}\",\n ARRAY_UNIQUE: \"Array items are not unique (indexes {0} and {1})\",\n ARRAY_ADDITIONAL_ITEMS: \"Additional items not allowed\",\n\n // Numeric errors\n MULTIPLE_OF: \"Value {0} is not a multiple of {1}\",\n MINIMUM: \"Value {0} is less than minimum {1}\",\n MINIMUM_EXCLUSIVE: \"Value {0} is equal or less than exclusive minimum {1}\",\n MAXIMUM: \"Value {0} is greater than maximum {1}\",\n MAXIMUM_EXCLUSIVE: \"Value {0} is equal or greater than exclusive maximum {1}\",\n\n // Object errors\n OBJECT_PROPERTIES_MINIMUM: \"Too few properties defined ({0}), minimum {1}\",\n OBJECT_PROPERTIES_MAXIMUM: \"Too many properties defined ({0}), maximum {1}\",\n OBJECT_MISSING_REQUIRED_PROPERTY: \"Missing required property: {0}\",\n OBJECT_ADDITIONAL_PROPERTIES: \"Additional properties not allowed: {0}\",\n OBJECT_DEPENDENCY_KEY: \"Dependency failed - key must exist: {0} (due to key: {1})\",\n\n // String errors\n MIN_LENGTH: \"String is too short ({0} chars), minimum {1}\",\n MAX_LENGTH: \"String is too long ({0} chars), maximum {1}\",\n PATTERN: \"String does not match pattern {0}: {1}\",\n\n // Schema validation errors\n KEYWORD_TYPE_EXPECTED: \"Keyword '{0}' is expected to be of type '{1}'\",\n KEYWORD_UNDEFINED_STRICT: \"Keyword '{0}' must be defined in strict mode\",\n KEYWORD_UNEXPECTED: \"Keyword '{0}' is not expected to appear in the schema\",\n KEYWORD_MUST_BE: \"Keyword '{0}' must be {1}\",\n KEYWORD_DEPENDENCY: \"Keyword '{0}' requires keyword '{1}'\",\n KEYWORD_PATTERN: \"Keyword '{0}' is not a valid RegExp pattern: {1}\",\n KEYWORD_VALUE_TYPE: \"Each element of keyword '{0}' array must be a '{1}'\",\n UNKNOWN_FORMAT: \"There is no validation function for format '{0}'\",\n CUSTOM_MODE_FORCE_PROPERTIES: \"{0} must define at least one property if present\",\n\n // Remote errors\n REF_UNRESOLVED: \"Reference has not been resolved during compilation: {0}\",\n UNRESOLVABLE_REFERENCE: \"Reference could not be resolved: {0}\",\n SCHEMA_NOT_REACHABLE: \"Validator was not able to read schema with uri: {0}\",\n SCHEMA_TYPE_EXPECTED: \"Schema is expected to be of type 'object'\",\n SCHEMA_NOT_AN_OBJECT: \"Schema is not an object: {0}\",\n ASYNC_TIMEOUT: \"{0} asynchronous task(s) have timed out after {1} ms\",\n PARENT_SCHEMA_VALIDATION_FAILED: \"Schema failed to validate against its parent schema, see inner errors for details.\",\n REMOTE_NOT_VALID: \"Remote reference didn't compile successfully: {0}\"\n\n};\n","/*jshint maxlen: false*/\n\nvar validator = require(\"validator\");\n\nvar FormatValidators = {\n \"date\": function (date) {\n if (typeof date !== \"string\") {\n return true;\n }\n // full-date from http://tools.ietf.org/html/rfc3339#section-5.6\n var matches = /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.exec(date);\n if (matches === null) {\n return false;\n }\n // var year = matches[1];\n // var month = matches[2];\n // var day = matches[3];\n if (matches[2] < \"01\" || matches[2] > \"12\" || matches[3] < \"01\" || matches[3] > \"31\") {\n return false;\n }\n return true;\n },\n \"date-time\": function (dateTime) {\n if (typeof dateTime !== \"string\") {\n return true;\n }\n // date-time from http://tools.ietf.org/html/rfc3339#section-5.6\n var s = dateTime.toLowerCase().split(\"t\");\n if (!FormatValidators.date(s[0])) {\n return false;\n }\n var matches = /^([0-9]{2}):([0-9]{2}):([0-9]{2})(.[0-9]+)?(z|([+-][0-9]{2}:[0-9]{2}))$/.exec(s[1]);\n if (matches === null) {\n return false;\n }\n // var hour = matches[1];\n // var minute = matches[2];\n // var second = matches[3];\n // var fraction = matches[4];\n // var timezone = matches[5];\n if (matches[1] > \"23\" || matches[2] > \"59\" || matches[3] > \"59\") {\n return false;\n }\n return true;\n },\n \"email\": function (email) {\n if (typeof email !== \"string\") {\n return true;\n }\n return validator.isEmail(email, { \"require_tld\": true });\n },\n \"hostname\": function (hostname) {\n if (typeof hostname !== \"string\") {\n return true;\n }\n /*\n http://json-schema.org/latest/json-schema-validation.html#anchor114\n A string instance is valid against this attribute if it is a valid\n representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034].\n\n http://tools.ietf.org/html/rfc1034#section-3.5\n\n ::= any one of the ten digits 0 through 9\n var digit = /[0-9]/;\n\n ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case\n var letter = /[a-zA-Z]/;\n\n ::= | \n var letDig = /[0-9a-zA-Z]/;\n\n ::= | \"-\"\n var letDigHyp = /[-0-9a-zA-Z]/;\n\n ::= | \n var ldhStr = /[-0-9a-zA-Z]+/;\n\n