From 765b2a4738cfd7b550fc57591de010911d9ec6d3 Mon Sep 17 00:00:00 2001 From: acelaya Date: Sun, 13 Aug 2023 11:54:46 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20preview-env=20from=20@=20shlin?= =?UTF-8?q?kio/shlink-web-client@5e2dce8f3f4ae65463e0994d2b3accc0d051daac?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-afa15ae3.js => index-b04000ec.js} | 108 +++++++++--------- feature/react-tag-autocomplete-7/index.html | 2 +- .../service-worker.js | 2 +- 3 files changed, 56 insertions(+), 56 deletions(-) rename feature/react-tag-autocomplete-7/assets/{index-afa15ae3.js => index-b04000ec.js} (86%) diff --git a/feature/react-tag-autocomplete-7/assets/index-afa15ae3.js b/feature/react-tag-autocomplete-7/assets/index-b04000ec.js similarity index 86% rename from feature/react-tag-autocomplete-7/assets/index-afa15ae3.js rename to feature/react-tag-autocomplete-7/assets/index-b04000ec.js index 85340821..7a48e211 100644 --- a/feature/react-tag-autocomplete-7/assets/index-afa15ae3.js +++ b/feature/react-tag-autocomplete-7/assets/index-b04000ec.js @@ -14,7 +14,7 @@ var hF=Object.defineProperty;var pF=(e,t,n)=>t in e?hF(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var DF=B,LF=Symbol.for("react.element"),RF=Symbol.for("react.fragment"),NF=Object.prototype.hasOwnProperty,AF=DF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,IF={key:!0,ref:!0,__self:!0,__source:!0};function yD(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)NF.call(t,r)&&!IF.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:LF,type:e,key:o,ref:a,props:i,_owner:AF.current}}kv.Fragment=RF;kv.jsx=yD;kv.jsxs=yD;cD.exports=kv;var g=cD.exports;/*! + */var DF=B,LF=Symbol.for("react.element"),RF=Symbol.for("react.fragment"),NF=Object.prototype.hasOwnProperty,AF=DF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,IF={key:!0,ref:!0,__self:!0,__source:!0};function yD(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)NF.call(t,r)&&!IF.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:LF,type:e,key:o,ref:a,props:i,_owner:AF.current}}kv.Fragment=RF;kv.jsx=yD;kv.jsxs=yD;cD.exports=kv;var m=cD.exports;/*! * @kurkle/color v0.3.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela @@ -24,14 +24,14 @@ var hF=Object.defineProperty;var pF=(e,t,n)=>t in e?hF(e,t,{enumerable:!0,config * https://www.chartjs.org * (c) 2023 Chart.js Contributors * Released under the MIT License - */function yo(){}const a$=(()=>{let e=0;return()=>e++})();function ft(e){return e===null||typeof e>"u"}function Lt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function nt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Qt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Lr(e,t){return Qt(e)?e:t}function Ke(e,t){return typeof e>"u"?t:e}const s$=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,xD=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Pt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function bt(e,t,n,r){let i,o,a;if(Lt(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function u$(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function f$(e){const t=u$(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function za(e,t){return(pE[t]||(pE[t]=f$(t)))(e)}function Wx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const id=e=>typeof e<"u",Va=e=>typeof e=="function",mE=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function d$(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ut=Math.PI,Rt=2*Ut,h$=Rt+Ut,Hm=Number.POSITIVE_INFINITY,p$=Ut/180,Xt=Ut/2,hs=Ut/4,gE=Ut*2/3,ya=Math.log10,no=Math.sign;function Cf(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Tc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function g$(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function OD(e,t,n){let r,i,o;for(r=0,i=e.length;rl&&c=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function qx(e,t,n){n=n||(a=>e[a]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const ko=(e,t,n,r)=>qx(e,n,r?i=>{const o=e[i][t];return oe[i][t]qx(e,n,r=>e[r][t]>=n);function b$(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+Wx(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function _E(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(ED.forEach(o=>{delete e[o]}),delete e._chartjs)}function kD(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const PD=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function TD(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,PD.call(window,()=>{r=!1,e.apply(t,n)}))}}function x$(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Gx=e=>e==="start"?"left":e==="end"?"right":"center",er=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,S$=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function MD(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,_parsed:s}=e,l=a.axis,{min:c,max:f,minDefined:d,maxDefined:p}=a.getUserBounds();d&&(i=Tn(Math.min(ko(s,l,c).lo,n?r:ko(t,l,a.getPixelForValue(c)).lo),0,r-1)),p?o=Tn(Math.max(ko(s,a.axis,f,!0).hi+1,n?0:ko(t,l,a.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function jD(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const lp=e=>e===0||e===1,bE=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Rt/n)),wE=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Rt/n)+1,Ef={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Xt)+1,easeOutSine:e=>Math.sin(e*Xt),easeInOutSine:e=>-.5*(Math.cos(Ut*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>lp(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>lp(e)?e:bE(e,.075,.3),easeOutElastic:e=>lp(e)?e:wE(e,.075,.3),easeInOutElastic(e){return lp(e)?e:e<.5?.5*bE(e*2,.1125,.45):.5+.5*wE(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Ef.easeOutBounce(1-e),easeOutBounce(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},easeInOutBounce:e=>e<.5?Ef.easeInBounce(e*2)*.5:Ef.easeOutBounce(e*2-1)*.5+.5};function Kx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function xE(e){return Kx(e)?e:new nd(e)}function w0(e){return Kx(e)?e:new nd(e).saturate(.5).darken(.1).hexString()}const O$=["x","y","borderWidth","radius","tension"],C$=["color","borderColor","backgroundColor"];function E$(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:C$},numbers:{type:"number",properties:O$}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function k$(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const SE=new Map;function P$(e,t){t=t||{};const n=e+JSON.stringify(t);let r=SE.get(n);return r||(r=new Intl.NumberFormat(e,t),SE.set(n,r)),r}function nh(e,t,n){return P$(t,n).format(e)}const DD={values(e){return Lt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=T$(e,n)}const a=ya(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),nh(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(ya(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?DD.numeric.call(this,e,t,n):""}};function T$(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Pv={formatters:DD};function M$(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Pv.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Gs=Object.create(null),cb=Object.create(null);function kf(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>w0(i.backgroundColor),this.hoverBorderColor=(r,i)=>w0(i.borderColor),this.hoverColor=(r,i)=>w0(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return x0(this,t,n)}get(t){return kf(this,t)}describe(t,n){return x0(cb,t,n)}override(t,n){return x0(Gs,t,n)}route(t,n,r,i){const o=kf(this,t),a=kf(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return nt(l)?Object.assign({},c,l):Ke(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var Jt=new j$({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[E$,k$,M$]);function D$(e){return!e||ft(e.size)||ft(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Wm(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function L$(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let a=0;const s=n.length;let l,c,f,d,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Po(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,A$(e,o),l=0;l+e||0;function Zx(e,t){const n={},r=nt(t),i=r?Object.keys(t):t,o=nt(e)?r?a=>Ke(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=z$(o(a));return n}function RD(e){return Zx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Is(e){return Zx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ir(e){const t=RD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function _n(e,t){e=e||{},t=t||Jt.font;let n=Ke(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ke(e.style,t.style);r&&!(""+r).match(B$)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ke(e.family,t.family),lineHeight:U$(Ke(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ke(e.weight,t.weight),string:""};return i.string=D$(i),i}function lf(e,t,n,r){let i=!0,o,a,s;for(o=0,a=e.length;on&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function Ja(e,t){return Object.assign(Object.create(e),t)}function Qx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=FD("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>Qx([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return AD(s,l,()=>Q$(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return EE(s).includes(l)},ownKeys(s){return EE(s)},set(s,l,c){const f=s._storage||(s._storage=i());return s[l]=f[l]=c,delete s._keys,!0}})}function Mc(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:ND(e,r),setContext:o=>Mc(e,o,n,r),override:o=>Mc(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return AD(o,a,()=>W$(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function ND(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Va(n)?n:()=>n,isIndexable:Va(r)?r:()=>r}}const H$=(e,t)=>e?e+Wx(t):t,Xx=(e,t)=>nt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function AD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function W$(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return Va(s)&&a.isScriptable(t)&&(s=Y$(t,s,e,n)),Lt(s)&&s.length&&(s=q$(t,s,e,a.isIndexable)),Xx(t,s)&&(s=Mc(s,i,o&&o[t],a)),s}function Y$(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),Xx(e,l)&&(l=Jx(i._scopes,i,e,l)),l}function q$(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(nt(t[0])){const l=t,c=i._scopes.filter(f=>f!==l);t=[];for(const f of l){const d=Jx(c,i,e,f);t.push(Mc(d,o,a&&a[e],s))}}return t}function ID(e,t,n){return Va(e)?e(t,n):e}const G$=(e,t)=>e===!0?t:typeof e=="string"?za(t,e):void 0;function K$(e,t,n,r,i){for(const o of t){const a=G$(n,o);if(a){e.add(a);const s=ID(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function Jx(e,t,n,r){const i=t._rootScopes,o=ID(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=CE(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=CE(s,a,o,l,r),l===null)?!1:Qx(Array.from(s),[""],i,o,()=>Z$(t,n,r))}function CE(e,t,n,r,i){for(;n;)n=K$(e,t,n,r,i);return n}function Z$(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Lt(i)&&nt(n)?n:i||{}}function Q$(e,t,n,r){let i;for(const o of t)if(i=FD(H$(o,e),n),typeof i<"u")return Xx(e,i)?Jx(n,r,e,i):i}function FD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function EE(e){let t=e._keys;return t||(t=e._keys=X$(e._scopes)),t}function X$(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function $D(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,a=new Array(r);let s,l,c,f;for(s=0,l=r;ste==="x"?"y":"x";function e7(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=lb(o,i),l=lb(a,o);let c=s/(s+l),f=l/(s+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const d=r*c,p=r*f;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+p*(a.x-i.x),y:o.y+p*(a.y-i.y)}}}function t7(e,t,n){const r=e.length;let i,o,a,s,l,c=jc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")r7(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function a7(e,t){return jv(e).getPropertyValue(t)}const s7=["top","right","bottom","left"];function Fs(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=s7[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const l7=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function c7(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(l7(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function ws(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=jv(n),o=i.boxSizing==="border-box",a=Fs(i,"padding"),s=Fs(i,"border","width"),{x:l,y:c,box:f}=c7(e,n),d=a.left+(f&&s.left),p=a.top+(f&&s.top);let{width:m,height:v}=t;return o&&(m-=a.width+s.width,v-=a.height+s.height),{x:Math.round((l-d)/m*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function u7(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e2(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=jv(o),l=Fs(s,"border","width"),c=Fs(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=Ym(s.maxWidth,o,"clientWidth"),i=Ym(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Hm,maxHeight:i||Hm}}const up=e=>Math.round(e*10)/10;function f7(e,t,n,r){const i=jv(e),o=Fs(i,"margin"),a=Ym(i.maxWidth,e,"clientWidth")||Hm,s=Ym(i.maxHeight,e,"clientHeight")||Hm,l=u7(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=Fs(i,"border","width"),m=Fs(i,"padding");c-=m.width+p.width,f-=m.height+p.height}return c=Math.max(0,c-o.width),f=Math.max(0,r?c/r:f-o.height),c=up(Math.min(c,a,l.maxWidth)),f=up(Math.min(f,s,l.maxHeight)),c&&!f&&(f=up(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=up(Math.floor(f*r))),{width:c,height:f}}function kE(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const d7=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function PE(e,t){const n=a7(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function xs(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function h7(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function p7(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=xs(e,i,n),s=xs(i,o,n),l=xs(o,t,n),c=xs(a,s,n),f=xs(s,l,n);return xs(c,f,n)}const m7=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},g7=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function gc(e,t,n){return e?m7(t,n):g7()}function zD(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function VD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function HD(e){return e==="angle"?{between:od,compare:v$,normalize:Nr}:{between:Eo,compare:(t,n)=>t-n,normalize:t=>t}}function TE({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function v7(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=HD(r),l=t.length;let{start:c,end:f,loop:d}=e,p,m;if(d){for(c+=l,f+=l,p=0,m=l;pl(i,S,b)&&s(i,S)!==0,k=()=>s(o,b)===0||l(o,S,b),P=()=>y||C(),j=()=>!y||k();for(let N=f,H=f;N<=d;++N)w=t[N%a],!w.skip&&(b=c(w[r]),b!==S&&(y=l(b,i,o),x===null&&P()&&(x=s(b,i)===0?N:H),x!==null&&j()&&(v.push(TE({start:x,end:N,loop:p,count:a,style:m})),x=null),H=N,S=b));return x!==null&&v.push(TE({start:x,end:d,loop:p,count:a,style:m})),v}function YD(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function _7(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function b7(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=y7(n,i,o,r);if(r===!0)return ME(e,[{start:a,end:s,loop:o}],n,t);const l=s{let e=0;return()=>e++})();function ft(e){return e===null||typeof e>"u"}function Lt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function nt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Qt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Lr(e,t){return Qt(e)?e:t}function Ke(e,t){return typeof e>"u"?t:e}const s$=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,xD=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Pt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function bt(e,t,n,r){let i,o,a;if(Lt(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function u$(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function f$(e){const t=u$(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function za(e,t){return(pE[t]||(pE[t]=f$(t)))(e)}function Wx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const id=e=>typeof e<"u",Va=e=>typeof e=="function",mE=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function d$(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ut=Math.PI,Rt=2*Ut,h$=Rt+Ut,Hm=Number.POSITIVE_INFINITY,p$=Ut/180,Xt=Ut/2,ps=Ut/4,gE=Ut*2/3,ya=Math.log10,no=Math.sign;function Cf(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Tc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function g$(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function OD(e,t,n){let r,i,o;for(r=0,i=e.length;rl&&c=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function qx(e,t,n){n=n||(a=>e[a]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const ko=(e,t,n,r)=>qx(e,n,r?i=>{const o=e[i][t];return oe[i][t]qx(e,n,r=>e[r][t]>=n);function b$(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+Wx(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function _E(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(ED.forEach(o=>{delete e[o]}),delete e._chartjs)}function kD(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const PD=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function TD(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,PD.call(window,()=>{r=!1,e.apply(t,n)}))}}function x$(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Gx=e=>e==="start"?"left":e==="end"?"right":"center",er=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,S$=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function MD(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,_parsed:s}=e,l=a.axis,{min:c,max:f,minDefined:d,maxDefined:p}=a.getUserBounds();d&&(i=Tn(Math.min(ko(s,l,c).lo,n?r:ko(t,l,a.getPixelForValue(c)).lo),0,r-1)),p?o=Tn(Math.max(ko(s,a.axis,f,!0).hi+1,n?0:ko(t,l,a.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function jD(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const lp=e=>e===0||e===1,bE=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Rt/n)),wE=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Rt/n)+1,Ef={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Xt)+1,easeOutSine:e=>Math.sin(e*Xt),easeInOutSine:e=>-.5*(Math.cos(Ut*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>lp(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>lp(e)?e:bE(e,.075,.3),easeOutElastic:e=>lp(e)?e:wE(e,.075,.3),easeInOutElastic(e){return lp(e)?e:e<.5?.5*bE(e*2,.1125,.45):.5+.5*wE(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Ef.easeOutBounce(1-e),easeOutBounce(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},easeInOutBounce:e=>e<.5?Ef.easeInBounce(e*2)*.5:Ef.easeOutBounce(e*2-1)*.5+.5};function Kx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function xE(e){return Kx(e)?e:new nd(e)}function w0(e){return Kx(e)?e:new nd(e).saturate(.5).darken(.1).hexString()}const O$=["x","y","borderWidth","radius","tension"],C$=["color","borderColor","backgroundColor"];function E$(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:C$},numbers:{type:"number",properties:O$}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function k$(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const SE=new Map;function P$(e,t){t=t||{};const n=e+JSON.stringify(t);let r=SE.get(n);return r||(r=new Intl.NumberFormat(e,t),SE.set(n,r)),r}function nh(e,t,n){return P$(t,n).format(e)}const DD={values(e){return Lt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=T$(e,n)}const a=ya(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),nh(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(ya(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?DD.numeric.call(this,e,t,n):""}};function T$(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Pv={formatters:DD};function M$(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Pv.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ks=Object.create(null),cb=Object.create(null);function kf(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>w0(i.backgroundColor),this.hoverBorderColor=(r,i)=>w0(i.borderColor),this.hoverColor=(r,i)=>w0(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return x0(this,t,n)}get(t){return kf(this,t)}describe(t,n){return x0(cb,t,n)}override(t,n){return x0(Ks,t,n)}route(t,n,r,i){const o=kf(this,t),a=kf(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return nt(l)?Object.assign({},c,l):Ke(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var Jt=new j$({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[E$,k$,M$]);function D$(e){return!e||ft(e.size)||ft(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Wm(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function L$(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let a=0;const s=n.length;let l,c,f,d,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Po(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,A$(e,o),l=0;l+e||0;function Zx(e,t){const n={},r=nt(t),i=r?Object.keys(t):t,o=nt(e)?r?a=>Ke(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=z$(o(a));return n}function RD(e){return Zx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Fs(e){return Zx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ir(e){const t=RD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function _n(e,t){e=e||{},t=t||Jt.font;let n=Ke(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ke(e.style,t.style);r&&!(""+r).match(B$)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ke(e.family,t.family),lineHeight:U$(Ke(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ke(e.weight,t.weight),string:""};return i.string=D$(i),i}function lf(e,t,n,r){let i=!0,o,a,s;for(o=0,a=e.length;on&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function Ja(e,t){return Object.assign(Object.create(e),t)}function Qx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=FD("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>Qx([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return AD(s,l,()=>Q$(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return EE(s).includes(l)},ownKeys(s){return EE(s)},set(s,l,c){const f=s._storage||(s._storage=i());return s[l]=f[l]=c,delete s._keys,!0}})}function Mc(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:ND(e,r),setContext:o=>Mc(e,o,n,r),override:o=>Mc(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return AD(o,a,()=>W$(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function ND(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Va(n)?n:()=>n,isIndexable:Va(r)?r:()=>r}}const H$=(e,t)=>e?e+Wx(t):t,Xx=(e,t)=>nt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function AD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function W$(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return Va(s)&&a.isScriptable(t)&&(s=Y$(t,s,e,n)),Lt(s)&&s.length&&(s=q$(t,s,e,a.isIndexable)),Xx(t,s)&&(s=Mc(s,i,o&&o[t],a)),s}function Y$(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),Xx(e,l)&&(l=Jx(i._scopes,i,e,l)),l}function q$(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(nt(t[0])){const l=t,c=i._scopes.filter(f=>f!==l);t=[];for(const f of l){const d=Jx(c,i,e,f);t.push(Mc(d,o,a&&a[e],s))}}return t}function ID(e,t,n){return Va(e)?e(t,n):e}const G$=(e,t)=>e===!0?t:typeof e=="string"?za(t,e):void 0;function K$(e,t,n,r,i){for(const o of t){const a=G$(n,o);if(a){e.add(a);const s=ID(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function Jx(e,t,n,r){const i=t._rootScopes,o=ID(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=CE(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=CE(s,a,o,l,r),l===null)?!1:Qx(Array.from(s),[""],i,o,()=>Z$(t,n,r))}function CE(e,t,n,r,i){for(;n;)n=K$(e,t,n,r,i);return n}function Z$(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Lt(i)&&nt(n)?n:i||{}}function Q$(e,t,n,r){let i;for(const o of t)if(i=FD(H$(o,e),n),typeof i<"u")return Xx(e,i)?Jx(n,r,e,i):i}function FD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function EE(e){let t=e._keys;return t||(t=e._keys=X$(e._scopes)),t}function X$(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function $D(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,a=new Array(r);let s,l,c,f;for(s=0,l=r;ste==="x"?"y":"x";function e7(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=lb(o,i),l=lb(a,o);let c=s/(s+l),f=l/(s+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const d=r*c,p=r*f;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+p*(a.x-i.x),y:o.y+p*(a.y-i.y)}}}function t7(e,t,n){const r=e.length;let i,o,a,s,l,c=jc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")r7(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function a7(e,t){return jv(e).getPropertyValue(t)}const s7=["top","right","bottom","left"];function $s(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=s7[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const l7=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function c7(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(l7(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function xs(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=jv(n),o=i.boxSizing==="border-box",a=$s(i,"padding"),s=$s(i,"border","width"),{x:l,y:c,box:f}=c7(e,n),d=a.left+(f&&s.left),p=a.top+(f&&s.top);let{width:g,height:v}=t;return o&&(g-=a.width+s.width,v-=a.height+s.height),{x:Math.round((l-d)/g*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function u7(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e2(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=jv(o),l=$s(s,"border","width"),c=$s(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=Ym(s.maxWidth,o,"clientWidth"),i=Ym(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Hm,maxHeight:i||Hm}}const up=e=>Math.round(e*10)/10;function f7(e,t,n,r){const i=jv(e),o=$s(i,"margin"),a=Ym(i.maxWidth,e,"clientWidth")||Hm,s=Ym(i.maxHeight,e,"clientHeight")||Hm,l=u7(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=$s(i,"border","width"),g=$s(i,"padding");c-=g.width+p.width,f-=g.height+p.height}return c=Math.max(0,c-o.width),f=Math.max(0,r?c/r:f-o.height),c=up(Math.min(c,a,l.maxWidth)),f=up(Math.min(f,s,l.maxHeight)),c&&!f&&(f=up(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=up(Math.floor(f*r))),{width:c,height:f}}function kE(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const d7=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function PE(e,t){const n=a7(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Ss(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function h7(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function p7(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=Ss(e,i,n),s=Ss(i,o,n),l=Ss(o,t,n),c=Ss(a,s,n),f=Ss(s,l,n);return Ss(c,f,n)}const m7=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},g7=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function gc(e,t,n){return e?m7(t,n):g7()}function zD(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function VD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function HD(e){return e==="angle"?{between:od,compare:v$,normalize:Nr}:{between:Eo,compare:(t,n)=>t-n,normalize:t=>t}}function TE({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function v7(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=HD(r),l=t.length;let{start:c,end:f,loop:d}=e,p,g;if(d){for(c+=l,f+=l,p=0,g=l;pl(i,S,b)&&s(i,S)!==0,k=()=>s(o,b)===0||l(o,S,b),P=()=>y||C(),j=()=>!y||k();for(let N=f,H=f;N<=d;++N)w=t[N%a],!w.skip&&(b=c(w[r]),b!==S&&(y=l(b,i,o),x===null&&P()&&(x=s(b,i)===0?N:H),x!==null&&j()&&(v.push(TE({start:x,end:N,loop:p,count:a,style:g})),x=null),H=N,S=b));return x!==null&&v.push(TE({start:x,end:d,loop:p,count:a,style:g})),v}function YD(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function _7(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function b7(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=y7(n,i,o,r);if(r===!0)return ME(e,[{start:a,end:s,loop:o}],n,t);const l=ss({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=PD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var _o=new S7;const DE="transparent",O7={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=xE(e||DE),i=r.valid&&xE(t||DE);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class C7{constructor(t,n,r,i){const o=n[r];i=lf([t.to,i,o,t.from]);const a=lf([t.from,o,i]);this._active=!0,this._fn=t.fn||O7[t.type||typeof a],this._easing=Ef[t.easing]||Ef.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=lf([t.to,n,i,t.from]),this._from=lf([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!nt(o))return;const a={};for(const s of n)a[s]=o[s];(Lt(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=k7(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&E7(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[c];let d=o[c];const p=r.get(c);if(d)if(p&&d.active()){d.update(p,f,s);continue}else d.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=d=new C7(p,t,c,f),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return _o.add(this._chart,r),!0}}function E7(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function IE(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,f=j7(o,a,r),d=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function R7(e,t){return Ja(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function N7(e,t,n){return Ja(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function $u(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const O0=e=>e==="reset"||e==="none",FE=(e,t)=>t?e:Object.assign({},e),A7=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:GD(n,!0),values:null};class Di{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=NE(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&$u(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,p,m,v)=>d==="x"?p:d==="r"?v:m,o=n.xAxisID=Ke(r.xAxisID,S0(t,"x")),a=n.yAxisID=Ke(r.yAxisID,S0(t,"y")),s=n.rAxisID=Ke(r.rAxisID,S0(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),f=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_E(this._data,this),t._stacked&&$u(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(nt(n))this._data=M7(n);else if(r!==n){if(r){_E(r,this);const i=this._cachedMeta;$u(i),i._parsed=[]}n&&Object.isExtensible(n)&&w$(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=NE(n.vScale,n),n.stack!==r.stack&&(i=!0,$u(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&IE(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],f,d,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{Lt(i[t])?p=this.parseArrayData(r,i,t,n):nt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>d[s]===null||c&&d[s]y||d=0;--p)if(!v()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,m,v,d);return y.$shared&&(y.$shared=l,o[a]=Object.freeze(FE(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const f=this.chart.config,d=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),d);l=f.createResolver(p,this.getContext(t,r,n))}const c=new qD(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||O0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){O0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!O0(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;si-o))}return e._cache.$bar}function F7(e){const t=e.iScale,n=I7(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(id(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function KD(e,t,n,r){return Lt(e)?U7(e,t,n,r):t[n.axis]=n.parse(e,r),t}function $E(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,f,d,p;for(c=n,f=n+r;c=n?1:-1)}function V7(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,a=[],s=l=>{const c=l.controller.getParsed(n),f=c&&c[l.vScale.axis];if(ft(f)||isNaN(f))return!0};for(const l of i)if(!(n!==void 0&&s(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,a=this.getParsed(t),s=i.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:r[t]||"",value:"("+s+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),f=a.axis,d=s.axis;for(let p=n;pod(S,s,l,!0)?1:Math.max(C,C*n,k,k*n),v=(S,C,k)=>od(S,s,l,!0)?-1:Math.min(C,C*n,k,k*n),y=m(0,c,d),x=m(Xt,f,p),b=v(Ut,c,d),w=v(Ut+Xt,f,p);r=(y-b)/2,i=(x-w)/2,o=-(y+b)/2,a=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class _a extends Di{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(nt(r[t])){const{key:l="value"}=this._parsing;o=c=>+za(r[c],l)}let a,s;for(a=t,s=t+n;a0&&!isNaN(t)?Rt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=nh(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),me(_a,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Tf extends Di{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=MD(n,i,a);this._drawStart=s,this._drawCount=l,jD(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:f,includeOptions:d}=this._getSharedOptions(n,i),p=a.axis,m=s.axis,{spanGaps:v,segment:y}=this.options,x=Tc(v)?v:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let C=n>0&&this.getParsed(n-1);for(let k=0;k=w){j.skip=!0;continue}const N=this.getParsed(k),H=ft(N[m]),R=j[p]=a.getPixelForValue(N[p],k),V=j[m]=o||H?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,N,l):N[m],k);j.skip=isNaN(R)||isNaN(V)||H,j.stop=k>0&&Math.abs(N[p]-C[p])>x,y&&(j.parsed=N,j.raw=c.data[k]),d&&(j.options=f||this.resolveDataElementOptions(k,P.active?"active":i)),b||this.updateElement(P,k,j,i),C=N}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}me(Tf,"id","line"),me(Tf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),me(Tf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Mf extends Di{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=nh(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return $D.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),s=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,f=c.xCenter,d=c.yCenter,p=c.getIndexAngle(0)-.5*Ut;let m=p,v;const y=360/this.countVisibleElements();for(v=0;v{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Ti(this.resolveDataElementOptions(t,n).angle||r):0}}me(Mf,"id","polarArea"),me(Mf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),me(Mf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class fb extends _a{}me(fb,"id","pie"),me(fb,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class hm extends Di{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return $D.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===i.length,options:a};this.updateElement(r,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,a=i==="reset";for(let s=n;s0&&this.getParsed(n-1);for(let C=n;C0&&Math.abs(P[m]-S[m])>b,x&&(j.parsed=P,j.raw=c.data[C]),p&&(j.options=d||this.resolveDataElementOptions(C,k.active?"active":i)),w||this.updateElement(k,C,j,i),S=P}this.updateSharedOptions(d,i,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let s=0;for(let l=n.length-1;l>=0;--l)s=Math.max(s,n[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,a)/2}}me(pm,"id","scatter"),me(pm,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),me(pm,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var G7=Object.freeze({__proto__:null,BarController:Pf,BubbleController:dm,DoughnutController:_a,LineController:Tf,PieController:fb,PolarAreaController:Mf,RadarController:hm,ScatterController:pm});function ms(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class t2{constructor(t){me(this,"options");this.options=t||{}}static override(t){Object.assign(t2.prototype,t)}init(){}formats(){return ms()}parse(){return ms()}format(){return ms()}add(){return ms()}diff(){return ms()}startOf(){return ms()}endOf(){return ms()}}var K7={_date:t2};function Z7(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const l=s._reversePixels?_$:ko;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const d=l(o,t,n-f),p=l(o,t,n+f);return{lo:d.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function rh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s{l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:f}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var eB={evaluateInteractionItems:rh,modes:{index(e,t,n,r){const i=ws(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?E0(e,i,o,r,a):k0(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=s[0].index,d=c.data[f];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=ws(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?E0(e,i,o,r,a):k0(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let f=0;fn.pos===t)}function VE(e,t){return e.filter(n=>ZD.indexOf(n.pos)===-1&&n.box.axis===t)}function Uu(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function tB(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Uu(Bu(t,"left"),!0),i=Uu(Bu(t,"right")),o=Uu(Bu(t,"top"),!0),a=Uu(Bu(t,"bottom")),s=VE(t,"x"),l=VE(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Bu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function HE(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function QD(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function oB(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!nt(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&QD(a,o.getPadding());const s=Math.max(0,t.outerWidth-HE(a,e,"left","right")),l=Math.max(0,t.outerHeight-HE(a,e,"top","bottom")),c=s!==e.w,f=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:f}:{same:f,other:c}}function aB(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function sB(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function cf(e,t,n,r){const i=[];let o,a,s,l,c,f;for(o=0,a=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/f,hBoxMaxHeight:a/2}),p=Object.assign({},i);QD(p,ir(r));const m=Object.assign({maxPadding:p,w:o,h:a,x:i.left,y:i.top},i),v=rB(l.concat(c),d);cf(s.fullSize,m,d,v),cf(l,m,d,v),cf(c,m,d,v)&&cf(l,m,d,v),aB(m),WE(s.leftAndTop,m,d,v),m.x+=m.w,m.y+=m.h,WE(s.rightAndBottom,m,d,v),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},bt(s.chartArea,y=>{const x=y.box;Object.assign(x,e.chartArea),x.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class XD{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class lB extends XD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const mm="$chartjs",cB={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},YE=e=>e===null||e==="";function uB(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[mm]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",YE(i)){const o=PE(e,"width");o!==void 0&&(e.width=o)}if(YE(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=PE(e,"height");o!==void 0&&(e.height=o)}return e}const JD=d7?{passive:!0}:!1;function fB(e,t,n){e.addEventListener(t,n,JD)}function dB(e,t,n){e.canvas.removeEventListener(t,n,JD)}function hB(e,t){const n=cB[e.type]||e.type,{x:r,y:i}=ws(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function qm(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function pB(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||qm(s.addedNodes,r),a=a&&!qm(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function mB(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||qm(s.removedNodes,r),a=a&&!qm(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const sd=new Map;let qE=0;function eL(){const e=window.devicePixelRatio;e!==qE&&(qE=e,sd.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function gB(e,t){sd.size||window.addEventListener("resize",eL),sd.set(e,t)}function vB(e){sd.delete(e),sd.size||window.removeEventListener("resize",eL)}function yB(e,t,n){const r=e.canvas,i=r&&e2(r);if(!i)return;const o=TD((s,l)=>{const c=i.clientWidth;n(s,l),c{const l=s[0],c=l.contentRect.width,f=l.contentRect.height;c===0&&f===0||o(c,f)});return a.observe(i),gB(e,o),a}function P0(e,t,n){n&&n.disconnect(),t==="resize"&&vB(e)}function _B(e,t,n){const r=e.canvas,i=TD(o=>{e.ctx!==null&&n(hB(o,e))},e);return fB(r,t,i),i}class bB extends XD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(uB(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[mm])return!1;const r=n[mm].initial;["height","width"].forEach(o=>{const a=r[o];ft(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[mm],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:pB,detach:mB,resize:yB}[n]||_B;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:P0,detach:P0,resize:P0}[n]||dB)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return f7(t,n,r,i)}isAttached(t){const n=e2(t);return!!(n&&n.isConnected)}}function wB(e){return!UD()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?lB:bB}var cm;let Ho=(cm=class{constructor(){me(this,"x");me(this,"y");me(this,"active",!1);me(this,"options");me(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Tc(this.x)&&Tc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},me(cm,"defaults",{}),me(cm,"defaultRoutes"),cm);function xB(e,t){const n=e.options.ticks,r=SB(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?CB(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return EB(t,c,o,a/i),c;const f=OB(o,t,i);if(a>0){let d,p;const m=a>1?Math.round((l-s)/(a-1)):null;for(dp(t,c,f,ft(m)?0:s-m,s),d=0,p=a-1;di)return l}return Math.max(i,1)}function CB(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,GE=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,KE=(e,t)=>Math.min(t||e,e);function ZE(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;oa+s)))return l}function MB(e,t){bt(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Lr(n,Lr(r,n)),max:Lr(r,Lr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Pt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=V$(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),d=f.widest.width,p=f.highest.height,m=Tn(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:m/(r-1),d+6>s&&(s=m/(r-(t.offset?.5:1)),l=this.maxHeight-zu(t.grid)-n.padding-QE(t.title,this.chart.options.font),c=Math.sqrt(d*d+p*p),a=Yx(Math.min(Math.asin(Tn((f.highest.height+6)/s,-1,1)),Math.asin(Tn(l/c,-1,1))-Math.asin(Tn(p/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){Pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Pt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=QE(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=zu(o)+l):(t.height=this.maxHeight,t.width=zu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:d,highest:p}=this._getLabelSizes(),m=r.padding*2,v=Ti(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(s){const b=r.mirror?0:x*d.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+b+m)}else{const b=r.mirror?0:y*d.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+b+m)}this._calculatePadding(c,f,x,y)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;l?c?(p=i*t.width,m=r*n.height):(p=r*t.height,m=i*n.width):o==="start"?m=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=n.width/2),this.paddingLeft=Math.max((p-f+a)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-d+a)*this.width/(this.width-d),0)}else{let f=n.height/2,d=t.height/2;o==="start"?(f=0,d=t.height):o==="end"&&(f=n.height,d=0),this.paddingTop=f+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Pt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:a[H]||0,height:s[H]||0});return{first:N(0),last:N(n-1),widest:N(P),highest:N(j),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return y$(this._alignToPixels?ps(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ts*i?s/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),p=zu(o),m=[],v=s.setContext(this.getContext()),y=v.display?v.width:0,x=y/2,b=function(oe){return ps(r,oe,y)};let w,S,C,k,P,j,N,H,R,V,W,ee;if(a==="top")w=b(this.bottom),j=this.bottom-p,H=w-x,V=b(t.top)+x,ee=t.bottom;else if(a==="bottom")w=b(this.top),V=t.top,ee=b(t.bottom)-x,j=w+x,H=this.top+p;else if(a==="left")w=b(this.right),P=this.right-p,N=w-x,R=b(t.left)+x,W=t.right;else if(a==="right")w=b(this.left),R=t.left,W=b(t.right)-x,P=w+x,N=this.left+p;else if(n==="x"){if(a==="center")w=b((t.top+t.bottom)/2+.5);else if(nt(a)){const oe=Object.keys(a)[0],le=a[oe];w=b(this.chart.scales[oe].getPixelForValue(le))}V=t.top,ee=t.bottom,j=w+x,H=j+p}else if(n==="y"){if(a==="center")w=b((t.left+t.right)/2);else if(nt(a)){const oe=Object.keys(a)[0],le=a[oe];w=b(this.chart.scales[oe].getPixelForValue(le))}P=w-x,N=P-p,R=t.left,W=t.right}const q=Ke(i.ticks.maxTicksLimit,d),Q=Math.max(1,Math.ceil(d/q));for(S=0;So.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Jt.route(o,i,l,s)})}function IB(e){return"id"in e&&"defaults"in e}class FB{constructor(){this.controllers=new hp(Di,"datasets",!0),this.elements=new hp(Ho,"elements"),this.plugins=new hp(Object,"plugins"),this.scales=new hp(ll,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):bt(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=Wx(t);Pt(r["before"+i],[],r),n[t](r),Pt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function BB(e){const t={},n=[],r=Object.keys(Gi.plugins.items);for(let o=0;o1&&XE(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function JE(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function qB(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return JE(e,"x",n[0])||JE(e,"y",n[0])}return{}}function GB(e,t){const n=Gs[e.type]||{scales:{}},r=t.scales||{},i=db(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!nt(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=hb(a,s,qB(a,e),Jt.scales[s.type]),c=WB(l,i),f=n.scales||{};o[a]=Of(Object.create(null),[{axis:l},s,f[l],f[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||db(s,t),f=(Gs[s]||{}).scales||{};Object.keys(f).forEach(d=>{const p=HB(d,l),m=a[p+"AxisID"]||p;o[m]=o[m]||Object.create(null),Of(o[m],[{axis:p},r[m],f[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];Of(s,[Jt.scales[s.type],Jt.scale])}),o}function tL(e){const t=e.options||(e.options={});t.plugins=Ke(t.plugins,{}),t.scales=GB(e,t)}function nL(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function KB(e){return e=e||{},e.data=nL(e.data),tL(e),e}const ek=new Map,rL=new Set;function pp(e,t){let n=ek.get(e);return n||(n=t(),ek.set(e,n),rL.add(n)),n}const Vu=(e,t,n)=>{const r=za(t,n);r!==void 0&&e.add(r)};class ZB{constructor(t){this._config=KB(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=nL(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),tL(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return pp(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return pp(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return pp(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return pp(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(f=>{t&&(l.add(t),f.forEach(d=>Vu(l,t,d))),f.forEach(d=>Vu(l,i,d)),f.forEach(d=>Vu(l,Gs[o]||{},d)),f.forEach(d=>Vu(l,Jt,d)),f.forEach(d=>Vu(l,cb,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),rL.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Gs[n]||{},Jt.datasets[n]||{},{type:n},Jt,cb]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=tk(this._resolverCache,t,i);let l=a;if(XB(a,n)){o.$shared=!1,r=Va(r)?r():r;const c=this.createResolver(t,r,s);l=Mc(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=tk(this._resolverCache,t,r);return nt(n)?Mc(o,n,void 0,i):o}}function tk(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Qx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const QB=e=>nt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Va(e[n]),!1);function XB(e,t){const{isScriptable:n,isIndexable:r}=ND(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(Va(s)||QB(s))||a&&Lt(s))return!0}return!1}var JB="4.3.3";const e9=["top","bottom","left","right","chartArea"];function nk(e,t){return e==="top"||e==="bottom"||e9.indexOf(e)===-1&&t==="x"}function rk(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function ik(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Pt(n&&n.onComplete,[e],t)}function t9(e){const t=e.chart,n=t.options.animation;Pt(n&&n.onProgress,[e],t)}function iL(e){return UD()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const gm={},ok=e=>{const t=iL(e);return Object.values(gm).filter(n=>n.canvas===t).pop()};function n9(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function r9(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function i9(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var sa;let Dv=(sa=class{static register(...t){Gi.add(...t),ak()}static unregister(...t){Gi.remove(...t),ak()}constructor(t,n){const r=this.config=new ZB(n),i=iL(t),o=ok(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||wB(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,f=l&&l.width;if(this.id=a$(),this.ctx=s,this.canvas=l,this.width=f,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new $B,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=x$(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],gm[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}_o.listen(this,"complete",ik),_o.listen(this,"progress",t9),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return ft(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Gi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():kE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return OE(this.canvas,this.ctx),this}stop(){return _o.stop(this),this}resize(t,n){_o.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,kE(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),Pt(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};bt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=hb(a,s),c=l==="r",f=l==="x";return{options:s,dposition:c?"chartArea":f?"bottom":"left",dtype:c?"radialLinear":f?"category":"linear"}}))),bt(o,a=>{const s=a.options,l=s.id,c=hb(l,s),f=Ke(s.type,a.dtype);(s.position===void 0||nk(s.position,c)!==nk(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===f)d=r[l];else{const p=Gi.getScale(f);d=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),bt(i,(a,s)=>{a||delete r[s]}),bt(r,a=>{rr.configure(this,a,a.options),rr.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,f=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(rk("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){bt(this.scales,t=>{rr.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!mE(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;n9(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;rr.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],bt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=i9(t)||this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&Tv(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&Mv(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Po(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=eB.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Ja(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);id(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),_o.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};bt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){bt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},bt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!zm(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(f=>!c.some(d=>f.datasetIndex===d.datasetIndex&&f.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=d$(t),c=r9(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Pt(o.onHover,[t,s,this],this),l&&Pt(o.onClick,[t,s,this],this));const f=!zm(s,i);return(f||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,f}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},me(sa,"defaults",Jt),me(sa,"instances",gm),me(sa,"overrides",Gs),me(sa,"registry",Gi),me(sa,"version",JB),me(sa,"getChart",ok),sa);function ak(){return bt(Dv.instances,e=>e._plugins.invalidate())}function o9(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+Xt,r-Xt),e.closePath(),e.clip()}function a9(e){return Zx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function s9(e,t,n,r){const i=a9(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return Tn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Tn(i.innerStart,0,a),innerEnd:Tn(i.innerEnd,0,a)}}function Ll(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Gm(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:f}=t,d=Math.max(t.outerRadius+r+n-c,0),p=f>0?f+r+n+c:0;let m=0;const v=i-l;if(r){const Q=f>0?f-r:0,oe=d>0?d-r:0,le=(Q+oe)/2,G=le!==0?v*le/(le+r):v;m=(v-G)/2}const y=Math.max(.001,v*d-n/Ut)/d,x=(v-y)/2,b=l+x+m,w=i-x-m,{outerStart:S,outerEnd:C,innerStart:k,innerEnd:P}=s9(t,p,d,w-b),j=d-S,N=d-C,H=b+S/j,R=w-C/N,V=p+k,W=p+P,ee=b+k/V,q=w-P/W;if(e.beginPath(),o){const Q=(H+R)/2;if(e.arc(a,s,d,H,Q),e.arc(a,s,d,Q,R),C>0){const F=Ll(N,R,a,s);e.arc(F.x,F.y,C,R,w+Xt)}const oe=Ll(W,w,a,s);if(e.lineTo(oe.x,oe.y),P>0){const F=Ll(W,q,a,s);e.arc(F.x,F.y,P,w+Xt,q+Math.PI)}const le=(w-P/p+(b+k/p))/2;if(e.arc(a,s,p,w-P/p,le,!0),e.arc(a,s,p,le,b+k/p,!0),k>0){const F=Ll(V,ee,a,s);e.arc(F.x,F.y,k,ee+Math.PI,b-Xt)}const G=Ll(j,b,a,s);if(e.lineTo(G.x,G.y),S>0){const F=Ll(j,H,a,s);e.arc(F.x,F.y,S,b-Xt,H)}}else{e.moveTo(a,s);const Q=Math.cos(H)*d+a,oe=Math.sin(H)*d+s;e.lineTo(Q,oe);const le=Math.cos(R)*d+a,G=Math.sin(R)*d+s;e.lineTo(le,G)}e.closePath()}function l9(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Gm(e,t,n,r,l,i);for(let c=0;c=Rt||od(a,l,c),x=Eo(s,f+m,d+m);return y&&x}getCenterPoint(n){const{x:r,y:i,startAngle:o,endAngle:a,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:f}=this.options,d=(o+a)/2,p=(s+l+f+c)/2;return{x:r+Math.cos(d)*p,y:i+Math.sin(d)*p}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,o=(r.offset||0)/4,a=(r.spacing||0)/2,s=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>Rt?Math.floor(i/Rt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(Ut,i||0)),f=o*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,l9(n,this,f,a,s),c9(n,this,f,a,s),n.restore()}}me(uf,"id","arc"),me(uf,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),me(uf,"defaultRoutes",{backgroundColor:"backgroundColor"}),me(uf,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function oL(e,t,n=t){e.lineCap=Ke(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ke(n.borderDash,t.borderDash)),e.lineDashOffset=Ke(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ke(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ke(n.borderWidth,t.borderWidth),e.strokeStyle=Ke(n.borderColor,t.borderColor)}function u9(e,t,n){e.lineTo(n.x,n.y)}function f9(e){return e.stepped?R$:e.tension||e.cubicInterpolationMode==="monotone"?N$:u9}function aL(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),f=is&&o>s;return{count:r,start:l,loop:t.loop,ilen:c(a+(c?s-C:C))%o,S=()=>{y!==x&&(e.lineTo(f,x),e.lineTo(f,y),e.lineTo(f,b))};for(l&&(m=i[w(0)],e.moveTo(m.x,m.y)),p=0;p<=s;++p){if(m=i[w(p)],m.skip)continue;const C=m.x,k=m.y,P=C|0;P===v?(kx&&(x=k),f=(d*f+C)/++d):(S(),e.lineTo(C,k),v=P,d=0,y=x=k),b=k}S()}function pb(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?h9:d9}function p9(e){return e.stepped?h7:e.tension||e.cubicInterpolationMode==="monotone"?p7:xs}function m9(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),oL(e,t.options),e.stroke(i)}function g9(e,t,n,r){const{segments:i,options:o}=t,a=pb(t);for(const s of i)oL(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const v9=typeof Path2D=="function";function y9(e,t,n,r){v9&&!t.options.segment?m9(e,t,n,r):g9(e,t,n,r)}class ba extends Ho{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;o7(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=b7(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=YD(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=p9(r);let c,f;for(c=0,f=a.length;ct!=="borderDash"&&t!=="fill"});function sk(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function lL(e){return mb[e%mb.length]}function cL(e){return lk[e%lk.length]}function C9(e,t){return e.borderColor=lL(t),e.backgroundColor=cL(t),++t}function E9(e,t){return e.backgroundColor=e.data.map(()=>lL(t++)),t}function k9(e,t){return e.backgroundColor=e.data.map(()=>cL(t++)),t}function P9(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof _a?t=E9(n,t):i instanceof Mf?t=k9(n,t):i&&(t=C9(n,t))}}function ck(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function T9(e){return e&&(e.borderColor||e.backgroundColor)}var M9={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:o}=i;if(!n.forceOverride&&(ck(r)||T9(i)||o&&ck(o)))return;const a=P9(e);r.forEach(a)}};function j9(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const a=[],s=(n-2)/(o-2);let l=0;const c=t+n-1;let f=t,d,p,m,v,y;for(a[l++]=e[f],d=0;dm&&(m=v,p=e[w],y=w);a[l++]=p,f=y}return a[l++]=e[c],a}function D9(e,t,n,r){let i=0,o=0,a,s,l,c,f,d,p,m,v,y;const x=[],b=t+n-1,w=e[t].x,C=e[b].x-w;for(a=t;ay&&(y=c,p=a),i=(o*i+s.x)/++o;else{const P=a-1;if(!ft(d)&&!ft(p)){const j=Math.min(d,p),N=Math.max(d,p);j!==m&&j!==P&&x.push({...e[j],x:i}),N!==m&&N!==P&&x.push({...e[N],x:i})}a>0&&P!==m&&x.push(e[P]),x.push(s),f=k,o=0,v=y=c,d=p=m=a}}return x}function uL(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function uk(e){e.data.datasets.forEach(t=>{uL(t)})}function L9(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:a,max:s,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Tn(ko(t,o.axis,a).lo,0,n-1)),c?i=Tn(ko(t,o.axis,s).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var R9={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){uk(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:a,indexAxis:s}=i,l=e.getDatasetMeta(o),c=a||i.data;if(lf([s,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const f=e.scales[l.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:d,count:p}=L9(l,c);const m=n.threshold||4*r;if(p<=m){uL(i);return}ft(a)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let v;switch(n.algorithm){case"lttb":v=j9(c,d,p,r,n);break;case"min-max":v=D9(c,d,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){uk(e)}};function N9(e,t,n){const r=e.segments,i=e.points,o=t.points,a=[];for(const s of r){let{start:l,end:c}=s;c=n2(l,c,i);const f=gb(n,i[l],i[c],s.loop);if(!t.segments){a.push({source:s,target:f,start:i[l],end:i[c]});continue}const d=YD(t,f);for(const p of d){const m=gb(n,o[p.start],o[p.end],p.loop),v=WD(s,i,m);for(const y of v)a.push({source:y,target:p,start:{[n]:fk(f,m,"start",Math.max)},end:{[n]:fk(f,m,"end",Math.min)}})}}return a}function gb(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Nr(i),o=Nr(o)),{property:e,start:i,end:o}}function A9(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:a,end:s})=>{s=n2(a,s,i);const l=i[a],c=i[s];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function n2(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function fk(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function fL(e,t){let n=[],r=!1;return Lt(e)?(r=!0,n=e):n=A9(e,t),n.length?new ba({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function dk(e){return e&&e.fill!==!1}function I9(e,t,n){let i=e[t].fill;const o=[t];let a;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Qt(i))return i;if(a=e[i],!a)return!1;if(a.visible)return i;o.push(i),i=a.fill}return!1}function F9(e,t,n){const r=z9(e);if(nt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Qt(i)&&Math.floor(i)===i?$9(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function $9(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function B9(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:nt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function U9(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:nt(e)?r=e.value:r=t.getBaseValue(),r}function z9(e){const t=e.options,n=t.fill;let r=Ke(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function V9(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,a=r.points,s=H9(t,n);s.push(fL({x:null,y:t.bottom},r));for(let l=0;l=0;--a){const s=i[a].$filler;s&&(s.line.updateControlPoints(o,s.axis),r&&s.fill&&j0(e.ctx,s,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;dk(o)&&j0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!dk(r)||n.drawTime!=="beforeDatasetDraw"||j0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const gk=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},tU=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class vk extends Ho{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Pt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=_n(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=gk(r,o);let c,f;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,f=this._fitRows(a,o,s,l)+10):(f=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],f=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-f;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*s>a)&&(d+=f,c[c.length-(y>0?0:1)]=0,m+=f,p++),l[y]={left:0,top:m,row:p,width:x,height:i},c[c.length-1]+=x+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],f=a-t;let d=s,p=0,m=0,v=0,y=0;return this.legendItems.forEach((x,b)=>{const{itemWidth:w,itemHeight:S}=nU(r,n,o,x,i);b>0&&m+S+2*s>f&&(d+=p+s,c.push({width:p,height:m}),v+=p+s,y++,p=m=0),l[b]={left:v,top:m,col:y,width:w,height:S},p=Math.max(p,w),m+=S+s}),d+=p,c.push({width:p,height:m}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=gc(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=er(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=er(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=er(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=er(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Tv(t,this),this._draw(),Mv(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Jt.color,l=gc(t.rtl,this.left,this.width),c=_n(a.font),{padding:f}=a,d=c.size,p=d/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:y,itemHeight:x}=gk(a,d),b=function(P,j,N){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const H=Ke(N.lineWidth,1);if(i.fillStyle=Ke(N.fillStyle,s),i.lineCap=Ke(N.lineCap,"butt"),i.lineDashOffset=Ke(N.lineDashOffset,0),i.lineJoin=Ke(N.lineJoin,"miter"),i.lineWidth=H,i.strokeStyle=Ke(N.strokeStyle,s),i.setLineDash(Ke(N.lineDash,[])),a.usePointStyle){const R={radius:y*Math.SQRT2/2,pointStyle:N.pointStyle,rotation:N.rotation,borderWidth:H},V=l.xPlus(P,v/2),W=j+p;LD(i,R,V,W,a.pointStyleWidth&&v)}else{const R=j+Math.max((d-y)/2,0),V=l.leftForLtr(P,v),W=Is(N.borderRadius);i.beginPath(),Object.values(W).some(ee=>ee!==0)?ad(i,{x:V,y:R,w:v,h:y,radius:W}):i.rect(V,R,v,y),i.fill(),H!==0&&i.stroke()}i.restore()},w=function(P,j,N){Ks(i,N.text,P,j+x/2,c,{strikethrough:N.hidden,textAlign:l.textAlign(N.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?m={x:er(o,this.left+f,this.right-r[0]),y:this.top+f+C,line:0}:m={x:this.left+f,y:er(o,this.top+C+f,this.bottom-n[0].height),line:0},zD(this.ctx,t.textDirection);const k=x+f;this.legendItems.forEach((P,j)=>{i.strokeStyle=P.fontColor,i.fillStyle=P.fontColor;const N=i.measureText(P.text).width,H=l.textAlign(P.textAlign||(P.textAlign=a.textAlign)),R=v+p+N;let V=m.x,W=m.y;l.setWidth(this.width),S?j>0&&V+R+f>this.right&&(W=m.y+=k,m.line++,V=m.x=er(o,this.left+f,this.right-r[m.line])):j>0&&W+k>this.bottom&&(V=m.x=V+n[m.line].width+f,m.line++,W=m.y=er(o,this.top+C+f,this.bottom-n[m.line].height));const ee=l.x(V);if(b(ee,W,P),V=S$(H,V+v+p,S?V+R:this.right,t.rtl),w(l.x(V),W,P),S)m.x+=R+f;else if(typeof P.text!="string"){const q=c.lineHeight;m.y+=hL(P,q)+f}else m.y+=k}),VD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=_n(n.font),i=ir(n.padding);if(!n.display)return;const o=gc(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let f,d=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,d=er(t.align,d,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);f=c+er(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=er(s,d,d+p);a.textAlign=o.textAlign(Gx(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Ks(a,n.text,m,f,r)}_computeTitleHeight(){const t=this.options.title,n=_n(t.font),r=ir(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Eo(t,this.left,this.right)&&Eo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function iU(e,t,n){let r=e;return typeof t.text!="string"&&(r=hL(t,n)),r}function hL(e,t){const n=e.text?e.text.length:0;return t*n}function oU(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var aU={id:"legend",_element:vk,start(e,t,n){const r=e.legend=new vk({ctx:e.ctx,options:n,chart:e});rr.configure(e,r,n),rr.addBox(e,r)},stop(e){rr.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;rr.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),f=ir(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class r2 extends Ho{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Lt(r.text)?r.text.length:1;this._padding=ir(r.padding);const o=i*_n(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:a}=this,s=a.align;let l=0,c,f,d;return this.isHorizontal()?(f=er(s,r,o),d=n+t,c=o-r):(a.position==="left"?(f=r+t,d=er(s,i,n),l=Ut*-.5):(f=o-t,d=er(s,n,i),l=Ut*.5),c=i-n),{titleX:f,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=_n(n.font),o=r.lineHeight/2+this._padding.top,{titleX:a,titleY:s,maxWidth:l,rotation:c}=this._drawArgs(o);Ks(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Gx(n.align),textBaseline:"middle",translation:[a,s]})}}function sU(e,t){const n=new r2({ctx:e.ctx,options:t,chart:e});rr.configure(e,n,t),rr.addBox(e,n),e.titleBlock=n}var lU={id:"title",_element:r2,start(e,t,n){sU(e,n)},stop(e){const t=e.titleBlock;rr.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;rr.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const mp=new WeakMap;var cU={id:"subtitle",start(e,t,n){const r=new r2({ctx:e.ctx,options:n,chart:e});rr.configure(e,r,n),rr.addBox(e,r),mp.set(e,r)},stop(e){rr.removeBox(e,mp.get(e)),mp.delete(e)},beforeUpdate(e,t,n){const r=mp.get(e);rr.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ff={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;ts({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=PD.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var _o=new S7;const DE="transparent",O7={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=xE(e||DE),i=r.valid&&xE(t||DE);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class C7{constructor(t,n,r,i){const o=n[r];i=lf([t.to,i,o,t.from]);const a=lf([t.from,o,i]);this._active=!0,this._fn=t.fn||O7[t.type||typeof a],this._easing=Ef[t.easing]||Ef.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=lf([t.to,n,i,t.from]),this._from=lf([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!nt(o))return;const a={};for(const s of n)a[s]=o[s];(Lt(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=k7(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&E7(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[c];let d=o[c];const p=r.get(c);if(d)if(p&&d.active()){d.update(p,f,s);continue}else d.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=d=new C7(p,t,c,f),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return _o.add(this._chart,r),!0}}function E7(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function IE(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,f=j7(o,a,r),d=t.length;let p;for(let g=0;gn[r].axis===t).shift()}function R7(e,t){return Ja(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function N7(e,t,n){return Ja(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function $u(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const O0=e=>e==="reset"||e==="none",FE=(e,t)=>t?e:Object.assign({},e),A7=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:GD(n,!0),values:null};class Di{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=NE(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&$u(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,p,g,v)=>d==="x"?p:d==="r"?v:g,o=n.xAxisID=Ke(r.xAxisID,S0(t,"x")),a=n.yAxisID=Ke(r.yAxisID,S0(t,"y")),s=n.rAxisID=Ke(r.rAxisID,S0(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),f=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_E(this._data,this),t._stacked&&$u(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(nt(n))this._data=M7(n);else if(r!==n){if(r){_E(r,this);const i=this._cachedMeta;$u(i),i._parsed=[]}n&&Object.isExtensible(n)&&w$(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=NE(n.vScale,n),n.stack!==r.stack&&(i=!0,$u(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&IE(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],f,d,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{Lt(i[t])?p=this.parseArrayData(r,i,t,n):nt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const g=()=>d[s]===null||c&&d[s]y||d=0;--p)if(!v()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,g,v,d);return y.$shared&&(y.$shared=l,o[a]=Object.freeze(FE(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const f=this.chart.config,d=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),d);l=f.createResolver(p,this.getContext(t,r,n))}const c=new qD(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||O0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){O0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!O0(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;si-o))}return e._cache.$bar}function F7(e){const t=e.iScale,n=I7(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(id(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function KD(e,t,n,r){return Lt(e)?U7(e,t,n,r):t[n.axis]=n.parse(e,r),t}function $E(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,f,d,p;for(c=n,f=n+r;c=n?1:-1)}function V7(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,a=[],s=l=>{const c=l.controller.getParsed(n),f=c&&c[l.vScale.axis];if(ft(f)||isNaN(f))return!0};for(const l of i)if(!(n!==void 0&&s(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,a=this.getParsed(t),s=i.getLabelForValue(a.x),l=o.getLabelForValue(a.y),c=a._custom;return{label:r[t]||"",value:"("+s+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),f=a.axis,d=s.axis;for(let p=n;pod(S,s,l,!0)?1:Math.max(C,C*n,k,k*n),v=(S,C,k)=>od(S,s,l,!0)?-1:Math.min(C,C*n,k,k*n),y=g(0,c,d),x=g(Xt,f,p),b=v(Ut,c,d),w=v(Ut+Xt,f,p);r=(y-b)/2,i=(x-w)/2,o=-(y+b)/2,a=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class _a extends Di{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(nt(r[t])){const{key:l="value"}=this._parsing;o=c=>+za(r[c],l)}let a,s;for(a=t,s=t+n;a0&&!isNaN(t)?Rt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=nh(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),me(_a,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Tf extends Di{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=MD(n,i,a);this._drawStart=s,this._drawCount=l,jD(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:f,includeOptions:d}=this._getSharedOptions(n,i),p=a.axis,g=s.axis,{spanGaps:v,segment:y}=this.options,x=Tc(v)?v:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let C=n>0&&this.getParsed(n-1);for(let k=0;k=w){j.skip=!0;continue}const N=this.getParsed(k),H=ft(N[g]),R=j[p]=a.getPixelForValue(N[p],k),V=j[g]=o||H?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,N,l):N[g],k);j.skip=isNaN(R)||isNaN(V)||H,j.stop=k>0&&Math.abs(N[p]-C[p])>x,y&&(j.parsed=N,j.raw=c.data[k]),d&&(j.options=f||this.resolveDataElementOptions(k,P.active?"active":i)),b||this.updateElement(P,k,j,i),C=N}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}me(Tf,"id","line"),me(Tf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),me(Tf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Mf extends Di{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=nh(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return $D.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),s=(o-a)/t.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,l=a.options.animation,c=this._cachedMeta.rScale,f=c.xCenter,d=c.yCenter,p=c.getIndexAngle(0)-.5*Ut;let g=p,v;const y=360/this.countVisibleElements();for(v=0;v{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Ti(this.resolveDataElementOptions(t,n).angle||r):0}}me(Mf,"id","polarArea"),me(Mf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),me(Mf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class fb extends _a{}me(fb,"id","pie"),me(fb,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class hm extends Di{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return $D.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===i.length,options:a};this.updateElement(r,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,a=i==="reset";for(let s=n;s0&&this.getParsed(n-1);for(let C=n;C0&&Math.abs(P[g]-S[g])>b,x&&(j.parsed=P,j.raw=c.data[C]),p&&(j.options=d||this.resolveDataElementOptions(C,k.active?"active":i)),w||this.updateElement(k,C,j,i),S=P}this.updateSharedOptions(d,i,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let s=0;for(let l=n.length-1;l>=0;--l)s=Math.max(s,n[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,a)/2}}me(pm,"id","scatter"),me(pm,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),me(pm,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var G7=Object.freeze({__proto__:null,BarController:Pf,BubbleController:dm,DoughnutController:_a,LineController:Tf,PieController:fb,PolarAreaController:Mf,RadarController:hm,ScatterController:pm});function gs(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class t2{constructor(t){me(this,"options");this.options=t||{}}static override(t){Object.assign(t2.prototype,t)}init(){}formats(){return gs()}parse(){return gs()}format(){return gs()}add(){return gs()}diff(){return gs()}startOf(){return gs()}endOf(){return gs()}}var K7={_date:t2};function Z7(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const l=s._reversePixels?_$:ko;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const d=l(o,t,n-f),p=l(o,t,n+f);return{lo:d.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function rh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s{l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:f}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var eB={evaluateInteractionItems:rh,modes:{index(e,t,n,r){const i=xs(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?E0(e,i,o,r,a):k0(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=s[0].index,d=c.data[f];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=xs(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?E0(e,i,o,r,a):k0(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let f=0;fn.pos===t)}function VE(e,t){return e.filter(n=>ZD.indexOf(n.pos)===-1&&n.box.axis===t)}function Uu(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function tB(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Uu(Bu(t,"left"),!0),i=Uu(Bu(t,"right")),o=Uu(Bu(t,"top"),!0),a=Uu(Bu(t,"bottom")),s=VE(t,"x"),l=VE(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Bu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function HE(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function QD(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function oB(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!nt(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&QD(a,o.getPadding());const s=Math.max(0,t.outerWidth-HE(a,e,"left","right")),l=Math.max(0,t.outerHeight-HE(a,e,"top","bottom")),c=s!==e.w,f=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:f}:{same:f,other:c}}function aB(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function sB(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function cf(e,t,n,r){const i=[];let o,a,s,l,c,f;for(o=0,a=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/f,hBoxMaxHeight:a/2}),p=Object.assign({},i);QD(p,ir(r));const g=Object.assign({maxPadding:p,w:o,h:a,x:i.left,y:i.top},i),v=rB(l.concat(c),d);cf(s.fullSize,g,d,v),cf(l,g,d,v),cf(c,g,d,v)&&cf(l,g,d,v),aB(g),WE(s.leftAndTop,g,d,v),g.x+=g.w,g.y+=g.h,WE(s.rightAndBottom,g,d,v),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},bt(s.chartArea,y=>{const x=y.box;Object.assign(x,e.chartArea),x.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class XD{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class lB extends XD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const mm="$chartjs",cB={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},YE=e=>e===null||e==="";function uB(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[mm]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",YE(i)){const o=PE(e,"width");o!==void 0&&(e.width=o)}if(YE(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=PE(e,"height");o!==void 0&&(e.height=o)}return e}const JD=d7?{passive:!0}:!1;function fB(e,t,n){e.addEventListener(t,n,JD)}function dB(e,t,n){e.canvas.removeEventListener(t,n,JD)}function hB(e,t){const n=cB[e.type]||e.type,{x:r,y:i}=xs(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function qm(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function pB(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||qm(s.addedNodes,r),a=a&&!qm(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function mB(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||qm(s.removedNodes,r),a=a&&!qm(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const sd=new Map;let qE=0;function eL(){const e=window.devicePixelRatio;e!==qE&&(qE=e,sd.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function gB(e,t){sd.size||window.addEventListener("resize",eL),sd.set(e,t)}function vB(e){sd.delete(e),sd.size||window.removeEventListener("resize",eL)}function yB(e,t,n){const r=e.canvas,i=r&&e2(r);if(!i)return;const o=TD((s,l)=>{const c=i.clientWidth;n(s,l),c{const l=s[0],c=l.contentRect.width,f=l.contentRect.height;c===0&&f===0||o(c,f)});return a.observe(i),gB(e,o),a}function P0(e,t,n){n&&n.disconnect(),t==="resize"&&vB(e)}function _B(e,t,n){const r=e.canvas,i=TD(o=>{e.ctx!==null&&n(hB(o,e))},e);return fB(r,t,i),i}class bB extends XD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(uB(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[mm])return!1;const r=n[mm].initial;["height","width"].forEach(o=>{const a=r[o];ft(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[mm],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:pB,detach:mB,resize:yB}[n]||_B;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:P0,detach:P0,resize:P0}[n]||dB)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return f7(t,n,r,i)}isAttached(t){const n=e2(t);return!!(n&&n.isConnected)}}function wB(e){return!UD()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?lB:bB}var cm;let Ho=(cm=class{constructor(){me(this,"x");me(this,"y");me(this,"active",!1);me(this,"options");me(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Tc(this.x)&&Tc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},me(cm,"defaults",{}),me(cm,"defaultRoutes"),cm);function xB(e,t){const n=e.options.ticks,r=SB(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?CB(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return EB(t,c,o,a/i),c;const f=OB(o,t,i);if(a>0){let d,p;const g=a>1?Math.round((l-s)/(a-1)):null;for(dp(t,c,f,ft(g)?0:s-g,s),d=0,p=a-1;di)return l}return Math.max(i,1)}function CB(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,GE=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,KE=(e,t)=>Math.min(t||e,e);function ZE(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;oa+s)))return l}function MB(e,t){bt(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Lr(n,Lr(r,n)),max:Lr(r,Lr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Pt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=V$(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),d=f.widest.width,p=f.highest.height,g=Tn(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:g/(r-1),d+6>s&&(s=g/(r-(t.offset?.5:1)),l=this.maxHeight-zu(t.grid)-n.padding-QE(t.title,this.chart.options.font),c=Math.sqrt(d*d+p*p),a=Yx(Math.min(Math.asin(Tn((f.highest.height+6)/s,-1,1)),Math.asin(Tn(l/c,-1,1))-Math.asin(Tn(p/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){Pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Pt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=QE(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=zu(o)+l):(t.height=this.maxHeight,t.width=zu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:d,highest:p}=this._getLabelSizes(),g=r.padding*2,v=Ti(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(s){const b=r.mirror?0:x*d.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+b+g)}else{const b=r.mirror?0:y*d.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+b+g)}this._calculatePadding(c,f,x,y)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,g=0;l?c?(p=i*t.width,g=r*n.height):(p=r*t.height,g=i*n.width):o==="start"?g=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,g=n.width/2),this.paddingLeft=Math.max((p-f+a)*this.width/(this.width-f),0),this.paddingRight=Math.max((g-d+a)*this.width/(this.width-d),0)}else{let f=n.height/2,d=t.height/2;o==="start"?(f=0,d=t.height):o==="end"&&(f=n.height,d=0),this.paddingTop=f+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Pt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:a[H]||0,height:s[H]||0});return{first:N(0),last:N(n-1),widest:N(P),highest:N(j),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return y$(this._alignToPixels?ms(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ts*i?s/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),p=zu(o),g=[],v=s.setContext(this.getContext()),y=v.display?v.width:0,x=y/2,b=function(oe){return ms(r,oe,y)};let w,S,C,k,P,j,N,H,R,V,W,ee;if(a==="top")w=b(this.bottom),j=this.bottom-p,H=w-x,V=b(t.top)+x,ee=t.bottom;else if(a==="bottom")w=b(this.top),V=t.top,ee=b(t.bottom)-x,j=w+x,H=this.top+p;else if(a==="left")w=b(this.right),P=this.right-p,N=w-x,R=b(t.left)+x,W=t.right;else if(a==="right")w=b(this.left),R=t.left,W=b(t.right)-x,P=w+x,N=this.left+p;else if(n==="x"){if(a==="center")w=b((t.top+t.bottom)/2+.5);else if(nt(a)){const oe=Object.keys(a)[0],le=a[oe];w=b(this.chart.scales[oe].getPixelForValue(le))}V=t.top,ee=t.bottom,j=w+x,H=j+p}else if(n==="y"){if(a==="center")w=b((t.left+t.right)/2);else if(nt(a)){const oe=Object.keys(a)[0],le=a[oe];w=b(this.chart.scales[oe].getPixelForValue(le))}P=w-x,N=P-p,R=t.left,W=t.right}const q=Ke(i.ticks.maxTicksLimit,d),Q=Math.max(1,Math.ceil(d/q));for(S=0;So.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Jt.route(o,i,l,s)})}function IB(e){return"id"in e&&"defaults"in e}class FB{constructor(){this.controllers=new hp(Di,"datasets",!0),this.elements=new hp(Ho,"elements"),this.plugins=new hp(Object,"plugins"),this.scales=new hp(cl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):bt(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=Wx(t);Pt(r["before"+i],[],r),n[t](r),Pt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function BB(e){const t={},n=[],r=Object.keys(Gi.plugins.items);for(let o=0;o1&&XE(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function JE(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function qB(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return JE(e,"x",n[0])||JE(e,"y",n[0])}return{}}function GB(e,t){const n=Ks[e.type]||{scales:{}},r=t.scales||{},i=db(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!nt(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=hb(a,s,qB(a,e),Jt.scales[s.type]),c=WB(l,i),f=n.scales||{};o[a]=Of(Object.create(null),[{axis:l},s,f[l],f[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||db(s,t),f=(Ks[s]||{}).scales||{};Object.keys(f).forEach(d=>{const p=HB(d,l),g=a[p+"AxisID"]||p;o[g]=o[g]||Object.create(null),Of(o[g],[{axis:p},r[g],f[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];Of(s,[Jt.scales[s.type],Jt.scale])}),o}function tL(e){const t=e.options||(e.options={});t.plugins=Ke(t.plugins,{}),t.scales=GB(e,t)}function nL(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function KB(e){return e=e||{},e.data=nL(e.data),tL(e),e}const ek=new Map,rL=new Set;function pp(e,t){let n=ek.get(e);return n||(n=t(),ek.set(e,n),rL.add(n)),n}const Vu=(e,t,n)=>{const r=za(t,n);r!==void 0&&e.add(r)};class ZB{constructor(t){this._config=KB(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=nL(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),tL(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return pp(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return pp(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return pp(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return pp(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(f=>{t&&(l.add(t),f.forEach(d=>Vu(l,t,d))),f.forEach(d=>Vu(l,i,d)),f.forEach(d=>Vu(l,Ks[o]||{},d)),f.forEach(d=>Vu(l,Jt,d)),f.forEach(d=>Vu(l,cb,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),rL.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ks[n]||{},Jt.datasets[n]||{},{type:n},Jt,cb]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=tk(this._resolverCache,t,i);let l=a;if(XB(a,n)){o.$shared=!1,r=Va(r)?r():r;const c=this.createResolver(t,r,s);l=Mc(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=tk(this._resolverCache,t,r);return nt(n)?Mc(o,n,void 0,i):o}}function tk(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Qx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const QB=e=>nt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Va(e[n]),!1);function XB(e,t){const{isScriptable:n,isIndexable:r}=ND(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(Va(s)||QB(s))||a&&Lt(s))return!0}return!1}var JB="4.3.3";const e9=["top","bottom","left","right","chartArea"];function nk(e,t){return e==="top"||e==="bottom"||e9.indexOf(e)===-1&&t==="x"}function rk(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function ik(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Pt(n&&n.onComplete,[e],t)}function t9(e){const t=e.chart,n=t.options.animation;Pt(n&&n.onProgress,[e],t)}function iL(e){return UD()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const gm={},ok=e=>{const t=iL(e);return Object.values(gm).filter(n=>n.canvas===t).pop()};function n9(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function r9(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function i9(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var sa;let Dv=(sa=class{static register(...t){Gi.add(...t),ak()}static unregister(...t){Gi.remove(...t),ak()}constructor(t,n){const r=this.config=new ZB(n),i=iL(t),o=ok(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||wB(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,f=l&&l.width;if(this.id=a$(),this.ctx=s,this.canvas=l,this.width=f,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new $B,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=x$(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],gm[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}_o.listen(this,"complete",ik),_o.listen(this,"progress",t9),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return ft(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Gi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():kE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return OE(this.canvas,this.ctx),this}stop(){return _o.stop(this),this}resize(t,n){_o.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,kE(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),Pt(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};bt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=hb(a,s),c=l==="r",f=l==="x";return{options:s,dposition:c?"chartArea":f?"bottom":"left",dtype:c?"radialLinear":f?"category":"linear"}}))),bt(o,a=>{const s=a.options,l=s.id,c=hb(l,s),f=Ke(s.type,a.dtype);(s.position===void 0||nk(s.position,c)!==nk(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===f)d=r[l];else{const p=Gi.getScale(f);d=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),bt(i,(a,s)=>{a||delete r[s]}),bt(r,a=>{rr.configure(this,a,a.options),rr.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,f=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(rk("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){bt(this.scales,t=>{rr.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!mE(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;n9(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;rr.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],bt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=i9(t)||this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&Tv(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&Mv(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Po(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=eB.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Ja(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);id(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),_o.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};bt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){bt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},bt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!zm(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(f=>!c.some(d=>f.datasetIndex===d.datasetIndex&&f.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=d$(t),c=r9(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Pt(o.onHover,[t,s,this],this),l&&Pt(o.onClick,[t,s,this],this));const f=!zm(s,i);return(f||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,f}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},me(sa,"defaults",Jt),me(sa,"instances",gm),me(sa,"overrides",Ks),me(sa,"registry",Gi),me(sa,"version",JB),me(sa,"getChart",ok),sa);function ak(){return bt(Dv.instances,e=>e._plugins.invalidate())}function o9(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+Xt,r-Xt),e.closePath(),e.clip()}function a9(e){return Zx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function s9(e,t,n,r){const i=a9(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return Tn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Tn(i.innerStart,0,a),innerEnd:Tn(i.innerEnd,0,a)}}function Ll(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Gm(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:f}=t,d=Math.max(t.outerRadius+r+n-c,0),p=f>0?f+r+n+c:0;let g=0;const v=i-l;if(r){const Q=f>0?f-r:0,oe=d>0?d-r:0,le=(Q+oe)/2,G=le!==0?v*le/(le+r):v;g=(v-G)/2}const y=Math.max(.001,v*d-n/Ut)/d,x=(v-y)/2,b=l+x+g,w=i-x-g,{outerStart:S,outerEnd:C,innerStart:k,innerEnd:P}=s9(t,p,d,w-b),j=d-S,N=d-C,H=b+S/j,R=w-C/N,V=p+k,W=p+P,ee=b+k/V,q=w-P/W;if(e.beginPath(),o){const Q=(H+R)/2;if(e.arc(a,s,d,H,Q),e.arc(a,s,d,Q,R),C>0){const F=Ll(N,R,a,s);e.arc(F.x,F.y,C,R,w+Xt)}const oe=Ll(W,w,a,s);if(e.lineTo(oe.x,oe.y),P>0){const F=Ll(W,q,a,s);e.arc(F.x,F.y,P,w+Xt,q+Math.PI)}const le=(w-P/p+(b+k/p))/2;if(e.arc(a,s,p,w-P/p,le,!0),e.arc(a,s,p,le,b+k/p,!0),k>0){const F=Ll(V,ee,a,s);e.arc(F.x,F.y,k,ee+Math.PI,b-Xt)}const G=Ll(j,b,a,s);if(e.lineTo(G.x,G.y),S>0){const F=Ll(j,H,a,s);e.arc(F.x,F.y,S,b-Xt,H)}}else{e.moveTo(a,s);const Q=Math.cos(H)*d+a,oe=Math.sin(H)*d+s;e.lineTo(Q,oe);const le=Math.cos(R)*d+a,G=Math.sin(R)*d+s;e.lineTo(le,G)}e.closePath()}function l9(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Gm(e,t,n,r,l,i);for(let c=0;c=Rt||od(a,l,c),x=Eo(s,f+g,d+g);return y&&x}getCenterPoint(n){const{x:r,y:i,startAngle:o,endAngle:a,innerRadius:s,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:f}=this.options,d=(o+a)/2,p=(s+l+f+c)/2;return{x:r+Math.cos(d)*p,y:i+Math.sin(d)*p}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,o=(r.offset||0)/4,a=(r.spacing||0)/2,s=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>Rt?Math.floor(i/Rt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*o,Math.sin(l)*o);const c=1-Math.sin(Math.min(Ut,i||0)),f=o*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,l9(n,this,f,a,s),c9(n,this,f,a,s),n.restore()}}me(uf,"id","arc"),me(uf,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),me(uf,"defaultRoutes",{backgroundColor:"backgroundColor"}),me(uf,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function oL(e,t,n=t){e.lineCap=Ke(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ke(n.borderDash,t.borderDash)),e.lineDashOffset=Ke(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ke(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ke(n.borderWidth,t.borderWidth),e.strokeStyle=Ke(n.borderColor,t.borderColor)}function u9(e,t,n){e.lineTo(n.x,n.y)}function f9(e){return e.stepped?R$:e.tension||e.cubicInterpolationMode==="monotone"?N$:u9}function aL(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),f=is&&o>s;return{count:r,start:l,loop:t.loop,ilen:c(a+(c?s-C:C))%o,S=()=>{y!==x&&(e.lineTo(f,x),e.lineTo(f,y),e.lineTo(f,b))};for(l&&(g=i[w(0)],e.moveTo(g.x,g.y)),p=0;p<=s;++p){if(g=i[w(p)],g.skip)continue;const C=g.x,k=g.y,P=C|0;P===v?(kx&&(x=k),f=(d*f+C)/++d):(S(),e.lineTo(C,k),v=P,d=0,y=x=k),b=k}S()}function pb(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?h9:d9}function p9(e){return e.stepped?h7:e.tension||e.cubicInterpolationMode==="monotone"?p7:Ss}function m9(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),oL(e,t.options),e.stroke(i)}function g9(e,t,n,r){const{segments:i,options:o}=t,a=pb(t);for(const s of i)oL(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const v9=typeof Path2D=="function";function y9(e,t,n,r){v9&&!t.options.segment?m9(e,t,n,r):g9(e,t,n,r)}class ba extends Ho{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;o7(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=b7(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=YD(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=p9(r);let c,f;for(c=0,f=a.length;ct!=="borderDash"&&t!=="fill"});function sk(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function lL(e){return mb[e%mb.length]}function cL(e){return lk[e%lk.length]}function C9(e,t){return e.borderColor=lL(t),e.backgroundColor=cL(t),++t}function E9(e,t){return e.backgroundColor=e.data.map(()=>lL(t++)),t}function k9(e,t){return e.backgroundColor=e.data.map(()=>cL(t++)),t}function P9(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof _a?t=E9(n,t):i instanceof Mf?t=k9(n,t):i&&(t=C9(n,t))}}function ck(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function T9(e){return e&&(e.borderColor||e.backgroundColor)}var M9={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:o}=i;if(!n.forceOverride&&(ck(r)||T9(i)||o&&ck(o)))return;const a=P9(e);r.forEach(a)}};function j9(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const a=[],s=(n-2)/(o-2);let l=0;const c=t+n-1;let f=t,d,p,g,v,y;for(a[l++]=e[f],d=0;dg&&(g=v,p=e[w],y=w);a[l++]=p,f=y}return a[l++]=e[c],a}function D9(e,t,n,r){let i=0,o=0,a,s,l,c,f,d,p,g,v,y;const x=[],b=t+n-1,w=e[t].x,C=e[b].x-w;for(a=t;ay&&(y=c,p=a),i=(o*i+s.x)/++o;else{const P=a-1;if(!ft(d)&&!ft(p)){const j=Math.min(d,p),N=Math.max(d,p);j!==g&&j!==P&&x.push({...e[j],x:i}),N!==g&&N!==P&&x.push({...e[N],x:i})}a>0&&P!==g&&x.push(e[P]),x.push(s),f=k,o=0,v=y=c,d=p=g=a}}return x}function uL(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function uk(e){e.data.datasets.forEach(t=>{uL(t)})}function L9(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:a,max:s,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Tn(ko(t,o.axis,a).lo,0,n-1)),c?i=Tn(ko(t,o.axis,s).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var R9={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){uk(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:a,indexAxis:s}=i,l=e.getDatasetMeta(o),c=a||i.data;if(lf([s,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const f=e.scales[l.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:d,count:p}=L9(l,c);const g=n.threshold||4*r;if(p<=g){uL(i);return}ft(a)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let v;switch(n.algorithm){case"lttb":v=j9(c,d,p,r,n);break;case"min-max":v=D9(c,d,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){uk(e)}};function N9(e,t,n){const r=e.segments,i=e.points,o=t.points,a=[];for(const s of r){let{start:l,end:c}=s;c=n2(l,c,i);const f=gb(n,i[l],i[c],s.loop);if(!t.segments){a.push({source:s,target:f,start:i[l],end:i[c]});continue}const d=YD(t,f);for(const p of d){const g=gb(n,o[p.start],o[p.end],p.loop),v=WD(s,i,g);for(const y of v)a.push({source:y,target:p,start:{[n]:fk(f,g,"start",Math.max)},end:{[n]:fk(f,g,"end",Math.min)}})}}return a}function gb(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Nr(i),o=Nr(o)),{property:e,start:i,end:o}}function A9(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:a,end:s})=>{s=n2(a,s,i);const l=i[a],c=i[s];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function n2(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function fk(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function fL(e,t){let n=[],r=!1;return Lt(e)?(r=!0,n=e):n=A9(e,t),n.length?new ba({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function dk(e){return e&&e.fill!==!1}function I9(e,t,n){let i=e[t].fill;const o=[t];let a;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Qt(i))return i;if(a=e[i],!a)return!1;if(a.visible)return i;o.push(i),i=a.fill}return!1}function F9(e,t,n){const r=z9(e);if(nt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Qt(i)&&Math.floor(i)===i?$9(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function $9(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function B9(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:nt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function U9(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:nt(e)?r=e.value:r=t.getBaseValue(),r}function z9(e){const t=e.options,n=t.fill;let r=Ke(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function V9(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,a=r.points,s=H9(t,n);s.push(fL({x:null,y:t.bottom},r));for(let l=0;l=0;--a){const s=i[a].$filler;s&&(s.line.updateControlPoints(o,s.axis),r&&s.fill&&j0(e.ctx,s,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;dk(o)&&j0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!dk(r)||n.drawTime!=="beforeDatasetDraw"||j0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const gk=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},tU=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class vk extends Ho{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Pt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=_n(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=gk(r,o);let c,f;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,f=this._fitRows(a,o,s,l)+10):(f=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],f=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let p=-1,g=-f;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*s>a)&&(d+=f,c[c.length-(y>0?0:1)]=0,g+=f,p++),l[y]={left:0,top:g,row:p,width:x,height:i},c[c.length-1]+=x+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],f=a-t;let d=s,p=0,g=0,v=0,y=0;return this.legendItems.forEach((x,b)=>{const{itemWidth:w,itemHeight:S}=nU(r,n,o,x,i);b>0&&g+S+2*s>f&&(d+=p+s,c.push({width:p,height:g}),v+=p+s,y++,p=g=0),l[b]={left:v,top:g,col:y,width:w,height:S},p=Math.max(p,w),g+=S+s}),d+=p,c.push({width:p,height:g}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=gc(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=er(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=er(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=er(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=er(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Tv(t,this),this._draw(),Mv(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Jt.color,l=gc(t.rtl,this.left,this.width),c=_n(a.font),{padding:f}=a,d=c.size,p=d/2;let g;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:y,itemHeight:x}=gk(a,d),b=function(P,j,N){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const H=Ke(N.lineWidth,1);if(i.fillStyle=Ke(N.fillStyle,s),i.lineCap=Ke(N.lineCap,"butt"),i.lineDashOffset=Ke(N.lineDashOffset,0),i.lineJoin=Ke(N.lineJoin,"miter"),i.lineWidth=H,i.strokeStyle=Ke(N.strokeStyle,s),i.setLineDash(Ke(N.lineDash,[])),a.usePointStyle){const R={radius:y*Math.SQRT2/2,pointStyle:N.pointStyle,rotation:N.rotation,borderWidth:H},V=l.xPlus(P,v/2),W=j+p;LD(i,R,V,W,a.pointStyleWidth&&v)}else{const R=j+Math.max((d-y)/2,0),V=l.leftForLtr(P,v),W=Fs(N.borderRadius);i.beginPath(),Object.values(W).some(ee=>ee!==0)?ad(i,{x:V,y:R,w:v,h:y,radius:W}):i.rect(V,R,v,y),i.fill(),H!==0&&i.stroke()}i.restore()},w=function(P,j,N){Zs(i,N.text,P,j+x/2,c,{strikethrough:N.hidden,textAlign:l.textAlign(N.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?g={x:er(o,this.left+f,this.right-r[0]),y:this.top+f+C,line:0}:g={x:this.left+f,y:er(o,this.top+C+f,this.bottom-n[0].height),line:0},zD(this.ctx,t.textDirection);const k=x+f;this.legendItems.forEach((P,j)=>{i.strokeStyle=P.fontColor,i.fillStyle=P.fontColor;const N=i.measureText(P.text).width,H=l.textAlign(P.textAlign||(P.textAlign=a.textAlign)),R=v+p+N;let V=g.x,W=g.y;l.setWidth(this.width),S?j>0&&V+R+f>this.right&&(W=g.y+=k,g.line++,V=g.x=er(o,this.left+f,this.right-r[g.line])):j>0&&W+k>this.bottom&&(V=g.x=V+n[g.line].width+f,g.line++,W=g.y=er(o,this.top+C+f,this.bottom-n[g.line].height));const ee=l.x(V);if(b(ee,W,P),V=S$(H,V+v+p,S?V+R:this.right,t.rtl),w(l.x(V),W,P),S)g.x+=R+f;else if(typeof P.text!="string"){const q=c.lineHeight;g.y+=hL(P,q)+f}else g.y+=k}),VD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=_n(n.font),i=ir(n.padding);if(!n.display)return;const o=gc(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let f,d=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,d=er(t.align,d,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);f=c+er(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const g=er(s,d,d+p);a.textAlign=o.textAlign(Gx(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Zs(a,n.text,g,f,r)}_computeTitleHeight(){const t=this.options.title,n=_n(t.font),r=ir(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Eo(t,this.left,this.right)&&Eo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function iU(e,t,n){let r=e;return typeof t.text!="string"&&(r=hL(t,n)),r}function hL(e,t){const n=e.text?e.text.length:0;return t*n}function oU(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var aU={id:"legend",_element:vk,start(e,t,n){const r=e.legend=new vk({ctx:e.ctx,options:n,chart:e});rr.configure(e,r,n),rr.addBox(e,r)},stop(e){rr.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;rr.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),f=ir(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class r2 extends Ho{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Lt(r.text)?r.text.length:1;this._padding=ir(r.padding);const o=i*_n(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:a}=this,s=a.align;let l=0,c,f,d;return this.isHorizontal()?(f=er(s,r,o),d=n+t,c=o-r):(a.position==="left"?(f=r+t,d=er(s,i,n),l=Ut*-.5):(f=o-t,d=er(s,n,i),l=Ut*.5),c=i-n),{titleX:f,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=_n(n.font),o=r.lineHeight/2+this._padding.top,{titleX:a,titleY:s,maxWidth:l,rotation:c}=this._drawArgs(o);Zs(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Gx(n.align),textBaseline:"middle",translation:[a,s]})}}function sU(e,t){const n=new r2({ctx:e.ctx,options:t,chart:e});rr.configure(e,n,t),rr.addBox(e,n),e.titleBlock=n}var lU={id:"title",_element:r2,start(e,t,n){sU(e,n)},stop(e){const t=e.titleBlock;rr.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;rr.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const mp=new WeakMap;var cU={id:"subtitle",start(e,t,n){const r=new r2({ctx:e.ctx,options:n,chart:e});rr.configure(e,r,n),rr.addBox(e,r),mp.set(e,r)},stop(e){rr.removeBox(e,mp.get(e)),mp.delete(e)},beforeUpdate(e,t,n){const r=mp.get(e);rr.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ff={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t-1?e.split(` -`):e}function uU(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function yk(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=_n(t.bodyFont),c=_n(t.titleFont),f=_n(t.footerFont),d=o.length,p=i.length,m=r.length,v=ir(t.padding);let y=v.height,x=0,b=r.reduce((C,k)=>C+k.before.length+k.lines.length+k.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(y+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const C=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;y+=m*C+(b-m)*l.lineHeight+(b-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(C){x=Math.max(x,n.measureText(C).width+w)};return n.save(),n.font=c.string,bt(e.title,S),n.font=l.string,bt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?a+2+t.boxPadding:0,bt(r,C=>{bt(C.before,S),bt(C.lines,S),bt(C.after,S)}),w=0,n.font=f.string,bt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function fU(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function dU(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function hU(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),dU(c,e,t,n)&&(c="center"),c}function _k(e,t,n){const r=n.yAlign||t.yAlign||fU(e,n);return{xAlign:n.xAlign||t.xAlign||hU(e,t,n,r),yAlign:r}}function pU(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function mU(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function bk(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:f,topRight:d,bottomLeft:p,bottomRight:m}=Is(a);let v=pU(t,s);const y=mU(t,l,c);return l==="center"?s==="left"?v+=c:s==="right"&&(v-=c):s==="left"?v-=Math.max(f,p)+i:s==="right"&&(v+=Math.max(d,m)+i),{x:Tn(v,0,r.width-t.width),y:Tn(y,0,r.height-t.height)}}function gp(e,t,n){const r=ir(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function wk(e){return qi([],bo(e))}function gU(e,t,n){return Ja(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function xk(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const pL={beforeTitle:yo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?pL[t].call(n,r):i}var ab;let Sk=(ab=class extends Ho{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new qD(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=gU(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=wr(r,"beforeTitle",this,t),o=wr(r,"title",this,t),a=wr(r,"afterTitle",this,t);let s=[];return s=qi(s,bo(i)),s=qi(s,bo(o)),s=qi(s,bo(a)),s}getBeforeBody(t,n){return wk(wr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return bt(t,o=>{const a={before:[],lines:[],after:[]},s=xk(r,o);qi(a.before,bo(wr(s,"beforeLabel",this,o))),qi(a.lines,wr(s,"label",this,o)),qi(a.after,bo(wr(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return wk(wr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=wr(r,"beforeFooter",this,t),o=wr(r,"footer",this,t),a=wr(r,"afterFooter",this,t);let s=[];return s=qi(s,bo(i)),s=qi(s,bo(o)),s=qi(s,bo(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;lt.filter(f,d,p,r))),t.itemSort&&(s=s.sort((f,d)=>t.itemSort(f,d,r))),bt(s,f=>{const d=xk(t.callbacks,f);i.push(wr(d,"labelColor",this,f)),o.push(wr(d,"labelPointStyle",this,f)),a.push(wr(d,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=ff[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=yk(this,r),c=Object.assign({},s,l),f=_k(this.chart,r,c),d=bk(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:f,bottomRight:d}=Is(s),{x:p,y:m}=t,{width:v,height:y}=n;let x,b,w,S,C,k;return o==="center"?(C=m+y/2,i==="left"?(x=p,b=x-a,S=C+a,k=C-a):(x=p+v,b=x+a,S=C-a,k=C+a),w=x):(i==="left"?b=p+Math.max(l,f)+a:i==="right"?b=p+v-Math.max(c,d)-a:b=this.caretX,o==="top"?(S=m,C=S-a,x=b-a,w=b+a):(S=m+y,C=S+a,x=b+a,w=b-a),k=S),{x1:x,x2:b,x3:w,y1:S,y2:C,y3:k}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=gc(r.rtl,this.x,this.width);for(t.x=gp(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=_n(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;lw!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ad(t,{x:y,y:v,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ad(t,{x,y:v+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,v,c,l),t.strokeRect(y,v,c,l),t.fillStyle=a.backgroundColor,t.fillRect(x,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:f}=r,d=_n(r.bodyFont);let p=d.lineHeight,m=0;const v=gc(r.rtl,this.x,this.width),y=function(N){n.fillText(N,v.x(t.x+m),t.y+p/2),t.y+=p+o},x=v.textAlign(a);let b,w,S,C,k,P,j;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=gp(this,x,r),n.fillStyle=r.bodyColor,bt(this.beforeBody,y),m=s&&x!=="right"?a==="center"?c/2+f:c+2+f:0,C=0,P=i.length;C0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=ff[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=yk(this,t),l=Object.assign({},a,this._size),c=_k(n,t,l),f=bk(t,l,c,n);(i._to!==f.x||o._to!==f.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=ir(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),zD(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),VD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!zm(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!zm(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=ff[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}},me(ab,"positioners",ff),ab);var vU={id:"tooltip",_element:Sk,positioners:ff,afterInit(e,t,n){n&&(e.tooltip=new Sk({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:pL},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},yU=Object.freeze({__proto__:null,Colors:M9,Decimation:R9,Filler:eU,Legend:aU,SubTitle:cU,Title:lU,Tooltip:vU});const _U=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function bU(e,t,n,r){const i=e.indexOf(t);if(i===-1)return _U(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const wU=(e,t)=>e===null?null:Tn(Math.round(e),0,t);function Ok(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}me(vb,"id","category"),me(vb,"defaults",{ticks:{callback:Ok}});function xU(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:f,maxDigits:d,includeBounds:p}=e,m=o||1,v=f-1,{min:y,max:x}=t,b=!ft(a),w=!ft(s),S=!ft(c),C=(x-y)/(d+1);let k=vE((x-y)/v/m)*m,P,j,N,H;if(k<1e-14&&!b&&!w)return[{value:y},{value:x}];H=Math.ceil(x/k)-Math.floor(y/k),H>v&&(k=vE(H*k/v/m)*m),ft(l)||(P=Math.pow(10,l),k=Math.ceil(k*P)/P),i==="ticks"?(j=Math.floor(y/k)*k,N=Math.ceil(x/k)*k):(j=y,N=x),b&&w&&o&&g$((s-a)/o,k/1e3)?(H=Math.round(Math.min((s-a)/k,f)),k=(s-a)/H,j=a,N=s):S?(j=b?a:j,N=w?s:N,H=c-1,k=(N-j)/H):(H=(N-j)/k,Cf(H,Math.round(H),k/1e3)?H=Math.round(H):H=Math.ceil(H));const R=Math.max(yE(k),yE(j));P=Math.pow(10,ft(l)?R:l),j=Math.round(j*P)/P,N=Math.round(N*P)/P;let V=0;for(b&&(p&&j!==a?(n.push({value:a}),js)break;n.push({value:W})}return w&&p&&N!==s?n.length&&Cf(n[n.length-1].value,s,Ck(s,C,e))?n[n.length-1].value=s:n.push({value:s}):(!w||N===s)&&n.push({value:N}),n}function Ck(e,t,{horizontal:n,minRotation:r}){const i=Ti(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Km extends ll{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return ft(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=no(i),c=no(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=xU(i,o);return t.bounds==="ticks"&&OD(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return nh(t,this.chart.options.locale,this.options.ticks.format)}}class yb extends Km{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Qt(t)?t:0,this.max=Qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Ti(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}me(yb,"id","linear"),me(yb,"defaults",{ticks:{callback:Pv.formatters.numeric}});const ld=e=>Math.floor(ya(e)),gs=(e,t)=>Math.pow(10,ld(e)+t);function Ek(e){return e/Math.pow(10,ld(e))===1}function kk(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function SU(e,t){const n=t-e;let r=ld(n);for(;kk(e,t,r)>10;)r++;for(;kk(e,t,r)<10;)r--;return Math.min(r,ld(e))}function OU(e,{min:t,max:n}){t=Lr(e.min,t);const r=[],i=ld(t);let o=SU(t,n),a=o<0?Math.pow(10,Math.abs(o)):1;const s=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*a)/a,f=Math.floor((t-l)/s/10)*s*10;let d=Math.floor((c-f)/Math.pow(10,o)),p=Lr(e.min,Math.round((l+f+d*Math.pow(10,o))*a)/a);for(;p=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),p=Math.round((l+f+d*Math.pow(10,o))*a)/a;const m=Lr(e.max,p);return r.push({value:m,major:Ek(m),significand:d}),r}class _b extends ll{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Km.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Qt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Qt(t)?Math.max(0,t):null,this.max=Qt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Qt(this._userMin)&&(this.min=t===gs(this.min,0)?gs(this.min,-1):gs(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=s=>r=t?r:s,a=s=>i=n?i:s;r===i&&(r<=0?(o(1),a(10)):(o(gs(r,-1)),a(gs(i,1)))),r<=0&&o(gs(i,-1)),i<=0&&a(gs(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=OU(n,this);return t.bounds==="ticks"&&OD(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":nh(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ya(t),this._valueRange=ya(this.max)-ya(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ya(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}me(_b,"id","logarithmic"),me(_b,"defaults",{ticks:{callback:Pv.formatters.logarithmic,major:{enabled:!0}}});function bb(e){const t=e.ticks;if(t.display&&e.display){const n=ir(t.backdropPadding);return Ke(t.font&&t.font.size,Jt.font.size)+n.height}return 0}function CU(e,t,n){return n=Lt(n)?n:[n],{w:L$(e,t.string,n),h:n.length*t.lineHeight}}function Pk(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function EU(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,a=e.options.pointLabels,s=a.centerPointLabels?Ut/o:0;for(let l=0;lt.r&&(s=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+s)),i.startt.b&&(l=(i.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function PU(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:a,size:s}=n,l=e.getPointPosition(t,r+i+a,o),c=Math.round(Yx(Nr(l.angle+Xt))),f=LU(l.y,s.h,c),d=jU(c),p=DU(l.x,s.w,d);return{visible:!0,x:l.x,y:f,textAlign:d,left:p,top:f,right:p+s.w,bottom:f+s.h}}function TU(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Po({x:n,y:r},t)||Po({x:n,y:o},t)||Po({x:i,y:r},t)||Po({x:i,y:o},t))}function MU(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:s}=o.pointLabels,l={extra:bb(o)/2,additionalAngle:a?Ut/i:0};let c;for(let f=0;f270||n<90)&&(e-=t),e}function RU(e,t,n){const{left:r,top:i,right:o,bottom:a}=n,{backdropColor:s}=t;if(!ft(s)){const l=Is(t.borderRadius),c=ir(t.backdropPadding);e.fillStyle=s;const f=r-c.left,d=i-c.top,p=o-r+c.width,m=a-i+c.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),ad(e,{x:f,y:d,w:p,h:m,radius:l}),e.fill()):e.fillRect(f,d,p,m)}}function NU(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const a=r.setContext(e.getPointLabelContext(i));RU(n,a,o);const s=_n(a.font),{x:l,y:c,textAlign:f}=o;Ks(n,e._pointLabels[i],l,c+s.lineHeight/2,s,{color:a.color,textAlign:f,textBaseline:"middle"})}}function mL(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Rt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let a=1;a{const i=Pt(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?EU(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Rt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Nr(t*n+Ti(r))}getDistanceFromCenterForValue(t){if(ft(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ft(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(d!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(d),m=i.setContext(p),v=o.setContext(p);AU(this,m,l,a,v)}}),r.display){for(t.save(),s=a-1;s>=0;s--){const f=r.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:p}=f;!p||!d||(t.lineWidth=p,t.strokeStyle=d,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),f=_n(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=f.string,a=t.measureText(s.label).width,t.fillStyle=c.backdropColor;const d=ir(c.backdropPadding);t.fillRect(-a/2-d.left,-o-f.size/2-d.top,a+d.width,f.size+d.height)}Ks(t,s.label,0,-o,f,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}me(df,"id","radialLinear"),me(df,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Pv.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),me(df,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),me(df,"descriptors",{angleLines:{_fallback:"grid"}});const Lv={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Sr=Object.keys(Lv);function Tk(e,t){return e-t}function Mk(e,t){if(ft(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),Qt(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Tc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function jk(e,t,n,r){const i=Sr.length;for(let o=Sr.indexOf(e);o=Sr.indexOf(n);o--){const a=Sr[o];if(Lv[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return Sr[n?Sr.indexOf(n):0]}function $U(e){for(let t=Sr.indexOf(e)+1,n=Sr.length;t=t?n[r]:n[i];e[o]=!0}}function BU(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function Lk(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=Tn(n,0,a),r=Tn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||jk(o.minUnit,n,r,this._getLabelCapacity(n)),s=Ke(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Tc(l)||l===!0,f={};let d=n,p,m;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=d,m=0;p+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return Pt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,f=l&&s[l],d=c&&s[c],p=r[n],m=c&&d&&p&&p.major;return this._adapter.format(t,i||(m?d:f))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ko(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ko(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class wb extends cd{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=vp(n,this.min),this._tableRange=vp(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,f;for(a=0,s=t.length;a=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;ai-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(vp(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return vp(this._table,r*this._tableRange+this._minPos,!0)}}me(wb,"id","timeseries"),me(wb,"defaults",cd.defaults);var UU=Object.freeze({__proto__:null,CategoryScale:vb,LinearScale:yb,LogarithmicScale:_b,RadialLinearScale:df,TimeScale:cd,TimeSeriesScale:wb});const zU=[G7,O9,yU,UU];Dv.register(...zU);var gL={exports:{}},Kr={},vL={exports:{}},yL={};/** +`):e}function uU(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function yk(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=_n(t.bodyFont),c=_n(t.titleFont),f=_n(t.footerFont),d=o.length,p=i.length,g=r.length,v=ir(t.padding);let y=v.height,x=0,b=r.reduce((C,k)=>C+k.before.length+k.lines.length+k.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(y+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const C=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;y+=g*C+(b-g)*l.lineHeight+(b-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(C){x=Math.max(x,n.measureText(C).width+w)};return n.save(),n.font=c.string,bt(e.title,S),n.font=l.string,bt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?a+2+t.boxPadding:0,bt(r,C=>{bt(C.before,S),bt(C.lines,S),bt(C.after,S)}),w=0,n.font=f.string,bt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function fU(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function dU(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function hU(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),dU(c,e,t,n)&&(c="center"),c}function _k(e,t,n){const r=n.yAlign||t.yAlign||fU(e,n);return{xAlign:n.xAlign||t.xAlign||hU(e,t,n,r),yAlign:r}}function pU(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function mU(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function bk(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:f,topRight:d,bottomLeft:p,bottomRight:g}=Fs(a);let v=pU(t,s);const y=mU(t,l,c);return l==="center"?s==="left"?v+=c:s==="right"&&(v-=c):s==="left"?v-=Math.max(f,p)+i:s==="right"&&(v+=Math.max(d,g)+i),{x:Tn(v,0,r.width-t.width),y:Tn(y,0,r.height-t.height)}}function gp(e,t,n){const r=ir(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function wk(e){return qi([],bo(e))}function gU(e,t,n){return Ja(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function xk(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const pL={beforeTitle:yo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?pL[t].call(n,r):i}var ab;let Sk=(ab=class extends Ho{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new qD(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=gU(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=wr(r,"beforeTitle",this,t),o=wr(r,"title",this,t),a=wr(r,"afterTitle",this,t);let s=[];return s=qi(s,bo(i)),s=qi(s,bo(o)),s=qi(s,bo(a)),s}getBeforeBody(t,n){return wk(wr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return bt(t,o=>{const a={before:[],lines:[],after:[]},s=xk(r,o);qi(a.before,bo(wr(s,"beforeLabel",this,o))),qi(a.lines,wr(s,"label",this,o)),qi(a.after,bo(wr(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return wk(wr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=wr(r,"beforeFooter",this,t),o=wr(r,"footer",this,t),a=wr(r,"afterFooter",this,t);let s=[];return s=qi(s,bo(i)),s=qi(s,bo(o)),s=qi(s,bo(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;lt.filter(f,d,p,r))),t.itemSort&&(s=s.sort((f,d)=>t.itemSort(f,d,r))),bt(s,f=>{const d=xk(t.callbacks,f);i.push(wr(d,"labelColor",this,f)),o.push(wr(d,"labelPointStyle",this,f)),a.push(wr(d,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=ff[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=yk(this,r),c=Object.assign({},s,l),f=_k(this.chart,r,c),d=bk(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:f,bottomRight:d}=Fs(s),{x:p,y:g}=t,{width:v,height:y}=n;let x,b,w,S,C,k;return o==="center"?(C=g+y/2,i==="left"?(x=p,b=x-a,S=C+a,k=C-a):(x=p+v,b=x+a,S=C-a,k=C+a),w=x):(i==="left"?b=p+Math.max(l,f)+a:i==="right"?b=p+v-Math.max(c,d)-a:b=this.caretX,o==="top"?(S=g,C=S-a,x=b-a,w=b+a):(S=g+y,C=S+a,x=b+a,w=b-a),k=S),{x1:x,x2:b,x3:w,y1:S,y2:C,y3:k}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=gc(r.rtl,this.x,this.width);for(t.x=gp(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=_n(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;lw!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ad(t,{x:y,y:v,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ad(t,{x,y:v+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,v,c,l),t.strokeRect(y,v,c,l),t.fillStyle=a.backgroundColor,t.fillRect(x,v+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:f}=r,d=_n(r.bodyFont);let p=d.lineHeight,g=0;const v=gc(r.rtl,this.x,this.width),y=function(N){n.fillText(N,v.x(t.x+g),t.y+p/2),t.y+=p+o},x=v.textAlign(a);let b,w,S,C,k,P,j;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=gp(this,x,r),n.fillStyle=r.bodyColor,bt(this.beforeBody,y),g=s&&x!=="right"?a==="center"?c/2+f:c+2+f:0,C=0,P=i.length;C0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=ff[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=yk(this,t),l=Object.assign({},a,this._size),c=_k(n,t,l),f=bk(t,l,c,n);(i._to!==f.x||o._to!==f.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=ir(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),zD(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),VD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!zm(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!zm(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=ff[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}},me(ab,"positioners",ff),ab);var vU={id:"tooltip",_element:Sk,positioners:ff,afterInit(e,t,n){n&&(e.tooltip=new Sk({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:pL},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},yU=Object.freeze({__proto__:null,Colors:M9,Decimation:R9,Filler:eU,Legend:aU,SubTitle:cU,Title:lU,Tooltip:vU});const _U=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function bU(e,t,n,r){const i=e.indexOf(t);if(i===-1)return _U(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const wU=(e,t)=>e===null?null:Tn(Math.round(e),0,t);function Ok(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}me(vb,"id","category"),me(vb,"defaults",{ticks:{callback:Ok}});function xU(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:f,maxDigits:d,includeBounds:p}=e,g=o||1,v=f-1,{min:y,max:x}=t,b=!ft(a),w=!ft(s),S=!ft(c),C=(x-y)/(d+1);let k=vE((x-y)/v/g)*g,P,j,N,H;if(k<1e-14&&!b&&!w)return[{value:y},{value:x}];H=Math.ceil(x/k)-Math.floor(y/k),H>v&&(k=vE(H*k/v/g)*g),ft(l)||(P=Math.pow(10,l),k=Math.ceil(k*P)/P),i==="ticks"?(j=Math.floor(y/k)*k,N=Math.ceil(x/k)*k):(j=y,N=x),b&&w&&o&&g$((s-a)/o,k/1e3)?(H=Math.round(Math.min((s-a)/k,f)),k=(s-a)/H,j=a,N=s):S?(j=b?a:j,N=w?s:N,H=c-1,k=(N-j)/H):(H=(N-j)/k,Cf(H,Math.round(H),k/1e3)?H=Math.round(H):H=Math.ceil(H));const R=Math.max(yE(k),yE(j));P=Math.pow(10,ft(l)?R:l),j=Math.round(j*P)/P,N=Math.round(N*P)/P;let V=0;for(b&&(p&&j!==a?(n.push({value:a}),js)break;n.push({value:W})}return w&&p&&N!==s?n.length&&Cf(n[n.length-1].value,s,Ck(s,C,e))?n[n.length-1].value=s:n.push({value:s}):(!w||N===s)&&n.push({value:N}),n}function Ck(e,t,{horizontal:n,minRotation:r}){const i=Ti(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Km extends cl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return ft(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=no(i),c=no(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=xU(i,o);return t.bounds==="ticks"&&OD(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return nh(t,this.chart.options.locale,this.options.ticks.format)}}class yb extends Km{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Qt(t)?t:0,this.max=Qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Ti(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}me(yb,"id","linear"),me(yb,"defaults",{ticks:{callback:Pv.formatters.numeric}});const ld=e=>Math.floor(ya(e)),vs=(e,t)=>Math.pow(10,ld(e)+t);function Ek(e){return e/Math.pow(10,ld(e))===1}function kk(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function SU(e,t){const n=t-e;let r=ld(n);for(;kk(e,t,r)>10;)r++;for(;kk(e,t,r)<10;)r--;return Math.min(r,ld(e))}function OU(e,{min:t,max:n}){t=Lr(e.min,t);const r=[],i=ld(t);let o=SU(t,n),a=o<0?Math.pow(10,Math.abs(o)):1;const s=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*a)/a,f=Math.floor((t-l)/s/10)*s*10;let d=Math.floor((c-f)/Math.pow(10,o)),p=Lr(e.min,Math.round((l+f+d*Math.pow(10,o))*a)/a);for(;p=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),p=Math.round((l+f+d*Math.pow(10,o))*a)/a;const g=Lr(e.max,p);return r.push({value:g,major:Ek(g),significand:d}),r}class _b extends cl{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Km.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Qt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Qt(t)?Math.max(0,t):null,this.max=Qt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Qt(this._userMin)&&(this.min=t===vs(this.min,0)?vs(this.min,-1):vs(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=s=>r=t?r:s,a=s=>i=n?i:s;r===i&&(r<=0?(o(1),a(10)):(o(vs(r,-1)),a(vs(i,1)))),r<=0&&o(vs(i,-1)),i<=0&&a(vs(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=OU(n,this);return t.bounds==="ticks"&&OD(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":nh(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ya(t),this._valueRange=ya(this.max)-ya(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ya(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}me(_b,"id","logarithmic"),me(_b,"defaults",{ticks:{callback:Pv.formatters.logarithmic,major:{enabled:!0}}});function bb(e){const t=e.ticks;if(t.display&&e.display){const n=ir(t.backdropPadding);return Ke(t.font&&t.font.size,Jt.font.size)+n.height}return 0}function CU(e,t,n){return n=Lt(n)?n:[n],{w:L$(e,t.string,n),h:n.length*t.lineHeight}}function Pk(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function EU(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,a=e.options.pointLabels,s=a.centerPointLabels?Ut/o:0;for(let l=0;lt.r&&(s=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+s)),i.startt.b&&(l=(i.end-t.b)/a,e.b=Math.max(e.b,t.b+l))}function PU(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:a,size:s}=n,l=e.getPointPosition(t,r+i+a,o),c=Math.round(Yx(Nr(l.angle+Xt))),f=LU(l.y,s.h,c),d=jU(c),p=DU(l.x,s.w,d);return{visible:!0,x:l.x,y:f,textAlign:d,left:p,top:f,right:p+s.w,bottom:f+s.h}}function TU(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Po({x:n,y:r},t)||Po({x:n,y:o},t)||Po({x:i,y:r},t)||Po({x:i,y:o},t))}function MU(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:s}=o.pointLabels,l={extra:bb(o)/2,additionalAngle:a?Ut/i:0};let c;for(let f=0;f270||n<90)&&(e-=t),e}function RU(e,t,n){const{left:r,top:i,right:o,bottom:a}=n,{backdropColor:s}=t;if(!ft(s)){const l=Fs(t.borderRadius),c=ir(t.backdropPadding);e.fillStyle=s;const f=r-c.left,d=i-c.top,p=o-r+c.width,g=a-i+c.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),ad(e,{x:f,y:d,w:p,h:g,radius:l}),e.fill()):e.fillRect(f,d,p,g)}}function NU(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const a=r.setContext(e.getPointLabelContext(i));RU(n,a,o);const s=_n(a.font),{x:l,y:c,textAlign:f}=o;Zs(n,e._pointLabels[i],l,c+s.lineHeight/2,s,{color:a.color,textAlign:f,textBaseline:"middle"})}}function mL(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Rt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let a=1;a{const i=Pt(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?EU(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Rt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Nr(t*n+Ti(r))}getDistanceFromCenterForValue(t){if(ft(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ft(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(d!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(d),g=i.setContext(p),v=o.setContext(p);AU(this,g,l,a,v)}}),r.display){for(t.save(),s=a-1;s>=0;s--){const f=r.setContext(this.getPointLabelContext(s)),{color:d,lineWidth:p}=f;!p||!d||(t.lineWidth=p,t.strokeStyle=d,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(s,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),f=_n(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=f.string,a=t.measureText(s.label).width,t.fillStyle=c.backdropColor;const d=ir(c.backdropPadding);t.fillRect(-a/2-d.left,-o-f.size/2-d.top,a+d.width,f.size+d.height)}Zs(t,s.label,0,-o,f,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}me(df,"id","radialLinear"),me(df,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Pv.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),me(df,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),me(df,"descriptors",{angleLines:{_fallback:"grid"}});const Lv={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Sr=Object.keys(Lv);function Tk(e,t){return e-t}function Mk(e,t){if(ft(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),Qt(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Tc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function jk(e,t,n,r){const i=Sr.length;for(let o=Sr.indexOf(e);o=Sr.indexOf(n);o--){const a=Sr[o];if(Lv[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return Sr[n?Sr.indexOf(n):0]}function $U(e){for(let t=Sr.indexOf(e)+1,n=Sr.length;t=t?n[r]:n[i];e[o]=!0}}function BU(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function Lk(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=Tn(n,0,a),r=Tn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||jk(o.minUnit,n,r,this._getLabelCapacity(n)),s=Ke(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Tc(l)||l===!0,f={};let d=n,p,g;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=d,g=0;p+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return Pt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,f=l&&s[l],d=c&&s[c],p=r[n],g=c&&d&&p&&p.major;return this._adapter.format(t,i||(g?d:f))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ko(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ko(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class wb extends cd{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=vp(n,this.min),this._tableRange=vp(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,f;for(a=0,s=t.length;a=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;ai-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(vp(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return vp(this._table,r*this._tableRange+this._minPos,!0)}}me(wb,"id","timeseries"),me(wb,"defaults",cd.defaults);var UU=Object.freeze({__proto__:null,CategoryScale:vb,LinearScale:yb,LogarithmicScale:_b,RadialLinearScale:df,TimeScale:cd,TimeSeriesScale:wb});const zU=[G7,O9,yU,UU];Dv.register(...zU);var gL={exports:{}},Kr={},vL={exports:{}},yL={};/** * @license React * scheduler.production.min.js * @@ -39,7 +39,7 @@ var hF=Object.defineProperty;var pF=(e,t,n)=>t in e?hF(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(G,F){var A=G.length;G.push(F);e:for(;0>>1,re=G[z];if(0>>1;zi(ie,A))aei(he,ie)?(G[z]=he,G[ae]=A,z=ae):(G[z]=ie,G[K]=A,z=K);else if(aei(he,A))G[z]=he,G[ae]=A,z=ae;else break e}}return F}function i(G,F){var A=G.sortIndex-F.sortIndex;return A!==0?A:G.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],f=1,d=null,p=3,m=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(G){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=G)r(c),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(c)}}function C(G){if(y=!1,S(G),!v)if(n(l)!==null)v=!0,oe(k);else{var F=n(c);F!==null&&le(C,F.startTime-G)}}function k(G,F){v=!1,y&&(y=!1,b(N),N=-1),m=!0;var A=p;try{for(S(F),d=n(l);d!==null&&(!(d.expirationTime>F)||G&&!V());){var z=d.callback;if(typeof z=="function"){d.callback=null,p=d.priorityLevel;var re=z(d.expirationTime<=F);F=e.unstable_now(),typeof re=="function"?d.callback=re:d===n(l)&&r(l),S(F)}else r(l);d=n(l)}if(d!==null)var U=!0;else{var K=n(c);K!==null&&le(C,K.startTime-F),U=!1}return U}finally{d=null,p=A,m=!1}}var P=!1,j=null,N=-1,H=5,R=-1;function V(){return!(e.unstable_now()-RG||125z?(G.sortIndex=A,t(c,G),n(l)===null&&G===n(c)&&(y?(b(N),N=-1):y=!0,le(C,A-z))):(G.sortIndex=re,t(l,G),v||m||(v=!0,oe(k))),G},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(G){var F=p;return function(){var A=p;p=F;try{return G.apply(this,arguments)}finally{p=A}}}})(yL);vL.exports=yL;var VU=vL.exports;/** + */(function(e){function t(G,F){var A=G.length;G.push(F);e:for(;0>>1,re=G[z];if(0>>1;zi(ie,A))aei(he,ie)?(G[z]=he,G[ae]=A,z=ae):(G[z]=ie,G[K]=A,z=K);else if(aei(he,A))G[z]=he,G[ae]=A,z=ae;else break e}}return F}function i(G,F){var A=G.sortIndex-F.sortIndex;return A!==0?A:G.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],f=1,d=null,p=3,g=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(G){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=G)r(c),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(c)}}function C(G){if(y=!1,S(G),!v)if(n(l)!==null)v=!0,oe(k);else{var F=n(c);F!==null&&le(C,F.startTime-G)}}function k(G,F){v=!1,y&&(y=!1,b(N),N=-1),g=!0;var A=p;try{for(S(F),d=n(l);d!==null&&(!(d.expirationTime>F)||G&&!V());){var z=d.callback;if(typeof z=="function"){d.callback=null,p=d.priorityLevel;var re=z(d.expirationTime<=F);F=e.unstable_now(),typeof re=="function"?d.callback=re:d===n(l)&&r(l),S(F)}else r(l);d=n(l)}if(d!==null)var U=!0;else{var K=n(c);K!==null&&le(C,K.startTime-F),U=!1}return U}finally{d=null,p=A,g=!1}}var P=!1,j=null,N=-1,H=5,R=-1;function V(){return!(e.unstable_now()-RG||125z?(G.sortIndex=A,t(c,G),n(l)===null&&G===n(c)&&(y?(b(N),N=-1):y=!0,le(C,A-z))):(G.sortIndex=re,t(l,G),v||g||(v=!0,oe(k))),G},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(G){var F=p;return function(){var A=p;p=F;try{return G.apply(this,arguments)}finally{p=A}}}})(yL);vL.exports=yL;var VU=vL.exports;/** * @license React * react-dom.production.min.js * @@ -47,14 +47,14 @@ var hF=Object.defineProperty;var pF=(e,t,n)=>t in e?hF(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var _L=B,Hr=VU;function Oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xb=Object.prototype.hasOwnProperty,HU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Rk={},Nk={};function WU(e){return xb.call(Nk,e)?!0:xb.call(Rk,e)?!1:HU.test(e)?Nk[e]=!0:(Rk[e]=!0,!1)}function YU(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qU(e,t,n,r){if(t===null||typeof t>"u"||YU(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _r(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Gn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gn[e]=new _r(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gn[t]=new _r(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gn[e]=new _r(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gn[e]=new _r(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Gn[e]=new _r(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gn[e]=new _r(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gn[e]=new _r(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gn[e]=new _r(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gn[e]=new _r(e,5,!1,e.toLowerCase(),null,!1,!1)});var i2=/[\-:]([a-z])/g;function o2(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(i2,o2);Gn[t]=new _r(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(i2,o2);Gn[t]=new _r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(i2,o2);Gn[t]=new _r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gn[e]=new _r(e,1,!1,e.toLowerCase(),null,!1,!1)});Gn.xlinkHref=new _r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gn[e]=new _r(e,1,!1,e.toLowerCase(),null,!0,!0)});function a2(e,t,n,r){var i=Gn.hasOwnProperty(t)?Gn[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xb=Object.prototype.hasOwnProperty,HU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Rk={},Nk={};function WU(e){return xb.call(Nk,e)?!0:xb.call(Rk,e)?!1:HU.test(e)?Nk[e]=!0:(Rk[e]=!0,!1)}function YU(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function qU(e,t,n,r){if(t===null||typeof t>"u"||YU(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _r(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Gn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gn[e]=new _r(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gn[t]=new _r(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gn[e]=new _r(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gn[e]=new _r(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Gn[e]=new _r(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gn[e]=new _r(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gn[e]=new _r(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gn[e]=new _r(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gn[e]=new _r(e,5,!1,e.toLowerCase(),null,!1,!1)});var i2=/[\-:]([a-z])/g;function o2(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(i2,o2);Gn[t]=new _r(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(i2,o2);Gn[t]=new _r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(i2,o2);Gn[t]=new _r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gn[e]=new _r(e,1,!1,e.toLowerCase(),null,!1,!1)});Gn.xlinkHref=new _r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gn[e]=new _r(e,1,!1,e.toLowerCase(),null,!0,!0)});function a2(e,t,n,r){var i=Gn.hasOwnProperty(t)?Gn[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{L0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hf(e):""}function GU(e){switch(e.tag){case 5:return hf(e.type);case 16:return hf("Lazy");case 13:return hf("Suspense");case 19:return hf("SuspenseList");case 0:case 2:case 15:return e=R0(e.type,!1),e;case 11:return e=R0(e.type.render,!1),e;case 1:return e=R0(e.type,!0),e;default:return""}}function Eb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xl:return"Fragment";case Ql:return"Portal";case Sb:return"Profiler";case s2:return"StrictMode";case Ob:return"Suspense";case Cb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xL:return(e.displayName||"Context")+".Consumer";case wL:return(e._context.displayName||"Context")+".Provider";case l2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c2:return t=e.displayName||null,t!==null?t:Eb(e.type)||"Memo";case ua:t=e._payload,e=e._init;try{return Eb(e(t))}catch{}}return null}function KU(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Eb(t);case 8:return t===s2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ha(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function OL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ZU(e){var t=OL(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _p(e){e._valueTracker||(e._valueTracker=ZU(e))}function CL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=OL(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kb(e,t){var n=t.checked;return qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ik(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ha(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function EL(e,t){t=t.checked,t!=null&&a2(e,"checked",t,!1)}function Pb(e,t){EL(e,t);var n=Ha(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tb(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tb(e,t.type,Ha(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Tb(e,t,n){(t!=="number"||Zm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pf=Array.isArray;function vc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=bp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},QU=["Webkit","ms","Moz","O"];Object.keys(jf).forEach(function(e){QU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jf[t]=jf[e]})});function ML(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||jf.hasOwnProperty(e)&&jf[e]?(""+t).trim():t+"px"}function jL(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=ML(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var XU=qt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Db(e,t){if(t){if(XU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function Lb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rb=null;function u2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nb=null,yc=null,_c=null;function Uk(e){if(e=ah(e)){if(typeof Nb!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=Fv(t),Nb(e.stateNode,e.type,t))}}function DL(e){yc?_c?_c.push(e):_c=[e]:yc=e}function LL(){if(yc){var e=yc,t=_c;if(_c=yc=null,Uk(e),t)for(e=0;e>>=0,e===0?32:31-(cz(e)/uz|0)|0}var wp=64,xp=4194304;function mf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function eg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=mf(s):(o&=a,o!==0&&(r=mf(o)))}else a=n&~i,a!==0?r=mf(a):o!==0&&(r=mf(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ih(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Li(t),e[t]=n}function pz(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Lf),Zk=String.fromCharCode(32),Qk=!1;function JL(e,t){switch(e){case"keyup":return zz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jl=!1;function Hz(e,t){switch(e){case"compositionend":return eR(t);case"keypress":return t.which!==32?null:(Qk=!0,Zk);case"textInput":return e=t.data,e===Zk&&Qk?null:e;default:return null}}function Wz(e,t){if(Jl)return e==="compositionend"||!y2&&JL(e,t)?(e=QL(),bm=m2=xa=null,Jl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=tP(n)}}function iR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?iR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oR(){for(var e=window,t=Zm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zm(e.document)}return t}function _2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function eV(e){var t=oR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&iR(n.ownerDocument.documentElement,n)){if(r!==null&&_2(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=nP(n,o);var a=nP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ec=null,Ub=null,Nf=null,zb=!1;function rP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zb||ec==null||ec!==Zm(r)||(r=ec,"selectionStart"in r&&_2(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nf&&vd(Nf,r)||(Nf=r,r=rg(Ub,"onSelect"),0rc||(e.current=Gb[rc],Gb[rc]=null,rc--)}function Tt(e,t){rc++,Gb[rc]=e.current,e.current=t}var Wa={},or=ts(Wa),Cr=ts(!1),Zs=Wa;function Lc(e,t){var n=e.type.contextTypes;if(!n)return Wa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Er(e){return e=e.childContextTypes,e!=null}function og(){Nt(Cr),Nt(or)}function uP(e,t,n){if(or.current!==Wa)throw Error(Oe(168));Tt(or,t),Tt(Cr,n)}function pR(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,KU(e)||"Unknown",i));return qt({},n,r)}function ag(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wa,Zs=or.current,Tt(or,e),Tt(Cr,Cr.current),!0}function fP(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=pR(e,t,Zs),r.__reactInternalMemoizedMergedChildContext=e,Nt(Cr),Nt(or),Tt(or,e)):Nt(Cr),Tt(Cr,n)}var So=null,$v=!1,G0=!1;function mR(e){So===null?So=[e]:So.push(e)}function dV(e){$v=!0,mR(e)}function ns(){if(!G0&&So!==null){G0=!0;var e=0,t=wt;try{var n=So;for(wt=1;e>=a,i-=a,To=1<<32-Li(t)+i|n<N?(H=j,j=null):H=j.sibling;var R=p(b,j,S[N],C);if(R===null){j===null&&(j=H);break}e&&j&&R.alternate===null&&t(b,j),w=o(R,w,N),P===null?k=R:P.sibling=R,P=R,j=H}if(N===S.length)return n(b,j),Bt&&Ss(b,N),k;if(j===null){for(;NN?(H=j,j=null):H=j.sibling;var V=p(b,j,R.value,C);if(V===null){j===null&&(j=H);break}e&&j&&V.alternate===null&&t(b,j),w=o(V,w,N),P===null?k=V:P.sibling=V,P=V,j=H}if(R.done)return n(b,j),Bt&&Ss(b,N),k;if(j===null){for(;!R.done;N++,R=S.next())R=d(b,R.value,C),R!==null&&(w=o(R,w,N),P===null?k=R:P.sibling=R,P=R);return Bt&&Ss(b,N),k}for(j=r(b,j);!R.done;N++,R=S.next())R=m(j,b,N,R.value,C),R!==null&&(e&&R.alternate!==null&&j.delete(R.key===null?N:R.key),w=o(R,w,N),P===null?k=R:P.sibling=R,P=R);return e&&j.forEach(function(W){return t(b,W)}),Bt&&Ss(b,N),k}function x(b,w,S,C){if(typeof S=="object"&&S!==null&&S.type===Xl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case yp:e:{for(var k=S.key,P=w;P!==null;){if(P.key===k){if(k=S.type,k===Xl){if(P.tag===7){n(b,P.sibling),w=i(P,S.props.children),w.return=b,b=w;break e}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ua&&yP(k)===P.type){n(b,P.sibling),w=i(P,S.props),w.ref=Ku(b,P,S),w.return=b,b=w;break e}n(b,P);break}else t(b,P);P=P.sibling}S.type===Xl?(w=Bs(S.props.children,b.mode,C,S.key),w.return=b,b=w):(C=Pm(S.type,S.key,S.props,null,b.mode,C),C.ref=Ku(b,w,S),C.return=b,b=C)}return a(b);case Ql:e:{for(P=S.key;w!==null;){if(w.key===P)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(b,w.sibling),w=i(w,S.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=n_(S,b.mode,C),w.return=b,b=w}return a(b);case ua:return P=S._init,x(b,w,P(S._payload),C)}if(pf(S))return v(b,w,S,C);if(Hu(S))return y(b,w,S,C);Tp(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,S),w.return=b,b=w):(n(b,w),w=t_(S,b.mode,C),w.return=b,b=w),a(b)):n(b,w)}return x}var Nc=SR(!0),OR=SR(!1),sh={},io=ts(sh),wd=ts(sh),xd=ts(sh);function Ls(e){if(e===sh)throw Error(Oe(174));return e}function P2(e,t){switch(Tt(xd,t),Tt(wd,e),Tt(io,sh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jb(t,e)}Nt(io),Tt(io,t)}function Ac(){Nt(io),Nt(wd),Nt(xd)}function CR(e){Ls(xd.current);var t=Ls(io.current),n=jb(t,e.type);t!==n&&(Tt(wd,e),Tt(io,n))}function T2(e){wd.current===e&&(Nt(io),Nt(wd))}var Ht=ts(0);function dg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var K0=[];function M2(){for(var e=0;en?n:4,e(!0);var r=Z0.transition;Z0.transition={};try{e(!1),t()}finally{wt=n,Z0.transition=r}}function UR(){return pi().memoizedState}function gV(e,t,n){var r=Aa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zR(e))VR(t,n);else if(n=_R(e,t,n,r),n!==null){var i=vr();Ri(n,e,r,i),HR(n,t,r)}}function vV(e,t,n){var r=Aa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zR(e))VR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ai(s,a)){var l=t.interleaved;l===null?(i.next=i,E2(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=_R(e,t,i,r),n!==null&&(i=vr(),Ri(n,e,r,i),HR(n,t,r))}}function zR(e){var t=e.alternate;return e===Yt||t!==null&&t===Yt}function VR(e,t){Af=hg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function HR(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d2(e,n)}}var pg={readContext:hi,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},yV={readContext:hi,useCallback:function(e,t){return Ki().memoizedState=[e,t===void 0?null:t],e},useContext:hi,useEffect:bP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Om(4194308,4,AR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Om(4194308,4,e,t)},useInsertionEffect:function(e,t){return Om(4,2,e,t)},useMemo:function(e,t){var n=Ki();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ki();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gV.bind(null,Yt,e),[r.memoizedState,e]},useRef:function(e){var t=Ki();return e={current:e},t.memoizedState=e},useState:_P,useDebugValue:N2,useDeferredValue:function(e){return Ki().memoizedState=e},useTransition:function(){var e=_P(!1),t=e[0];return e=mV.bind(null,e[1]),Ki().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Yt,i=Ki();if(Bt){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),Mn===null)throw Error(Oe(349));Xs&30||PR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,bP(MR.bind(null,r,o,e),[e]),r.flags|=2048,Cd(9,TR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ki(),t=Mn.identifierPrefix;if(Bt){var n=Mo,r=To;n=(r&~(1<<32-Li(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Sd++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{L0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hf(e):""}function GU(e){switch(e.tag){case 5:return hf(e.type);case 16:return hf("Lazy");case 13:return hf("Suspense");case 19:return hf("SuspenseList");case 0:case 2:case 15:return e=R0(e.type,!1),e;case 11:return e=R0(e.type.render,!1),e;case 1:return e=R0(e.type,!0),e;default:return""}}function Eb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xl:return"Fragment";case Ql:return"Portal";case Sb:return"Profiler";case s2:return"StrictMode";case Ob:return"Suspense";case Cb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xL:return(e.displayName||"Context")+".Consumer";case wL:return(e._context.displayName||"Context")+".Provider";case l2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case c2:return t=e.displayName||null,t!==null?t:Eb(e.type)||"Memo";case ua:t=e._payload,e=e._init;try{return Eb(e(t))}catch{}}return null}function KU(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Eb(t);case 8:return t===s2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ha(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function OL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ZU(e){var t=OL(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _p(e){e._valueTracker||(e._valueTracker=ZU(e))}function CL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=OL(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kb(e,t){var n=t.checked;return qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ik(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ha(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function EL(e,t){t=t.checked,t!=null&&a2(e,"checked",t,!1)}function Pb(e,t){EL(e,t);var n=Ha(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tb(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tb(e,t.type,Ha(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Tb(e,t,n){(t!=="number"||Zm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pf=Array.isArray;function vc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=bp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},QU=["Webkit","ms","Moz","O"];Object.keys(jf).forEach(function(e){QU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jf[t]=jf[e]})});function ML(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||jf.hasOwnProperty(e)&&jf[e]?(""+t).trim():t+"px"}function jL(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=ML(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var XU=qt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Db(e,t){if(t){if(XU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Oe(62))}}function Lb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rb=null;function u2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nb=null,yc=null,_c=null;function Uk(e){if(e=ah(e)){if(typeof Nb!="function")throw Error(Oe(280));var t=e.stateNode;t&&(t=Fv(t),Nb(e.stateNode,e.type,t))}}function DL(e){yc?_c?_c.push(e):_c=[e]:yc=e}function LL(){if(yc){var e=yc,t=_c;if(_c=yc=null,Uk(e),t)for(e=0;e>>=0,e===0?32:31-(cz(e)/uz|0)|0}var wp=64,xp=4194304;function mf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function eg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=mf(s):(o&=a,o!==0&&(r=mf(o)))}else a=n&~i,a!==0?r=mf(a):o!==0&&(r=mf(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ih(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Li(t),e[t]=n}function pz(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Lf),Zk=String.fromCharCode(32),Qk=!1;function JL(e,t){switch(e){case"keyup":return zz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jl=!1;function Hz(e,t){switch(e){case"compositionend":return eR(t);case"keypress":return t.which!==32?null:(Qk=!0,Zk);case"textInput":return e=t.data,e===Zk&&Qk?null:e;default:return null}}function Wz(e,t){if(Jl)return e==="compositionend"||!y2&&JL(e,t)?(e=QL(),bm=m2=xa=null,Jl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=tP(n)}}function iR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?iR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oR(){for(var e=window,t=Zm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zm(e.document)}return t}function _2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function eV(e){var t=oR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&iR(n.ownerDocument.documentElement,n)){if(r!==null&&_2(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=nP(n,o);var a=nP(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ec=null,Ub=null,Nf=null,zb=!1;function rP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zb||ec==null||ec!==Zm(r)||(r=ec,"selectionStart"in r&&_2(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nf&&vd(Nf,r)||(Nf=r,r=rg(Ub,"onSelect"),0rc||(e.current=Gb[rc],Gb[rc]=null,rc--)}function Tt(e,t){rc++,Gb[rc]=e.current,e.current=t}var Wa={},or=ts(Wa),Cr=ts(!1),Qs=Wa;function Lc(e,t){var n=e.type.contextTypes;if(!n)return Wa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Er(e){return e=e.childContextTypes,e!=null}function og(){Nt(Cr),Nt(or)}function uP(e,t,n){if(or.current!==Wa)throw Error(Oe(168));Tt(or,t),Tt(Cr,n)}function pR(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Oe(108,KU(e)||"Unknown",i));return qt({},n,r)}function ag(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wa,Qs=or.current,Tt(or,e),Tt(Cr,Cr.current),!0}function fP(e,t,n){var r=e.stateNode;if(!r)throw Error(Oe(169));n?(e=pR(e,t,Qs),r.__reactInternalMemoizedMergedChildContext=e,Nt(Cr),Nt(or),Tt(or,e)):Nt(Cr),Tt(Cr,n)}var So=null,$v=!1,G0=!1;function mR(e){So===null?So=[e]:So.push(e)}function dV(e){$v=!0,mR(e)}function ns(){if(!G0&&So!==null){G0=!0;var e=0,t=wt;try{var n=So;for(wt=1;e>=a,i-=a,To=1<<32-Li(t)+i|n<N?(H=j,j=null):H=j.sibling;var R=p(b,j,S[N],C);if(R===null){j===null&&(j=H);break}e&&j&&R.alternate===null&&t(b,j),w=o(R,w,N),P===null?k=R:P.sibling=R,P=R,j=H}if(N===S.length)return n(b,j),Bt&&Os(b,N),k;if(j===null){for(;NN?(H=j,j=null):H=j.sibling;var V=p(b,j,R.value,C);if(V===null){j===null&&(j=H);break}e&&j&&V.alternate===null&&t(b,j),w=o(V,w,N),P===null?k=V:P.sibling=V,P=V,j=H}if(R.done)return n(b,j),Bt&&Os(b,N),k;if(j===null){for(;!R.done;N++,R=S.next())R=d(b,R.value,C),R!==null&&(w=o(R,w,N),P===null?k=R:P.sibling=R,P=R);return Bt&&Os(b,N),k}for(j=r(b,j);!R.done;N++,R=S.next())R=g(j,b,N,R.value,C),R!==null&&(e&&R.alternate!==null&&j.delete(R.key===null?N:R.key),w=o(R,w,N),P===null?k=R:P.sibling=R,P=R);return e&&j.forEach(function(W){return t(b,W)}),Bt&&Os(b,N),k}function x(b,w,S,C){if(typeof S=="object"&&S!==null&&S.type===Xl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case yp:e:{for(var k=S.key,P=w;P!==null;){if(P.key===k){if(k=S.type,k===Xl){if(P.tag===7){n(b,P.sibling),w=i(P,S.props.children),w.return=b,b=w;break e}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ua&&yP(k)===P.type){n(b,P.sibling),w=i(P,S.props),w.ref=Ku(b,P,S),w.return=b,b=w;break e}n(b,P);break}else t(b,P);P=P.sibling}S.type===Xl?(w=Us(S.props.children,b.mode,C,S.key),w.return=b,b=w):(C=Pm(S.type,S.key,S.props,null,b.mode,C),C.ref=Ku(b,w,S),C.return=b,b=C)}return a(b);case Ql:e:{for(P=S.key;w!==null;){if(w.key===P)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(b,w.sibling),w=i(w,S.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=n_(S,b.mode,C),w.return=b,b=w}return a(b);case ua:return P=S._init,x(b,w,P(S._payload),C)}if(pf(S))return v(b,w,S,C);if(Hu(S))return y(b,w,S,C);Tp(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(b,w.sibling),w=i(w,S),w.return=b,b=w):(n(b,w),w=t_(S,b.mode,C),w.return=b,b=w),a(b)):n(b,w)}return x}var Nc=SR(!0),OR=SR(!1),sh={},io=ts(sh),wd=ts(sh),xd=ts(sh);function Rs(e){if(e===sh)throw Error(Oe(174));return e}function P2(e,t){switch(Tt(xd,t),Tt(wd,e),Tt(io,sh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jb(t,e)}Nt(io),Tt(io,t)}function Ac(){Nt(io),Nt(wd),Nt(xd)}function CR(e){Rs(xd.current);var t=Rs(io.current),n=jb(t,e.type);t!==n&&(Tt(wd,e),Tt(io,n))}function T2(e){wd.current===e&&(Nt(io),Nt(wd))}var Ht=ts(0);function dg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var K0=[];function M2(){for(var e=0;en?n:4,e(!0);var r=Z0.transition;Z0.transition={};try{e(!1),t()}finally{wt=n,Z0.transition=r}}function UR(){return pi().memoizedState}function gV(e,t,n){var r=Aa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zR(e))VR(t,n);else if(n=_R(e,t,n,r),n!==null){var i=vr();Ri(n,e,r,i),HR(n,t,r)}}function vV(e,t,n){var r=Aa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zR(e))VR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ai(s,a)){var l=t.interleaved;l===null?(i.next=i,E2(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=_R(e,t,i,r),n!==null&&(i=vr(),Ri(n,e,r,i),HR(n,t,r))}}function zR(e){var t=e.alternate;return e===Yt||t!==null&&t===Yt}function VR(e,t){Af=hg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function HR(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d2(e,n)}}var pg={readContext:hi,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},yV={readContext:hi,useCallback:function(e,t){return Ki().memoizedState=[e,t===void 0?null:t],e},useContext:hi,useEffect:bP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Om(4194308,4,AR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Om(4194308,4,e,t)},useInsertionEffect:function(e,t){return Om(4,2,e,t)},useMemo:function(e,t){var n=Ki();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ki();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gV.bind(null,Yt,e),[r.memoizedState,e]},useRef:function(e){var t=Ki();return e={current:e},t.memoizedState=e},useState:_P,useDebugValue:N2,useDeferredValue:function(e){return Ki().memoizedState=e},useTransition:function(){var e=_P(!1),t=e[0];return e=mV.bind(null,e[1]),Ki().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Yt,i=Ki();if(Bt){if(n===void 0)throw Error(Oe(407));n=n()}else{if(n=t(),Mn===null)throw Error(Oe(349));Js&30||PR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,bP(MR.bind(null,r,o,e),[e]),r.flags|=2048,Cd(9,TR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ki(),t=Mn.identifierPrefix;if(Bt){var n=Mo,r=To;n=(r&~(1<<32-Li(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Sd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Qi]=t,e[bd]=r,JR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Lb(n,r),n){case"dialog":Mt("cancel",e),Mt("close",e),i=r;break;case"iframe":case"object":case"embed":Mt("load",e),i=r;break;case"video":case"audio":for(i=0;iFc&&(t.flags|=128,r=!0,Zu(o,!1),t.lanes=4194304)}else{if(!r)if(e=dg(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Bt)return Qn(t),null}else 2*on()-o.renderingStartTime>Fc&&n!==1073741824&&(t.flags|=128,r=!0,Zu(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=on(),t.sibling=null,n=Ht.current,Tt(Ht,r?n&1|2:n&1),t):(Qn(t),null);case 22:case 23:return U2(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rr&1073741824&&(Qn(t),t.subtreeFlags&6&&(t.flags|=8192)):Qn(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function EV(e,t){switch(w2(t),t.tag){case 1:return Er(t.type)&&og(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ac(),Nt(Cr),Nt(or),M2(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return T2(t),null;case 13:if(Nt(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));Rc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(Ht),null;case 4:return Ac(),null;case 10:return C2(t.type._context),null;case 22:case 23:return U2(),null;case 24:return null;default:return null}}var jp=!1,tr=!1,kV=typeof WeakSet=="function"?WeakSet:Set,Be=null;function sc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Kt(e,t,r)}else n.current=null}function a1(e,t,n){try{n()}catch(r){Kt(e,t,r)}}var TP=!1;function PV(e,t){if(Vb=tg,e=oR(),_2(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++f===r&&(l=a),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hb={focusedElem:e,selectionRange:n},tg=!1,Be=t;Be!==null;)if(t=Be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Be=e;else for(;Be!==null;){t=Be;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,x=v.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?y:Oi(t.type,y),x);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(C){Kt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,Be=e;break}Be=t.return}return v=TP,TP=!1,v}function If(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&a1(t,n,o)}i=i.next}while(i!==r)}}function zv(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function s1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function nN(e){var t=e.alternate;t!==null&&(e.alternate=null,nN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qi],delete t[bd],delete t[qb],delete t[uV],delete t[fV])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rN(e){return e.tag===5||e.tag===3||e.tag===4}function MP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rN(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function l1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ig));else if(r!==4&&(e=e.child,e!==null))for(l1(e,t,n),e=e.sibling;e!==null;)l1(e,t,n),e=e.sibling}function c1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(c1(e,t,n),e=e.sibling;e!==null;)c1(e,t,n),e=e.sibling}var Wn=null,Ci=!1;function ra(e,t,n){for(n=n.child;n!==null;)iN(e,t,n),n=n.sibling}function iN(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Rv,n)}catch{}switch(n.tag){case 5:tr||sc(n,t);case 6:var r=Wn,i=Ci;Wn=null,ra(e,t,n),Wn=r,Ci=i,Wn!==null&&(Ci?(e=Wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Wn.removeChild(n.stateNode));break;case 18:Wn!==null&&(Ci?(e=Wn,n=n.stateNode,e.nodeType===8?q0(e.parentNode,n):e.nodeType===1&&q0(e,n),md(e)):q0(Wn,n.stateNode));break;case 4:r=Wn,i=Ci,Wn=n.stateNode.containerInfo,Ci=!0,ra(e,t,n),Wn=r,Ci=i;break;case 0:case 11:case 14:case 15:if(!tr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&a1(n,t,a),i=i.next}while(i!==r)}ra(e,t,n);break;case 1:if(!tr&&(sc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Kt(n,t,s)}ra(e,t,n);break;case 21:ra(e,t,n);break;case 22:n.mode&1?(tr=(r=tr)||n.memoizedState!==null,ra(e,t,n),tr=r):ra(e,t,n);break;default:ra(e,t,n)}}function jP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kV),t.forEach(function(r){var i=IV.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Si(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=on()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*MV(r/1960))-r,10e?16:e,Sa===null)var r=!1;else{if(e=Sa,Sa=null,vg=0,dt&6)throw Error(Oe(331));var i=dt;for(dt|=4,Be=e.current;Be!==null;){var o=Be,a=o.child;if(Be.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lon()-$2?$s(e,0):F2|=n),kr(e,t)}function dN(e,t){t===0&&(e.mode&1?(t=xp,xp<<=1,!(xp&130023424)&&(xp=4194304)):t=1);var n=vr();e=No(e,t),e!==null&&(ih(e,t,n),kr(e,n))}function AV(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dN(e,n)}function IV(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),dN(e,n)}var hN;hN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Cr.current)Or=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Or=!1,OV(e,t,n);Or=!!(e.flags&131072)}else Or=!1,Bt&&t.flags&1048576&&gR(t,lg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cm(e,t),e=t.pendingProps;var i=Lc(t,or.current);wc(t,n),i=D2(null,t,r,e,i,n);var o=L2();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Er(r)?(o=!0,ag(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,k2(t),i.updater=Bv,t.stateNode=i,i._reactInternals=t,Jb(t,r,e,n),t=n1(null,t,r,!0,o,n)):(t.tag=0,Bt&&o&&b2(t),dr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=$V(r),e=Oi(r,e),i){case 0:t=t1(null,t,r,e,n);break e;case 1:t=EP(null,t,r,e,n);break e;case 11:t=OP(null,t,r,e,n);break e;case 14:t=CP(null,t,r,Oi(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Oi(r,i),t1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Oi(r,i),EP(e,t,r,i,n);case 3:e:{if(ZR(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,bR(e,t),fg(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ic(Error(Oe(423)),t),t=kP(e,t,r,n,i);break e}else if(r!==i){i=Ic(Error(Oe(424)),t),t=kP(e,t,r,n,i);break e}else for(Ar=La(t.stateNode.containerInfo.firstChild),Ur=t,Bt=!0,Ei=null,n=OR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rc(),r===i){t=Ao(e,t,n);break e}dr(e,t,r,n)}t=t.child}return t;case 5:return CR(t),e===null&&Zb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Wb(r,i)?a=null:o!==null&&Wb(r,o)&&(t.flags|=32),KR(e,t),dr(e,t,a,n),t.child;case 6:return e===null&&Zb(t),null;case 13:return QR(e,t,n);case 4:return P2(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Nc(t,null,r,n):dr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Oi(r,i),OP(e,t,r,i,n);case 7:return dr(e,t,t.pendingProps,n),t.child;case 8:return dr(e,t,t.pendingProps.children,n),t.child;case 12:return dr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Tt(cg,r._currentValue),r._currentValue=a,o!==null)if(Ai(o.value,a)){if(o.children===i.children&&!Cr.current){t=Ao(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=jo(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Qb(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Qb(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}dr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,wc(t,n),i=hi(i),r=r(i),t.flags|=1,dr(e,t,r,n),t.child;case 14:return r=t.type,i=Oi(r,t.pendingProps),i=Oi(r.type,i),CP(e,t,r,i,n);case 15:return qR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Oi(r,i),Cm(e,t),t.tag=1,Er(r)?(e=!0,ag(t)):e=!1,wc(t,n),xR(t,r,i),Jb(t,r,i,n),n1(null,t,r,!0,e,n);case 19:return XR(e,t,n);case 22:return GR(e,t,n)}throw Error(Oe(156,t.tag))};function pN(e,t){return BL(e,t)}function FV(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function si(e,t,n,r){return new FV(e,t,n,r)}function V2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $V(e){if(typeof e=="function")return V2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l2)return 11;if(e===c2)return 14}return 2}function Ia(e,t){var n=e.alternate;return n===null?(n=si(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pm(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")V2(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Xl:return Bs(n.children,i,o,t);case s2:a=8,i|=8;break;case Sb:return e=si(12,n,t,i|2),e.elementType=Sb,e.lanes=o,e;case Ob:return e=si(13,n,t,i),e.elementType=Ob,e.lanes=o,e;case Cb:return e=si(19,n,t,i),e.elementType=Cb,e.lanes=o,e;case SL:return Hv(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wL:a=10;break e;case xL:a=9;break e;case l2:a=11;break e;case c2:a=14;break e;case ua:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=si(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Bs(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function Hv(e,t,n,r){return e=si(22,e,r,t),e.elementType=SL,e.lanes=n,e.stateNode={isHidden:!1},e}function t_(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function n_(e,t,n){return t=si(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BV(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=A0(0),this.expirationTimes=A0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=A0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function H2(e,t,n,r,i,o,a,s,l){return e=new BV(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=si(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},k2(o),e}function UV(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yN)}catch(e){console.error(e)}}yN(),gL.exports=Kr;var fu=gL.exports;const Us=Fi(fu);var _N,$P=fu;_N=$P.createRoot,$P.hydrateRoot;var bN={exports:{}},wN={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function J0(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function e1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wV=typeof WeakMap=="function"?WeakMap:Map;function WR(e,t,n){n=jo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gg||(gg=!0,u1=r),e1(e,t)},n}function YR(e,t,n){n=jo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){e1(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){e1(e,t),typeof r!="function"&&(Na===null?Na=new Set([this]):Na.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function wP(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wV;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=NV.bind(null,e,t,n),t.then(e,e))}function xP(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function SP(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=jo(-1,1),t.tag=2,Ra(n,t,1))),n.lanes|=1),e)}var xV=Wo.ReactCurrentOwner,Or=!1;function dr(e,t,n,r){t.child=e===null?OR(t,null,n,r):Nc(t,e.child,n,r)}function OP(e,t,n,r,i){n=n.render;var o=t.ref;return wc(t,i),r=D2(e,t,n,r,o,i),n=L2(),e!==null&&!Or?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ao(e,t,i)):(Bt&&n&&b2(t),t.flags|=1,dr(e,t,r,i),t.child)}function CP(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!V2(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,qR(e,t,o,r,i)):(e=Pm(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:vd,n(a,r)&&e.ref===t.ref)return Ao(e,t,i)}return t.flags|=1,e=Ia(o,r),e.ref=t.ref,e.return=t,t.child=e}function qR(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(vd(o,r)&&e.ref===t.ref)if(Or=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Or=!0);else return t.lanes=e.lanes,Ao(e,t,i)}return t1(e,t,n,r,i)}function GR(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(lc,Rr),Rr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Tt(lc,Rr),Rr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Tt(lc,Rr),Rr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Tt(lc,Rr),Rr|=r;return dr(e,t,i,n),t.child}function KR(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function t1(e,t,n,r,i){var o=Er(n)?Qs:or.current;return o=Lc(t,o),wc(t,i),n=D2(e,t,n,r,o,i),r=L2(),e!==null&&!Or?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ao(e,t,i)):(Bt&&r&&b2(t),t.flags|=1,dr(e,t,n,i),t.child)}function EP(e,t,n,r,i){if(Er(n)){var o=!0;ag(t)}else o=!1;if(wc(t,i),t.stateNode===null)Cm(e,t),xR(t,n,r),Jb(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=hi(c):(c=Er(n)?Qs:or.current,c=Lc(t,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==c)&&vP(t,a,r,c),fa=!1;var p=t.memoizedState;a.state=p,fg(t,r,a,i),l=t.memoizedState,s!==r||p!==l||Cr.current||fa?(typeof f=="function"&&(Xb(t,n,f,r),l=t.memoizedState),(s=fa||gP(t,n,s,r,p,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,bR(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Oi(t.type,s),a.props=c,d=t.pendingProps,p=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=hi(l):(l=Er(n)?Qs:or.current,l=Lc(t,l));var g=n.getDerivedStateFromProps;(f=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||p!==l)&&vP(t,a,r,l),fa=!1,p=t.memoizedState,a.state=p,fg(t,r,a,i);var v=t.memoizedState;s!==d||p!==v||Cr.current||fa?(typeof g=="function"&&(Xb(t,n,g,r),v=t.memoizedState),(c=fa||gP(t,n,c,r,p,v,l)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=l,r=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return n1(e,t,n,r,o,i)}function n1(e,t,n,r,i,o){KR(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&fP(t,n,!1),Ao(e,t,o);r=t.stateNode,xV.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Nc(t,e.child,null,o),t.child=Nc(t,null,s,o)):dr(e,t,s,o),t.memoizedState=r.state,i&&fP(t,n,!0),t.child}function ZR(e){var t=e.stateNode;t.pendingContext?uP(e,t.pendingContext,t.pendingContext!==t.context):t.context&&uP(e,t.context,!1),P2(e,t.containerInfo)}function kP(e,t,n,r,i){return Rc(),x2(i),t.flags|=256,dr(e,t,n,r),t.child}var r1={dehydrated:null,treeContext:null,retryLane:0};function i1(e){return{baseLanes:e,cachePool:null,transitions:null}}function QR(e,t,n){var r=t.pendingProps,i=Ht.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Tt(Ht,i&1),e===null)return Zb(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Hv(a,r,0,null),e=Us(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=i1(n),t.memoizedState=r1,e):A2(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return SV(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ia(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Ia(s,o):(o=Us(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?i1(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=r1,r}return o=e.child,e=o.sibling,r=Ia(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function A2(e,t){return t=Hv({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Mp(e,t,n,r){return r!==null&&x2(r),Nc(t,e.child,null,n),e=A2(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function SV(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=J0(Error(Oe(422))),Mp(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Hv({mode:"visible",children:r.children},i,0,null),o=Us(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Nc(t,e.child,null,a),t.child.memoizedState=i1(a),t.memoizedState=r1,o);if(!(t.mode&1))return Mp(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(Oe(419)),r=J0(o,r,void 0),Mp(e,t,a,r)}if(s=(a&e.childLanes)!==0,Or||s){if(r=Mn,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,No(e,i),Ri(r,e,i,-1))}return z2(),r=J0(Error(Oe(421))),Mp(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=AV.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ar=La(i.nextSibling),Ur=t,Bt=!0,Ei=null,e!==null&&(ii[oi++]=To,ii[oi++]=Mo,ii[oi++]=Xs,To=e.id,Mo=e.overflow,Xs=t),t=A2(t,r.children),t.flags|=4096,t)}function PP(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qb(e.return,t,n)}function e_(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function XR(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(dr(e,t,r.children,n),r=Ht.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&PP(e,n,t);else if(e.tag===19)PP(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Tt(Ht,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&dg(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),e_(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&dg(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}e_(t,!0,n,null,o);break;case"together":e_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cm(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ao(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),el|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Oe(153));if(t.child!==null){for(e=t.child,n=Ia(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ia(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function OV(e,t,n){switch(t.tag){case 3:ZR(t),Rc();break;case 5:CR(t);break;case 1:Er(t.type)&&ag(t);break;case 4:P2(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Tt(cg,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Tt(Ht,Ht.current&1),t.flags|=128,null):n&t.child.childLanes?QR(e,t,n):(Tt(Ht,Ht.current&1),e=Ao(e,t,n),e!==null?e.sibling:null);Tt(Ht,Ht.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return XR(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Tt(Ht,Ht.current),r)break;return null;case 22:case 23:return t.lanes=0,GR(e,t,n)}return Ao(e,t,n)}var JR,o1,eN,tN;JR=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};o1=function(){};eN=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Rs(io.current);var o=null;switch(n){case"input":i=kb(e,i),r=kb(e,r),o=[];break;case"select":i=qt({},i,{value:void 0}),r=qt({},r,{value:void 0}),o=[];break;case"textarea":i=Mb(e,i),r=Mb(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ig)}Db(n,r);var a;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ud.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(s=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ud.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Mt("scroll",e),o||s===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};tN=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zu(e,t){if(!Bt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function CV(e,t,n){var r=t.pendingProps;switch(w2(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qn(t),null;case 1:return Er(t.type)&&og(),Qn(t),null;case 3:return r=t.stateNode,Ac(),Nt(Cr),Nt(or),M2(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Pp(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ei!==null&&(h1(Ei),Ei=null))),o1(e,t),Qn(t),null;case 5:T2(t);var i=Rs(xd.current);if(n=t.type,e!==null&&t.stateNode!=null)eN(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Oe(166));return Qn(t),null}if(e=Rs(io.current),Pp(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Qi]=t,r[bd]=o,e=(t.mode&1)!==0,n){case"dialog":Mt("cancel",r),Mt("close",r);break;case"iframe":case"object":case"embed":Mt("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Qi]=t,e[bd]=r,JR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Lb(n,r),n){case"dialog":Mt("cancel",e),Mt("close",e),i=r;break;case"iframe":case"object":case"embed":Mt("load",e),i=r;break;case"video":case"audio":for(i=0;iFc&&(t.flags|=128,r=!0,Zu(o,!1),t.lanes=4194304)}else{if(!r)if(e=dg(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Bt)return Qn(t),null}else 2*on()-o.renderingStartTime>Fc&&n!==1073741824&&(t.flags|=128,r=!0,Zu(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=on(),t.sibling=null,n=Ht.current,Tt(Ht,r?n&1|2:n&1),t):(Qn(t),null);case 22:case 23:return U2(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rr&1073741824&&(Qn(t),t.subtreeFlags&6&&(t.flags|=8192)):Qn(t),null;case 24:return null;case 25:return null}throw Error(Oe(156,t.tag))}function EV(e,t){switch(w2(t),t.tag){case 1:return Er(t.type)&&og(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ac(),Nt(Cr),Nt(or),M2(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return T2(t),null;case 13:if(Nt(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Oe(340));Rc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(Ht),null;case 4:return Ac(),null;case 10:return C2(t.type._context),null;case 22:case 23:return U2(),null;case 24:return null;default:return null}}var jp=!1,tr=!1,kV=typeof WeakSet=="function"?WeakSet:Set,Be=null;function sc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Kt(e,t,r)}else n.current=null}function a1(e,t,n){try{n()}catch(r){Kt(e,t,r)}}var TP=!1;function PV(e,t){if(Vb=tg,e=oR(),_2(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var g;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(g=d.firstChild)!==null;)p=d,d=g;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++f===r&&(l=a),(g=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=g}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hb={focusedElem:e,selectionRange:n},tg=!1,Be=t;Be!==null;)if(t=Be,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Be=e;else for(;Be!==null;){t=Be;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,x=v.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?y:Oi(t.type,y),x);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(C){Kt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,Be=e;break}Be=t.return}return v=TP,TP=!1,v}function If(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&a1(t,n,o)}i=i.next}while(i!==r)}}function zv(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function s1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function nN(e){var t=e.alternate;t!==null&&(e.alternate=null,nN(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Qi],delete t[bd],delete t[qb],delete t[uV],delete t[fV])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rN(e){return e.tag===5||e.tag===3||e.tag===4}function MP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rN(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function l1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ig));else if(r!==4&&(e=e.child,e!==null))for(l1(e,t,n),e=e.sibling;e!==null;)l1(e,t,n),e=e.sibling}function c1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(c1(e,t,n),e=e.sibling;e!==null;)c1(e,t,n),e=e.sibling}var Wn=null,Ci=!1;function ra(e,t,n){for(n=n.child;n!==null;)iN(e,t,n),n=n.sibling}function iN(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(Rv,n)}catch{}switch(n.tag){case 5:tr||sc(n,t);case 6:var r=Wn,i=Ci;Wn=null,ra(e,t,n),Wn=r,Ci=i,Wn!==null&&(Ci?(e=Wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Wn.removeChild(n.stateNode));break;case 18:Wn!==null&&(Ci?(e=Wn,n=n.stateNode,e.nodeType===8?q0(e.parentNode,n):e.nodeType===1&&q0(e,n),md(e)):q0(Wn,n.stateNode));break;case 4:r=Wn,i=Ci,Wn=n.stateNode.containerInfo,Ci=!0,ra(e,t,n),Wn=r,Ci=i;break;case 0:case 11:case 14:case 15:if(!tr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&a1(n,t,a),i=i.next}while(i!==r)}ra(e,t,n);break;case 1:if(!tr&&(sc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Kt(n,t,s)}ra(e,t,n);break;case 21:ra(e,t,n);break;case 22:n.mode&1?(tr=(r=tr)||n.memoizedState!==null,ra(e,t,n),tr=r):ra(e,t,n);break;default:ra(e,t,n)}}function jP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kV),t.forEach(function(r){var i=IV.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Si(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=on()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*MV(r/1960))-r,10e?16:e,Sa===null)var r=!1;else{if(e=Sa,Sa=null,vg=0,dt&6)throw Error(Oe(331));var i=dt;for(dt|=4,Be=e.current;Be!==null;){var o=Be,a=o.child;if(Be.flags&16){var s=o.deletions;if(s!==null){for(var l=0;lon()-$2?Bs(e,0):F2|=n),kr(e,t)}function dN(e,t){t===0&&(e.mode&1?(t=xp,xp<<=1,!(xp&130023424)&&(xp=4194304)):t=1);var n=vr();e=No(e,t),e!==null&&(ih(e,t,n),kr(e,n))}function AV(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dN(e,n)}function IV(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Oe(314))}r!==null&&r.delete(t),dN(e,n)}var hN;hN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Cr.current)Or=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Or=!1,OV(e,t,n);Or=!!(e.flags&131072)}else Or=!1,Bt&&t.flags&1048576&&gR(t,lg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cm(e,t),e=t.pendingProps;var i=Lc(t,or.current);wc(t,n),i=D2(null,t,r,e,i,n);var o=L2();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Er(r)?(o=!0,ag(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,k2(t),i.updater=Bv,t.stateNode=i,i._reactInternals=t,Jb(t,r,e,n),t=n1(null,t,r,!0,o,n)):(t.tag=0,Bt&&o&&b2(t),dr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=$V(r),e=Oi(r,e),i){case 0:t=t1(null,t,r,e,n);break e;case 1:t=EP(null,t,r,e,n);break e;case 11:t=OP(null,t,r,e,n);break e;case 14:t=CP(null,t,r,Oi(r.type,e),n);break e}throw Error(Oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Oi(r,i),t1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Oi(r,i),EP(e,t,r,i,n);case 3:e:{if(ZR(t),e===null)throw Error(Oe(387));r=t.pendingProps,o=t.memoizedState,i=o.element,bR(e,t),fg(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ic(Error(Oe(423)),t),t=kP(e,t,r,n,i);break e}else if(r!==i){i=Ic(Error(Oe(424)),t),t=kP(e,t,r,n,i);break e}else for(Ar=La(t.stateNode.containerInfo.firstChild),Ur=t,Bt=!0,Ei=null,n=OR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rc(),r===i){t=Ao(e,t,n);break e}dr(e,t,r,n)}t=t.child}return t;case 5:return CR(t),e===null&&Zb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Wb(r,i)?a=null:o!==null&&Wb(r,o)&&(t.flags|=32),KR(e,t),dr(e,t,a,n),t.child;case 6:return e===null&&Zb(t),null;case 13:return QR(e,t,n);case 4:return P2(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Nc(t,null,r,n):dr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Oi(r,i),OP(e,t,r,i,n);case 7:return dr(e,t,t.pendingProps,n),t.child;case 8:return dr(e,t,t.pendingProps.children,n),t.child;case 12:return dr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Tt(cg,r._currentValue),r._currentValue=a,o!==null)if(Ai(o.value,a)){if(o.children===i.children&&!Cr.current){t=Ao(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=jo(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Qb(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Qb(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}dr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,wc(t,n),i=hi(i),r=r(i),t.flags|=1,dr(e,t,r,n),t.child;case 14:return r=t.type,i=Oi(r,t.pendingProps),i=Oi(r.type,i),CP(e,t,r,i,n);case 15:return qR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Oi(r,i),Cm(e,t),t.tag=1,Er(r)?(e=!0,ag(t)):e=!1,wc(t,n),xR(t,r,i),Jb(t,r,i,n),n1(null,t,r,!0,e,n);case 19:return XR(e,t,n);case 22:return GR(e,t,n)}throw Error(Oe(156,t.tag))};function pN(e,t){return BL(e,t)}function FV(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function si(e,t,n,r){return new FV(e,t,n,r)}function V2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $V(e){if(typeof e=="function")return V2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l2)return 11;if(e===c2)return 14}return 2}function Ia(e,t){var n=e.alternate;return n===null?(n=si(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pm(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")V2(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Xl:return Us(n.children,i,o,t);case s2:a=8,i|=8;break;case Sb:return e=si(12,n,t,i|2),e.elementType=Sb,e.lanes=o,e;case Ob:return e=si(13,n,t,i),e.elementType=Ob,e.lanes=o,e;case Cb:return e=si(19,n,t,i),e.elementType=Cb,e.lanes=o,e;case SL:return Hv(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wL:a=10;break e;case xL:a=9;break e;case l2:a=11;break e;case c2:a=14;break e;case ua:a=16,r=null;break e}throw Error(Oe(130,e==null?e:typeof e,""))}return t=si(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Us(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function Hv(e,t,n,r){return e=si(22,e,r,t),e.elementType=SL,e.lanes=n,e.stateNode={isHidden:!1},e}function t_(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function n_(e,t,n){return t=si(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BV(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=A0(0),this.expirationTimes=A0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=A0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function H2(e,t,n,r,i,o,a,s,l){return e=new BV(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=si(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},k2(o),e}function UV(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yN)}catch(e){console.error(e)}}yN(),gL.exports=Kr;var fu=gL.exports;const zs=Fi(fu);var _N,$P=fu;_N=$P.createRoot,$P.hydrateRoot;var bN={exports:{}},wN={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -70,7 +70,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Kv=B,nH=xN;function rH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var iH=typeof Object.is=="function"?Object.is:rH,oH=nH.useSyncExternalStore,aH=Kv.useRef,sH=Kv.useEffect,lH=Kv.useMemo,cH=Kv.useDebugValue;tH.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=aH(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=lH(function(){function l(m){if(!c){if(c=!0,f=m,m=r(m),i!==void 0&&a.hasValue){var v=a.value;if(i(v,m))return d=v}return d=m}if(v=d,iH(f,m))return v;var y=r(m);return i!==void 0&&i(v,y)?v:(f=m,d=y)}var c=!1,f,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=oH(e,o[0],o[1]);return sH(function(){a.hasValue=!0,a.value=s},[s]),cH(s),s};function uH(e){e()}let SN=uH;const fH=e=>SN=e,dH=()=>SN,BP=Symbol.for("react-redux-context"),UP=typeof globalThis<"u"?globalThis:{};function hH(){var e;if(!B.createContext)return{};const t=(e=UP[BP])!=null?e:UP[BP]=new Map;let n=t.get(B.createContext);return n||(n=B.createContext(null),t.set(B.createContext,n)),n}const ON=hH(),pH=()=>{throw new Error("uSES not initialized!")};function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var CN={exports:{}},xt={};/** @license React v16.13.1 + */var Kv=B,nH=xN;function rH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var iH=typeof Object.is=="function"?Object.is:rH,oH=nH.useSyncExternalStore,aH=Kv.useRef,sH=Kv.useEffect,lH=Kv.useMemo,cH=Kv.useDebugValue;tH.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=aH(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=lH(function(){function l(g){if(!c){if(c=!0,f=g,g=r(g),i!==void 0&&a.hasValue){var v=a.value;if(i(v,g))return d=v}return d=g}if(v=d,iH(f,g))return v;var y=r(g);return i!==void 0&&i(v,y)?v:(f=g,d=y)}var c=!1,f,d,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var s=oH(e,o[0],o[1]);return sH(function(){a.hasValue=!0,a.value=s},[s]),cH(s),s};function uH(e){e()}let SN=uH;const fH=e=>SN=e,dH=()=>SN,BP=Symbol.for("react-redux-context"),UP=typeof globalThis<"u"?globalThis:{};function hH(){var e;if(!B.createContext)return{};const t=(e=UP[BP])!=null?e:UP[BP]=new Map;let n=t.get(B.createContext);return n||(n=B.createContext(null),t.set(B.createContext,n)),n}const ON=hH(),pH=()=>{throw new Error("uSES not initialized!")};function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var CN={exports:{}},xt={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. @@ -85,7 +85,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var eS=Symbol.for("react.element"),tS=Symbol.for("react.portal"),ay=Symbol.for("react.fragment"),sy=Symbol.for("react.strict_mode"),ly=Symbol.for("react.profiler"),cy=Symbol.for("react.provider"),uy=Symbol.for("react.context"),TH=Symbol.for("react.server_context"),fy=Symbol.for("react.forward_ref"),dy=Symbol.for("react.suspense"),hy=Symbol.for("react.suspense_list"),py=Symbol.for("react.memo"),my=Symbol.for("react.lazy"),MH=Symbol.for("react.offscreen"),jH=Symbol.for("react.module.reference");function yi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case eS:switch(e=e.type,e){case ay:case ly:case sy:case dy:case hy:return e;default:switch(e=e&&e.$$typeof,e){case TH:case uy:case fy:case my:case py:case cy:return e;default:return t}}case tS:return t}}}St.ContextConsumer=uy;St.ContextProvider=cy;St.Element=eS;St.ForwardRef=fy;St.Fragment=ay;St.Lazy=my;St.Memo=py;St.Portal=tS;St.Profiler=ly;St.StrictMode=sy;St.Suspense=dy;St.SuspenseList=hy;St.isAsyncMode=function(){return!1};St.isConcurrentMode=function(){return!1};St.isContextConsumer=function(e){return yi(e)===uy};St.isContextProvider=function(e){return yi(e)===cy};St.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===eS};St.isForwardRef=function(e){return yi(e)===fy};St.isFragment=function(e){return yi(e)===ay};St.isLazy=function(e){return yi(e)===my};St.isMemo=function(e){return yi(e)===py};St.isPortal=function(e){return yi(e)===tS};St.isProfiler=function(e){return yi(e)===ly};St.isStrictMode=function(e){return yi(e)===sy};St.isSuspense=function(e){return yi(e)===dy};St.isSuspenseList=function(e){return yi(e)===hy};St.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ay||e===ly||e===sy||e===dy||e===hy||e===MH||typeof e=="object"&&e!==null&&(e.$$typeof===my||e.$$typeof===py||e.$$typeof===cy||e.$$typeof===uy||e.$$typeof===fy||e.$$typeof===jH||e.getModuleId!==void 0)};St.typeOf=yi;TN.exports=St;var DH=TN.exports;const LH=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function RH(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:a}){let s=!1,l,c,f,d,p;function m(w,S){return l=w,c=S,f=e(l,c),d=t(r,c),p=n(f,d,c),s=!0,p}function v(){return f=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),p=n(f,d,c),p}function y(){return e.dependsOnOwnProps&&(f=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),p=n(f,d,c),p}function x(){const w=e(l,c),S=!a(w,f);return f=w,S&&(p=n(f,d,c)),p}function b(w,S){const C=!o(S,c),k=!i(w,l,S,c);return l=w,c=S,C&&k?v():C?y():k?x():p}return function(S,C){return s?b(S,C):m(S,C)}}function NH(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,o=G2(t,LH);const a=n(e,o),s=r(e,o),l=i(e,o);return RH(a,s,l,e,o)}function AH(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...o)=>t(i(...o)))}return n}function p1(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function YP(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function MN(e,t){return function(r,{displayName:i}){const o=function(s,l){return o.dependsOnOwnProps?o.mapToProps(s,l):o.mapToProps(s,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,l){o.mapToProps=e,o.dependsOnOwnProps=YP(e);let c=o(s,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=YP(c),c=o(s,l)),c},o}}function nS(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function IH(e){return e&&typeof e=="object"?p1(t=>AH(e,t)):e?typeof e=="function"?MN(e):nS(e,"mapDispatchToProps"):p1(t=>({dispatch:t}))}function FH(e){return e?typeof e=="function"?MN(e):nS(e,"mapStateToProps"):p1(()=>({}))}function $H(e,t,n){return Sc({},n,e,t)}function BH(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,a;return function(l,c,f){const d=e(l,c,f);return o?i(d,a)||(a=d):(o=!0,a=d),a}}}function UH(e){return e?typeof e=="function"?BH(e):nS(e,"mergeProps"):()=>$H}function zH(){const e=dH();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const qP={notify(){},get:()=>[]};function jN(e,t){let n,r=qP;function i(d){return l(),r.subscribe(d)}function o(){r.notify()}function a(){f.onStateChange&&f.onStateChange()}function s(){return!!n}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=zH())}function c(){n&&(n(),n=void 0,r.clear(),r=qP)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const VH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bg=VH?B.useLayoutEffect:B.useEffect;function GP(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function i_(e,t){if(GP(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{DN=e},YH=[null,null];function qH(e,t,n){bg(()=>e(...t),n)}function GH(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function KH(e,t,n,r,i,o,a,s,l,c,f){if(!e)return()=>{};let d=!1,p=null;const m=()=>{if(d||!s.current)return;const y=t.getState();let x,b;try{x=r(y,i.current)}catch(w){b=w,p=w}b||(p=null),x===o.current?a.current||c():(o.current=x,l.current=x,a.current=!0,f())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function ZH(e,t){return e===t}function LN(e,t,n,{pure:r,areStatesEqual:i=ZH,areOwnPropsEqual:o=i_,areStatePropsEqual:a=i_,areMergedPropsEqual:s=i_,forwardRef:l=!1,context:c=ON}={}){const f=c,d=FH(e),p=IH(t),m=UH(n),v=!!e;return x=>{const b=x.displayName||x.name||"Component",w=`Connect(${b})`,S={shouldHandleStateChanges:v,displayName:w,wrappedComponentName:b,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function C(j){const[N,H,R]=B.useMemo(()=>{const{reactReduxForwardedRef:X}=j,se=G2(j,HH);return[j.context,X,se]},[j]),V=B.useMemo(()=>N&&N.Consumer&&DH.isContextConsumer(B.createElement(N.Consumer,null))?N:f,[N,f]),W=B.useContext(V),ee=!!j.store&&!!j.store.getState&&!!j.store.dispatch,q=!!W&&!!W.store,Q=ee?j.store:W.store,oe=q?W.getServerState:Q.getState,le=B.useMemo(()=>NH(Q.dispatch,S),[Q]),[G,F]=B.useMemo(()=>{if(!v)return YH;const X=jN(Q,ee?void 0:W.subscription),se=X.notifyNestedSubs.bind(X);return[X,se]},[Q,ee,W]),A=B.useMemo(()=>ee?W:Sc({},W,{subscription:G}),[ee,W,G]),z=B.useRef(),re=B.useRef(R),U=B.useRef(),K=B.useRef(!1);B.useRef(!1);const ie=B.useRef(!1),ae=B.useRef();bg(()=>(ie.current=!0,()=>{ie.current=!1}),[]);const he=B.useMemo(()=>()=>U.current&&R===re.current?U.current:le(Q.getState(),R),[Q,R]),E=B.useMemo(()=>se=>G?KH(v,Q,G,le,re,z,K,ie,U,F,se):()=>{},[G]);qH(GH,[re,z,K,R,U,F]);let M;try{M=DN(E,he,oe?()=>le(oe(),R):he)}catch(X){throw ae.current&&(X.message+=` + */var eS=Symbol.for("react.element"),tS=Symbol.for("react.portal"),ay=Symbol.for("react.fragment"),sy=Symbol.for("react.strict_mode"),ly=Symbol.for("react.profiler"),cy=Symbol.for("react.provider"),uy=Symbol.for("react.context"),TH=Symbol.for("react.server_context"),fy=Symbol.for("react.forward_ref"),dy=Symbol.for("react.suspense"),hy=Symbol.for("react.suspense_list"),py=Symbol.for("react.memo"),my=Symbol.for("react.lazy"),MH=Symbol.for("react.offscreen"),jH=Symbol.for("react.module.reference");function yi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case eS:switch(e=e.type,e){case ay:case ly:case sy:case dy:case hy:return e;default:switch(e=e&&e.$$typeof,e){case TH:case uy:case fy:case my:case py:case cy:return e;default:return t}}case tS:return t}}}St.ContextConsumer=uy;St.ContextProvider=cy;St.Element=eS;St.ForwardRef=fy;St.Fragment=ay;St.Lazy=my;St.Memo=py;St.Portal=tS;St.Profiler=ly;St.StrictMode=sy;St.Suspense=dy;St.SuspenseList=hy;St.isAsyncMode=function(){return!1};St.isConcurrentMode=function(){return!1};St.isContextConsumer=function(e){return yi(e)===uy};St.isContextProvider=function(e){return yi(e)===cy};St.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===eS};St.isForwardRef=function(e){return yi(e)===fy};St.isFragment=function(e){return yi(e)===ay};St.isLazy=function(e){return yi(e)===my};St.isMemo=function(e){return yi(e)===py};St.isPortal=function(e){return yi(e)===tS};St.isProfiler=function(e){return yi(e)===ly};St.isStrictMode=function(e){return yi(e)===sy};St.isSuspense=function(e){return yi(e)===dy};St.isSuspenseList=function(e){return yi(e)===hy};St.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ay||e===ly||e===sy||e===dy||e===hy||e===MH||typeof e=="object"&&e!==null&&(e.$$typeof===my||e.$$typeof===py||e.$$typeof===cy||e.$$typeof===uy||e.$$typeof===fy||e.$$typeof===jH||e.getModuleId!==void 0)};St.typeOf=yi;TN.exports=St;var DH=TN.exports;const LH=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function RH(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:a}){let s=!1,l,c,f,d,p;function g(w,S){return l=w,c=S,f=e(l,c),d=t(r,c),p=n(f,d,c),s=!0,p}function v(){return f=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),p=n(f,d,c),p}function y(){return e.dependsOnOwnProps&&(f=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),p=n(f,d,c),p}function x(){const w=e(l,c),S=!a(w,f);return f=w,S&&(p=n(f,d,c)),p}function b(w,S){const C=!o(S,c),k=!i(w,l,S,c);return l=w,c=S,C&&k?v():C?y():k?x():p}return function(S,C){return s?b(S,C):g(S,C)}}function NH(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,o=G2(t,LH);const a=n(e,o),s=r(e,o),l=i(e,o);return RH(a,s,l,e,o)}function AH(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...o)=>t(i(...o)))}return n}function p1(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function YP(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function MN(e,t){return function(r,{displayName:i}){const o=function(s,l){return o.dependsOnOwnProps?o.mapToProps(s,l):o.mapToProps(s,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,l){o.mapToProps=e,o.dependsOnOwnProps=YP(e);let c=o(s,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=YP(c),c=o(s,l)),c},o}}function nS(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function IH(e){return e&&typeof e=="object"?p1(t=>AH(e,t)):e?typeof e=="function"?MN(e):nS(e,"mapDispatchToProps"):p1(t=>({dispatch:t}))}function FH(e){return e?typeof e=="function"?MN(e):nS(e,"mapStateToProps"):p1(()=>({}))}function $H(e,t,n){return Sc({},n,e,t)}function BH(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,a;return function(l,c,f){const d=e(l,c,f);return o?i(d,a)||(a=d):(o=!0,a=d),a}}}function UH(e){return e?typeof e=="function"?BH(e):nS(e,"mergeProps"):()=>$H}function zH(){const e=dH();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const qP={notify(){},get:()=>[]};function jN(e,t){let n,r=qP;function i(d){return l(),r.subscribe(d)}function o(){r.notify()}function a(){f.onStateChange&&f.onStateChange()}function s(){return!!n}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=zH())}function c(){n&&(n(),n=void 0,r.clear(),r=qP)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const VH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bg=VH?B.useLayoutEffect:B.useEffect;function GP(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function i_(e,t){if(GP(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{DN=e},YH=[null,null];function qH(e,t,n){bg(()=>e(...t),n)}function GH(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function KH(e,t,n,r,i,o,a,s,l,c,f){if(!e)return()=>{};let d=!1,p=null;const g=()=>{if(d||!s.current)return;const y=t.getState();let x,b;try{x=r(y,i.current)}catch(w){b=w,p=w}b||(p=null),x===o.current?a.current||c():(o.current=x,l.current=x,a.current=!0,f())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function ZH(e,t){return e===t}function LN(e,t,n,{pure:r,areStatesEqual:i=ZH,areOwnPropsEqual:o=i_,areStatePropsEqual:a=i_,areMergedPropsEqual:s=i_,forwardRef:l=!1,context:c=ON}={}){const f=c,d=FH(e),p=IH(t),g=UH(n),v=!!e;return x=>{const b=x.displayName||x.name||"Component",w=`Connect(${b})`,S={shouldHandleStateChanges:v,displayName:w,wrappedComponentName:b,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function C(j){const[N,H,R]=B.useMemo(()=>{const{reactReduxForwardedRef:X}=j,se=G2(j,HH);return[j.context,X,se]},[j]),V=B.useMemo(()=>N&&N.Consumer&&DH.isContextConsumer(B.createElement(N.Consumer,null))?N:f,[N,f]),W=B.useContext(V),ee=!!j.store&&!!j.store.getState&&!!j.store.dispatch,q=!!W&&!!W.store,Q=ee?j.store:W.store,oe=q?W.getServerState:Q.getState,le=B.useMemo(()=>NH(Q.dispatch,S),[Q]),[G,F]=B.useMemo(()=>{if(!v)return YH;const X=jN(Q,ee?void 0:W.subscription),se=X.notifyNestedSubs.bind(X);return[X,se]},[Q,ee,W]),A=B.useMemo(()=>ee?W:Sc({},W,{subscription:G}),[ee,W,G]),z=B.useRef(),re=B.useRef(R),U=B.useRef(),K=B.useRef(!1);B.useRef(!1);const ie=B.useRef(!1),ae=B.useRef();bg(()=>(ie.current=!0,()=>{ie.current=!1}),[]);const he=B.useMemo(()=>()=>U.current&&R===re.current?U.current:le(Q.getState(),R),[Q,R]),E=B.useMemo(()=>se=>G?KH(v,Q,G,le,re,z,K,ie,U,F,se):()=>{},[G]);qH(GH,[re,z,K,R,U,F]);let M;try{M=DN(E,he,oe?()=>le(oe(),R):he)}catch(X){throw ae.current&&(X.message+=` The error may be correlated with this previous error: ${ae.current.stack} @@ -98,7 +98,7 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function kd(){return kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function rS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function XH(){return Math.random().toString(36).substr(2,8)}function ZP(e,t){return{usr:e.state,key:e.key,idx:t}}function m1(e,t,n,r){return n===void 0&&(n=null),kd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?du(t):t,{state:n,key:t&&t.key||r||XH()})}function wg(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function du(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function JH(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Oa.Pop,l=null,c=f();c==null&&(c=0,a.replaceState(kd({},a.state,{idx:c}),""));function f(){return(a.state||{idx:null}).idx}function d(){s=Oa.Pop;let x=f(),b=x==null?null:x-c;c=x,l&&l({action:s,location:y.location,delta:b})}function p(x,b){s=Oa.Push;let w=m1(y.location,x,b);n&&n(w,x),c=f()+1;let S=ZP(w,c),C=y.createHref(w);try{a.pushState(S,"",C)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(C)}o&&l&&l({action:s,location:y.location,delta:1})}function m(x,b){s=Oa.Replace;let w=m1(y.location,x,b);n&&n(w,x),c=f();let S=ZP(w,c),C=y.createHref(w);a.replaceState(S,"",C),o&&l&&l({action:s,location:y.location,delta:0})}function v(x){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof x=="string"?x:wg(x);return cn(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let y={get action(){return s},get location(){return e(i,a)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(KP,d),l=x,()=>{i.removeEventListener(KP,d),l=null}},createHref(x){return t(i,x)},createURL:v,encodeLocation(x){let b=v(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:m,go(x){return a.go(x)}};return y}var QP;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(QP||(QP={}));function eW(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?du(t):t,i=iS(r.pathname||"/",n);if(i==null)return null;let o=NN(e);tW(o);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(cn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Fa([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(cn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),NN(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:lW(c,o.index),routesMeta:f})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of AN(o.path))i(o,a,l)}),t}function AN(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=AN(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function tW(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cW(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const nW=/^:\w+$/,rW=3,iW=2,oW=1,aW=10,sW=-2,XP=e=>e==="*";function lW(e,t){let n=e.split("/"),r=n.length;return n.some(XP)&&(r+=sW),t&&(r+=iW),n.filter(i=>!XP(i)).reduce((i,o)=>i+(nW.test(o)?rW:o===""?oW:aW),r)}function cW(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function uW(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a{if(f==="*"){let p=s[d]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=pW(s[d]||"",f),c},{}),pathname:o,pathnameBase:a,pattern:e}}function dW(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),rS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function hW(e){try{return decodeURI(e)}catch(t){return rS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function pW(e,t){try{return decodeURIComponent(e)}catch(n){return rS(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function iS(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function mW(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?du(e):e;return{pathname:n?n.startsWith("/")?n:gW(n,t):t,search:yW(r),hash:_W(i)}}function gW(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function o_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function oS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function aS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=du(e):(i=kd({},e),cn(!i.pathname||!i.pathname.includes("?"),o_("?","pathname","search",i)),cn(!i.pathname||!i.pathname.includes("#"),o_("#","pathname","hash",i)),cn(!i.search||!i.search.includes("#"),o_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(r||a==null)s=n;else{let d=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=mW(i,s),c=a&&a!=="/"&&a.endsWith("/"),f=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Fa=e=>e.join("/").replace(/\/\/+/g,"/"),vW=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yW=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_W=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function bW(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const IN=["post","put","patch","delete"];new Set(IN);const wW=["get",...IN];new Set(wW);/** + */function kd(){return kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function rS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function XH(){return Math.random().toString(36).substr(2,8)}function ZP(e,t){return{usr:e.state,key:e.key,idx:t}}function m1(e,t,n,r){return n===void 0&&(n=null),kd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?du(t):t,{state:n,key:t&&t.key||r||XH()})}function wg(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function du(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function JH(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Oa.Pop,l=null,c=f();c==null&&(c=0,a.replaceState(kd({},a.state,{idx:c}),""));function f(){return(a.state||{idx:null}).idx}function d(){s=Oa.Pop;let x=f(),b=x==null?null:x-c;c=x,l&&l({action:s,location:y.location,delta:b})}function p(x,b){s=Oa.Push;let w=m1(y.location,x,b);n&&n(w,x),c=f()+1;let S=ZP(w,c),C=y.createHref(w);try{a.pushState(S,"",C)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(C)}o&&l&&l({action:s,location:y.location,delta:1})}function g(x,b){s=Oa.Replace;let w=m1(y.location,x,b);n&&n(w,x),c=f();let S=ZP(w,c),C=y.createHref(w);a.replaceState(S,"",C),o&&l&&l({action:s,location:y.location,delta:0})}function v(x){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof x=="string"?x:wg(x);return cn(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let y={get action(){return s},get location(){return e(i,a)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(KP,d),l=x,()=>{i.removeEventListener(KP,d),l=null}},createHref(x){return t(i,x)},createURL:v,encodeLocation(x){let b=v(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:g,go(x){return a.go(x)}};return y}var QP;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(QP||(QP={}));function eW(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?du(t):t,i=iS(r.pathname||"/",n);if(i==null)return null;let o=NN(e);tW(o);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(cn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Fa([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(cn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),NN(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:lW(c,o.index),routesMeta:f})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of AN(o.path))i(o,a,l)}),t}function AN(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=AN(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function tW(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cW(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const nW=/^:\w+$/,rW=3,iW=2,oW=1,aW=10,sW=-2,XP=e=>e==="*";function lW(e,t){let n=e.split("/"),r=n.length;return n.some(XP)&&(r+=sW),t&&(r+=iW),n.filter(i=>!XP(i)).reduce((i,o)=>i+(nW.test(o)?rW:o===""?oW:aW),r)}function cW(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function uW(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a{if(f==="*"){let p=s[d]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=pW(s[d]||"",f),c},{}),pathname:o,pathnameBase:a,pattern:e}}function dW(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),rS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function hW(e){try{return decodeURI(e)}catch(t){return rS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function pW(e,t){try{return decodeURIComponent(e)}catch(n){return rS(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function iS(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function mW(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?du(e):e;return{pathname:n?n.startsWith("/")?n:gW(n,t):t,search:yW(r),hash:_W(i)}}function gW(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function o_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function oS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function aS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=du(e):(i=kd({},e),cn(!i.pathname||!i.pathname.includes("?"),o_("?","pathname","search",i)),cn(!i.pathname||!i.pathname.includes("#"),o_("#","pathname","hash",i)),cn(!i.search||!i.search.includes("#"),o_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(r||a==null)s=n;else{let d=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=mW(i,s),c=a&&a!=="/"&&a.endsWith("/"),f=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Fa=e=>e.join("/").replace(/\/\/+/g,"/"),vW=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yW=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_W=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function bW(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const IN=["post","put","patch","delete"];new Set(IN);const wW=["get",...IN];new Set(wW);/** * React Router v6.14.2 * * Copyright (c) Remix Software Inc. @@ -107,7 +107,7 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=B.useRef(!1);return BN(()=>{a.current=!0}),B.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){n.go(l);return}let f=aS(l,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Fa([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,i,e])}function hl(){let{matches:e}=B.useContext(Yo),t=e[e.length-1];return t?t.params:{}}function lS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=B.useContext(Yo),{pathname:i}=gn(),o=JSON.stringify(oS(r).map(a=>a.pathnameBase));return B.useMemo(()=>aS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function OW(e,t){return CW(e,t)}function CW(e,t,n){dl()||cn(!1);let{navigator:r}=B.useContext(fl),{matches:i}=B.useContext(Yo),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let l=gn(),c;if(t){var f;let y=typeof t=="string"?du(t):t;s==="/"||(f=y.pathname)!=null&&f.startsWith(s)||cn(!1),c=y}else c=l;let d=c.pathname||"/",p=s==="/"?d:d.slice(s.length)||"/",m=eW(e,{pathname:p}),v=MW(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Fa([s,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Fa([s,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n);return t&&v?B.createElement(gy.Provider,{value:{location:xg({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Oa.Pop}},v):v}function EW(){let e=RW(),t=bW(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return B.createElement(B.Fragment,null,B.createElement("h2",null,"Unexpected Application Error!"),B.createElement("h3",{style:{fontStyle:"italic"}},t),n?B.createElement("pre",{style:i},n):null,o)}const kW=B.createElement(EW,null);class PW extends B.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?B.createElement(Yo.Provider,{value:this.props.routeContext},B.createElement($N.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function TW(e){let{routeContext:t,match:n,children:r}=e,i=B.useContext(sS);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),B.createElement(Yo.Provider,{value:t},r)}function MW(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,a=(r=n)==null?void 0:r.errors;if(a!=null){let s=o.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||cn(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,l,c)=>{let f=l.route.id?a==null?void 0:a[l.route.id]:null,d=null;n&&(d=l.route.errorElement||kW);let p=t.concat(o.slice(0,c+1)),m=()=>{let v;return f?v=d:l.route.Component?v=B.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=s,B.createElement(TW,{match:l,routeContext:{outlet:s,matches:p,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?B.createElement(PW,{location:n.location,revalidation:n.revalidation,component:d,error:f,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var g1;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(g1||(g1={}));var Pd;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Pd||(Pd={}));function jW(e){let t=B.useContext(sS);return t||cn(!1),t}function DW(e){let t=B.useContext(FN);return t||cn(!1),t}function LW(e){let t=B.useContext(Yo);return t||cn(!1),t}function UN(e){let t=LW(),n=t.matches[t.matches.length-1];return n.route.id||cn(!1),n.route.id}function RW(){var e;let t=B.useContext($N),n=DW(Pd.UseRouteError),r=UN(Pd.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function NW(){let{router:e}=jW(g1.UseNavigateStable),t=UN(Pd.UseNavigateStable),n=B.useRef(!1);return BN(()=>{n.current=!0}),B.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,xg({fromRouteId:t},o)))},[e,t])}function cS(e){let{to:t,replace:n,state:r,relative:i}=e;dl()||cn(!1);let{matches:o}=B.useContext(Yo),{pathname:a}=gn(),s=uo(),l=aS(t,oS(o).map(f=>f.pathnameBase),a,i==="path"),c=JSON.stringify(l);return B.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:i}),[s,c,i,n,r]),null}function vt(e){cn(!1)}function AW(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Oa.Pop,navigator:o,static:a=!1}=e;dl()&&cn(!1);let s=t.replace(/^\/*/,"/"),l=B.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof r=="string"&&(r=du(r));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:m="default"}=r,v=B.useMemo(()=>{let y=iS(c,s);return y==null?null:{location:{pathname:y,search:f,hash:d,state:p,key:m},navigationType:i}},[s,c,f,d,p,m,i]);return v==null?null:B.createElement(fl.Provider,{value:l},B.createElement(gy.Provider,{children:n,value:v}))}function vy(e){let{children:t,location:n}=e;return OW(v1(t),n)}var JP;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(JP||(JP={}));new Promise(()=>{});function v1(e,t){t===void 0&&(t=[]);let n=[];return B.Children.forEach(e,(r,i)=>{if(!B.isValidElement(r))return;let o=[...t,i];if(r.type===B.Fragment){n.push.apply(n,v1(r.props.children,o));return}r.type!==vt&&cn(!1),!r.props.index||!r.props.children||cn(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=v1(r.props.children,o)),n.push(a)}),n}/** + */function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=B.useRef(!1);return BN(()=>{a.current=!0}),B.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){n.go(l);return}let f=aS(l,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Fa([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,i,e])}function pl(){let{matches:e}=B.useContext(Yo),t=e[e.length-1];return t?t.params:{}}function lS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=B.useContext(Yo),{pathname:i}=gn(),o=JSON.stringify(oS(r).map(a=>a.pathnameBase));return B.useMemo(()=>aS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function OW(e,t){return CW(e,t)}function CW(e,t,n){hl()||cn(!1);let{navigator:r}=B.useContext(dl),{matches:i}=B.useContext(Yo),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let l=gn(),c;if(t){var f;let y=typeof t=="string"?du(t):t;s==="/"||(f=y.pathname)!=null&&f.startsWith(s)||cn(!1),c=y}else c=l;let d=c.pathname||"/",p=s==="/"?d:d.slice(s.length)||"/",g=eW(e,{pathname:p}),v=MW(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Fa([s,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Fa([s,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n);return t&&v?B.createElement(gy.Provider,{value:{location:xg({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Oa.Pop}},v):v}function EW(){let e=RW(),t=bW(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return B.createElement(B.Fragment,null,B.createElement("h2",null,"Unexpected Application Error!"),B.createElement("h3",{style:{fontStyle:"italic"}},t),n?B.createElement("pre",{style:i},n):null,o)}const kW=B.createElement(EW,null);class PW extends B.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?B.createElement(Yo.Provider,{value:this.props.routeContext},B.createElement($N.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function TW(e){let{routeContext:t,match:n,children:r}=e,i=B.useContext(sS);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),B.createElement(Yo.Provider,{value:t},r)}function MW(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,a=(r=n)==null?void 0:r.errors;if(a!=null){let s=o.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||cn(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.reduceRight((s,l,c)=>{let f=l.route.id?a==null?void 0:a[l.route.id]:null,d=null;n&&(d=l.route.errorElement||kW);let p=t.concat(o.slice(0,c+1)),g=()=>{let v;return f?v=d:l.route.Component?v=B.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=s,B.createElement(TW,{match:l,routeContext:{outlet:s,matches:p,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?B.createElement(PW,{location:n.location,revalidation:n.revalidation,component:d,error:f,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var g1;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(g1||(g1={}));var Pd;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Pd||(Pd={}));function jW(e){let t=B.useContext(sS);return t||cn(!1),t}function DW(e){let t=B.useContext(FN);return t||cn(!1),t}function LW(e){let t=B.useContext(Yo);return t||cn(!1),t}function UN(e){let t=LW(),n=t.matches[t.matches.length-1];return n.route.id||cn(!1),n.route.id}function RW(){var e;let t=B.useContext($N),n=DW(Pd.UseRouteError),r=UN(Pd.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function NW(){let{router:e}=jW(g1.UseNavigateStable),t=UN(Pd.UseNavigateStable),n=B.useRef(!1);return BN(()=>{n.current=!0}),B.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,xg({fromRouteId:t},o)))},[e,t])}function cS(e){let{to:t,replace:n,state:r,relative:i}=e;hl()||cn(!1);let{matches:o}=B.useContext(Yo),{pathname:a}=gn(),s=uo(),l=aS(t,oS(o).map(f=>f.pathnameBase),a,i==="path"),c=JSON.stringify(l);return B.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:i}),[s,c,i,n,r]),null}function vt(e){cn(!1)}function AW(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Oa.Pop,navigator:o,static:a=!1}=e;hl()&&cn(!1);let s=t.replace(/^\/*/,"/"),l=B.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof r=="string"&&(r=du(r));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:g="default"}=r,v=B.useMemo(()=>{let y=iS(c,s);return y==null?null:{location:{pathname:y,search:f,hash:d,state:p,key:g},navigationType:i}},[s,c,f,d,p,g,i]);return v==null?null:B.createElement(dl.Provider,{value:l},B.createElement(gy.Provider,{children:n,value:v}))}function vy(e){let{children:t,location:n}=e;return OW(v1(t),n)}var JP;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(JP||(JP={}));new Promise(()=>{});function v1(e,t){t===void 0&&(t=[]);let n=[];return B.Children.forEach(e,(r,i)=>{if(!B.isValidElement(r))return;let o=[...t,i];if(r.type===B.Fragment){n.push.apply(n,v1(r.props.children,o));return}r.type!==vt&&cn(!1),!r.props.index||!r.props.children||cn(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=v1(r.props.children,o)),n.push(a)}),n}/** * React Router DOM v6.14.2 * * Copyright (c) Remix Software Inc. @@ -116,9 +116,9 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function IW(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function FW(e,t){return e.button===0&&(!t||t==="_self")&&!IW(e)}const $W=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],BW=["aria-current","caseSensitive","className","end","style","to","children"],UW="startTransition",eT=jF[UW];function VN(e){let{basename:t,children:n,future:r,window:i}=e,o=B.useRef();o.current==null&&(o.current=QH({window:i,v5Compat:!0}));let a=o.current,[s,l]=B.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},f=B.useCallback(d=>{c&&eT?eT(()=>l(d)):l(d)},[l,c]);return B.useLayoutEffect(()=>a.listen(f),[a,f]),B.createElement(AW,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}const zW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",VW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=B.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:f}=t,d=zN(t,$W),{basename:p}=B.useContext(fl),m,v=!1;if(typeof c=="string"&&VW.test(c)&&(m=c,zW))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),C=iS(S.pathname,p);S.origin===w.origin&&C!=null?c=C+S.search+S.hash:v=!0}catch{}let y=xW(c,{relative:i}),x=HW(c,{replace:a,state:s,target:l,preventScrollReset:f,relative:i});function b(w){r&&r(w),w.defaultPrevented||x(w)}return B.createElement("a",Sg({},d,{href:m||y,onClick:v||o?r:b,ref:n,target:l}))}),HN=B.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,children:c}=t,f=zN(t,BW),d=lS(l,{relative:f.relative}),p=gn(),m=B.useContext(FN),{navigator:v}=B.useContext(fl),y=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,x=p.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase());let w=x===y||!a&&x.startsWith(y)&&x.charAt(y.length)==="/",S=b!=null&&(b===y||!a&&b.startsWith(y)&&b.charAt(y.length)==="/"),C=w?r:void 0,k;typeof o=="function"?k=o({isActive:w,isPending:S}):k=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let P=typeof s=="function"?s({isActive:w,isPending:S}):s;return B.createElement(It,Sg({},f,{"aria-current":C,className:k,ref:n,style:P,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var tT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(tT||(tT={}));var nT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(nT||(nT={}));function HW(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a}=t===void 0?{}:t,s=uo(),l=gn(),c=lS(e,{relative:a});return B.useCallback(f=>{if(FW(f,n)){f.preventDefault();let d=r!==void 0?r:wg(l)===wg(c);s(e,{replace:d,state:i,preventScrollReset:o,relative:a})}},[l,s,c,r,i,n,e,o,a])}const WW="shlink-web-client",YW="A React-based progressive web application for shlink",qW="/shlink-web-client/feature/react-tag-autocomplete-7",GW="https://github.com/shlinkio/shlink-web-client",KW="MIT",ZW={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss shlink-web-component/*.scss shlink-web-component/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src shlink-web-component test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},QW={"@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^7.0.1","@reduxjs/toolkit":"^1.9.5","@shlinkio/shlink-frontend-kit":"^0.2.0",bootstrap:"5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.3.3",classnames:"^2.3.2","compare-versions":"^6.1.0",csvtojson:"^2.0.10","date-fns":"^2.30.0","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.4",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.2.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.16.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.1","react-redux":"^8.1.2","react-router-dom":"^6.14.2","react-swipeable":"^7.0.1","react-tag-autocomplete":"^7.0.0",reactstrap:"^9.2.0","redux-localstorage-simple":"^2.5.1",uuid:"^9.0.0","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},XW={"@shlinkio/eslint-config-js-coding-standard":"~2.2.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@testing-library/jest-dom":"^5.17.0","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.1","@types/leaflet":"^1.9.3","@types/qs":"^6.9.7","@types/ramda":"^0.27.66","@types/react":"^18.2.19","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.15.0","@types/react-dom":"^18.2.7","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^9.0.2","@vitejs/plugin-react":"^4.0.4","@vitest/coverage-v8":"^0.34.1","adm-zip":"^0.5.10",chalk:"^5.3.0",eslint:"^8.46.0",jsdom:"^22.1.0","resize-observer-polyfill":"^1.5.1",sass:"^1.64.2",stylelint:"^15.10.2",typescript:"^5.1.6",vite:"^4.4.9","vite-plugin-pwa":"^0.16.4",vitest:"^0.34.1","vitest-canvas-mock":"^0.3.2"},JW=[">0.2%","not dead","not ie <= 11","not op_mini all"],Og={name:WW,description:YW,private:!1,homepage:qW,repository:GW,license:KW,scripts:ZW,dependencies:QW,devDependencies:XW,browserslist:JW};var Ii,so=".",WN="function",YN="string",qN="__global__",uS="Provider",eY=0,fS=Array.prototype.slice,tY=function(t,n){var r=t[n];if(r===void 0&&Ii.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},yy=function(t){var n;return this.nested[t]||(n=Ii.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},GN=function(t){return t.split(so).reduce(tY,this)},nY=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(f){if(f)throw f;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},rY=function(t,n){var r,i;return typeof t===WN&&(n=t,t=qN),r=t.split(so),i=r.shift(),r.length?yy.call(this,i).middleware(r.join(so),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},iY=function(t,n){return n(t)},rT=function(t,n){return(t[n]||[]).concat(t.__global__||[])},oY=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+uS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=rT(a,t).reduce(iY,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:nY(rT(s,t),t,f,o)}},Object.defineProperties(o,i),this},KN=function(t,n){var r,i;return r=t.split(so),this.providerMap[t]&&r.length===1&&!this.container[t+uS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(yy.call(this,i).provider(r.join(so),n),this):oY.call(this,i,n))},dS=function(t,n){return KN.call(this,t,function(){this.$get=n})},ZN=function(t,n,r){var i=arguments.length>3?fS.call(arguments,3):[],o=this;return dS.call(this,t,function(){var s=n,l=i.map(GN,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},aY=function(t,n){return ZN.apply(this,[t,n,!0].concat(fS.call(arguments,2)))},sY=function(t,n){return ZN.apply(this,[t,n,!1].concat(fS.call(arguments,2)))},QN=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},XN=function(t,n){var r=t[n];return r||(r={},QN.call(t,n,r)),r},lY=function(t,n){var r;return r=t.split(so),t=r.pop(),QN.call(r.reduce(XN,this.container),t,n),this},cY=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},uY=function(t,n){var r=t.split(so);return t=r.pop(),cY.call(r.reduce(XN,this.container),t,n),this},JN=function(t,n){var r,i;return typeof t===WN&&(n=t,t=qN),r=t.split(so),i=r.shift(),r.length?yy.call(this,i).decorator(r.join(so),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},fY=function(t){return this.deferred.push(t),this},dY=function(t){return(t||[]).map(GN,this.container)},hY=function(t,n){return dS.call(this,t,function(i){return{instance:n.bind(n,i)}})},pY=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},hS=function(t){return Object.keys(t||this.container||{}).filter(pY)},Cg={},mY=function(t){var n;return typeof t===YN?(n=Cg[t],n||(Cg[t]=n=new Ii,n.constant("BOTTLE_NAME",t)),n):new Ii},gY=function(t){typeof t===YN?delete Cg[t]:Cg={}},eA=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},iT=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+uS]},vY=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(so);a.length>1&&a.forEach(iT,yy.call(this,a[0])),iT.call(this,o),this.provider(o,n[o])}},this)},yY=function(t){return this.deferred.forEach(function(r){r(t)}),this};Ii=function e(t){if(!(this instanceof e))return e.pop(t);this.id=eY++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:JN.bind(this),$register:eA.bind(this),$list:hS.bind(this)}};Ii.prototype={constant:uY,decorator:JN,defer:fY,digest:dY,factory:dS,instanceFactory:hY,list:hS,middleware:rY,provider:KN,resetProviders:vY,register:eA,resolve:yY,service:aY,serviceFactory:sY,value:lY};Ii.pop=mY;Ii.clear=gY;Ii.list=hS;Ii.config={strict:!1};const tA=Ii;var _Y=function(){return!0};const nA=_Y;function jt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Et(e){return function t(n){return arguments.length===0||jt(n)?t:e.apply(this,arguments)}}function ut(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return jt(n)?t:Et(function(i){return e(n,i)});default:return jt(n)&&jt(r)?t:jt(n)?Et(function(i){return e(i,r)}):jt(r)?Et(function(i){return e(n,i)}):e(n,r)}}}function bY(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?s=t[a]:(s=arguments[i],i+=1),r[a]=s,jt(s)||(o-=1),a+=1}return o<=0?n.apply(this,r):hu(o,_y(e,r,n))}}var wY=ut(function(t,n){return t===1?Et(n):hu(t,_y(t,[],n))});const Eg=wY;function pl(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return jt(n)?t:ut(function(o,a){return e(n,o,a)});case 2:return jt(n)&&jt(r)?t:jt(n)?ut(function(o,a){return e(o,r,a)}):jt(r)?ut(function(o,a){return e(n,o,a)}):Et(function(o){return e(n,r,o)});default:return jt(n)&&jt(r)&&jt(i)?t:jt(n)&&jt(r)?ut(function(o,a){return e(o,a,i)}):jt(n)&&jt(i)?ut(function(o,a){return e(o,r,a)}):jt(r)&&jt(i)?ut(function(o,a){return e(n,o,a)}):jt(n)?Et(function(o){return e(o,r,i)}):jt(r)?Et(function(o){return e(n,o,i)}):jt(i)?Et(function(o){return e(n,r,o)}):e(n,r,i)}}}const lh=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function xY(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function pS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!lh(i)){for(var o=0;ot?n:t});const rA=SY;function Tm(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const iA=OY;var CY=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function EY(e){return new CY(e)}var kY=ut(function(t,n){return hu(t.length,function(){return t.apply(n,arguments)})});const PY=kY;function TY(e,t,n){for(var r=0,i=n.length;r=0;)n=cT[r],Ir(n,t)&&!NY(i,n)&&(i[i.length]=n),r-=1;return i});const lo=AY;var IY=ut(pS(["fantasy-land/map","map"],DY,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Eg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return pu(function(r,i){return r[i]=t(n[i]),r},{},lo(n));default:return Tm(t,n)}}));const ch=IY,y1=Number.isInteger||function(t){return t<<0===t};var FY=ut(function(t,n){var r=t<0?n.length+t:t;return by(n)?n.charAt(r):n[r]});const aA=FY;var $Y=ut(function(t,n){return t.map(function(r){for(var i=n,o=0,a;o1){var o=!qo(r)&&Ir(i,r)?r[i]:y1(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(y1(i)&&lh(r)){var a=[].concat(r);return a[i]=n,a}else return Md(i,n,r)});const Nl=QY;function XY(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var JY=ut(function(t,n){var r=Eg(t,n);return Eg(t,function(){return pu(qY,ch(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const eq=JY;var tq=Et(function(t){return eq(t.length,t)});const nq=tq;function rq(e){return function t(n){for(var r,i,o,a=[],s=0,l=n.length;s=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:hT(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:hT(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=lo(e);if(a.length!==lo(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(o=a.length-1;o>=0;){var c=a[o];if(!(Ir(c,t)&&yS(t[c],e[c],s,l)))return!1;o-=1}return!0}var _q=ut(function(t,n){return yS(t,n,[],[])});const _S=_q;function bq(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n=0}function l_(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Xu=function(t){return(t<10?"0":"")+t},xq=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Xu(t.getUTCMonth()+1)+"-"+Xu(t.getUTCDate())+"T"+Xu(t.getUTCHours())+":"+Xu(t.getUTCMinutes())+":"+Xu(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const Sq=xq;function Oq(e){return function(){return!e.apply(this,arguments)}}function Cq(e,t){for(var n=0,r=t.length,i=[];n":uA(a,s)},r=function(o,a){return Tm(function(s){return l_(s)+": "+n(o[s])},a.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Tm(n,e).join(", ")+"))";case"[object Array]":return"["+Tm(n,e).concat(r(e,uh(function(o){return/^\d+$/.test(o)},lo(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):l_(Sq(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":l_(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var i=e.toString();if(i!=="[object Object]")return i}return"{"+r(e,lo(e)).join(", ")+"}"}}var jq=Et(function(t){return uA(t,[])});const Dq=jq;var Lq=Et(function(t){var n=mS(rA,0,ch(function(r){return r[0].length},t));return hu(n,function(){for(var r=0;ra?1:0})});const hG=dG;var pG=ut(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;i!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),Bf=e=>!!(e!=null&&e.id),yA=e=>!!(e!=null&&e.version),_G=e=>!!(e!=null&&e.serverNotFound),bG=e=>Bf(e)?e.id:"",wG=e=>sG(["id","autoConnect"],e);var xG={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z"]},SG=xG,OG={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},SS=OG,CG={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM200 352h16c22.1 0 40 17.9 40 40v8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-8c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8v-8c0-8.8 7.2-16 16-16s16 7.2 16 16v8c0 22.1-17.9 40-40 40H200c-22.1 0-40-17.9-40-40V392c0-22.1 17.9-40 40-40zm133.1 0H368c8.8 0 16 7.2 16 16s-7.2 16-16 16H333.1c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1H304c-8.8 0-16-7.2-16-16s7.2-16 16-16h42.9c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16v31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66V368c0-8.8 7.2-16 16-16s16 7.2 16 16v31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6V368c0-8.8 7.2-16 16-16z"]},EG={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1v32c0 8.8 7.2 16 16 16h32zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},kG=EG,_A={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},PG={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},bA={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"]},TG={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},MG=TG,jG={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},OS=jG,DG={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8C297 398 352 333.4 352 256V224c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]},LG={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"]},RG={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},mT={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},NG={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},AG=NG,IG={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503V200.4zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},wA=IG,FG={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},$G={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},BG={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},UG=BG,CS={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240V16.6c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16H304zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4V288L412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288H558.4z"]},xA={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},gT={prefix:"fas",iconName:"calendar-xmark",icon:[512,512,["calendar-times"],"f273","M160 0c17.7 0 32 14.3 32 32V64H320V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H32V112c0-26.5 21.5-48 48-48h48V32c0-17.7 14.3-32 32-32zM32 192H480V464c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V192zM337 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},zG={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},SA={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},VG={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V32c0-17.7-14.3-32-32-32H352zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},HG=VG,WG={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},YG={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},ES=YG,qG={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},GG=qG,KG={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},ZG={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},QG=ZG,XG={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},JG=XG,eK={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3V448c0 17.7 14.3 32 32 32s32-14.3 32-32V146.3l32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},tK=eK,nK={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 232V334.1l31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31V232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},OA=nK,rK={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},iK={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},oK={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},aK=oK,sK={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},kS={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},lK={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},w1=lK,cK={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},uK={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},fK=uK,vT={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z"]},dK={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8h-.7c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},hK=dK,pK={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80zM64 96v64h64V96H64zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336zm64 16v64h64V352H64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H304c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48zm80 64H320v64h64V96zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16v96c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16v64c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V304zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},mK={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},gK={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},vK={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V288H64V64H512z"]},Dd={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]};function yT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(n[i]=e[i]);return n}function IW(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function FW(e,t){return e.button===0&&(!t||t==="_self")&&!IW(e)}const $W=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],BW=["aria-current","caseSensitive","className","end","style","to","children"],UW="startTransition",eT=jF[UW];function VN(e){let{basename:t,children:n,future:r,window:i}=e,o=B.useRef();o.current==null&&(o.current=QH({window:i,v5Compat:!0}));let a=o.current,[s,l]=B.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},f=B.useCallback(d=>{c&&eT?eT(()=>l(d)):l(d)},[l,c]);return B.useLayoutEffect(()=>a.listen(f),[a,f]),B.createElement(AW,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}const zW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",VW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=B.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:f}=t,d=zN(t,$W),{basename:p}=B.useContext(dl),g,v=!1;if(typeof c=="string"&&VW.test(c)&&(g=c,zW))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),C=iS(S.pathname,p);S.origin===w.origin&&C!=null?c=C+S.search+S.hash:v=!0}catch{}let y=xW(c,{relative:i}),x=HW(c,{replace:a,state:s,target:l,preventScrollReset:f,relative:i});function b(w){r&&r(w),w.defaultPrevented||x(w)}return B.createElement("a",Sg({},d,{href:g||y,onClick:v||o?r:b,ref:n,target:l}))}),HN=B.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,children:c}=t,f=zN(t,BW),d=lS(l,{relative:f.relative}),p=gn(),g=B.useContext(FN),{navigator:v}=B.useContext(dl),y=v.encodeLocation?v.encodeLocation(d).pathname:d.pathname,x=p.pathname,b=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(x=x.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase());let w=x===y||!a&&x.startsWith(y)&&x.charAt(y.length)==="/",S=b!=null&&(b===y||!a&&b.startsWith(y)&&b.charAt(y.length)==="/"),C=w?r:void 0,k;typeof o=="function"?k=o({isActive:w,isPending:S}):k=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let P=typeof s=="function"?s({isActive:w,isPending:S}):s;return B.createElement(It,Sg({},f,{"aria-current":C,className:k,ref:n,style:P,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var tT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(tT||(tT={}));var nT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(nT||(nT={}));function HW(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a}=t===void 0?{}:t,s=uo(),l=gn(),c=lS(e,{relative:a});return B.useCallback(f=>{if(FW(f,n)){f.preventDefault();let d=r!==void 0?r:wg(l)===wg(c);s(e,{replace:d,state:i,preventScrollReset:o,relative:a})}},[l,s,c,r,i,n,e,o,a])}const WW="shlink-web-client",YW="A React-based progressive web application for shlink",qW="/shlink-web-client/feature/react-tag-autocomplete-7",GW="https://github.com/shlinkio/shlink-web-client",KW="MIT",ZW={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss shlink-web-component/*.scss shlink-web-component/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src shlink-web-component test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},QW={"@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-brands-svg-icons":"^6.4.2","@fortawesome/free-regular-svg-icons":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^7.0.1","@reduxjs/toolkit":"^1.9.5","@shlinkio/shlink-frontend-kit":"^0.2.0",bootstrap:"5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.3.3",classnames:"^2.3.2","compare-versions":"^6.1.0",csvtojson:"^2.0.10","date-fns":"^2.30.0","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.4",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.2.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.16.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.1","react-redux":"^8.1.2","react-router-dom":"^6.14.2","react-swipeable":"^7.0.1","react-tag-autocomplete":"^7.0.0",reactstrap:"^9.2.0","redux-localstorage-simple":"^2.5.1",uuid:"^9.0.0","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},XW={"@shlinkio/eslint-config-js-coding-standard":"~2.2.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@testing-library/jest-dom":"^5.17.0","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.1","@types/leaflet":"^1.9.3","@types/qs":"^6.9.7","@types/ramda":"^0.27.66","@types/react":"^18.2.19","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.15.0","@types/react-dom":"^18.2.7","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^9.0.2","@vitejs/plugin-react":"^4.0.4","@vitest/coverage-v8":"^0.34.1","adm-zip":"^0.5.10",chalk:"^5.3.0",eslint:"^8.46.0",jsdom:"^22.1.0","resize-observer-polyfill":"^1.5.1",sass:"^1.64.2",stylelint:"^15.10.2",typescript:"^5.1.6",vite:"^4.4.9","vite-plugin-pwa":"^0.16.4",vitest:"^0.34.1","vitest-canvas-mock":"^0.3.2"},JW=[">0.2%","not dead","not ie <= 11","not op_mini all"],Og={name:WW,description:YW,private:!1,homepage:qW,repository:GW,license:KW,scripts:ZW,dependencies:QW,devDependencies:XW,browserslist:JW};var Ii,so=".",WN="function",YN="string",qN="__global__",uS="Provider",eY=0,fS=Array.prototype.slice,tY=function(t,n){var r=t[n];if(r===void 0&&Ii.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},yy=function(t){var n;return this.nested[t]||(n=Ii.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},GN=function(t){return t.split(so).reduce(tY,this)},nY=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(f){if(f)throw f;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},rY=function(t,n){var r,i;return typeof t===WN&&(n=t,t=qN),r=t.split(so),i=r.shift(),r.length?yy.call(this,i).middleware(r.join(so),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},iY=function(t,n){return n(t)},rT=function(t,n){return(t[n]||[]).concat(t.__global__||[])},oY=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+uS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=rT(a,t).reduce(iY,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:nY(rT(s,t),t,f,o)}},Object.defineProperties(o,i),this},KN=function(t,n){var r,i;return r=t.split(so),this.providerMap[t]&&r.length===1&&!this.container[t+uS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(yy.call(this,i).provider(r.join(so),n),this):oY.call(this,i,n))},dS=function(t,n){return KN.call(this,t,function(){this.$get=n})},ZN=function(t,n,r){var i=arguments.length>3?fS.call(arguments,3):[],o=this;return dS.call(this,t,function(){var s=n,l=i.map(GN,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},aY=function(t,n){return ZN.apply(this,[t,n,!0].concat(fS.call(arguments,2)))},sY=function(t,n){return ZN.apply(this,[t,n,!1].concat(fS.call(arguments,2)))},QN=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},XN=function(t,n){var r=t[n];return r||(r={},QN.call(t,n,r)),r},lY=function(t,n){var r;return r=t.split(so),t=r.pop(),QN.call(r.reduce(XN,this.container),t,n),this},cY=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},uY=function(t,n){var r=t.split(so);return t=r.pop(),cY.call(r.reduce(XN,this.container),t,n),this},JN=function(t,n){var r,i;return typeof t===WN&&(n=t,t=qN),r=t.split(so),i=r.shift(),r.length?yy.call(this,i).decorator(r.join(so),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},fY=function(t){return this.deferred.push(t),this},dY=function(t){return(t||[]).map(GN,this.container)},hY=function(t,n){return dS.call(this,t,function(i){return{instance:n.bind(n,i)}})},pY=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},hS=function(t){return Object.keys(t||this.container||{}).filter(pY)},Cg={},mY=function(t){var n;return typeof t===YN?(n=Cg[t],n||(Cg[t]=n=new Ii,n.constant("BOTTLE_NAME",t)),n):new Ii},gY=function(t){typeof t===YN?delete Cg[t]:Cg={}},eA=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},iT=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+uS]},vY=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(so);a.length>1&&a.forEach(iT,yy.call(this,a[0])),iT.call(this,o),this.provider(o,n[o])}},this)},yY=function(t){return this.deferred.forEach(function(r){r(t)}),this};Ii=function e(t){if(!(this instanceof e))return e.pop(t);this.id=eY++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:JN.bind(this),$register:eA.bind(this),$list:hS.bind(this)}};Ii.prototype={constant:uY,decorator:JN,defer:fY,digest:dY,factory:dS,instanceFactory:hY,list:hS,middleware:rY,provider:KN,resetProviders:vY,register:eA,resolve:yY,service:aY,serviceFactory:sY,value:lY};Ii.pop=mY;Ii.clear=gY;Ii.list=hS;Ii.config={strict:!1};const tA=Ii;var _Y=function(){return!0};const nA=_Y;function jt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Et(e){return function t(n){return arguments.length===0||jt(n)?t:e.apply(this,arguments)}}function ut(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return jt(n)?t:Et(function(i){return e(n,i)});default:return jt(n)&&jt(r)?t:jt(n)?Et(function(i){return e(i,r)}):jt(r)?Et(function(i){return e(n,i)}):e(n,r)}}}function bY(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?s=t[a]:(s=arguments[i],i+=1),r[a]=s,jt(s)||(o-=1),a+=1}return o<=0?n.apply(this,r):hu(o,_y(e,r,n))}}var wY=ut(function(t,n){return t===1?Et(n):hu(t,_y(t,[],n))});const Eg=wY;function ml(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return jt(n)?t:ut(function(o,a){return e(n,o,a)});case 2:return jt(n)&&jt(r)?t:jt(n)?ut(function(o,a){return e(o,r,a)}):jt(r)?ut(function(o,a){return e(n,o,a)}):Et(function(o){return e(n,r,o)});default:return jt(n)&&jt(r)&&jt(i)?t:jt(n)&&jt(r)?ut(function(o,a){return e(o,a,i)}):jt(n)&&jt(i)?ut(function(o,a){return e(o,r,a)}):jt(r)&&jt(i)?ut(function(o,a){return e(n,o,a)}):jt(n)?Et(function(o){return e(o,r,i)}):jt(r)?Et(function(o){return e(n,o,i)}):jt(i)?Et(function(o){return e(n,r,o)}):e(n,r,i)}}}const lh=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function xY(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function pS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!lh(i)){for(var o=0;ot?n:t});const rA=SY;function Tm(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const iA=OY;var CY=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function EY(e){return new CY(e)}var kY=ut(function(t,n){return hu(t.length,function(){return t.apply(n,arguments)})});const PY=kY;function TY(e,t,n){for(var r=0,i=n.length;r=0;)n=cT[r],Ir(n,t)&&!NY(i,n)&&(i[i.length]=n),r-=1;return i});const lo=AY;var IY=ut(pS(["fantasy-land/map","map"],DY,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Eg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return pu(function(r,i){return r[i]=t(n[i]),r},{},lo(n));default:return Tm(t,n)}}));const ch=IY,y1=Number.isInteger||function(t){return t<<0===t};var FY=ut(function(t,n){var r=t<0?n.length+t:t;return by(n)?n.charAt(r):n[r]});const aA=FY;var $Y=ut(function(t,n){return t.map(function(r){for(var i=n,o=0,a;o1){var o=!qo(r)&&Ir(i,r)?r[i]:y1(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(y1(i)&&lh(r)){var a=[].concat(r);return a[i]=n,a}else return Md(i,n,r)});const Nl=QY;function XY(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var JY=ut(function(t,n){var r=Eg(t,n);return Eg(t,function(){return pu(qY,ch(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const eq=JY;var tq=Et(function(t){return eq(t.length,t)});const nq=tq;function rq(e){return function t(n){for(var r,i,o,a=[],s=0,l=n.length;s=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:hT(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:hT(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=lo(e);if(a.length!==lo(t).length)return!1;var s=n.concat([e]),l=r.concat([t]);for(o=a.length-1;o>=0;){var c=a[o];if(!(Ir(c,t)&&yS(t[c],e[c],s,l)))return!1;o-=1}return!0}var _q=ut(function(t,n){return yS(t,n,[],[])});const _S=_q;function bq(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n=0}function l_(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Xu=function(t){return(t<10?"0":"")+t},xq=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Xu(t.getUTCMonth()+1)+"-"+Xu(t.getUTCDate())+"T"+Xu(t.getUTCHours())+":"+Xu(t.getUTCMinutes())+":"+Xu(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const Sq=xq;function Oq(e){return function(){return!e.apply(this,arguments)}}function Cq(e,t){for(var n=0,r=t.length,i=[];n":uA(a,s)},r=function(o,a){return Tm(function(s){return l_(s)+": "+n(o[s])},a.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Tm(n,e).join(", ")+"))";case"[object Array]":return"["+Tm(n,e).concat(r(e,uh(function(o){return/^\d+$/.test(o)},lo(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):l_(Sq(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":l_(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var i=e.toString();if(i!=="[object Object]")return i}return"{"+r(e,lo(e)).join(", ")+"}"}}var jq=Et(function(t){return uA(t,[])});const Dq=jq;var Lq=Et(function(t){var n=mS(rA,0,ch(function(r){return r[0].length},t));return hu(n,function(){for(var r=0;ra?1:0})});const hG=dG;var pG=ut(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;i!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),Bf=e=>!!(e!=null&&e.id),yA=e=>!!(e!=null&&e.version),_G=e=>!!(e!=null&&e.serverNotFound),bG=e=>Bf(e)?e.id:"",wG=e=>sG(["id","autoConnect"],e);var xG={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32V64H288V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H0V112C0 85.5 21.5 64 48 64H96V32c0-17.7 14.3-32 32-32zM0 192H448V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V192zm64 80v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm128 0v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V272c0-8.8-7.2-16-16-16H336zM64 400v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H80c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H208zm112 16v32c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H336c-8.8 0-16 7.2-16 16z"]},SG=xG,OG={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232H328c13.3 0 24 10.7 24 24s-10.7 24-24 24H184c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},SS=OG,CG={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V304H176c-35.3 0-64 28.7-64 64V512H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128zM200 352h16c22.1 0 40 17.9 40 40v8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-8c0-4.4-3.6-8-8-8H200c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h16c4.4 0 8-3.6 8-8v-8c0-8.8 7.2-16 16-16s16 7.2 16 16v8c0 22.1-17.9 40-40 40H200c-22.1 0-40-17.9-40-40V392c0-22.1 17.9-40 40-40zm133.1 0H368c8.8 0 16 7.2 16 16s-7.2 16-16 16H333.1c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1H304c-8.8 0-16-7.2-16-16s7.2-16 16-16h42.9c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16v31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66V368c0-8.8 7.2-16 16-16s16 7.2 16 16v31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6V368c0-8.8 7.2-16 16-16z"]},EG={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1v32c0 8.8 7.2 16 16 16h32zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},kG=EG,_A={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},PG={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"]},bA={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"]},TG={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},MG=TG,jG={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},OS=jG,DG={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8C297 398 352 333.4 352 256V224c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]},LG={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64H163.3c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64H348.7c2.2 20.4 3.3 41.8 3.3 64zm28.8-64H503.9c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64H380.8c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32H376.7c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0H167.7c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0H18.6C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192H131.2c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64H8.1C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6H344.3c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352H135.3zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6H493.4z"]},RG={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},mT={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64v64c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V352c0-35.3-28.7-64-64-64H64zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},NG={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},AG=NG,IG={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152V422.8c0 9.8-6 18.6-15.1 22.3L416 503V200.4zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6V451.8L32.9 502.7C17.1 509 0 497.4 0 480.4V209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77V504.3L192 449.4V255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},wA=IG,FG={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},$G={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3H344c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},BG={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320z"]},UG=BG,CS={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240V16.6c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16H304zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4V288L412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288H558.4z"]},xA={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},gT={prefix:"fas",iconName:"calendar-xmark",icon:[512,512,["calendar-times"],"f273","M160 0c17.7 0 32 14.3 32 32V64H320V32c0-17.7 14.3-32 32-32s32 14.3 32 32V64h48c26.5 0 48 21.5 48 48v48H32V112c0-26.5 21.5-48 48-48h48V32c0-17.7 14.3-32 32-32zM32 192H480V464c0 26.5-21.5 48-48 48H80c-26.5 0-48-21.5-48-48V192zM337 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},zG={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"]},SA={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},VG={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V32c0-17.7-14.3-32-32-32H352zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"]},HG=VG,WG={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},YG={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},ES=YG,qG={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},GG=qG,KG={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},ZG={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},QG=ZG,XG={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},JG=XG,eK={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3V448c0 17.7 14.3 32 32 32s32-14.3 32-32V146.3l32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},tK=eK,nK={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 232V334.1l31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31V232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},OA=nK,rK={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},iK={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},oK={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},aK=oK,sK={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},kS={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},lK={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},w1=lK,cK={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},uK={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},fK=uK,vT={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z"]},dK={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8h-.7c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},hK=dK,pK={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80zM64 96v64h64V96H64zM0 336c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336zm64 16v64h64V352H64zM304 32h96c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H304c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48zm80 64H320v64h64V96zM256 304c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16v96c0 8.8-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16v64c0 8.8-7.2 16-16 16H272c-8.8 0-16-7.2-16-16V304zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},mK={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},gK={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},vK={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64H240l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H346.7L336 416H512c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64zM512 64V288H64V64H512z"]},Dd={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]};function yT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return At.head.insertBefore(t,r),e}}var zK="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Id(){for(var e=12,t="";e-- >0;)t+=zK[Math.random()*62|0];return t}function gu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function LS(e){return e.classList?gu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function AA(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function VK(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(AA(e[n]),'" ')},"").trim()}function wy(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function RS(e){return e.size!==to.size||e.x!==to.x||e.y!==to.y||e.rotate!==to.rotate||e.flipX||e.flipY}function HK(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function WK(e){var t=e.transform,n=e.width,r=n===void 0?S1:n,i=e.height,o=i===void 0?S1:i,a=e.startCentered,s=a===void 0?!1:a,l="";return s&&TA?l+="translate(".concat(t.x/ia-r/2,"em, ").concat(t.y/ia-o/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/ia,"em), calc(-50% + ").concat(t.y/ia,"em)) "):l+="translate(".concat(t.x/ia,"em, ").concat(t.y/ia,"em) "),l+="scale(".concat(t.size/ia*(t.flipX?-1:1),", ").concat(t.size/ia*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var YK=`:root, :host { +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var bT=function(){},TS={},EA={},kA=null,PA={mark:bT,measure:bT};try{typeof window<"u"&&(TS=window),typeof document<"u"&&(EA=document),typeof MutationObserver<"u"&&(kA=MutationObserver),typeof performance<"u"&&(PA=performance)}catch{}var EK=TS.navigator||{},wT=EK.userAgent,xT=wT===void 0?"":wT,Ya=TS,At=EA,ST=kA,Rp=PA;Ya.document;var Go=!!At.documentElement&&!!At.head&&typeof At.addEventListener=="function"&&typeof At.createElement=="function",TA=~xT.indexOf("MSIE")||~xT.indexOf("Trident/"),Np,Ap,Ip,Fp,$p,Io="___FONT_AWESOME___",S1=16,MA="fa",jA="svg-inline--fa",nl="data-fa-i2svg",O1="data-fa-pseudo-element",kK="data-fa-pseudo-element-pending",MS="data-prefix",jS="data-icon",OT="fontawesome-i2svg",PK="async",TK=["HTML","HEAD","STYLE","SCRIPT"],DA=function(){try{return!0}catch{return!1}}(),Dt="classic",Zt="sharp",DS=[Dt,Zt];function dh(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[Dt]}})}var Ld=dh((Np={},xn(Np,Dt,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit"}),xn(Np,Zt,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light"}),Np)),Rd=dh((Ap={},xn(Ap,Dt,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),xn(Ap,Zt,{solid:"fass",regular:"fasr",light:"fasl"}),Ap)),Nd=dh((Ip={},xn(Ip,Dt,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),xn(Ip,Zt,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light"}),Ip)),MK=dh((Fp={},xn(Fp,Dt,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),xn(Fp,Zt,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl"}),Fp)),jK=/fa(s|r|l|t|d|b|k|ss|sr|sl)?[\-\ ]/,LA="fa-layers-text",DK=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,LK=dh(($p={},xn($p,Dt,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),xn($p,Zt,{900:"fass",400:"fasr",300:"fasl"}),$p)),RA=[1,2,3,4,5,6,7,8,9,10],RK=RA.concat([11,12,13,14,15,16,17,18,19,20]),NK=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Ns={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Ad=new Set;Object.keys(Rd[Dt]).map(Ad.add.bind(Ad));Object.keys(Rd[Zt]).map(Ad.add.bind(Ad));var AK=[].concat(DS,fh(Ad),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Ns.GROUP,Ns.SWAP_OPACITY,Ns.PRIMARY,Ns.SECONDARY]).concat(RA.map(function(e){return"".concat(e,"x")})).concat(RK.map(function(e){return"w-".concat(e)})),Uf=Ya.FontAwesomeConfig||{};function IK(e){var t=At.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function FK(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(At&&typeof At.querySelector=="function"){var $K=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];$K.forEach(function(e){var t=PS(e,2),n=t[0],r=t[1],i=FK(IK(n));i!=null&&(Uf[r]=i)})}var NA={styleDefault:"solid",familyDefault:"classic",cssPrefix:MA,replacementClass:jA,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Uf.familyPrefix&&(Uf.cssPrefix=Uf.familyPrefix);var Bc=Fe(Fe({},NA),Uf);Bc.autoReplaceSvg||(Bc.observeMutations=!1);var ze={};Object.keys(NA).forEach(function(e){Object.defineProperty(ze,e,{enumerable:!0,set:function(n){Bc[e]=n,zf.forEach(function(r){return r(ze)})},get:function(){return Bc[e]}})});Object.defineProperty(ze,"familyPrefix",{enumerable:!0,set:function(t){Bc.cssPrefix=t,zf.forEach(function(n){return n(ze)})},get:function(){return Bc.cssPrefix}});Ya.FontAwesomeConfig=ze;var zf=[];function BK(e){return zf.push(e),function(){zf.splice(zf.indexOf(e),1)}}var ia=S1,to={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function UK(e){if(!(!e||!Go)){var t=At.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=At.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return At.head.insertBefore(t,r),e}}var zK="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Id(){for(var e=12,t="";e-- >0;)t+=zK[Math.random()*62|0];return t}function gu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function LS(e){return e.classList?gu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function AA(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function VK(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(AA(e[n]),'" ')},"").trim()}function wy(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function RS(e){return e.size!==to.size||e.x!==to.x||e.y!==to.y||e.rotate!==to.rotate||e.flipX||e.flipY}function HK(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function WK(e){var t=e.transform,n=e.width,r=n===void 0?S1:n,i=e.height,o=i===void 0?S1:i,a=e.startCentered,s=a===void 0?!1:a,l="";return s&&TA?l+="translate(".concat(t.x/ia-r/2,"em, ").concat(t.y/ia-o/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/ia,"em), calc(-50% + ").concat(t.y/ia,"em)) "):l+="translate(".concat(t.x/ia,"em, ").concat(t.y/ia,"em) "),l+="scale(".concat(t.size/ia*(t.flipX?-1:1),", ").concat(t.size/ia*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var YK=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; @@ -874,54 +874,54 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); -}`;function IA(){var e=MA,t=jA,n=ze.cssPrefix,r=ze.replacementClass,i=YK;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var CT=!1;function c_(){ze.autoAddCss&&!CT&&(UK(IA()),CT=!0)}var qK={mixout:function(){return{dom:{css:IA,insertCss:c_}}},hooks:function(){return{beforeDOMElementCreation:function(){c_()},beforeI2svg:function(){c_()}}}},Fo=Ya||{};Fo[Io]||(Fo[Io]={});Fo[Io].styles||(Fo[Io].styles={});Fo[Io].hooks||(Fo[Io].hooks={});Fo[Io].shims||(Fo[Io].shims=[]);var Mi=Fo[Io],FA=[],GK=function e(){At.removeEventListener("DOMContentLoaded",e),Mg=1,FA.map(function(t){return t()})},Mg=!1;Go&&(Mg=(At.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(At.readyState),Mg||At.addEventListener("DOMContentLoaded",GK));function KK(e){Go&&(Mg?setTimeout(e,0):FA.push(e))}function hh(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?AA(e):"<".concat(t," ").concat(VK(r),">").concat(o.map(hh).join(""),"")}function ET(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var ZK=function(t,n){return function(r,i,o,a){return t.call(n,r,i,o,a)}},u_=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=i!==void 0?ZK(n,i):n,l,c,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function kT(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function E1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=kT(t);typeof Mi.hooks.addPack=="function"&&!i?Mi.hooks.addPack(e,kT(t)):Mi.styles[e]=Fe(Fe({},Mi.styles[e]||{}),o),e==="fas"&&E1("fa",t)}var Bp,Up,zp,cc=Mi.styles,JK=Mi.shims,eZ=(Bp={},xn(Bp,Dt,Object.values(Nd[Dt])),xn(Bp,Zt,Object.values(Nd[Zt])),Bp),NS=null,$A={},BA={},UA={},zA={},VA={},tZ=(Up={},xn(Up,Dt,Object.keys(Ld[Dt])),xn(Up,Zt,Object.keys(Ld[Zt])),Up);function nZ(e){return~AK.indexOf(e)}function rZ(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!nZ(i)?i:null}var HA=function(){var t=function(o){return u_(cc,function(a,s,l){return a[l]=u_(s,o,{}),a},{})};$A=t(function(i,o,a){if(o[3]&&(i[o[3]]=a),o[2]){var s=o[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){i[l.toString(16)]=a})}return i}),BA=t(function(i,o,a){if(i[a]=a,o[2]){var s=o[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){i[l]=a})}return i}),VA=t(function(i,o,a){var s=o[2];return i[a]=a,s.forEach(function(l){i[l]=a}),i});var n="far"in cc||ze.autoFetchSvg,r=u_(JK,function(i,o){var a=o[0],s=o[1],l=o[2];return s==="far"&&!n&&(s="fas"),typeof a=="string"&&(i.names[a]={prefix:s,iconName:l}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:s,iconName:l}),i},{names:{},unicodes:{}});UA=r.names,zA=r.unicodes,NS=xy(ze.styleDefault,{family:ze.familyDefault})};BK(function(e){NS=xy(e.styleDefault,{family:ze.familyDefault})});HA();function AS(e,t){return($A[e]||{})[t]}function iZ(e,t){return(BA[e]||{})[t]}function Ns(e,t){return(VA[e]||{})[t]}function WA(e){return UA[e]||{prefix:null,iconName:null}}function oZ(e){var t=zA[e],n=AS("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function qa(){return NS}var IS=function(){return{prefix:null,iconName:null,rest:[]}};function xy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Dt:n,i=Ld[r][e],o=Rd[r][e]||Rd[r][i],a=e in Mi.styles?e:null;return o||a||null}var PT=(zp={},xn(zp,Dt,Object.keys(Nd[Dt])),xn(zp,Zt,Object.keys(Nd[Zt])),zp);function Sy(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},xn(t,Dt,"".concat(ze.cssPrefix,"-").concat(Dt)),xn(t,Zt,"".concat(ze.cssPrefix,"-").concat(Zt)),t),a=null,s=Dt;(e.includes(o[Dt])||e.some(function(c){return PT[Dt].includes(c)}))&&(s=Dt),(e.includes(o[Zt])||e.some(function(c){return PT[Zt].includes(c)}))&&(s=Zt);var l=e.reduce(function(c,f){var d=rZ(ze.cssPrefix,f);if(cc[f]?(f=eZ[s].includes(f)?MK[s][f]:f,a=f,c.prefix=f):tZ[s].indexOf(f)>-1?(a=f,c.prefix=xy(f,{family:s})):d?c.iconName=d:f!==ze.replacementClass&&f!==o[Dt]&&f!==o[Zt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=a==="fa"?WA(c.iconName):{},m=Ns(c.prefix,c.iconName);p.prefix&&(a=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!cc.far&&cc.fas&&!ze.autoFetchSvg&&(c.prefix="fas")}return c},IS());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===Zt&&(cc.fass||ze.autoFetchSvg)&&(l.prefix="fass",l.iconName=Ns(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||a==="fa")&&(l.prefix=qa()||"fas"),l}var aZ=function(){function e(){yK(this,e),this.definitions={}}return _K(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(d){typeof d=="string"&&(n[s][d]=c)}),n[s][l]=c}),n}}]),e}(),TT=[],uc={},Oc={},sZ=Object.keys(Oc);function lZ(e,t){var n=t.mixoutsTo;return TT=e,uc={},Object.keys(Oc).forEach(function(r){sZ.indexOf(r)===-1&&delete Oc[r]}),TT.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(n[a]=i[a]),Tg(i[a])==="object"&&Object.keys(i[a]).forEach(function(s){n[a]||(n[a]={}),n[a][s]=i[a][s]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(a){uc[a]||(uc[a]=[]),uc[a].push(o[a])})}r.provides&&r.provides(Oc)}),n}function k1(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return Go?(nl("beforeI2svg",t),$o("pseudoElements2svg",t),$o("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;ze.autoReplaceSvg===!1&&(ze.autoReplaceSvg=!0),ze.observeMutations=!0,KK(function(){dZ({autoReplaceSvgRoot:n}),nl("watch",t)})}},fZ={icon:function(t){if(t===null)return null;if(Tg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Ns(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=xy(t[0]);return{prefix:r,iconName:Ns(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(ze.cssPrefix,"-"))>-1||t.match(jK))){var i=Sy(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||qa(),iconName:Ns(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=qa();return{prefix:o,iconName:Ns(o,t)||t}}}},Xr={noAuto:cZ,config:ze,dom:uZ,parse:fZ,library:YA,findIconDefinition:P1,toHtml:hh},dZ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?At:n;(Object.keys(Mi.styles).length>0||ze.autoFetchSvg)&&Go&&ze.autoReplaceSvg&&Xr.dom.i2svg({node:r})};function Oy(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return hh(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Go){var r=At.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function hZ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(RS(a)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=wy(Fe(Fe({},o),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function pZ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,a=o===!0?"".concat(t,"-").concat(ze.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Fe(Fe({},i),{},{id:a}),children:r}]}]}function FS(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,a=e.transform,s=e.symbol,l=e.title,c=e.maskId,f=e.titleId,d=e.extra,p=e.watchable,m=p===void 0?!1:p,v=r.found?r:n,y=v.width,x=v.height,b=i==="fak",w=[ze.replacementClass,o?"".concat(ze.cssPrefix,"-").concat(o):""].filter(function(H){return d.classes.indexOf(H)===-1}).filter(function(H){return H!==""||!!H}).concat(d.classes).join(" "),S={children:[],attributes:Fe(Fe({},d.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},C=b&&!~d.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};m&&(S.attributes[tl]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(f||Id())},children:[l]}),delete S.attributes.title);var k=Fe(Fe({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:a,symbol:s,styles:Fe(Fe({},C),d.styles)}),P=r.found&&n.found?$o("generateAbstractMask",k)||{children:[],attributes:{}}:$o("generateAbstractIcon",k)||{children:[],attributes:{}},j=P.children,N=P.attributes;return k.children=j,k.attributes=N,s?pZ(k):hZ(k)}function MT(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,a=e.extra,s=e.watchable,l=s===void 0?!1:s,c=Fe(Fe(Fe({},a.attributes),o?{title:o}:{}),{},{class:a.classes.join(" ")});l&&(c[tl]="");var f=Fe({},a.styles);RS(i)&&(f.transform=WK({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var d=wy(f);d.length>0&&(c.style=d);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function mZ(e){var t=e.content,n=e.title,r=e.extra,i=Fe(Fe(Fe({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=wy(r.styles);o.length>0&&(i.style=o);var a=[];return a.push({tag:"span",attributes:i,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}var f_=Mi.styles;function T1(e){var t=e[0],n=e[1],r=e.slice(4),i=PS(r,1),o=i[0],a=null;return Array.isArray(o)?a={tag:"g",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Rs.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Rs.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Rs.PRIMARY),fill:"currentColor",d:o[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:a}}var gZ={found:!1,width:512,height:512};function vZ(e,t){!DA&&!ze.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function M1(e,t){var n=t;return t==="fa"&&ze.styleDefault!==null&&(t=qa()),new Promise(function(r,i){if($o("missingIconAbstract"),n==="fa"){var o=WA(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&f_[t]&&f_[t][e]){var a=f_[t][e];return r(T1(a))}vZ(e,t),r(Fe(Fe({},gZ),{},{icon:ze.showMissingIcons&&e?$o("missingIconAbstract")||{}:{}}))})}var jT=function(){},j1=ze.measurePerformance&&Rp&&Rp.mark&&Rp.measure?Rp:{mark:jT,measure:jT},yf='FA "6.4.2"',yZ=function(t){return j1.mark("".concat(yf," ").concat(t," begins")),function(){return qA(t)}},qA=function(t){j1.mark("".concat(yf," ").concat(t," ends")),j1.measure("".concat(yf," ").concat(t),"".concat(yf," ").concat(t," begins"),"".concat(yf," ").concat(t," ends"))},$S={begin:yZ,end:qA},Mm=function(){};function DT(e){var t=e.getAttribute?e.getAttribute(tl):null;return typeof t=="string"}function _Z(e){var t=e.getAttribute?e.getAttribute(MS):null,n=e.getAttribute?e.getAttribute(jS):null;return t&&n}function bZ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(ze.replacementClass)}function wZ(){if(ze.autoReplaceSvg===!0)return jm.replace;var e=jm[ze.autoReplaceSvg];return e||jm.replace}function xZ(e){return At.createElementNS("http://www.w3.org/2000/svg",e)}function SZ(e){return At.createElement(e)}function GA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?xZ:SZ:n;if(typeof e=="string")return At.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(a){i.setAttribute(a,e.attributes[a])});var o=e.children||[];return o.forEach(function(a){i.appendChild(GA(a,{ceFn:r}))}),i}function OZ(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var jm={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(GA(i),n)}),n.getAttribute(tl)===null&&ze.keepOriginalSource){var r=At.createComment(OZ(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~LS(n).indexOf(ze.replacementClass))return jm.replace(t);var i=new RegExp("".concat(ze.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(s,l){return l===ze.replacementClass||l.match(i)?s.toSvg.push(l):s.toNode.push(l),s},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var a=r.map(function(s){return hh(s)}).join(` -`);n.setAttribute(tl,""),n.innerHTML=a}};function LT(e){e()}function KA(e,t){var n=typeof t=="function"?t:Mm;if(e.length===0)n();else{var r=LT;ze.mutateApproach===PK&&(r=Ya.requestAnimationFrame||LT),r(function(){var i=wZ(),o=$S.begin("mutate");e.map(i),o(),n()})}}var BS=!1;function ZA(){BS=!0}function D1(){BS=!1}var jg=null;function RT(e){if(ST&&ze.observeMutations){var t=e.treeCallback,n=t===void 0?Mm:t,r=e.nodeCallback,i=r===void 0?Mm:r,o=e.pseudoElementsCallback,a=o===void 0?Mm:o,s=e.observeMutationsRoot,l=s===void 0?At:s;jg=new ST(function(c){if(!BS){var f=qa();gu(c).forEach(function(d){if(d.type==="childList"&&d.addedNodes.length>0&&!DT(d.addedNodes[0])&&(ze.searchPseudoElements&&a(d.target),n(d.target)),d.type==="attributes"&&d.target.parentNode&&ze.searchPseudoElements&&a(d.target.parentNode),d.type==="attributes"&&DT(d.target)&&~NK.indexOf(d.attributeName))if(d.attributeName==="class"&&_Z(d.target)){var p=Sy(LS(d.target)),m=p.prefix,v=p.iconName;d.target.setAttribute(MS,m||f),v&&d.target.setAttribute(jS,v)}else bZ(d.target)&&i(d.target)})}}),Go&&jg.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function CZ(){jg&&jg.disconnect()}function EZ(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),a=o[0],s=o.slice(1);return a&&s.length>0&&(r[a]=s.join(":").trim()),r},{})),n}function kZ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=Sy(LS(e));return i.prefix||(i.prefix=qa()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=iZ(i.prefix,e.innerText)||AS(i.prefix,C1(e.innerText))),!i.iconName&&ze.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function PZ(e){var t=gu(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return ze.autoA11y&&(n?t["aria-labelledby"]="".concat(ze.replacementClass,"-title-").concat(r||Id()):(t["aria-hidden"]="true",t.focusable="false")),t}function TZ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:to,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function NT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=kZ(e),r=n.iconName,i=n.prefix,o=n.rest,a=PZ(e),s=k1("parseNodeAttributes",{},e),l=t.styleParser?EZ(e):[];return Fe({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:to,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:a}},s)}var MZ=Mi.styles;function QA(e){var t=ze.autoReplaceSvg==="nest"?NT(e,{styleParser:!1}):NT(e);return~t.extra.classes.indexOf(LA)?$o("generateLayersText",e,t):$o("generateSvgReplacementMutation",e,t)}var Ga=new Set;DS.map(function(e){Ga.add("fa-".concat(e))});Object.keys(Ld[Dt]).map(Ga.add.bind(Ga));Object.keys(Ld[Zt]).map(Ga.add.bind(Ga));Ga=fh(Ga);function AT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Go)return Promise.resolve();var n=At.documentElement.classList,r=function(d){return n.add("".concat(OT,"-").concat(d))},i=function(d){return n.remove("".concat(OT,"-").concat(d))},o=ze.autoFetchSvg?Ga:DS.map(function(f){return"fa-".concat(f)}).concat(Object.keys(MZ));o.includes("fa")||o.push("fa");var a=[".".concat(LA,":not([").concat(tl,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(tl,"])")})).join(", ");if(a.length===0)return Promise.resolve();var s=[];try{s=gu(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=$S.begin("onTree"),c=s.reduce(function(f,d){try{var p=QA(d);p&&f.push(p)}catch(m){DA||m.name==="MissingIcon"&&console.error(m)}return f},[]);return new Promise(function(f,d){Promise.all(c).then(function(p){KA(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),d(p)})})}function jZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;QA(e).then(function(n){n&&KA([n],t)})}function DZ(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:P1(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:P1(i||{})),e(r,Fe(Fe({},n),{},{mask:i}))}}var LZ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?to:r,o=n.symbol,a=o===void 0?!1:o,s=n.mask,l=s===void 0?null:s,c=n.maskId,f=c===void 0?null:c,d=n.title,p=d===void 0?null:d,m=n.titleId,v=m===void 0?null:m,y=n.classes,x=y===void 0?[]:y,b=n.attributes,w=b===void 0?{}:b,S=n.styles,C=S===void 0?{}:S;if(t){var k=t.prefix,P=t.iconName,j=t.icon;return Oy(Fe({type:"icon"},t),function(){return nl("beforeDOMElementCreation",{iconDefinition:t,params:n}),ze.autoA11y&&(p?w["aria-labelledby"]="".concat(ze.replacementClass,"-title-").concat(v||Id()):(w["aria-hidden"]="true",w.focusable="false")),FS({icons:{main:T1(j),mask:l?T1(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:k,iconName:P,transform:Fe(Fe({},to),i),symbol:a,title:p,maskId:f,titleId:v,extra:{attributes:w,styles:C,classes:x}})})}},RZ={mixout:function(){return{icon:DZ(LZ)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=AT,n.nodeCallback=jZ,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?At:r,o=n.callback,a=o===void 0?function(){}:o;return AT(i,a)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,a=r.titleId,s=r.prefix,l=r.transform,c=r.symbol,f=r.mask,d=r.maskId,p=r.extra;return new Promise(function(m,v){Promise.all([M1(i,s),f.iconName?M1(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=PS(y,2),b=x[0],w=x[1];m([n,FS({icons:{main:b,mask:w},prefix:s,iconName:i,transform:l,symbol:c,maskId:d,title:o,titleId:a,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.transform,s=n.styles,l=wy(s);l.length>0&&(i.style=l);var c;return RS(a)&&(c=$o("generateAbstractTransformGrouping",{main:o,transform:a,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},NZ={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return Oy({type:"layer"},function(){nl("beforeDOMElementCreation",{assembler:n,params:r});var a=[];return n(function(s){Array.isArray(s)?s.map(function(l){a=a.concat(l.abstract)}):a=a.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(ze.cssPrefix,"-layers")].concat(fh(o)).join(" ")},children:a}]})}}}},AZ={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,a=r.classes,s=a===void 0?[]:a,l=r.attributes,c=l===void 0?{}:l,f=r.styles,d=f===void 0?{}:f;return Oy({type:"counter",content:n},function(){return nl("beforeDOMElementCreation",{content:n,params:r}),mZ({content:n.toString(),title:o,extra:{attributes:c,styles:d,classes:["".concat(ze.cssPrefix,"-layers-counter")].concat(fh(s))}})})}}}},IZ={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?to:i,a=r.title,s=a===void 0?null:a,l=r.classes,c=l===void 0?[]:l,f=r.attributes,d=f===void 0?{}:f,p=r.styles,m=p===void 0?{}:p;return Oy({type:"text",content:n},function(){return nl("beforeDOMElementCreation",{content:n,params:r}),MT({content:n,transform:Fe(Fe({},to),o),title:s,extra:{attributes:d,styles:m,classes:["".concat(ze.cssPrefix,"-layers-text")].concat(fh(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,a=r.extra,s=null,l=null;if(TA){var c=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();s=f.width/c,l=f.height/c}return ze.autoA11y&&!i&&(a.attributes["aria-hidden"]="true"),Promise.resolve([n,MT({content:n.innerHTML,width:s,height:l,transform:o,title:i,extra:a,watchable:!0})])}}},FZ=new RegExp('"',"ug"),IT=[1105920,1112319];function $Z(e){var t=e.replace(FZ,""),n=XK(t,0),r=n>=IT[0]&&n<=IT[1],i=t.length===2?t[0]===t[1]:!1;return{value:C1(i?t[0]:t),isSecondary:r||i}}function FT(e,t){var n="".concat(kK).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=gu(e.children),a=o.filter(function(j){return j.getAttribute(O1)===t})[0],s=Ya.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(DK),c=s.getPropertyValue("font-weight"),f=s.getPropertyValue("content");if(a&&!l)return e.removeChild(a),r();if(l&&f!=="none"&&f!==""){var d=s.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Zt:Dt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?Rd[p][l[2].toLowerCase()]:LK[p][c],v=$Z(d),y=v.value,x=v.isSecondary,b=l[0].startsWith("FontAwesome"),w=AS(m,y),S=w;if(b){var C=oZ(y);C.iconName&&C.prefix&&(w=C.iconName,m=C.prefix)}if(w&&!x&&(!a||a.getAttribute(MS)!==m||a.getAttribute(jS)!==S)){e.setAttribute(n,S),a&&e.removeChild(a);var k=TZ(),P=k.extra;P.attributes[O1]=t,M1(w,m).then(function(j){var N=FS(Fe(Fe({},k),{},{icons:{main:j,mask:IS()},prefix:m,iconName:S,extra:P,watchable:!0})),H=At.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(H,e.firstChild):e.appendChild(H),H.outerHTML=N.map(function(R){return hh(R)}).join(` -`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function BZ(e){return Promise.all([FT(e,"::before"),FT(e,"::after")])}function UZ(e){return e.parentNode!==document.head&&!~TK.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(O1)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function $T(e){if(Go)return new Promise(function(t,n){var r=gu(e.querySelectorAll("*")).filter(UZ).map(BZ),i=$S.begin("searchPseudoElements");ZA(),Promise.all(r).then(function(){i(),D1(),t()}).catch(function(){i(),D1(),n()})})}var zZ={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=$T,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?At:r;ze.searchPseudoElements&&$T(i)}}},BT=!1,VZ={mixout:function(){return{dom:{unwatch:function(){ZA(),BT=!0}}}},hooks:function(){return{bootstrap:function(){RT(k1("mutationObserverCallbacks",{}))},noAuto:function(){CZ()},watch:function(n){var r=n.observeMutationsRoot;BT?D1():RT(k1("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},UT=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),a=o[0],s=o.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},HZ={mixout:function(){return{parse:{transform:function(n){return UT(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=UT(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,a=n.iconWidth,s={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),f="rotate(".concat(i.rotate," 0 0)"),d={transform:"".concat(l," ").concat(c," ").concat(f)},p={transform:"translate(".concat(a/2*-1," -256)")},m={outer:s,inner:d,path:p};return{tag:"g",attributes:Fe({},m.outer),children:[{tag:"g",attributes:Fe({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Fe(Fe({},r.icon.attributes),m.path)}]}]}}}},d_={x:0,y:0,width:"100%",height:"100%"};function zT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function WZ(e){return e.tag==="g"?e.children:[e]}var YZ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?Sy(i.split(" ").map(function(a){return a.trim()})):IS();return o.prefix||(o.prefix=qa()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.mask,s=n.maskId,l=n.transform,c=o.width,f=o.icon,d=a.width,p=a.icon,m=HK({transform:l,containerWidth:d,iconWidth:c}),v={tag:"rect",attributes:Fe(Fe({},d_),{},{fill:"white"})},y=f.children?{children:f.children.map(zT)}:{},x={tag:"g",attributes:Fe({},m.inner),children:[zT(Fe({tag:f.tag,attributes:Fe(Fe({},f.attributes),m.path)},y))]},b={tag:"g",attributes:Fe({},m.outer),children:[x]},w="mask-".concat(s||Id()),S="clip-".concat(s||Id()),C={tag:"mask",attributes:Fe(Fe({},d_),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,b]},k={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:WZ(p)},C]};return r.push(k,{tag:"rect",attributes:Fe({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},d_)}),{children:r,attributes:i}}}},qZ={provides:function(t){var n=!1;Ya.matchMedia&&(n=Ya.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Fe(Fe({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=Fe(Fe({},o),{},{attributeName:"opacity"}),s={tag:"circle",attributes:Fe(Fe({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:Fe(Fe({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Fe(Fe({},a),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:Fe(Fe({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Fe(Fe({},a),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Fe(Fe({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Fe(Fe({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},GZ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},KZ=[qK,RZ,NZ,AZ,IZ,zZ,VZ,HZ,YZ,qZ,GZ];lZ(KZ,{mixoutsTo:Xr});Xr.noAuto;Xr.config;Xr.library;Xr.dom;var L1=Xr.parse;Xr.findIconDefinition;Xr.toHtml;var ZZ=Xr.icon;Xr.layer;Xr.text;Xr.counter;var XA={exports:{}},QZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",XZ=QZ,JZ=XZ;function JA(){}function e4(){}e4.resetWarningCache=JA;var eQ=function(){function e(r,i,o,a,s,l){if(l!==JZ){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:e4,resetWarningCache:JA};return n.PropTypes=n,n};XA.exports=eQ();var tQ=XA.exports;const D=Fi(tQ);function VT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ca(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function rQ(e,t){if(e==null)return{};var n=nQ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function R1(e){return iQ(e)||oQ(e)||aQ(e)||sQ()}function iQ(e){if(Array.isArray(e))return N1(e)}function oQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aQ(e,t){if(e){if(typeof e=="string")return N1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N1(e,t)}}function N1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return n4(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=dQ(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[t4(c)]=f}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=rQ(n,uQ);return i.attrs.style=Ca(Ca({},i.attrs.style),a),e.apply(void 0,[t.tag,Ca(Ca({},i.attrs),s)].concat(R1(r)))}var r4=!1;try{r4=!0}catch{}function hQ(){if(!r4&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function HT(e){if(e&&Dg(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(L1.icon)return L1.icon(e);if(e===null)return null;if(e&&Dg(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function h_(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?fc({},e,t):{}}var Ie=Y.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,a=e.title,s=e.titleId,l=e.maskId,c=HT(n),f=h_("classes",[].concat(R1(lQ(e)),R1(o.split(" ")))),d=h_("transform",typeof e.transform=="string"?L1.transform(e.transform):e.transform),p=h_("mask",HT(r)),m=ZZ(c,Ca(Ca(Ca(Ca({},f),d),p),{},{symbol:i,title:a,titleId:s,maskId:l}));if(!m)return hQ("Could not find icon",c),null;var v=m.abstract,y={ref:t};return Object.keys(e).forEach(function(x){Ie.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),pQ(v[0],y)});Ie.displayName="FontAwesomeIcon";Ie.propTypes={beat:D.bool,border:D.bool,beatFade:D.bool,bounce:D.bool,className:D.string,fade:D.bool,flash:D.bool,mask:D.oneOfType([D.object,D.array,D.string]),maskId:D.string,fixedWidth:D.bool,inverse:D.bool,flip:D.oneOf([!0,!1,"horizontal","vertical","both"]),icon:D.oneOfType([D.object,D.array,D.string]),listItem:D.bool,pull:D.oneOf(["right","left"]),pulse:D.bool,rotation:D.oneOf([0,90,180,270]),shake:D.bool,size:D.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:D.bool,spinPulse:D.bool,spinReverse:D.bool,symbol:D.oneOfType([D.bool,D.string]),title:D.string,titleId:D.string,transform:D.oneOfType([D.string,D.object]),swapOpacity:D.bool};Ie.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var pQ=n4.bind(null,Y.createElement),i4={exports:{}};/*! +}`;function IA(){var e=MA,t=jA,n=ze.cssPrefix,r=ze.replacementClass,i=YK;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var CT=!1;function c_(){ze.autoAddCss&&!CT&&(UK(IA()),CT=!0)}var qK={mixout:function(){return{dom:{css:IA,insertCss:c_}}},hooks:function(){return{beforeDOMElementCreation:function(){c_()},beforeI2svg:function(){c_()}}}},Fo=Ya||{};Fo[Io]||(Fo[Io]={});Fo[Io].styles||(Fo[Io].styles={});Fo[Io].hooks||(Fo[Io].hooks={});Fo[Io].shims||(Fo[Io].shims=[]);var Mi=Fo[Io],FA=[],GK=function e(){At.removeEventListener("DOMContentLoaded",e),Mg=1,FA.map(function(t){return t()})},Mg=!1;Go&&(Mg=(At.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(At.readyState),Mg||At.addEventListener("DOMContentLoaded",GK));function KK(e){Go&&(Mg?setTimeout(e,0):FA.push(e))}function hh(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?AA(e):"<".concat(t," ").concat(VK(r),">").concat(o.map(hh).join(""),"")}function ET(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var ZK=function(t,n){return function(r,i,o,a){return t.call(n,r,i,o,a)}},u_=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=i!==void 0?ZK(n,i):n,l,c,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function kT(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function E1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=kT(t);typeof Mi.hooks.addPack=="function"&&!i?Mi.hooks.addPack(e,kT(t)):Mi.styles[e]=Fe(Fe({},Mi.styles[e]||{}),o),e==="fas"&&E1("fa",t)}var Bp,Up,zp,cc=Mi.styles,JK=Mi.shims,eZ=(Bp={},xn(Bp,Dt,Object.values(Nd[Dt])),xn(Bp,Zt,Object.values(Nd[Zt])),Bp),NS=null,$A={},BA={},UA={},zA={},VA={},tZ=(Up={},xn(Up,Dt,Object.keys(Ld[Dt])),xn(Up,Zt,Object.keys(Ld[Zt])),Up);function nZ(e){return~AK.indexOf(e)}function rZ(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!nZ(i)?i:null}var HA=function(){var t=function(o){return u_(cc,function(a,s,l){return a[l]=u_(s,o,{}),a},{})};$A=t(function(i,o,a){if(o[3]&&(i[o[3]]=a),o[2]){var s=o[2].filter(function(l){return typeof l=="number"});s.forEach(function(l){i[l.toString(16)]=a})}return i}),BA=t(function(i,o,a){if(i[a]=a,o[2]){var s=o[2].filter(function(l){return typeof l=="string"});s.forEach(function(l){i[l]=a})}return i}),VA=t(function(i,o,a){var s=o[2];return i[a]=a,s.forEach(function(l){i[l]=a}),i});var n="far"in cc||ze.autoFetchSvg,r=u_(JK,function(i,o){var a=o[0],s=o[1],l=o[2];return s==="far"&&!n&&(s="fas"),typeof a=="string"&&(i.names[a]={prefix:s,iconName:l}),typeof a=="number"&&(i.unicodes[a.toString(16)]={prefix:s,iconName:l}),i},{names:{},unicodes:{}});UA=r.names,zA=r.unicodes,NS=xy(ze.styleDefault,{family:ze.familyDefault})};BK(function(e){NS=xy(e.styleDefault,{family:ze.familyDefault})});HA();function AS(e,t){return($A[e]||{})[t]}function iZ(e,t){return(BA[e]||{})[t]}function As(e,t){return(VA[e]||{})[t]}function WA(e){return UA[e]||{prefix:null,iconName:null}}function oZ(e){var t=zA[e],n=AS("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function qa(){return NS}var IS=function(){return{prefix:null,iconName:null,rest:[]}};function xy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Dt:n,i=Ld[r][e],o=Rd[r][e]||Rd[r][i],a=e in Mi.styles?e:null;return o||a||null}var PT=(zp={},xn(zp,Dt,Object.keys(Nd[Dt])),xn(zp,Zt,Object.keys(Nd[Zt])),zp);function Sy(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},xn(t,Dt,"".concat(ze.cssPrefix,"-").concat(Dt)),xn(t,Zt,"".concat(ze.cssPrefix,"-").concat(Zt)),t),a=null,s=Dt;(e.includes(o[Dt])||e.some(function(c){return PT[Dt].includes(c)}))&&(s=Dt),(e.includes(o[Zt])||e.some(function(c){return PT[Zt].includes(c)}))&&(s=Zt);var l=e.reduce(function(c,f){var d=rZ(ze.cssPrefix,f);if(cc[f]?(f=eZ[s].includes(f)?MK[s][f]:f,a=f,c.prefix=f):tZ[s].indexOf(f)>-1?(a=f,c.prefix=xy(f,{family:s})):d?c.iconName=d:f!==ze.replacementClass&&f!==o[Dt]&&f!==o[Zt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=a==="fa"?WA(c.iconName):{},g=As(c.prefix,c.iconName);p.prefix&&(a=null),c.iconName=p.iconName||g||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!cc.far&&cc.fas&&!ze.autoFetchSvg&&(c.prefix="fas")}return c},IS());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&s===Zt&&(cc.fass||ze.autoFetchSvg)&&(l.prefix="fass",l.iconName=As(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||a==="fa")&&(l.prefix=qa()||"fas"),l}var aZ=function(){function e(){yK(this,e),this.definitions={}}return _K(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(d){typeof d=="string"&&(n[s][d]=c)}),n[s][l]=c}),n}}]),e}(),TT=[],uc={},Oc={},sZ=Object.keys(Oc);function lZ(e,t){var n=t.mixoutsTo;return TT=e,uc={},Object.keys(Oc).forEach(function(r){sZ.indexOf(r)===-1&&delete Oc[r]}),TT.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(n[a]=i[a]),Tg(i[a])==="object"&&Object.keys(i[a]).forEach(function(s){n[a]||(n[a]={}),n[a][s]=i[a][s]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(a){uc[a]||(uc[a]=[]),uc[a].push(o[a])})}r.provides&&r.provides(Oc)}),n}function k1(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return Go?(rl("beforeI2svg",t),$o("pseudoElements2svg",t),$o("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;ze.autoReplaceSvg===!1&&(ze.autoReplaceSvg=!0),ze.observeMutations=!0,KK(function(){dZ({autoReplaceSvgRoot:n}),rl("watch",t)})}},fZ={icon:function(t){if(t===null)return null;if(Tg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:As(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=xy(t[0]);return{prefix:r,iconName:As(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(ze.cssPrefix,"-"))>-1||t.match(jK))){var i=Sy(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||qa(),iconName:As(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=qa();return{prefix:o,iconName:As(o,t)||t}}}},Xr={noAuto:cZ,config:ze,dom:uZ,parse:fZ,library:YA,findIconDefinition:P1,toHtml:hh},dZ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?At:n;(Object.keys(Mi.styles).length>0||ze.autoFetchSvg)&&Go&&ze.autoReplaceSvg&&Xr.dom.i2svg({node:r})};function Oy(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return hh(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Go){var r=At.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function hZ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(RS(a)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=wy(Fe(Fe({},o),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function pZ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,a=o===!0?"".concat(t,"-").concat(ze.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Fe(Fe({},i),{},{id:a}),children:r}]}]}function FS(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,a=e.transform,s=e.symbol,l=e.title,c=e.maskId,f=e.titleId,d=e.extra,p=e.watchable,g=p===void 0?!1:p,v=r.found?r:n,y=v.width,x=v.height,b=i==="fak",w=[ze.replacementClass,o?"".concat(ze.cssPrefix,"-").concat(o):""].filter(function(H){return d.classes.indexOf(H)===-1}).filter(function(H){return H!==""||!!H}).concat(d.classes).join(" "),S={children:[],attributes:Fe(Fe({},d.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},C=b&&!~d.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};g&&(S.attributes[nl]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(f||Id())},children:[l]}),delete S.attributes.title);var k=Fe(Fe({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:a,symbol:s,styles:Fe(Fe({},C),d.styles)}),P=r.found&&n.found?$o("generateAbstractMask",k)||{children:[],attributes:{}}:$o("generateAbstractIcon",k)||{children:[],attributes:{}},j=P.children,N=P.attributes;return k.children=j,k.attributes=N,s?pZ(k):hZ(k)}function MT(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,a=e.extra,s=e.watchable,l=s===void 0?!1:s,c=Fe(Fe(Fe({},a.attributes),o?{title:o}:{}),{},{class:a.classes.join(" ")});l&&(c[nl]="");var f=Fe({},a.styles);RS(i)&&(f.transform=WK({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var d=wy(f);d.length>0&&(c.style=d);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function mZ(e){var t=e.content,n=e.title,r=e.extra,i=Fe(Fe(Fe({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=wy(r.styles);o.length>0&&(i.style=o);var a=[];return a.push({tag:"span",attributes:i,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}var f_=Mi.styles;function T1(e){var t=e[0],n=e[1],r=e.slice(4),i=PS(r,1),o=i[0],a=null;return Array.isArray(o)?a={tag:"g",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ns.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ns.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ns.PRIMARY),fill:"currentColor",d:o[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:a}}var gZ={found:!1,width:512,height:512};function vZ(e,t){!DA&&!ze.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function M1(e,t){var n=t;return t==="fa"&&ze.styleDefault!==null&&(t=qa()),new Promise(function(r,i){if($o("missingIconAbstract"),n==="fa"){var o=WA(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&f_[t]&&f_[t][e]){var a=f_[t][e];return r(T1(a))}vZ(e,t),r(Fe(Fe({},gZ),{},{icon:ze.showMissingIcons&&e?$o("missingIconAbstract")||{}:{}}))})}var jT=function(){},j1=ze.measurePerformance&&Rp&&Rp.mark&&Rp.measure?Rp:{mark:jT,measure:jT},yf='FA "6.4.2"',yZ=function(t){return j1.mark("".concat(yf," ").concat(t," begins")),function(){return qA(t)}},qA=function(t){j1.mark("".concat(yf," ").concat(t," ends")),j1.measure("".concat(yf," ").concat(t),"".concat(yf," ").concat(t," begins"),"".concat(yf," ").concat(t," ends"))},$S={begin:yZ,end:qA},Mm=function(){};function DT(e){var t=e.getAttribute?e.getAttribute(nl):null;return typeof t=="string"}function _Z(e){var t=e.getAttribute?e.getAttribute(MS):null,n=e.getAttribute?e.getAttribute(jS):null;return t&&n}function bZ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(ze.replacementClass)}function wZ(){if(ze.autoReplaceSvg===!0)return jm.replace;var e=jm[ze.autoReplaceSvg];return e||jm.replace}function xZ(e){return At.createElementNS("http://www.w3.org/2000/svg",e)}function SZ(e){return At.createElement(e)}function GA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?xZ:SZ:n;if(typeof e=="string")return At.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(a){i.setAttribute(a,e.attributes[a])});var o=e.children||[];return o.forEach(function(a){i.appendChild(GA(a,{ceFn:r}))}),i}function OZ(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var jm={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(GA(i),n)}),n.getAttribute(nl)===null&&ze.keepOriginalSource){var r=At.createComment(OZ(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~LS(n).indexOf(ze.replacementClass))return jm.replace(t);var i=new RegExp("".concat(ze.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(s,l){return l===ze.replacementClass||l.match(i)?s.toSvg.push(l):s.toNode.push(l),s},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var a=r.map(function(s){return hh(s)}).join(` +`);n.setAttribute(nl,""),n.innerHTML=a}};function LT(e){e()}function KA(e,t){var n=typeof t=="function"?t:Mm;if(e.length===0)n();else{var r=LT;ze.mutateApproach===PK&&(r=Ya.requestAnimationFrame||LT),r(function(){var i=wZ(),o=$S.begin("mutate");e.map(i),o(),n()})}}var BS=!1;function ZA(){BS=!0}function D1(){BS=!1}var jg=null;function RT(e){if(ST&&ze.observeMutations){var t=e.treeCallback,n=t===void 0?Mm:t,r=e.nodeCallback,i=r===void 0?Mm:r,o=e.pseudoElementsCallback,a=o===void 0?Mm:o,s=e.observeMutationsRoot,l=s===void 0?At:s;jg=new ST(function(c){if(!BS){var f=qa();gu(c).forEach(function(d){if(d.type==="childList"&&d.addedNodes.length>0&&!DT(d.addedNodes[0])&&(ze.searchPseudoElements&&a(d.target),n(d.target)),d.type==="attributes"&&d.target.parentNode&&ze.searchPseudoElements&&a(d.target.parentNode),d.type==="attributes"&&DT(d.target)&&~NK.indexOf(d.attributeName))if(d.attributeName==="class"&&_Z(d.target)){var p=Sy(LS(d.target)),g=p.prefix,v=p.iconName;d.target.setAttribute(MS,g||f),v&&d.target.setAttribute(jS,v)}else bZ(d.target)&&i(d.target)})}}),Go&&jg.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function CZ(){jg&&jg.disconnect()}function EZ(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),a=o[0],s=o.slice(1);return a&&s.length>0&&(r[a]=s.join(":").trim()),r},{})),n}function kZ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=Sy(LS(e));return i.prefix||(i.prefix=qa()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=iZ(i.prefix,e.innerText)||AS(i.prefix,C1(e.innerText))),!i.iconName&&ze.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function PZ(e){var t=gu(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return ze.autoA11y&&(n?t["aria-labelledby"]="".concat(ze.replacementClass,"-title-").concat(r||Id()):(t["aria-hidden"]="true",t.focusable="false")),t}function TZ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:to,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function NT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=kZ(e),r=n.iconName,i=n.prefix,o=n.rest,a=PZ(e),s=k1("parseNodeAttributes",{},e),l=t.styleParser?EZ(e):[];return Fe({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:to,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:a}},s)}var MZ=Mi.styles;function QA(e){var t=ze.autoReplaceSvg==="nest"?NT(e,{styleParser:!1}):NT(e);return~t.extra.classes.indexOf(LA)?$o("generateLayersText",e,t):$o("generateSvgReplacementMutation",e,t)}var Ga=new Set;DS.map(function(e){Ga.add("fa-".concat(e))});Object.keys(Ld[Dt]).map(Ga.add.bind(Ga));Object.keys(Ld[Zt]).map(Ga.add.bind(Ga));Ga=fh(Ga);function AT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Go)return Promise.resolve();var n=At.documentElement.classList,r=function(d){return n.add("".concat(OT,"-").concat(d))},i=function(d){return n.remove("".concat(OT,"-").concat(d))},o=ze.autoFetchSvg?Ga:DS.map(function(f){return"fa-".concat(f)}).concat(Object.keys(MZ));o.includes("fa")||o.push("fa");var a=[".".concat(LA,":not([").concat(nl,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(nl,"])")})).join(", ");if(a.length===0)return Promise.resolve();var s=[];try{s=gu(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=$S.begin("onTree"),c=s.reduce(function(f,d){try{var p=QA(d);p&&f.push(p)}catch(g){DA||g.name==="MissingIcon"&&console.error(g)}return f},[]);return new Promise(function(f,d){Promise.all(c).then(function(p){KA(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),d(p)})})}function jZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;QA(e).then(function(n){n&&KA([n],t)})}function DZ(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:P1(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:P1(i||{})),e(r,Fe(Fe({},n),{},{mask:i}))}}var LZ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?to:r,o=n.symbol,a=o===void 0?!1:o,s=n.mask,l=s===void 0?null:s,c=n.maskId,f=c===void 0?null:c,d=n.title,p=d===void 0?null:d,g=n.titleId,v=g===void 0?null:g,y=n.classes,x=y===void 0?[]:y,b=n.attributes,w=b===void 0?{}:b,S=n.styles,C=S===void 0?{}:S;if(t){var k=t.prefix,P=t.iconName,j=t.icon;return Oy(Fe({type:"icon"},t),function(){return rl("beforeDOMElementCreation",{iconDefinition:t,params:n}),ze.autoA11y&&(p?w["aria-labelledby"]="".concat(ze.replacementClass,"-title-").concat(v||Id()):(w["aria-hidden"]="true",w.focusable="false")),FS({icons:{main:T1(j),mask:l?T1(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:k,iconName:P,transform:Fe(Fe({},to),i),symbol:a,title:p,maskId:f,titleId:v,extra:{attributes:w,styles:C,classes:x}})})}},RZ={mixout:function(){return{icon:DZ(LZ)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=AT,n.nodeCallback=jZ,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?At:r,o=n.callback,a=o===void 0?function(){}:o;return AT(i,a)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,a=r.titleId,s=r.prefix,l=r.transform,c=r.symbol,f=r.mask,d=r.maskId,p=r.extra;return new Promise(function(g,v){Promise.all([M1(i,s),f.iconName?M1(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=PS(y,2),b=x[0],w=x[1];g([n,FS({icons:{main:b,mask:w},prefix:s,iconName:i,transform:l,symbol:c,maskId:d,title:o,titleId:a,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.transform,s=n.styles,l=wy(s);l.length>0&&(i.style=l);var c;return RS(a)&&(c=$o("generateAbstractTransformGrouping",{main:o,transform:a,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},NZ={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return Oy({type:"layer"},function(){rl("beforeDOMElementCreation",{assembler:n,params:r});var a=[];return n(function(s){Array.isArray(s)?s.map(function(l){a=a.concat(l.abstract)}):a=a.concat(s.abstract)}),[{tag:"span",attributes:{class:["".concat(ze.cssPrefix,"-layers")].concat(fh(o)).join(" ")},children:a}]})}}}},AZ={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,a=r.classes,s=a===void 0?[]:a,l=r.attributes,c=l===void 0?{}:l,f=r.styles,d=f===void 0?{}:f;return Oy({type:"counter",content:n},function(){return rl("beforeDOMElementCreation",{content:n,params:r}),mZ({content:n.toString(),title:o,extra:{attributes:c,styles:d,classes:["".concat(ze.cssPrefix,"-layers-counter")].concat(fh(s))}})})}}}},IZ={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?to:i,a=r.title,s=a===void 0?null:a,l=r.classes,c=l===void 0?[]:l,f=r.attributes,d=f===void 0?{}:f,p=r.styles,g=p===void 0?{}:p;return Oy({type:"text",content:n},function(){return rl("beforeDOMElementCreation",{content:n,params:r}),MT({content:n,transform:Fe(Fe({},to),o),title:s,extra:{attributes:d,styles:g,classes:["".concat(ze.cssPrefix,"-layers-text")].concat(fh(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,a=r.extra,s=null,l=null;if(TA){var c=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();s=f.width/c,l=f.height/c}return ze.autoA11y&&!i&&(a.attributes["aria-hidden"]="true"),Promise.resolve([n,MT({content:n.innerHTML,width:s,height:l,transform:o,title:i,extra:a,watchable:!0})])}}},FZ=new RegExp('"',"ug"),IT=[1105920,1112319];function $Z(e){var t=e.replace(FZ,""),n=XK(t,0),r=n>=IT[0]&&n<=IT[1],i=t.length===2?t[0]===t[1]:!1;return{value:C1(i?t[0]:t),isSecondary:r||i}}function FT(e,t){var n="".concat(kK).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=gu(e.children),a=o.filter(function(j){return j.getAttribute(O1)===t})[0],s=Ya.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(DK),c=s.getPropertyValue("font-weight"),f=s.getPropertyValue("content");if(a&&!l)return e.removeChild(a),r();if(l&&f!=="none"&&f!==""){var d=s.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Zt:Dt,g=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?Rd[p][l[2].toLowerCase()]:LK[p][c],v=$Z(d),y=v.value,x=v.isSecondary,b=l[0].startsWith("FontAwesome"),w=AS(g,y),S=w;if(b){var C=oZ(y);C.iconName&&C.prefix&&(w=C.iconName,g=C.prefix)}if(w&&!x&&(!a||a.getAttribute(MS)!==g||a.getAttribute(jS)!==S)){e.setAttribute(n,S),a&&e.removeChild(a);var k=TZ(),P=k.extra;P.attributes[O1]=t,M1(w,g).then(function(j){var N=FS(Fe(Fe({},k),{},{icons:{main:j,mask:IS()},prefix:g,iconName:S,extra:P,watchable:!0})),H=At.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(H,e.firstChild):e.appendChild(H),H.outerHTML=N.map(function(R){return hh(R)}).join(` +`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function BZ(e){return Promise.all([FT(e,"::before"),FT(e,"::after")])}function UZ(e){return e.parentNode!==document.head&&!~TK.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(O1)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function $T(e){if(Go)return new Promise(function(t,n){var r=gu(e.querySelectorAll("*")).filter(UZ).map(BZ),i=$S.begin("searchPseudoElements");ZA(),Promise.all(r).then(function(){i(),D1(),t()}).catch(function(){i(),D1(),n()})})}var zZ={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=$T,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?At:r;ze.searchPseudoElements&&$T(i)}}},BT=!1,VZ={mixout:function(){return{dom:{unwatch:function(){ZA(),BT=!0}}}},hooks:function(){return{bootstrap:function(){RT(k1("mutationObserverCallbacks",{}))},noAuto:function(){CZ()},watch:function(n){var r=n.observeMutationsRoot;BT?D1():RT(k1("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},UT=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),a=o[0],s=o.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n)},HZ={mixout:function(){return{parse:{transform:function(n){return UT(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=UT(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,a=n.iconWidth,s={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),f="rotate(".concat(i.rotate," 0 0)"),d={transform:"".concat(l," ").concat(c," ").concat(f)},p={transform:"translate(".concat(a/2*-1," -256)")},g={outer:s,inner:d,path:p};return{tag:"g",attributes:Fe({},g.outer),children:[{tag:"g",attributes:Fe({},g.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Fe(Fe({},r.icon.attributes),g.path)}]}]}}}},d_={x:0,y:0,width:"100%",height:"100%"};function zT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function WZ(e){return e.tag==="g"?e.children:[e]}var YZ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?Sy(i.split(" ").map(function(a){return a.trim()})):IS();return o.prefix||(o.prefix=qa()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,a=n.mask,s=n.maskId,l=n.transform,c=o.width,f=o.icon,d=a.width,p=a.icon,g=HK({transform:l,containerWidth:d,iconWidth:c}),v={tag:"rect",attributes:Fe(Fe({},d_),{},{fill:"white"})},y=f.children?{children:f.children.map(zT)}:{},x={tag:"g",attributes:Fe({},g.inner),children:[zT(Fe({tag:f.tag,attributes:Fe(Fe({},f.attributes),g.path)},y))]},b={tag:"g",attributes:Fe({},g.outer),children:[x]},w="mask-".concat(s||Id()),S="clip-".concat(s||Id()),C={tag:"mask",attributes:Fe(Fe({},d_),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,b]},k={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:WZ(p)},C]};return r.push(k,{tag:"rect",attributes:Fe({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},d_)}),{children:r,attributes:i}}}},qZ={provides:function(t){var n=!1;Ya.matchMedia&&(n=Ya.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Fe(Fe({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=Fe(Fe({},o),{},{attributeName:"opacity"}),s={tag:"circle",attributes:Fe(Fe({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||s.children.push({tag:"animate",attributes:Fe(Fe({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Fe(Fe({},a),{},{values:"1;0;1;1;0;1;"})}),r.push(s),r.push({tag:"path",attributes:Fe(Fe({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Fe(Fe({},a),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Fe(Fe({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Fe(Fe({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},GZ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},KZ=[qK,RZ,NZ,AZ,IZ,zZ,VZ,HZ,YZ,qZ,GZ];lZ(KZ,{mixoutsTo:Xr});Xr.noAuto;Xr.config;Xr.library;Xr.dom;var L1=Xr.parse;Xr.findIconDefinition;Xr.toHtml;var ZZ=Xr.icon;Xr.layer;Xr.text;Xr.counter;var XA={exports:{}},QZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",XZ=QZ,JZ=XZ;function JA(){}function e4(){}e4.resetWarningCache=JA;var eQ=function(){function e(r,i,o,a,s,l){if(l!==JZ){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:e4,resetWarningCache:JA};return n.PropTypes=n,n};XA.exports=eQ();var tQ=XA.exports;const D=Fi(tQ);function VT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ca(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function rQ(e,t){if(e==null)return{};var n=nQ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function R1(e){return iQ(e)||oQ(e)||aQ(e)||sQ()}function iQ(e){if(Array.isArray(e))return N1(e)}function oQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aQ(e,t){if(e){if(typeof e=="string")return N1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N1(e,t)}}function N1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return n4(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=dQ(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[t4(c)]=f}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=rQ(n,uQ);return i.attrs.style=Ca(Ca({},i.attrs.style),a),e.apply(void 0,[t.tag,Ca(Ca({},i.attrs),s)].concat(R1(r)))}var r4=!1;try{r4=!0}catch{}function hQ(){if(!r4&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function HT(e){if(e&&Dg(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(L1.icon)return L1.icon(e);if(e===null)return null;if(e&&Dg(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function h_(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?fc({},e,t):{}}var Ie=Y.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,a=e.title,s=e.titleId,l=e.maskId,c=HT(n),f=h_("classes",[].concat(R1(lQ(e)),R1(o.split(" ")))),d=h_("transform",typeof e.transform=="string"?L1.transform(e.transform):e.transform),p=h_("mask",HT(r)),g=ZZ(c,Ca(Ca(Ca(Ca({},f),d),p),{},{symbol:i,title:a,titleId:s,maskId:l}));if(!g)return hQ("Could not find icon",c),null;var v=g.abstract,y={ref:t};return Object.keys(e).forEach(function(x){Ie.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),pQ(v[0],y)});Ie.displayName="FontAwesomeIcon";Ie.propTypes={beat:D.bool,border:D.bool,beatFade:D.bool,bounce:D.bool,className:D.string,fade:D.bool,flash:D.bool,mask:D.oneOfType([D.object,D.array,D.string]),maskId:D.string,fixedWidth:D.bool,inverse:D.bool,flip:D.oneOf([!0,!1,"horizontal","vertical","both"]),icon:D.oneOfType([D.object,D.array,D.string]),listItem:D.bool,pull:D.oneOf(["right","left"]),pulse:D.bool,rotation:D.oneOf([0,90,180,270]),shake:D.bool,size:D.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:D.bool,spinPulse:D.bool,spinReverse:D.bool,symbol:D.oneOfType([D.bool,D.string]),title:D.string,titleId:D.string,transform:D.oneOfType([D.string,D.object]),swapOpacity:D.bool};Ie.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var pQ=n4.bind(null,Y.createElement),i4={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i0?"".concat(e,"px"):null}function vQ(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bQ;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function rs(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function a4(e,t){for(var n=Array.isArray(t)?t:[t],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=e[i];return o}var WT={};function A1(e){WT[e]||(typeof console<"u"&&console.error(e),WT[e]=!0)}function s4(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&A1('"'.concat(i,'" property of "').concat(o,`" has been deprecated. -`).concat(t));for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l"u"?"undefined":Uc(window))==="object"&&window.Element||function(){};function US(e,t,n){if(!(e[t]instanceof wQ))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var zc=D.oneOfType([D.string,D.func,US,D.shape({current:D.any})]),rt=D.oneOfType([D.func,D.string,D.shape({$$typeof:D.symbol,render:D.func}),D.arrayOf(D.oneOfType([D.func,D.string,D.shape({$$typeof:D.symbol,render:D.func})]))]),Lg={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},Rg=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],Vp={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},_t={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},xQ=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],zS=!!(typeof window<"u"&&window.document&&window.document.createElement);function SQ(e){return e&&Uc(e)==="object"?"current"in e:!1}function l4(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function I1(e){var t=Uc(e);return e!=null&&(t==="object"||t==="function")}function YT(e){var t=Uc(e),n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&l4(e)==="[object Symbol]")return n;if(I1(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=I1(r)?"".concat(r):r}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(e);return i||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function OQ(e){if(!I1(e))return!1;var t=l4(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function CQ(e){if(SQ(e))return e.current;if(OQ(e))return e();if(typeof e=="string"&&zS){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#".concat(e))),!t.length)throw new Error("The target '".concat(e,"' could not be identified in the dom, tip: check spelling"));return t}return e}function qT(e){return e===null?!1:Array.isArray(e)||zS&&typeof e.length=="number"}function Fd(e,t){var n=CQ(e);return t?qT(n)?n:n===null?[]:[n]:qT(n)?n[0]:n}var EQ=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],kQ=["className","cssModule","noGutters","tag","widths"];function F1(){return F1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var MQ=["xs","sm","md","lg","xl","xxl"],Al=D.oneOfType([D.number,D.string]),jQ={tag:rt,noGutters:s4(D.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:D.string,cssModule:D.object,xs:Al,sm:Al,md:Al,lg:Al,xl:Al,xxl:Al,widths:D.array};function mr(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,a=e.widths,s=a===void 0?MQ:a,l=PQ(e,kQ),c=[];s.forEach(function(d,p){var m=e[d];if(delete l[d],!!m){var v=!p;c.push(v?"row-cols-".concat(m):"row-cols-".concat(d,"-").concat(m))}});var f=He(Ee(t,r?"gx-0":null,"row",c),n);return Y.createElement(o,F1({},l,{className:f}))}mr.propTypes=jQ;var DQ=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function $1(){return $1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var NQ={children:D.node,className:D.string,color:D.string,container:D.oneOfType([D.bool,D.string]),cssModule:D.object,dark:D.bool,expand:D.oneOfType([D.bool,D.string]),fixed:D.string,light:D.bool,role:D.string,sticky:D.string,tag:rt},AQ=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function c4(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,a=e.light,s=e.dark,l=e.fixed,c=e.sticky,f=e.color,d=e.container,p=d===void 0?"fluid":d,m=e.tag,v=m===void 0?"nav":m,y=e.children,x=LQ(e,DQ),b=He(Ee(i,"navbar",AQ(r),(t={"navbar-light":a,"navbar-dark":s},p_(t,"bg-".concat(f),f),p_(t,"fixed-".concat(l),l),p_(t,"sticky-".concat(c),c),t)),o),w=p&&p===!0?"container":"container-".concat(p);return Y.createElement(v,$1({},x,{className:b}),p?Y.createElement("div",{className:w},y):y)}c4.propTypes=NQ;var IQ=["className","cssModule","tag"];function B1(){return B1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Q(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var BQ={className:D.string,cssModule:D.object,tag:rt};function u4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=FQ(e,IQ),a=He(Ee(t,"navbar-brand"),n);return Y.createElement(i,B1({},o,{className:a}))}u4.propTypes=BQ;var UQ=["className","cssModule","children","tag"];function U1(){return U1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var YQ={className:D.string,cssModule:D.object,tag:rt,type:D.string,children:D.node};function f4(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=HQ(e,UQ),s=He(Ee(t,"navbar-toggler"),n);return Y.createElement(o,U1({"aria-label":"Toggle navigation"},zQ({type:"button"},a),{className:s}),r||Y.createElement("span",{className:He("navbar-toggler-icon",n)}))}f4.propTypes=YQ;var qQ=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function z1(){return z1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ZQ={card:D.bool,className:D.string,cssModule:D.object,fill:D.bool,horizontal:D.oneOf(["center","end"]),justified:D.bool,navbar:D.bool,pills:D.bool,tabs:D.bool,tag:rt,vertical:D.oneOfType([D.bool,D.string])},QQ=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function VS(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=o===void 0?!1:o,s=e.horizontal,l=e.justified,c=e.fill,f=e.navbar,d=e.card,p=e.tag,m=p===void 0?"ul":p,v=GQ(e,qQ),y=He(Ee(t,f?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,QQ(a),{"nav-tabs":r,"card-header-tabs":d&&r,"nav-pills":i,"card-header-pills":d&&i,"nav-justified":l,"nav-fill":c}),n);return Y.createElement(m,z1({},v,{className:y}))}VS.propTypes=ZQ;var XQ=["className","cssModule","active","tag"];function V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var tX={active:D.bool,className:D.string,cssModule:D.object,tag:rt};function d4(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=JQ(e,XQ),s=He(Ee(t,"nav-item",r?"active":!1),n);return Y.createElement(o,V1({},a,{className:s}))}d4.propTypes=tX;function H1(e){"@babel/helpers - typeof";return H1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H1(e)}var nX=["className","cssModule","active","tag","innerRef"];function W1(){return W1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function oX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KT(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ng(e){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ng(e)}var fX={active:D.bool,className:D.string,cssModule:D.object,disabled:D.bool,href:D.any,innerRef:D.oneOfType([D.object,D.func,D.string]),onClick:D.func,tag:rt},p4=function(e){sX(n,e);var t=lX(n);function n(r){var i;return oX(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(h4(i)),i}return aX(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.active,l=i.tag,c=l===void 0?"a":l,f=i.innerRef,d=rX(i,nX),p=He(Ee(o,"nav-link",{disabled:d.disabled,active:s}),a);return Y.createElement(c,W1({},d,{ref:f,onClick:this.onClick,className:p}))}}]),n}(Y.Component);p4.propTypes=fX;const m4=p4;var dX=["className","cssModule","variant","innerRef"];function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var vX={active:D.bool,"aria-label":D.string,onClick:D.func,variant:D.oneOf(["white"]),className:D.string,cssModule:D.object,innerRef:D.oneOfType([D.object,D.string,D.func])};function g4(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=mX(e,dX),o=He(Ee(t,"btn-close",n&&"btn-close-".concat(n)));return Y.createElement("button",q1({ref:r,type:"button",className:o},hX({"aria-label":"close"},i)))}g4.propTypes=vX;var yX=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function G1(){return G1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wX={active:D.bool,"aria-label":D.string,block:D.bool,children:D.node,className:D.string,cssModule:D.object,close:D.bool,color:D.string,disabled:D.bool,innerRef:D.oneOfType([D.object,D.func,D.string]),onClick:D.func,outline:D.bool,size:D.string,tag:rt};function yt(e){var t=B.useCallback(function(w){if(e.disabled){w.preventDefault();return}if(e.onClick)return e.onClick(w)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,a=e.close,s=e.cssModule,l=e.color,c=l===void 0?"secondary":l,f=e.outline,d=e.size,p=e.tag,m=p===void 0?"button":p,v=e.innerRef,y=_X(e,yX);if(a)return Y.createElement(g4,y);var x="btn".concat(f?"-outline":"","-").concat(c),b=He(Ee(o,"btn",x,d?"btn-".concat(d):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&m==="button"&&(m="a"),Y.createElement(m,G1({type:m==="button"&&y.onClick?"button":void 0},y,{className:b,ref:v,onClick:t,"aria-label":r}))}yt.propTypes=wX;var v4=B.createContext(),y4=B.createContext();function K1(e){var t=e.children,n=B.useState(null),r=n[0],i=n[1],o=B.useRef(!1);B.useEffect(function(){return function(){o.current=!0}},[]);var a=B.useCallback(function(s){o.current||i(s)},[]);return B.createElement(v4.Provider,{value:r},B.createElement(y4.Provider,{value:a},t))}var _4=function(t){return Array.isArray(t)?t[0]:t},b4=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var t=Wr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function RX(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ui(o)||!co(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function NX(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!ui(i)||!co(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const AX={name:"applyStyles",enabled:!0,phase:"write",fn:RX,effect:NX,requires:["computeStyles"]};function oo(e){return e.split("-")[0]}var zs=Math.max,Ag=Math.min,Hc=Math.round;function Q1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function S4(){return!/^((?!chrome|android).)*safari/i.test(Q1())}function Wc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ui(e)&&(i=e.offsetWidth>0&&Hc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Hc(r.height)/e.offsetHeight||1);var a=rl(e)?Wr(e):window,s=a.visualViewport,l=!S4()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,p=r.height/o;return{width:d,height:p,top:f,right:c+d,bottom:f+p,left:c,x:c,y:f}}function YS(e){var t=Wc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function O4(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&WS(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Bo(e){return Wr(e).getComputedStyle(e)}function IX(e){return["table","td","th"].indexOf(co(e))>=0}function is(e){return((rl(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cy(e){return co(e)==="html"?e:e.assignedSlot||e.parentNode||(WS(e)?e.host:null)||is(e)}function eM(e){return!ui(e)||Bo(e).position==="fixed"?null:e.offsetParent}function FX(e){var t=/firefox/i.test(Q1()),n=/Trident/i.test(Q1());if(n&&ui(e)){var r=Bo(e);if(r.position==="fixed")return null}var i=Cy(e);for(WS(i)&&(i=i.host);ui(i)&&["html","body"].indexOf(co(i))<0;){var o=Bo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function mh(e){for(var t=Wr(e),n=eM(e);n&&IX(n)&&Bo(n).position==="static";)n=eM(n);return n&&(co(n)==="html"||co(n)==="body"&&Bo(n).position==="static")?t:n||FX(e)||t}function qS(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Vf(e,t,n){return zs(e,Ag(t,n))}function $X(e,t,n){var r=Vf(e,t,n);return r>n?n:r}function C4(){return{top:0,right:0,bottom:0,left:0}}function E4(e){return Object.assign({},C4(),e)}function k4(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var BX=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,E4(typeof t!="number"?t:k4(t,ph))};function UX(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=oo(n.placement),l=qS(s),c=[Tr,gi].indexOf(s)>=0,f=c?"height":"width";if(!(!o||!a)){var d=BX(i.padding,n),p=YS(o),m=l==="y"?Pr:Tr,v=l==="y"?mi:gi,y=n.rects.reference[f]+n.rects.reference[l]-a[l]-n.rects.popper[f],x=a[l]-n.rects.reference[l],b=mh(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,S=y/2-x/2,C=d[m],k=w-p[f]-d[v],P=w/2-p[f]/2+S,j=Vf(C,P,k),N=l;n.modifiersData[r]=(t={},t[N]=j,t.centerOffset=j-P,t)}}function zX(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||O4(t.elements.popper,i)&&(t.elements.arrow=i))}const VX={name:"arrow",enabled:!0,phase:"main",fn:UX,effect:zX,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yc(e){return e.split("-")[1]}var HX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function WX(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Hc(n*i)/i||0,y:Hc(r*i)/i||0}}function tM(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,d=e.isFixed,p=a.x,m=p===void 0?0:p,v=a.y,y=v===void 0?0:v,x=typeof f=="function"?f({x:m,y}):{x:m,y};m=x.x,y=x.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Tr,C=Pr,k=window;if(c){var P=mh(n),j="clientHeight",N="clientWidth";if(P===Wr(n)&&(P=is(n),Bo(P).position!=="static"&&s==="absolute"&&(j="scrollHeight",N="scrollWidth")),P=P,i===Pr||(i===Tr||i===gi)&&o===$d){C=mi;var H=d&&P===k&&k.visualViewport?k.visualViewport.height:P[j];y-=H-r.height,y*=l?1:-1}if(i===Tr||(i===Pr||i===mi)&&o===$d){S=gi;var R=d&&P===k&&k.visualViewport?k.visualViewport.width:P[N];m-=R-r.width,m*=l?1:-1}}var V=Object.assign({position:s},c&&HX),W=f===!0?WX({x:m,y},Wr(n)):{x:m,y};if(m=W.x,y=W.y,l){var ee;return Object.assign({},V,(ee={},ee[C]=w?"0":"",ee[S]=b?"0":"",ee.transform=(k.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",ee))}return Object.assign({},V,(t={},t[C]=w?y+"px":"",t[S]=b?m+"px":"",t.transform="",t))}function YX(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:oo(t.placement),variation:Yc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tM(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tM(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const qX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:YX,data:{}};var Hp={passive:!0};function GX(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Hp)}),s&&l.addEventListener("resize",n.update,Hp),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Hp)}),s&&l.removeEventListener("resize",n.update,Hp)}}const KX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:GX,data:{}};var ZX={left:"right",right:"left",bottom:"top",top:"bottom"};function Dm(e){return e.replace(/left|right|bottom|top/g,function(t){return ZX[t]})}var QX={start:"end",end:"start"};function nM(e){return e.replace(/start|end/g,function(t){return QX[t]})}function GS(e){var t=Wr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function KS(e){return Wc(is(e)).left+GS(e).scrollLeft}function XX(e,t){var n=Wr(e),r=is(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=S4();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+KS(e),y:l}}function JX(e){var t,n=is(e),r=GS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=zs(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=zs(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+KS(e),l=-r.scrollTop;return Bo(i||n).direction==="rtl"&&(s+=zs(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function ZS(e){var t=Bo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function P4(e){return["html","body","#document"].indexOf(co(e))>=0?e.ownerDocument.body:ui(e)&&ZS(e)?e:P4(Cy(e))}function Hf(e,t){var n;t===void 0&&(t=[]);var r=P4(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wr(r),a=i?[o].concat(o.visualViewport||[],ZS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Hf(Cy(a)))}function X1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function eJ(e,t){var n=Wc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function rM(e,t,n){return t===w4?X1(XX(e,n)):rl(t)?eJ(t,n):X1(JX(is(e)))}function tJ(e){var t=Hf(Cy(e)),n=["absolute","fixed"].indexOf(Bo(e).position)>=0,r=n&&ui(e)?mh(e):e;return rl(r)?t.filter(function(i){return rl(i)&&O4(i,r)&&co(i)!=="body"}):[]}function nJ(e,t,n,r){var i=t==="clippingParents"?tJ(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var f=rM(e,c,r);return l.top=zs(f.top,l.top),l.right=Ag(f.right,l.right),l.bottom=Ag(f.bottom,l.bottom),l.left=zs(f.left,l.left),l},rM(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function T4(e){var t=e.reference,n=e.element,r=e.placement,i=r?oo(r):null,o=r?Yc(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Pr:l={x:a,y:t.y-n.height};break;case mi:l={x:a,y:t.y+t.height};break;case gi:l={x:t.x+t.width,y:s};break;case Tr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?qS(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Vc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case $d:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function Bd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?xX:s,c=n.rootBoundary,f=c===void 0?w4:c,d=n.elementContext,p=d===void 0?Ju:d,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,b=E4(typeof x!="number"?x:k4(x,ph)),w=p===Ju?SX:Ju,S=e.rects.popper,C=e.elements[v?w:p],k=nJ(rl(C)?C:C.contextElement||is(e.elements.popper),l,f,a),P=Wc(e.elements.reference),j=T4({reference:P,element:S,strategy:"absolute",placement:i}),N=X1(Object.assign({},S,j)),H=p===Ju?N:P,R={top:k.top-H.top+b.top,bottom:H.bottom-k.bottom+b.bottom,left:k.left-H.left+b.left,right:H.right-k.right+b.right},V=e.modifiersData.offset;if(p===Ju&&V){var W=V[i];Object.keys(R).forEach(function(ee){var q=[gi,mi].indexOf(ee)>=0?1:-1,Q=[Pr,mi].indexOf(ee)>=0?"y":"x";R[ee]+=W[Q]*q})}return R}function rJ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?x4:l,f=Yc(r),d=f?s?JT:JT.filter(function(v){return Yc(v)===f}):ph,p=d.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=d);var m=p.reduce(function(v,y){return v[y]=Bd(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[oo(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function iJ(e){if(oo(e)===HS)return[];var t=Dm(e);return[nM(e),t,nM(t)]}function oJ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,f=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,b=oo(x),w=b===x,S=l||(w||!v?[Dm(x)]:iJ(x)),C=[x].concat(S).reduce(function(K,ie){return K.concat(oo(ie)===HS?rJ(t,{placement:ie,boundary:f,rootBoundary:d,padding:c,flipVariations:v,allowedAutoPlacements:y}):ie)},[]),k=t.rects.reference,P=t.rects.popper,j=new Map,N=!0,H=C[0],R=0;R=0,Q=q?"width":"height",oe=Bd(t,{placement:V,boundary:f,rootBoundary:d,altBoundary:p,padding:c}),le=q?ee?gi:Tr:ee?mi:Pr;k[Q]>P[Q]&&(le=Dm(le));var G=Dm(le),F=[];if(o&&F.push(oe[W]<=0),s&&F.push(oe[le]<=0,oe[G]<=0),F.every(function(K){return K})){H=V,N=!1;break}j.set(V,F)}if(N)for(var A=v?3:1,z=function(ie){var ae=C.find(function(he){var E=j.get(he);if(E)return E.slice(0,ie).every(function(M){return M})});if(ae)return H=ae,"break"},re=A;re>0;re--){var U=z(re);if(U==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const aJ={name:"flip",enabled:!0,phase:"main",fn:oJ,requiresIfExists:["offset"],data:{_skip:!1}};function iM(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function oM(e){return[Pr,gi,mi,Tr].some(function(t){return e[t]>=0})}function sJ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Bd(t,{elementContext:"reference"}),s=Bd(t,{altBoundary:!0}),l=iM(a,r),c=iM(s,i,o),f=oM(l),d=oM(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const lJ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sJ};function cJ(e,t,n){var r=oo(e),i=[Tr,Pr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Tr,gi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function uJ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=x4.reduce(function(f,d){return f[d]=cJ(d,t.rects,o),f},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const fJ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uJ};function dJ(e){var t=e.state,n=e.name;t.modifiersData[n]=T4({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const hJ={name:"popperOffsets",enabled:!0,phase:"read",fn:dJ,data:{}};function pJ(e){return e==="x"?"y":"x"}function mJ(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,d=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=Bd(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:f}),b=oo(t.placement),w=Yc(t.placement),S=!w,C=qS(b),k=pJ(C),P=t.modifiersData.popperOffsets,j=t.rects.reference,N=t.rects.popper,H=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(P){if(o){var ee,q=C==="y"?Pr:Tr,Q=C==="y"?mi:gi,oe=C==="y"?"height":"width",le=P[C],G=le+x[q],F=le-x[Q],A=m?-N[oe]/2:0,z=w===Vc?j[oe]:N[oe],re=w===Vc?-N[oe]:-j[oe],U=t.elements.arrow,K=m&&U?YS(U):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:C4(),ae=ie[q],he=ie[Q],E=Vf(0,j[oe],K[oe]),M=S?j[oe]/2-A-E-ae-R.mainAxis:z-E-ae-R.mainAxis,I=S?-j[oe]/2+A+E+he+R.mainAxis:re+E+he+R.mainAxis,J=t.elements.arrow&&mh(t.elements.arrow),X=J?C==="y"?J.clientTop||0:J.clientLeft||0:0,se=(ee=V==null?void 0:V[C])!=null?ee:0,ge=le+M-se-X,De=le+I-se,ue=Vf(m?Ag(G,ge):G,le,m?zs(F,De):F);P[C]=ue,W[C]=ue-le}if(s){var ve,_e=C==="x"?Pr:Tr,Ce=C==="x"?mi:gi,Le=P[k],Me=k==="y"?"height":"width",je=Le+x[_e],ce=Le-x[Ce],de=[Pr,Tr].indexOf(b)!==-1,be=(ve=V==null?void 0:V[k])!=null?ve:0,ye=de?je:Le-j[Me]-N[Me]-be+R.altAxis,Se=de?Le+j[Me]+N[Me]-be-R.altAxis:ce,Te=m&&de?$X(ye,Le,Se):Vf(m?ye:je,Le,m?Se:ce);P[k]=Te,W[k]=Te-Le}t.modifiersData[r]=W}}const gJ={name:"preventOverflow",enabled:!0,phase:"main",fn:mJ,requiresIfExists:["offset"]};function vJ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yJ(e){return e===Wr(e)||!ui(e)?GS(e):vJ(e)}function _J(e){var t=e.getBoundingClientRect(),n=Hc(t.width)/e.offsetWidth||1,r=Hc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function bJ(e,t,n){n===void 0&&(n=!1);var r=ui(t),i=ui(t)&&_J(t),o=is(t),a=Wc(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((co(t)!=="body"||ZS(o))&&(s=yJ(t)),ui(t)?(l=Wc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=KS(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function wJ(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function xJ(e){var t=wJ(e);return LX.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function SJ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function OJ(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var aM={placement:"bottom",modifiers:[],strategy:"absolute"};function sM(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function WJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ig(e)}var QJ={a11y:D.bool,disabled:D.bool,direction:D.oneOf(["up","down","start","end","left","right"]),group:D.bool,isOpen:D.bool,nav:D.bool,active:D.bool,size:D.string,tag:rt,toggle:D.func,children:D.node,className:D.string,cssModule:D.object,dropup:D.bool,inNavbar:D.bool,setActiveFromChild:D.bool,menuRole:D.oneOf(["listbox","menu"])},XJ={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},JJ=[_t.space,_t.enter,_t.up,_t.down,_t.end,_t.home],Ey=function(e){qJ(n,e);var t=GJ(n);function n(r){var i;return WJ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(la(i)),i.handleDocumentClick=i.handleDocumentClick.bind(la(i)),i.handleKeyDown=i.handleKeyDown.bind(la(i)),i.removeEvents=i.removeEvents.bind(la(i)),i.toggle=i.toggle.bind(la(i)),i.handleMenuRef=i.handleMenuRef.bind(la(i)),i.handleToggleRef=i.handleToggleRef.bind(la(i)),i.containerRef=Y.createRef(),i.menuRef=Y.createRef(),i.toggleRef=Y.createRef(),i}return YJ(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==_t.tab))){var o=this.getContainer(),a=this.getMenu(),s=this.getToggle(),l=s.contains(i.target),c=a&&a.contains(i.target)&&a!==i.target,f=!1;o&&(f=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!f||c)&&(i.type!=="keyup"||i.which===_t.tab))&&this.toggle(i)}}},{key:"handleKeyDown",value:function(i){var o=this,a=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",s=this.getMenuCtrl()===i.target,l=_t.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(a||s))&&((JJ.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(s)if([_t.space,_t.enter,_t.up,_t.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var w;return(w=o.getMenuItems()[0])===null||w===void 0?void 0:w.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===_t.esc&&this.toggle(i);if(this.props.isOpen&&a){if([_t.tab,_t.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([_t.space,_t.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([_t.down,_t.up].indexOf(i.which)>-1||[_t.n,_t.p].indexOf(i.which)>-1&&i.ctrlKey){var f=this.getMenuItems(),d=f.indexOf(i.target);_t.up===i.which||_t.p===i.which&&i.ctrlKey?d=d!==0?d-1:f.length-1:(_t.down===i.which||_t.n===i.which&&i.ctrlKey)&&(d=d===f.length-1?0:d+1),f[d].focus()}else if(_t.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(_t.home===i.which){var m=this.getMenuItems();m[0].focus()}else if(i.which>=48&&i.which<=90)for(var v=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),x=0;x=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function ree(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fg(e){return Fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fg(e)}var cee={children:D.node,active:D.bool,disabled:D.bool,divider:D.bool,tag:rt,header:D.bool,onClick:D.func,className:D.string,cssModule:D.object,toggle:D.bool,text:D.bool},XS=function(e){oee(n,e);var t=aee(n);function n(r){var i;return ree(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(ow(i)),i.getTabIndex=i.getTabIndex.bind(ow(i)),i}return iee(n,[{key:"onClick",value:function(i){var o,a=this.props,s=a.disabled,l=a.header,c=a.divider,f=a.text;if(s||l||c||f){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,a=i.header,s=i.divider,l=i.text;return o||a||s||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,a=rs(this.props,["toggle"]),s=a.className,l=a.cssModule,c=a.divider,f=a.tag,d=f===void 0?"button":f,p=a.header,m=a.active,v=a.text,y=tee(a,eee),x=He(Ee(s,{disabled:y.disabled,"dropdown-item":!c&&!p&&!v,active:m,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":v}),l);return d==="button"&&(p?d="h6":c?d="div":y.href?d="a":v&&(d="span")),Y.createElement(d,rw({type:d==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(Y.Component);XS.propTypes=cee;XS.contextType=Ud;const Ue=XS;function aw(e){"@babel/helpers - typeof";return aw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aw(e)}var uee=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function _ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bg(e){return Bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bg(e)}var Eee={tag:rt,children:D.node.isRequired,dark:D.bool,end:D.bool,flip:D.bool,modifiers:D.array,className:D.string,cssModule:D.object,style:D.object,persist:D.bool,strategy:D.string,container:zc,updateOnSelect:D.bool,right:s4(D.bool,'Please use "end" instead.')},kee={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},JS=function(e){wee(n,e);var t=xee(n);function n(){return _ee(this,n),t.apply(this,arguments)}return bee(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,c=o.end,f=o.right,d=o.tag,p=d===void 0?"div":d,m=o.flip,v=m===void 0?!0:m,y=o.modifiers,x=y===void 0?[]:y,b=o.persist,w=o.strategy,S=o.container,C=o.updateOnSelect,k=vee(o,uee),P=He(Ee(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||f,show:this.context.isOpen}),s),j=p;if(b||this.context.isOpen&&!this.context.inNavbar){var N=kee[this.context.direction]||"bottom",H=c||f?"end":"start",R="".concat(N,"-").concat(H),V=[].concat(dee(x),[{name:"flip",enabled:!!v}]),W=Y.createElement(QS,{placement:R,modifiers:V,strategy:w},function(q){var Q=q.ref,oe=q.style,le=q.placement,G=q.update,F=fM(fM({},i.props.style),oe),A=function(re){Q(re);var U=i.context.onMenuRef;U&&U(re)};return Y.createElement(j,$g({tabIndex:"-1",role:i.getRole(),ref:A},k,{style:F,"aria-hidden":!i.context.isOpen,className:P,"data-popper-placement":le,onClick:function(){return C&&G()}}))});return S?Us.createPortal(W,Fd(S)):W}var ee=this.context.onMenuRef;return Y.createElement(j,$g({tabIndex:"-1",role:this.getRole()},k,{ref:ee,"aria-hidden":!this.context.isOpen,className:P,"data-popper-placement":k.placement}))}}]),n}(Y.Component);JS.propTypes=Eee;JS.contextType=Ud;const vu=JS;function cw(e){"@babel/helpers - typeof";return cw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cw(e)}var Pee=["className","color","cssModule","caret","split","nav","tag","innerRef"];function Tee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Dee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zg(e){return zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zg(e)}var Fee={caret:D.bool,color:D.string,children:D.node,className:D.string,cssModule:D.object,disabled:D.bool,onClick:D.func,"aria-haspopup":D.bool,split:D.bool,tag:rt,nav:D.bool,innerRef:D.oneOfType([D.object,D.string,D.func])},$ee={color:"secondary","aria-haspopup":!0},ky=function(e){Ree(n,e);var t=Nee(n);function n(r){var i;return Dee(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(D4(i)),i}return Lee(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,c=o.caret,f=o.split,d=o.nav,p=o.tag,m=o.innerRef,v=Mee(o,Pee),y=v["aria-label"]||"Toggle Dropdown",x=He(Ee(a,{"dropdown-toggle":c||f,"dropdown-toggle-split":f,"nav-link":d}),l),b=typeof v.children<"u"?v.children:Y.createElement("span",{className:"visually-hidden"},y),w;return d&&!p?(w="a",v.href="#"):p?w=p:(w=yt,v.color=s,v.cssModule=l),this.context.inNavbar?Y.createElement(w,Ug({},v,{className:x,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:b})):Y.createElement(M4,{innerRef:m},function(S){var C=S.ref,k=function(j){C(j);var N=i.context.onToggleRef;N&&N(j)};return Y.createElement(w,Ug({},v,Tee({},typeof w=="string"?"ref":"innerRef",k),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:b}))})}}]),n}(Y.Component);ky.propTypes=Fee;ky.defaultProps=$ee;ky.contextType=Ud;const vh=ky;function Vg(e,t){return Vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vg(e,t)}function Bee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Vg(e,t)}const pM={disabled:!1},L4=Y.createContext(null);var _f="unmounted",Cs="exited",Es="entering",Yl="entered",fw="exiting",Ko=function(e){Bee(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Cs,o.appearStatus=Es):l=Yl:r.unmountOnExit||r.mountOnEnter?l=_f:l=Cs,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===_f?{status:Cs}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Es&&a!==Yl&&(o=Es):(a===Es||a===Yl)&&(o=fw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===Es?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===Cs&&this.setState({status:_f})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Us.findDOMNode(this),s],c=l[0],f=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!i&&!a||pM.disabled){this.safeSetState({status:Yl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:Es},function(){o.props.onEntering(c,f),o.onTransitionEnd(p,function(){o.safeSetState({status:Yl},function(){o.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Us.findDOMNode(this);if(!o||pM.disabled){this.safeSetState({status:Cs},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:fw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Cs},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Us.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],f=l[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===_f)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=G2(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(L4.Provider,{value:null},typeof a=="function"?a(i,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);Ko.contextType=L4;Ko.propTypes={};function Il(){}Ko.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Il,onEntering:Il,onEntered:Il,onExit:Il,onExiting:Il,onExited:Il};Ko.UNMOUNTED=_f;Ko.EXITED=Cs;Ko.ENTERING=Es;Ko.ENTERED=Yl;Ko.EXITING=fw;const yu=Ko;function $e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Uee=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function mM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zd(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Kee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yg(e){return Yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yg(e)}function vM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qc(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var cte={body:D.bool,className:D.string,color:D.string,cssModule:D.object,innerRef:D.oneOfType([D.object,D.string,D.func]),inverse:D.bool,outline:D.bool,tag:rt};function Yr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,c=e.innerRef,f=ste(e,ate),d=He(Ee(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return Y.createElement(l,pw({},f,{className:d,ref:c}))}Yr.propTypes=cte;var ute=["className","cssModule","innerRef","tag"];function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hte={className:D.string,cssModule:D.object,innerRef:D.oneOfType([D.object,D.string,D.func]),tag:rt};function Gc(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=fte(e,ute),s=He(Ee(t,"card-body"),n);return Y.createElement(o,mw({},a,{className:s,ref:r}))}Gc.propTypes=hte;var pte=["className","cssModule","tag"];function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var vte={className:D.string,cssModule:D.object,tag:rt};function A4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=mte(e,pte),a=He(Ee(t,"card-footer"),n);return Y.createElement(i,gw({},o,{className:a}))}A4.propTypes=vte;var yte=["className","cssModule","tag"];function vw(){return vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wte={className:D.string,cssModule:D.object,tag:rt};function Kc(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=_te(e,yte),a=He(Ee(t,"card-header"),n);return Y.createElement(i,vw({},o,{className:a}))}Kc.propTypes=wte;var xte=["className","cssModule","tag"];function yw(){return yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ote(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Cte={className:D.string,cssModule:D.object,tag:rt};function I4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=Ste(e,xte),a=He(Ee(t,"card-text"),n);return Y.createElement(i,yw({},o,{className:a}))}I4.propTypes=Cte;var Ete=["className","cssModule","tag"];function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Tte={className:D.string,cssModule:D.object,tag:rt};function F4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=kte(e,Ete),a=He(Ee(t,"card-title"),n);return Y.createElement(i,_w({},o,{className:a}))}F4.propTypes=Tte;function bw(e){"@babel/helpers - typeof";return bw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bw(e)}var Mte=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ate(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ite(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _M(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qg(e){return qg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qg(e)}function bM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rm(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gg(e){return Gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gg(e)}var Py={children:D.oneOfType([D.node,D.func]),placement:D.oneOf(xQ),target:zc.isRequired,container:zc,isOpen:D.bool,disabled:D.bool,hideArrow:D.bool,boundariesElement:D.oneOfType([D.string,US]),className:D.string,innerClassName:D.string,arrowClassName:D.string,popperClassName:D.string,cssModule:D.object,toggle:D.func,autohide:D.bool,placementPrefix:D.string,delay:D.oneOfType([D.shape({show:D.number,hide:D.number}),D.number]),modifiers:D.array,strategy:D.string,offset:D.arrayOf(D.number),innerRef:D.oneOfType([D.func,D.string,D.object]),trigger:D.string,fade:D.bool,flip:D.bool},$4={show:0,hide:50},ene={isOpen:!1,hideArrow:!1,autohide:!1,delay:$4,toggle:function(){},trigger:"click",fade:!0};function B4(e,t){return t&&(e===t||t.contains(e))}function xM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return B4(e,n)})[0]}var nO=function(e){Zte(n,e);var t=Qte(n);function n(r){var i;return Gte(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(Dr(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Dr(i)),i.removeTargetEvents=i.removeTargetEvents.bind(Dr(i)),i.toggle=i.toggle.bind(Dr(i)),i.showWithDelay=i.showWithDelay.bind(Dr(i)),i.hideWithDelay=i.hideWithDelay.bind(Dr(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(Dr(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(Dr(i)),i.show=i.show.bind(Dr(i)),i.hide=i.hide.bind(Dr(i)),i.onEscKeyDown=i.onEscKeyDown.bind(Dr(i)),i.getRef=i.getRef.bind(Dr(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return Kte(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||xM(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!B4(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&xM(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):Vd(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return Vd(o)==="object"?isNaN(o[i])?$4[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}},{key:"updateTarget",value:function(){var i=Fd(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,c=a.innerClassName,f=a.isOpen,d=a.hideArrow,p=a.boundariesElement,m=a.placement,v=a.placementPrefix,y=a.arrowClassName,x=a.popperClassName,b=a.container,w=a.modifiers,S=a.strategy,C=a.offset,k=a.fade,P=a.flip,j=a.children,N=rs(this.props,Object.keys(Py)),H=He(x,l),R=He(c,l);return Y.createElement(qte,{className:s,target:o,isOpen:f,hideArrow:d,boundariesElement:p,placement:m,placementPrefix:v,arrowClassName:y,popperClassName:H,container:b,modifiers:w,strategy:S,offset:C,cssModule:l,fade:k,flip:P},function(V){var W=V.update;return Y.createElement("div",Ow({},N,{ref:i.getRef,className:R,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof j=="function"?j({update:W}):j)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(Y.Component);nO.propTypes=Py;nO.defaultProps=ene;const U4=nO;function Ew(){return Ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function one(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ane={animated:D.bool,bar:D.bool,barAriaLabelledBy:D.string,barAriaValueText:D.string,barClassName:D.string,barStyle:D.object,children:D.node,className:D.string,cssModule:D.object,color:D.string,max:D.oneOfType([D.string,D.number]),min:D.oneOfType([D.string,D.number]),multi:D.bool,striped:D.bool,style:D.object,tag:rt,value:D.oneOfType([D.string,D.number])};function z4(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,c=e.max,f=c===void 0?100:c,d=e.animated,p=e.striped,m=e.color,v=e.bar,y=e.multi,x=e.tag,b=x===void 0?"div":x,w=e.style,S=w===void 0?{}:w,C=e.barStyle,k=C===void 0?{}:C,P=e.barAriaValueText,j=e.barAriaLabelledBy,N=ine(e,nne),H=YT(a)/YT(f)*100,R=He(Ee(n,"progress"),i),V=He(Ee("progress-bar",v&&n||r,d?"progress-bar-animated":null,m?"bg-".concat(m):null,p||d?"progress-bar-striped":null),i),W={className:V,style:m_(m_(m_({},v?S:{}),k),{},{width:"".concat(H,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":f,"aria-valuetext":P,"aria-labelledby":j,children:t};return v?Y.createElement(b,Kg({},N,W)):Y.createElement(b,Kg({},N,{style:S,className:R}),y?t:Y.createElement("div",W))}z4.propTypes=ane;function kw(e){"@babel/helpers - typeof";return kw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kw(e)}function sne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zg(e){return Zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zg(e)}var pne={children:D.node.isRequired,node:D.any},V4=function(e){cne(n,e);var t=une(n);function n(){return sne(this,n),t.apply(this,arguments)}return lne(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return zS?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Us.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(Y.Component);V4.propTypes=pne;const mne=V4;function Tw(e){"@babel/helpers - typeof";return Tw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tw(e)}function CM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $l(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qg(e){return Qg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qg(e)}function Xg(){}var kM=D.shape(gr.propTypes),H4={autoFocus:D.bool,backdrop:D.oneOfType([D.bool,D.oneOf(["static"])]),backdropClassName:D.string,backdropTransition:kM,centered:D.bool,children:D.node,contentClassName:D.string,className:D.string,container:zc,cssModule:D.object,external:D.node,fade:D.bool,fullscreen:D.oneOfType([D.bool,D.oneOf(["sm","md","lg","xl"])]),innerRef:D.oneOfType([D.object,D.string,D.func]),isOpen:D.bool,keyboard:D.bool,labelledBy:D.string,modalClassName:D.string,modalTransition:kM,onClosed:D.func,onEnter:D.func,onExit:D.func,onOpened:D.func,returnFocusAfterClose:D.bool,role:D.string,scrollable:D.bool,size:D.string,toggle:D.func,trapFocus:D.bool,unmountOnClose:D.bool,wrapClassName:D.string,zIndex:D.oneOfType([D.number,D.string])},xne=Object.keys(H4),Sne={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Xg,onClosed:Xg,modalTransition:{timeout:Lg.Modal},backdropTransition:{mountOnEnter:!0,timeout:Lg.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},yh=function(e){yne(n,e);var t=_ne(n);function n(r){var i;return gne(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(ri(i)),i.handleBackdropClick=i.handleBackdropClick.bind(ri(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(ri(i)),i.handleEscape=i.handleEscape.bind(ri(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(ri(i)),i.handleTab=i.handleTab.bind(ri(i)),i.onOpened=i.onOpened.bind(ri(i)),i.onClosed=i.onClosed.bind(ri(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(ri(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(ri(i)),i.trapFocus=i.trapFocus.bind(ri(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return vne(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Fd(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=yQ(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),_Q(),n.openCount===0&&(document.body.className=Ee(document.body.className,He("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=He("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),o4(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=rs(this.props,xne),s="modal-dialog";return Y.createElement("div",Wf({},a,{className:He(Ee(s,this.props.className,(i={},ql(i,"modal-".concat(this.props.size),this.props.size),ql(i,"".concat(s,"-centered"),this.props.centered),ql(i,"".concat(s,"-scrollable"),this.props.scrollable),ql(i,"modal-fullscreen",this.props.fullscreen===!0),ql(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),Y.createElement("div",{className:He(Ee("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,c=a.backdropClassName,f=a.cssModule,d=a.isOpen,p=a.backdrop,m=a.role,v=a.labelledBy,y=a.external,x=a.innerRef,b={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":v,"aria-modal":!0,role:m,tabIndex:"-1"},w=this.props.fade,S=$l($l($l({},gr.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),C=$l($l($l({},gr.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),k=p&&(w?Y.createElement(gr,Wf({},C,{in:d&&!!p,cssModule:f,className:He(Ee("modal-backdrop",c),f)})):Y.createElement("div",{className:He(Ee("modal-backdrop","show",c),f)}));return Y.createElement(mne,{node:this._element},Y.createElement("div",{className:He(s)},Y.createElement(gr,Wf({},b,S,{in:d,onEntered:this.onOpened,onExited:this.onClosed,cssModule:f,className:He(Ee("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),f),innerRef:x}),y,this.renderModalDialog()),k))}return null}}]),n}(Y.Component);yh.propTypes=H4;yh.defaultProps=Sne;yh.openCount=0;yh.originalBodyOverflow=null;const Zo=yh;var One=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function jw(){return jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ene(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var kne={children:D.node,className:D.string,close:D.object,closeAriaLabel:D.string,cssModule:D.object,tag:rt,toggle:D.func,wrapTag:rt};function Qo(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,c=l===void 0?"div":l,f=e.closeAriaLabel,d=f===void 0?"Close":f,p=e.close,m=Cne(e,One),v=He(Ee(n,"modal-header"),r);return!p&&o&&(t=Y.createElement("button",{type:"button",onClick:o,className:He("btn-close",r),"aria-label":d})),Y.createElement(c,jw({},m,{className:v}),Y.createElement(s,{className:He("modal-title",r)},i),p||t)}Qo.propTypes=kne;var Pne=["className","cssModule","tag"];function Dw(){return Dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var jne={className:D.string,cssModule:D.object,tag:rt};function fo(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Tne(e,Pne),a=He(Ee(t,"modal-body"),n);return Y.createElement(i,Dw({},o,{className:a}))}fo.propTypes=jne;var Dne=["className","cssModule","tag"];function Lw(){return Lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nne={className:D.string,cssModule:D.object,tag:rt};function ml(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Lne(e,Dne),a=He(Ee(t,"modal-footer"),n);return Y.createElement(i,Lw({},o,{className:a}))}ml.propTypes=Nne;function Rw(){return Rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Bne={className:D.string,cssModule:D.object,flush:D.bool,horizontal:D.oneOfType([D.bool,D.string]),numbered:D.bool,tag:rt},Une=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function W4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,c=l===void 0?!1:l,f=Fne(e,Ine),d=He(Ee(t,"list-group",o?"list-group-flush":Une(s),{"list-group-numbered":c}),n);return Y.createElement(i,Nw({},f,{className:d}))}W4.propTypes=Bne;var zne=["className","cssModule","row","disabled","check","inline","floating","tag","switch"];function Aw(){return Aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Wne={children:D.node,row:D.bool,check:D.bool,switch:D.bool,inline:D.bool,floating:D.bool,disabled:D.bool,tag:rt,className:D.string,cssModule:D.object};function Fr(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.tag,c=l===void 0?"div":l,f=e.switch,d=Vne(e,zne),p=o||f,m=He(Ee(t,r?"row":!1,p?"form-check":"mb-3",f?"form-switch":!1,p&&a?"form-check-inline":!1,p&&i?"disabled":!1,s&&"form-floating"),n);return c==="fieldset"&&(d.disabled=i),Y.createElement(c,Aw({},d,{className:m}))}Fr.propTypes=Wne;function Iw(e){"@babel/helpers - typeof";return Iw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iw(e)}var Yne=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function Fw(){return Fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Kne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jg(e){return Jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jg(e)}var tre={children:D.node,type:D.string,size:D.oneOfType([D.number,D.string]),bsSize:D.string,valid:D.bool,invalid:D.bool,tag:rt,innerRef:D.oneOfType([D.object,D.func,D.string]),plaintext:D.bool,addon:D.bool,className:D.string,cssModule:D.object},Y4=function(e){Qne(n,e);var t=Xne(n);function n(r){var i;return Kne(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(Bw(i)),i.focus=i.focus.bind(Bw(i)),i}return Zne(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,c=i.bsSize,f=i.valid,d=i.invalid,p=i.tag,m=i.addon,v=i.plaintext,y=i.innerRef,x=qne(i,Yne),b=["switch","radio","checkbox"].indexOf(l)>-1,w=/\D/g,S=l==="textarea",C=l==="select",k=l==="range",P=p||(C||S?l:"input"),j="form-control";v?(j="".concat(j,"-plaintext"),P=p||"input"):k?j="form-range":C?j="form-select":b&&(m?j=null:j="form-check-input"),x.size&&w.test(x.size)&&(A1(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var N=He(Ee(o,d&&"is-invalid",f&&"is-valid",c?C?"form-select-".concat(c):"form-control-".concat(c):!1,j),a);return(P==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(v||l==="select"||typeof P!="string"||P==="select")&&(A1('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),Y.createElement(P,Fw({},x,{ref:y,className:N,"aria-invalid":d}))}}]),n}(Y.Component);Y4.propTypes=tre;const Zc=Y4;var nre=["className","cssModule","tag","type","size"];function ev(){return ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ire(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ore={className:D.string,cssModule:D.object,size:D.string,tag:rt,type:D.string};function Ty(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=rre(e,nre),s=He(Ee(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?Y.createElement(gh,ev({},a,{className:s})):Y.createElement(j4.Provider,{value:{insideInputGroup:!0}},Y.createElement(i,ev({},a,{className:s})))}Ty.propTypes=ore;var are=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function Uw(){return Uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ure={children:D.node,className:D.string,listClassName:D.string,cssModule:D.object,size:D.string,tag:rt,listTag:rt,"aria-label":D.string};function iO(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,c=e["aria-label"],f=c===void 0?"pagination":c,d=lre(e,are),p=He(Ee(t),r),m=He(Ee(n,"pagination",sre({},"pagination-".concat(i),!!i)),r);return Y.createElement(a,{className:p,"aria-label":f},Y.createElement(l,Uw({},d,{className:m})))}iO.propTypes=ure;var fre=["active","className","cssModule","disabled","tag"];function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var pre={active:D.bool,children:D.node,className:D.string,cssModule:D.object,disabled:D.bool,tag:rt};function Vs(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=dre(e,fre),l=He(Ee(n,"page-item",{active:t,disabled:i}),r);return Y.createElement(a,zw({},s,{className:l}))}Vs.propTypes=pre;var mre=["className","cssModule","next","previous","first","last","tag"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var yre={"aria-label":D.string,children:D.node,className:D.string,cssModule:D.object,next:D.bool,previous:D.bool,first:D.bool,last:D.bool,tag:rt};function Hs(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,c=gre(e,mre),f=He(Ee(t,"page-link"),n),d;i?d="Previous":r?d="Next":o?d="First":a&&(d="Last");var p=e["aria-label"]||d,m;i?m="‹":r?m="›":o?m="«":a&&(m="»");var v=e.children;return v&&Array.isArray(v)&&v.length===0&&(v=null),!c.href&&l==="a"&&(l="button"),(i||r||o||a)&&(v=[Y.createElement("span",{"aria-hidden":"true",key:"caret"},v||m),Y.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),Y.createElement(l,Vw({},c,{className:f,"aria-label":p}),v)}Hs.propTypes=yre;var _re=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Sre={children:D.node,className:D.string,closeClassName:D.string,closeAriaLabel:D.string,color:D.string,cssModule:D.object,fade:D.bool,innerRef:D.oneOfType([D.object,D.string,D.func]),isOpen:D.bool,tag:rt,toggle:D.func,transition:D.shape(gr.propTypes)};function q4(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,c=l===void 0?"success":l,f=e.isOpen,d=f===void 0?!0:f,p=e.toggle,m=e.children,v=e.transition,y=v===void 0?ef(ef({},gr.defaultProps),{},{unmountOnExit:!0}):v,x=e.fade,b=x===void 0?!0:x,w=e.innerRef,S=wre(e,_re),C=He(Ee(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),k=He(Ee("btn-close",n),o),P=ef(ef(ef({},gr.defaultProps),y),{},{baseClass:b?y.baseClass:"",timeout:b?y.timeout:0});return Y.createElement(gr,Hw({},S,P,{tag:s,className:C,in:d,role:"alert",innerRef:w}),p?Y.createElement("button",{type:"button",className:k,"aria-label":i,onClick:p}):null,m)}q4.propTypes=Sre;var Ore=["className","cssModule","tag","active","disabled","action","color"];function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ere(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var kre={action:D.bool,active:D.bool,className:D.string,cssModule:D.object,color:D.string,disabled:D.bool,tag:rt},Pre=function(t){t.preventDefault()};function G4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,c=Cre(e,Ore),f=He(Ee(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(c.onClick=Pre),Y.createElement(i,Ww({},c,{className:f}))}G4.propTypes=kre;function Yw(e){"@babel/helpers - typeof";return Yw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yw(e)}function MM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tv(e){return tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tv(e)}var Ire=["defaultOpen"],bh=function(e){Lre(n,e);var t=Rre(n);function n(r){var i;return jre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(K4(i)),i}return Dre(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return Y.createElement(gh,qw({isOpen:this.state.isOpen,toggle:this.toggle},rs(this.props,Ire)))}}]),n}(B.Component);bh.propTypes=Tre({defaultOpen:D.bool,onToggle:D.func},gh.propTypes);function Kw(e){"@babel/helpers - typeof";return Kw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kw(e)}function DM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nv(e){return nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nv(e)}var Yre=["defaultOpen"],jr=function(e){zre(n,e);var t=Vre(n);function n(r){var i;return Bre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(Z4(i)),i}return Ure(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return Y.createElement(_h,Zw({isOpen:this.state.isOpen,toggle:this.toggle},rs(this.props,Yre)))}}]),n}(B.Component);jr.propTypes=Fre({defaultOpen:D.bool},_h.propTypes);function Q4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qre(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var X4={exports:{}};/*! +`).concat(t));for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l"u"?"undefined":Uc(window))==="object"&&window.Element||function(){};function US(e,t,n){if(!(e[t]instanceof wQ))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var zc=D.oneOfType([D.string,D.func,US,D.shape({current:D.any})]),rt=D.oneOfType([D.func,D.string,D.shape({$$typeof:D.symbol,render:D.func}),D.arrayOf(D.oneOfType([D.func,D.string,D.shape({$$typeof:D.symbol,render:D.func})]))]),Lg={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},Rg=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],Vp={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},_t={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},xQ=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],zS=!!(typeof window<"u"&&window.document&&window.document.createElement);function SQ(e){return e&&Uc(e)==="object"?"current"in e:!1}function l4(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function I1(e){var t=Uc(e);return e!=null&&(t==="object"||t==="function")}function YT(e){var t=Uc(e),n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&l4(e)==="[object Symbol]")return n;if(I1(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=I1(r)?"".concat(r):r}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(e);return i||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function OQ(e){if(!I1(e))return!1;var t=l4(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function CQ(e){if(SQ(e))return e.current;if(OQ(e))return e();if(typeof e=="string"&&zS){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#".concat(e))),!t.length)throw new Error("The target '".concat(e,"' could not be identified in the dom, tip: check spelling"));return t}return e}function qT(e){return e===null?!1:Array.isArray(e)||zS&&typeof e.length=="number"}function Fd(e,t){var n=CQ(e);return t?qT(n)?n:n===null?[]:[n]:qT(n)?n[0]:n}var EQ=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],kQ=["className","cssModule","noGutters","tag","widths"];function F1(){return F1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var MQ=["xs","sm","md","lg","xl","xxl"],Al=D.oneOfType([D.number,D.string]),jQ={tag:rt,noGutters:s4(D.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:D.string,cssModule:D.object,xs:Al,sm:Al,md:Al,lg:Al,xl:Al,xxl:Al,widths:D.array};function mr(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,a=e.widths,s=a===void 0?MQ:a,l=PQ(e,kQ),c=[];s.forEach(function(d,p){var g=e[d];if(delete l[d],!!g){var v=!p;c.push(v?"row-cols-".concat(g):"row-cols-".concat(d,"-").concat(g))}});var f=He(Ee(t,r?"gx-0":null,"row",c),n);return Y.createElement(o,F1({},l,{className:f}))}mr.propTypes=jQ;var DQ=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function $1(){return $1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var NQ={children:D.node,className:D.string,color:D.string,container:D.oneOfType([D.bool,D.string]),cssModule:D.object,dark:D.bool,expand:D.oneOfType([D.bool,D.string]),fixed:D.string,light:D.bool,role:D.string,sticky:D.string,tag:rt},AQ=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function c4(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,a=e.light,s=e.dark,l=e.fixed,c=e.sticky,f=e.color,d=e.container,p=d===void 0?"fluid":d,g=e.tag,v=g===void 0?"nav":g,y=e.children,x=LQ(e,DQ),b=He(Ee(i,"navbar",AQ(r),(t={"navbar-light":a,"navbar-dark":s},p_(t,"bg-".concat(f),f),p_(t,"fixed-".concat(l),l),p_(t,"sticky-".concat(c),c),t)),o),w=p&&p===!0?"container":"container-".concat(p);return Y.createElement(v,$1({},x,{className:b}),p?Y.createElement("div",{className:w},y):y)}c4.propTypes=NQ;var IQ=["className","cssModule","tag"];function B1(){return B1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Q(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var BQ={className:D.string,cssModule:D.object,tag:rt};function u4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=FQ(e,IQ),a=He(Ee(t,"navbar-brand"),n);return Y.createElement(i,B1({},o,{className:a}))}u4.propTypes=BQ;var UQ=["className","cssModule","children","tag"];function U1(){return U1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var YQ={className:D.string,cssModule:D.object,tag:rt,type:D.string,children:D.node};function f4(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=HQ(e,UQ),s=He(Ee(t,"navbar-toggler"),n);return Y.createElement(o,U1({"aria-label":"Toggle navigation"},zQ({type:"button"},a),{className:s}),r||Y.createElement("span",{className:He("navbar-toggler-icon",n)}))}f4.propTypes=YQ;var qQ=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function z1(){return z1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ZQ={card:D.bool,className:D.string,cssModule:D.object,fill:D.bool,horizontal:D.oneOf(["center","end"]),justified:D.bool,navbar:D.bool,pills:D.bool,tabs:D.bool,tag:rt,vertical:D.oneOfType([D.bool,D.string])},QQ=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function VS(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=o===void 0?!1:o,s=e.horizontal,l=e.justified,c=e.fill,f=e.navbar,d=e.card,p=e.tag,g=p===void 0?"ul":p,v=GQ(e,qQ),y=He(Ee(t,f?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,QQ(a),{"nav-tabs":r,"card-header-tabs":d&&r,"nav-pills":i,"card-header-pills":d&&i,"nav-justified":l,"nav-fill":c}),n);return Y.createElement(g,z1({},v,{className:y}))}VS.propTypes=ZQ;var XQ=["className","cssModule","active","tag"];function V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var tX={active:D.bool,className:D.string,cssModule:D.object,tag:rt};function d4(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=JQ(e,XQ),s=He(Ee(t,"nav-item",r?"active":!1),n);return Y.createElement(o,V1({},a,{className:s}))}d4.propTypes=tX;function H1(e){"@babel/helpers - typeof";return H1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H1(e)}var nX=["className","cssModule","active","tag","innerRef"];function W1(){return W1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function oX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KT(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ng(e){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ng(e)}var fX={active:D.bool,className:D.string,cssModule:D.object,disabled:D.bool,href:D.any,innerRef:D.oneOfType([D.object,D.func,D.string]),onClick:D.func,tag:rt},p4=function(e){sX(n,e);var t=lX(n);function n(r){var i;return oX(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(h4(i)),i}return aX(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.active,l=i.tag,c=l===void 0?"a":l,f=i.innerRef,d=rX(i,nX),p=He(Ee(o,"nav-link",{disabled:d.disabled,active:s}),a);return Y.createElement(c,W1({},d,{ref:f,onClick:this.onClick,className:p}))}}]),n}(Y.Component);p4.propTypes=fX;const m4=p4;var dX=["className","cssModule","variant","innerRef"];function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var vX={active:D.bool,"aria-label":D.string,onClick:D.func,variant:D.oneOf(["white"]),className:D.string,cssModule:D.object,innerRef:D.oneOfType([D.object,D.string,D.func])};function g4(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=mX(e,dX),o=He(Ee(t,"btn-close",n&&"btn-close-".concat(n)));return Y.createElement("button",q1({ref:r,type:"button",className:o},hX({"aria-label":"close"},i)))}g4.propTypes=vX;var yX=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function G1(){return G1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wX={active:D.bool,"aria-label":D.string,block:D.bool,children:D.node,className:D.string,cssModule:D.object,close:D.bool,color:D.string,disabled:D.bool,innerRef:D.oneOfType([D.object,D.func,D.string]),onClick:D.func,outline:D.bool,size:D.string,tag:rt};function yt(e){var t=B.useCallback(function(w){if(e.disabled){w.preventDefault();return}if(e.onClick)return e.onClick(w)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,a=e.close,s=e.cssModule,l=e.color,c=l===void 0?"secondary":l,f=e.outline,d=e.size,p=e.tag,g=p===void 0?"button":p,v=e.innerRef,y=_X(e,yX);if(a)return Y.createElement(g4,y);var x="btn".concat(f?"-outline":"","-").concat(c),b=He(Ee(o,"btn",x,d?"btn-".concat(d):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&g==="button"&&(g="a"),Y.createElement(g,G1({type:g==="button"&&y.onClick?"button":void 0},y,{className:b,ref:v,onClick:t,"aria-label":r}))}yt.propTypes=wX;var v4=B.createContext(),y4=B.createContext();function K1(e){var t=e.children,n=B.useState(null),r=n[0],i=n[1],o=B.useRef(!1);B.useEffect(function(){return function(){o.current=!0}},[]);var a=B.useCallback(function(s){o.current||i(s)},[]);return B.createElement(v4.Provider,{value:r},B.createElement(y4.Provider,{value:a},t))}var _4=function(t){return Array.isArray(t)?t[0]:t},b4=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var t=Wr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function RX(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ui(o)||!co(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function NX(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!ui(i)||!co(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const AX={name:"applyStyles",enabled:!0,phase:"write",fn:RX,effect:NX,requires:["computeStyles"]};function oo(e){return e.split("-")[0]}var Vs=Math.max,Ag=Math.min,Hc=Math.round;function Q1(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function S4(){return!/^((?!chrome|android).)*safari/i.test(Q1())}function Wc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ui(e)&&(i=e.offsetWidth>0&&Hc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Hc(r.height)/e.offsetHeight||1);var a=il(e)?Wr(e):window,s=a.visualViewport,l=!S4()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,p=r.height/o;return{width:d,height:p,top:f,right:c+d,bottom:f+p,left:c,x:c,y:f}}function YS(e){var t=Wc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function O4(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&WS(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Bo(e){return Wr(e).getComputedStyle(e)}function IX(e){return["table","td","th"].indexOf(co(e))>=0}function is(e){return((il(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cy(e){return co(e)==="html"?e:e.assignedSlot||e.parentNode||(WS(e)?e.host:null)||is(e)}function eM(e){return!ui(e)||Bo(e).position==="fixed"?null:e.offsetParent}function FX(e){var t=/firefox/i.test(Q1()),n=/Trident/i.test(Q1());if(n&&ui(e)){var r=Bo(e);if(r.position==="fixed")return null}var i=Cy(e);for(WS(i)&&(i=i.host);ui(i)&&["html","body"].indexOf(co(i))<0;){var o=Bo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function mh(e){for(var t=Wr(e),n=eM(e);n&&IX(n)&&Bo(n).position==="static";)n=eM(n);return n&&(co(n)==="html"||co(n)==="body"&&Bo(n).position==="static")?t:n||FX(e)||t}function qS(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Vf(e,t,n){return Vs(e,Ag(t,n))}function $X(e,t,n){var r=Vf(e,t,n);return r>n?n:r}function C4(){return{top:0,right:0,bottom:0,left:0}}function E4(e){return Object.assign({},C4(),e)}function k4(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var BX=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,E4(typeof t!="number"?t:k4(t,ph))};function UX(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=oo(n.placement),l=qS(s),c=[Tr,gi].indexOf(s)>=0,f=c?"height":"width";if(!(!o||!a)){var d=BX(i.padding,n),p=YS(o),g=l==="y"?Pr:Tr,v=l==="y"?mi:gi,y=n.rects.reference[f]+n.rects.reference[l]-a[l]-n.rects.popper[f],x=a[l]-n.rects.reference[l],b=mh(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,S=y/2-x/2,C=d[g],k=w-p[f]-d[v],P=w/2-p[f]/2+S,j=Vf(C,P,k),N=l;n.modifiersData[r]=(t={},t[N]=j,t.centerOffset=j-P,t)}}function zX(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||O4(t.elements.popper,i)&&(t.elements.arrow=i))}const VX={name:"arrow",enabled:!0,phase:"main",fn:UX,effect:zX,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yc(e){return e.split("-")[1]}var HX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function WX(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Hc(n*i)/i||0,y:Hc(r*i)/i||0}}function tM(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,d=e.isFixed,p=a.x,g=p===void 0?0:p,v=a.y,y=v===void 0?0:v,x=typeof f=="function"?f({x:g,y}):{x:g,y};g=x.x,y=x.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),S=Tr,C=Pr,k=window;if(c){var P=mh(n),j="clientHeight",N="clientWidth";if(P===Wr(n)&&(P=is(n),Bo(P).position!=="static"&&s==="absolute"&&(j="scrollHeight",N="scrollWidth")),P=P,i===Pr||(i===Tr||i===gi)&&o===$d){C=mi;var H=d&&P===k&&k.visualViewport?k.visualViewport.height:P[j];y-=H-r.height,y*=l?1:-1}if(i===Tr||(i===Pr||i===mi)&&o===$d){S=gi;var R=d&&P===k&&k.visualViewport?k.visualViewport.width:P[N];g-=R-r.width,g*=l?1:-1}}var V=Object.assign({position:s},c&&HX),W=f===!0?WX({x:g,y},Wr(n)):{x:g,y};if(g=W.x,y=W.y,l){var ee;return Object.assign({},V,(ee={},ee[C]=w?"0":"",ee[S]=b?"0":"",ee.transform=(k.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",ee))}return Object.assign({},V,(t={},t[C]=w?y+"px":"",t[S]=b?g+"px":"",t.transform="",t))}function YX(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:oo(t.placement),variation:Yc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tM(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tM(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const qX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:YX,data:{}};var Hp={passive:!0};function GX(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Wr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Hp)}),s&&l.addEventListener("resize",n.update,Hp),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Hp)}),s&&l.removeEventListener("resize",n.update,Hp)}}const KX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:GX,data:{}};var ZX={left:"right",right:"left",bottom:"top",top:"bottom"};function Dm(e){return e.replace(/left|right|bottom|top/g,function(t){return ZX[t]})}var QX={start:"end",end:"start"};function nM(e){return e.replace(/start|end/g,function(t){return QX[t]})}function GS(e){var t=Wr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function KS(e){return Wc(is(e)).left+GS(e).scrollLeft}function XX(e,t){var n=Wr(e),r=is(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=S4();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+KS(e),y:l}}function JX(e){var t,n=is(e),r=GS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Vs(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Vs(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+KS(e),l=-r.scrollTop;return Bo(i||n).direction==="rtl"&&(s+=Vs(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function ZS(e){var t=Bo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function P4(e){return["html","body","#document"].indexOf(co(e))>=0?e.ownerDocument.body:ui(e)&&ZS(e)?e:P4(Cy(e))}function Hf(e,t){var n;t===void 0&&(t=[]);var r=P4(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Wr(r),a=i?[o].concat(o.visualViewport||[],ZS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Hf(Cy(a)))}function X1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function eJ(e,t){var n=Wc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function rM(e,t,n){return t===w4?X1(XX(e,n)):il(t)?eJ(t,n):X1(JX(is(e)))}function tJ(e){var t=Hf(Cy(e)),n=["absolute","fixed"].indexOf(Bo(e).position)>=0,r=n&&ui(e)?mh(e):e;return il(r)?t.filter(function(i){return il(i)&&O4(i,r)&&co(i)!=="body"}):[]}function nJ(e,t,n,r){var i=t==="clippingParents"?tJ(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var f=rM(e,c,r);return l.top=Vs(f.top,l.top),l.right=Ag(f.right,l.right),l.bottom=Ag(f.bottom,l.bottom),l.left=Vs(f.left,l.left),l},rM(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function T4(e){var t=e.reference,n=e.element,r=e.placement,i=r?oo(r):null,o=r?Yc(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Pr:l={x:a,y:t.y-n.height};break;case mi:l={x:a,y:t.y+t.height};break;case gi:l={x:t.x+t.width,y:s};break;case Tr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?qS(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Vc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case $d:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function Bd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?xX:s,c=n.rootBoundary,f=c===void 0?w4:c,d=n.elementContext,p=d===void 0?Ju:d,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,x=y===void 0?0:y,b=E4(typeof x!="number"?x:k4(x,ph)),w=p===Ju?SX:Ju,S=e.rects.popper,C=e.elements[v?w:p],k=nJ(il(C)?C:C.contextElement||is(e.elements.popper),l,f,a),P=Wc(e.elements.reference),j=T4({reference:P,element:S,strategy:"absolute",placement:i}),N=X1(Object.assign({},S,j)),H=p===Ju?N:P,R={top:k.top-H.top+b.top,bottom:H.bottom-k.bottom+b.bottom,left:k.left-H.left+b.left,right:H.right-k.right+b.right},V=e.modifiersData.offset;if(p===Ju&&V){var W=V[i];Object.keys(R).forEach(function(ee){var q=[gi,mi].indexOf(ee)>=0?1:-1,Q=[Pr,mi].indexOf(ee)>=0?"y":"x";R[ee]+=W[Q]*q})}return R}function rJ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?x4:l,f=Yc(r),d=f?s?JT:JT.filter(function(v){return Yc(v)===f}):ph,p=d.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=d);var g=p.reduce(function(v,y){return v[y]=Bd(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[oo(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function iJ(e){if(oo(e)===HS)return[];var t=Dm(e);return[nM(e),t,nM(t)]}function oJ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,f=n.boundary,d=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,x=t.options.placement,b=oo(x),w=b===x,S=l||(w||!v?[Dm(x)]:iJ(x)),C=[x].concat(S).reduce(function(K,ie){return K.concat(oo(ie)===HS?rJ(t,{placement:ie,boundary:f,rootBoundary:d,padding:c,flipVariations:v,allowedAutoPlacements:y}):ie)},[]),k=t.rects.reference,P=t.rects.popper,j=new Map,N=!0,H=C[0],R=0;R=0,Q=q?"width":"height",oe=Bd(t,{placement:V,boundary:f,rootBoundary:d,altBoundary:p,padding:c}),le=q?ee?gi:Tr:ee?mi:Pr;k[Q]>P[Q]&&(le=Dm(le));var G=Dm(le),F=[];if(o&&F.push(oe[W]<=0),s&&F.push(oe[le]<=0,oe[G]<=0),F.every(function(K){return K})){H=V,N=!1;break}j.set(V,F)}if(N)for(var A=v?3:1,z=function(ie){var ae=C.find(function(he){var E=j.get(he);if(E)return E.slice(0,ie).every(function(M){return M})});if(ae)return H=ae,"break"},re=A;re>0;re--){var U=z(re);if(U==="break")break}t.placement!==H&&(t.modifiersData[r]._skip=!0,t.placement=H,t.reset=!0)}}const aJ={name:"flip",enabled:!0,phase:"main",fn:oJ,requiresIfExists:["offset"],data:{_skip:!1}};function iM(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function oM(e){return[Pr,gi,mi,Tr].some(function(t){return e[t]>=0})}function sJ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Bd(t,{elementContext:"reference"}),s=Bd(t,{altBoundary:!0}),l=iM(a,r),c=iM(s,i,o),f=oM(l),d=oM(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const lJ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sJ};function cJ(e,t,n){var r=oo(e),i=[Tr,Pr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Tr,gi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function uJ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=x4.reduce(function(f,d){return f[d]=cJ(d,t.rects,o),f},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const fJ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uJ};function dJ(e){var t=e.state,n=e.name;t.modifiersData[n]=T4({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const hJ={name:"popperOffsets",enabled:!0,phase:"read",fn:dJ,data:{}};function pJ(e){return e==="x"?"y":"x"}function mJ(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,d=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=Bd(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:f}),b=oo(t.placement),w=Yc(t.placement),S=!w,C=qS(b),k=pJ(C),P=t.modifiersData.popperOffsets,j=t.rects.reference,N=t.rects.popper,H=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(P){if(o){var ee,q=C==="y"?Pr:Tr,Q=C==="y"?mi:gi,oe=C==="y"?"height":"width",le=P[C],G=le+x[q],F=le-x[Q],A=g?-N[oe]/2:0,z=w===Vc?j[oe]:N[oe],re=w===Vc?-N[oe]:-j[oe],U=t.elements.arrow,K=g&&U?YS(U):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:C4(),ae=ie[q],he=ie[Q],E=Vf(0,j[oe],K[oe]),M=S?j[oe]/2-A-E-ae-R.mainAxis:z-E-ae-R.mainAxis,I=S?-j[oe]/2+A+E+he+R.mainAxis:re+E+he+R.mainAxis,J=t.elements.arrow&&mh(t.elements.arrow),X=J?C==="y"?J.clientTop||0:J.clientLeft||0:0,se=(ee=V==null?void 0:V[C])!=null?ee:0,ge=le+M-se-X,De=le+I-se,ue=Vf(g?Ag(G,ge):G,le,g?Vs(F,De):F);P[C]=ue,W[C]=ue-le}if(s){var ve,_e=C==="x"?Pr:Tr,Ce=C==="x"?mi:gi,Le=P[k],Me=k==="y"?"height":"width",je=Le+x[_e],ce=Le-x[Ce],de=[Pr,Tr].indexOf(b)!==-1,be=(ve=V==null?void 0:V[k])!=null?ve:0,ye=de?je:Le-j[Me]-N[Me]-be+R.altAxis,Se=de?Le+j[Me]+N[Me]-be-R.altAxis:ce,Te=g&&de?$X(ye,Le,Se):Vf(g?ye:je,Le,g?Se:ce);P[k]=Te,W[k]=Te-Le}t.modifiersData[r]=W}}const gJ={name:"preventOverflow",enabled:!0,phase:"main",fn:mJ,requiresIfExists:["offset"]};function vJ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yJ(e){return e===Wr(e)||!ui(e)?GS(e):vJ(e)}function _J(e){var t=e.getBoundingClientRect(),n=Hc(t.width)/e.offsetWidth||1,r=Hc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function bJ(e,t,n){n===void 0&&(n=!1);var r=ui(t),i=ui(t)&&_J(t),o=is(t),a=Wc(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((co(t)!=="body"||ZS(o))&&(s=yJ(t)),ui(t)?(l=Wc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=KS(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function wJ(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function xJ(e){var t=wJ(e);return LX.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function SJ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function OJ(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var aM={placement:"bottom",modifiers:[],strategy:"absolute"};function sM(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function WJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ig(e)}var QJ={a11y:D.bool,disabled:D.bool,direction:D.oneOf(["up","down","start","end","left","right"]),group:D.bool,isOpen:D.bool,nav:D.bool,active:D.bool,size:D.string,tag:rt,toggle:D.func,children:D.node,className:D.string,cssModule:D.object,dropup:D.bool,inNavbar:D.bool,setActiveFromChild:D.bool,menuRole:D.oneOf(["listbox","menu"])},XJ={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},JJ=[_t.space,_t.enter,_t.up,_t.down,_t.end,_t.home],Ey=function(e){qJ(n,e);var t=GJ(n);function n(r){var i;return WJ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(la(i)),i.handleDocumentClick=i.handleDocumentClick.bind(la(i)),i.handleKeyDown=i.handleKeyDown.bind(la(i)),i.removeEvents=i.removeEvents.bind(la(i)),i.toggle=i.toggle.bind(la(i)),i.handleMenuRef=i.handleMenuRef.bind(la(i)),i.handleToggleRef=i.handleToggleRef.bind(la(i)),i.containerRef=Y.createRef(),i.menuRef=Y.createRef(),i.toggleRef=Y.createRef(),i}return YJ(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==_t.tab))){var o=this.getContainer(),a=this.getMenu(),s=this.getToggle(),l=s.contains(i.target),c=a&&a.contains(i.target)&&a!==i.target,f=!1;o&&(f=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!f||c)&&(i.type!=="keyup"||i.which===_t.tab))&&this.toggle(i)}}},{key:"handleKeyDown",value:function(i){var o=this,a=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",s=this.getMenuCtrl()===i.target,l=_t.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(a||s))&&((JJ.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(s)if([_t.space,_t.enter,_t.up,_t.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var w;return(w=o.getMenuItems()[0])===null||w===void 0?void 0:w.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===_t.esc&&this.toggle(i);if(this.props.isOpen&&a){if([_t.tab,_t.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([_t.space,_t.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([_t.down,_t.up].indexOf(i.which)>-1||[_t.n,_t.p].indexOf(i.which)>-1&&i.ctrlKey){var f=this.getMenuItems(),d=f.indexOf(i.target);_t.up===i.which||_t.p===i.which&&i.ctrlKey?d=d!==0?d-1:f.length-1:(_t.down===i.which||_t.n===i.which&&i.ctrlKey)&&(d=d===f.length-1?0:d+1),f[d].focus()}else if(_t.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(_t.home===i.which){var g=this.getMenuItems();g[0].focus()}else if(i.which>=48&&i.which<=90)for(var v=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),x=0;x=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function ree(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fg(e){return Fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fg(e)}var cee={children:D.node,active:D.bool,disabled:D.bool,divider:D.bool,tag:rt,header:D.bool,onClick:D.func,className:D.string,cssModule:D.object,toggle:D.bool,text:D.bool},XS=function(e){oee(n,e);var t=aee(n);function n(r){var i;return ree(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(ow(i)),i.getTabIndex=i.getTabIndex.bind(ow(i)),i}return iee(n,[{key:"onClick",value:function(i){var o,a=this.props,s=a.disabled,l=a.header,c=a.divider,f=a.text;if(s||l||c||f){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,a=i.header,s=i.divider,l=i.text;return o||a||s||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,a=rs(this.props,["toggle"]),s=a.className,l=a.cssModule,c=a.divider,f=a.tag,d=f===void 0?"button":f,p=a.header,g=a.active,v=a.text,y=tee(a,eee),x=He(Ee(s,{disabled:y.disabled,"dropdown-item":!c&&!p&&!v,active:g,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":v}),l);return d==="button"&&(p?d="h6":c?d="div":y.href?d="a":v&&(d="span")),Y.createElement(d,rw({type:d==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(Y.Component);XS.propTypes=cee;XS.contextType=Ud;const Ue=XS;function aw(e){"@babel/helpers - typeof";return aw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aw(e)}var uee=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function _ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bg(e){return Bg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bg(e)}var Eee={tag:rt,children:D.node.isRequired,dark:D.bool,end:D.bool,flip:D.bool,modifiers:D.array,className:D.string,cssModule:D.object,style:D.object,persist:D.bool,strategy:D.string,container:zc,updateOnSelect:D.bool,right:s4(D.bool,'Please use "end" instead.')},kee={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},JS=function(e){wee(n,e);var t=xee(n);function n(){return _ee(this,n),t.apply(this,arguments)}return bee(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,c=o.end,f=o.right,d=o.tag,p=d===void 0?"div":d,g=o.flip,v=g===void 0?!0:g,y=o.modifiers,x=y===void 0?[]:y,b=o.persist,w=o.strategy,S=o.container,C=o.updateOnSelect,k=vee(o,uee),P=He(Ee(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||f,show:this.context.isOpen}),s),j=p;if(b||this.context.isOpen&&!this.context.inNavbar){var N=kee[this.context.direction]||"bottom",H=c||f?"end":"start",R="".concat(N,"-").concat(H),V=[].concat(dee(x),[{name:"flip",enabled:!!v}]),W=Y.createElement(QS,{placement:R,modifiers:V,strategy:w},function(q){var Q=q.ref,oe=q.style,le=q.placement,G=q.update,F=fM(fM({},i.props.style),oe),A=function(re){Q(re);var U=i.context.onMenuRef;U&&U(re)};return Y.createElement(j,$g({tabIndex:"-1",role:i.getRole(),ref:A},k,{style:F,"aria-hidden":!i.context.isOpen,className:P,"data-popper-placement":le,onClick:function(){return C&&G()}}))});return S?zs.createPortal(W,Fd(S)):W}var ee=this.context.onMenuRef;return Y.createElement(j,$g({tabIndex:"-1",role:this.getRole()},k,{ref:ee,"aria-hidden":!this.context.isOpen,className:P,"data-popper-placement":k.placement}))}}]),n}(Y.Component);JS.propTypes=Eee;JS.contextType=Ud;const vu=JS;function cw(e){"@babel/helpers - typeof";return cw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cw(e)}var Pee=["className","color","cssModule","caret","split","nav","tag","innerRef"];function Tee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Dee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zg(e){return zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zg(e)}var Fee={caret:D.bool,color:D.string,children:D.node,className:D.string,cssModule:D.object,disabled:D.bool,onClick:D.func,"aria-haspopup":D.bool,split:D.bool,tag:rt,nav:D.bool,innerRef:D.oneOfType([D.object,D.string,D.func])},$ee={color:"secondary","aria-haspopup":!0},ky=function(e){Ree(n,e);var t=Nee(n);function n(r){var i;return Dee(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(D4(i)),i}return Lee(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,c=o.caret,f=o.split,d=o.nav,p=o.tag,g=o.innerRef,v=Mee(o,Pee),y=v["aria-label"]||"Toggle Dropdown",x=He(Ee(a,{"dropdown-toggle":c||f,"dropdown-toggle-split":f,"nav-link":d}),l),b=typeof v.children<"u"?v.children:Y.createElement("span",{className:"visually-hidden"},y),w;return d&&!p?(w="a",v.href="#"):p?w=p:(w=yt,v.color=s,v.cssModule=l),this.context.inNavbar?Y.createElement(w,Ug({},v,{className:x,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:b})):Y.createElement(M4,{innerRef:g},function(S){var C=S.ref,k=function(j){C(j);var N=i.context.onToggleRef;N&&N(j)};return Y.createElement(w,Ug({},v,Tee({},typeof w=="string"?"ref":"innerRef",k),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:b}))})}}]),n}(Y.Component);ky.propTypes=Fee;ky.defaultProps=$ee;ky.contextType=Ud;const vh=ky;function Vg(e,t){return Vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vg(e,t)}function Bee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Vg(e,t)}const pM={disabled:!1},L4=Y.createContext(null);var _f="unmounted",Es="exited",ks="entering",Yl="entered",fw="exiting",Ko=function(e){Bee(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Es,o.appearStatus=ks):l=Yl:r.unmountOnExit||r.mountOnEnter?l=_f:l=Es,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===_f?{status:Es}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==ks&&a!==Yl&&(o=ks):(a===ks||a===Yl)&&(o=fw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===ks?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===Es&&this.setState({status:_f})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[zs.findDOMNode(this),s],c=l[0],f=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!i&&!a||pM.disabled){this.safeSetState({status:Yl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:ks},function(){o.props.onEntering(c,f),o.onTransitionEnd(p,function(){o.safeSetState({status:Yl},function(){o.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:zs.findDOMNode(this);if(!o||pM.disabled){this.safeSetState({status:Es},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:fw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Es},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:zs.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],f=l[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===_f)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=G2(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(L4.Provider,{value:null},typeof a=="function"?a(i,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);Ko.contextType=L4;Ko.propTypes={};function Il(){}Ko.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Il,onEntering:Il,onEntered:Il,onExit:Il,onExiting:Il,onExited:Il};Ko.UNMOUNTED=_f;Ko.EXITED=Es;Ko.ENTERING=ks;Ko.ENTERED=Yl;Ko.EXITING=fw;const yu=Ko;function $e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Uee=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function mM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zd(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Kee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yg(e){return Yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yg(e)}function vM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qc(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var cte={body:D.bool,className:D.string,color:D.string,cssModule:D.object,innerRef:D.oneOfType([D.object,D.string,D.func]),inverse:D.bool,outline:D.bool,tag:rt};function Yr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,c=e.innerRef,f=ste(e,ate),d=He(Ee(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return Y.createElement(l,pw({},f,{className:d,ref:c}))}Yr.propTypes=cte;var ute=["className","cssModule","innerRef","tag"];function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hte={className:D.string,cssModule:D.object,innerRef:D.oneOfType([D.object,D.string,D.func]),tag:rt};function Gc(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=fte(e,ute),s=He(Ee(t,"card-body"),n);return Y.createElement(o,mw({},a,{className:s,ref:r}))}Gc.propTypes=hte;var pte=["className","cssModule","tag"];function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var vte={className:D.string,cssModule:D.object,tag:rt};function A4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=mte(e,pte),a=He(Ee(t,"card-footer"),n);return Y.createElement(i,gw({},o,{className:a}))}A4.propTypes=vte;var yte=["className","cssModule","tag"];function vw(){return vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wte={className:D.string,cssModule:D.object,tag:rt};function Kc(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=_te(e,yte),a=He(Ee(t,"card-header"),n);return Y.createElement(i,vw({},o,{className:a}))}Kc.propTypes=wte;var xte=["className","cssModule","tag"];function yw(){return yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ote(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Cte={className:D.string,cssModule:D.object,tag:rt};function I4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=Ste(e,xte),a=He(Ee(t,"card-text"),n);return Y.createElement(i,yw({},o,{className:a}))}I4.propTypes=Cte;var Ete=["className","cssModule","tag"];function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Tte={className:D.string,cssModule:D.object,tag:rt};function F4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=kte(e,Ete),a=He(Ee(t,"card-title"),n);return Y.createElement(i,_w({},o,{className:a}))}F4.propTypes=Tte;function bw(e){"@babel/helpers - typeof";return bw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bw(e)}var Mte=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ate(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ite(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _M(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qg(e){return qg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qg(e)}function bM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rm(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gg(e){return Gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gg(e)}var Py={children:D.oneOfType([D.node,D.func]),placement:D.oneOf(xQ),target:zc.isRequired,container:zc,isOpen:D.bool,disabled:D.bool,hideArrow:D.bool,boundariesElement:D.oneOfType([D.string,US]),className:D.string,innerClassName:D.string,arrowClassName:D.string,popperClassName:D.string,cssModule:D.object,toggle:D.func,autohide:D.bool,placementPrefix:D.string,delay:D.oneOfType([D.shape({show:D.number,hide:D.number}),D.number]),modifiers:D.array,strategy:D.string,offset:D.arrayOf(D.number),innerRef:D.oneOfType([D.func,D.string,D.object]),trigger:D.string,fade:D.bool,flip:D.bool},$4={show:0,hide:50},ene={isOpen:!1,hideArrow:!1,autohide:!1,delay:$4,toggle:function(){},trigger:"click",fade:!0};function B4(e,t){return t&&(e===t||t.contains(e))}function xM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return B4(e,n)})[0]}var nO=function(e){Zte(n,e);var t=Qte(n);function n(r){var i;return Gte(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(Dr(i)),i.handleDocumentClick=i.handleDocumentClick.bind(Dr(i)),i.removeTargetEvents=i.removeTargetEvents.bind(Dr(i)),i.toggle=i.toggle.bind(Dr(i)),i.showWithDelay=i.showWithDelay.bind(Dr(i)),i.hideWithDelay=i.hideWithDelay.bind(Dr(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(Dr(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(Dr(i)),i.show=i.show.bind(Dr(i)),i.hide=i.hide.bind(Dr(i)),i.onEscKeyDown=i.onEscKeyDown.bind(Dr(i)),i.getRef=i.getRef.bind(Dr(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return Kte(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||xM(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!B4(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&xM(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):Vd(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return Vd(o)==="object"?isNaN(o[i])?$4[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}},{key:"updateTarget",value:function(){var i=Fd(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,c=a.innerClassName,f=a.isOpen,d=a.hideArrow,p=a.boundariesElement,g=a.placement,v=a.placementPrefix,y=a.arrowClassName,x=a.popperClassName,b=a.container,w=a.modifiers,S=a.strategy,C=a.offset,k=a.fade,P=a.flip,j=a.children,N=rs(this.props,Object.keys(Py)),H=He(x,l),R=He(c,l);return Y.createElement(qte,{className:s,target:o,isOpen:f,hideArrow:d,boundariesElement:p,placement:g,placementPrefix:v,arrowClassName:y,popperClassName:H,container:b,modifiers:w,strategy:S,offset:C,cssModule:l,fade:k,flip:P},function(V){var W=V.update;return Y.createElement("div",Ow({},N,{ref:i.getRef,className:R,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof j=="function"?j({update:W}):j)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(Y.Component);nO.propTypes=Py;nO.defaultProps=ene;const U4=nO;function Ew(){return Ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function one(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ane={animated:D.bool,bar:D.bool,barAriaLabelledBy:D.string,barAriaValueText:D.string,barClassName:D.string,barStyle:D.object,children:D.node,className:D.string,cssModule:D.object,color:D.string,max:D.oneOfType([D.string,D.number]),min:D.oneOfType([D.string,D.number]),multi:D.bool,striped:D.bool,style:D.object,tag:rt,value:D.oneOfType([D.string,D.number])};function z4(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,c=e.max,f=c===void 0?100:c,d=e.animated,p=e.striped,g=e.color,v=e.bar,y=e.multi,x=e.tag,b=x===void 0?"div":x,w=e.style,S=w===void 0?{}:w,C=e.barStyle,k=C===void 0?{}:C,P=e.barAriaValueText,j=e.barAriaLabelledBy,N=ine(e,nne),H=YT(a)/YT(f)*100,R=He(Ee(n,"progress"),i),V=He(Ee("progress-bar",v&&n||r,d?"progress-bar-animated":null,g?"bg-".concat(g):null,p||d?"progress-bar-striped":null),i),W={className:V,style:m_(m_(m_({},v?S:{}),k),{},{width:"".concat(H,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":f,"aria-valuetext":P,"aria-labelledby":j,children:t};return v?Y.createElement(b,Kg({},N,W)):Y.createElement(b,Kg({},N,{style:S,className:R}),y?t:Y.createElement("div",W))}z4.propTypes=ane;function kw(e){"@babel/helpers - typeof";return kw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kw(e)}function sne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zg(e){return Zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zg(e)}var pne={children:D.node.isRequired,node:D.any},V4=function(e){cne(n,e);var t=une(n);function n(){return sne(this,n),t.apply(this,arguments)}return lne(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return zS?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),zs.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(Y.Component);V4.propTypes=pne;const mne=V4;function Tw(e){"@babel/helpers - typeof";return Tw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tw(e)}function CM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $l(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qg(e){return Qg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qg(e)}function Xg(){}var kM=D.shape(gr.propTypes),H4={autoFocus:D.bool,backdrop:D.oneOfType([D.bool,D.oneOf(["static"])]),backdropClassName:D.string,backdropTransition:kM,centered:D.bool,children:D.node,contentClassName:D.string,className:D.string,container:zc,cssModule:D.object,external:D.node,fade:D.bool,fullscreen:D.oneOfType([D.bool,D.oneOf(["sm","md","lg","xl"])]),innerRef:D.oneOfType([D.object,D.string,D.func]),isOpen:D.bool,keyboard:D.bool,labelledBy:D.string,modalClassName:D.string,modalTransition:kM,onClosed:D.func,onEnter:D.func,onExit:D.func,onOpened:D.func,returnFocusAfterClose:D.bool,role:D.string,scrollable:D.bool,size:D.string,toggle:D.func,trapFocus:D.bool,unmountOnClose:D.bool,wrapClassName:D.string,zIndex:D.oneOfType([D.number,D.string])},xne=Object.keys(H4),Sne={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Xg,onClosed:Xg,modalTransition:{timeout:Lg.Modal},backdropTransition:{mountOnEnter:!0,timeout:Lg.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},yh=function(e){yne(n,e);var t=_ne(n);function n(r){var i;return gne(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(ri(i)),i.handleBackdropClick=i.handleBackdropClick.bind(ri(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(ri(i)),i.handleEscape=i.handleEscape.bind(ri(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(ri(i)),i.handleTab=i.handleTab.bind(ri(i)),i.onOpened=i.onOpened.bind(ri(i)),i.onClosed=i.onClosed.bind(ri(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(ri(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(ri(i)),i.trapFocus=i.trapFocus.bind(ri(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return vne(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Fd(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=yQ(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),_Q(),n.openCount===0&&(document.body.className=Ee(document.body.className,He("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=He("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),o4(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=rs(this.props,xne),s="modal-dialog";return Y.createElement("div",Wf({},a,{className:He(Ee(s,this.props.className,(i={},ql(i,"modal-".concat(this.props.size),this.props.size),ql(i,"".concat(s,"-centered"),this.props.centered),ql(i,"".concat(s,"-scrollable"),this.props.scrollable),ql(i,"modal-fullscreen",this.props.fullscreen===!0),ql(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),Y.createElement("div",{className:He(Ee("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,c=a.backdropClassName,f=a.cssModule,d=a.isOpen,p=a.backdrop,g=a.role,v=a.labelledBy,y=a.external,x=a.innerRef,b={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":v,"aria-modal":!0,role:g,tabIndex:"-1"},w=this.props.fade,S=$l($l($l({},gr.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),C=$l($l($l({},gr.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),k=p&&(w?Y.createElement(gr,Wf({},C,{in:d&&!!p,cssModule:f,className:He(Ee("modal-backdrop",c),f)})):Y.createElement("div",{className:He(Ee("modal-backdrop","show",c),f)}));return Y.createElement(mne,{node:this._element},Y.createElement("div",{className:He(s)},Y.createElement(gr,Wf({},b,S,{in:d,onEntered:this.onOpened,onExited:this.onClosed,cssModule:f,className:He(Ee("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),f),innerRef:x}),y,this.renderModalDialog()),k))}return null}}]),n}(Y.Component);yh.propTypes=H4;yh.defaultProps=Sne;yh.openCount=0;yh.originalBodyOverflow=null;const Zo=yh;var One=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function jw(){return jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ene(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var kne={children:D.node,className:D.string,close:D.object,closeAriaLabel:D.string,cssModule:D.object,tag:rt,toggle:D.func,wrapTag:rt};function Qo(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,c=l===void 0?"div":l,f=e.closeAriaLabel,d=f===void 0?"Close":f,p=e.close,g=Cne(e,One),v=He(Ee(n,"modal-header"),r);return!p&&o&&(t=Y.createElement("button",{type:"button",onClick:o,className:He("btn-close",r),"aria-label":d})),Y.createElement(c,jw({},g,{className:v}),Y.createElement(s,{className:He("modal-title",r)},i),p||t)}Qo.propTypes=kne;var Pne=["className","cssModule","tag"];function Dw(){return Dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var jne={className:D.string,cssModule:D.object,tag:rt};function fo(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Tne(e,Pne),a=He(Ee(t,"modal-body"),n);return Y.createElement(i,Dw({},o,{className:a}))}fo.propTypes=jne;var Dne=["className","cssModule","tag"];function Lw(){return Lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Nne={className:D.string,cssModule:D.object,tag:rt};function gl(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=Lne(e,Dne),a=He(Ee(t,"modal-footer"),n);return Y.createElement(i,Lw({},o,{className:a}))}gl.propTypes=Nne;function Rw(){return Rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Bne={className:D.string,cssModule:D.object,flush:D.bool,horizontal:D.oneOfType([D.bool,D.string]),numbered:D.bool,tag:rt},Une=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function W4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,c=l===void 0?!1:l,f=Fne(e,Ine),d=He(Ee(t,"list-group",o?"list-group-flush":Une(s),{"list-group-numbered":c}),n);return Y.createElement(i,Nw({},f,{className:d}))}W4.propTypes=Bne;var zne=["className","cssModule","row","disabled","check","inline","floating","tag","switch"];function Aw(){return Aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Wne={children:D.node,row:D.bool,check:D.bool,switch:D.bool,inline:D.bool,floating:D.bool,disabled:D.bool,tag:rt,className:D.string,cssModule:D.object};function Fr(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.tag,c=l===void 0?"div":l,f=e.switch,d=Vne(e,zne),p=o||f,g=He(Ee(t,r?"row":!1,p?"form-check":"mb-3",f?"form-switch":!1,p&&a?"form-check-inline":!1,p&&i?"disabled":!1,s&&"form-floating"),n);return c==="fieldset"&&(d.disabled=i),Y.createElement(c,Aw({},d,{className:g}))}Fr.propTypes=Wne;function Iw(e){"@babel/helpers - typeof";return Iw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iw(e)}var Yne=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function Fw(){return Fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Kne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PM(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jg(e){return Jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jg(e)}var tre={children:D.node,type:D.string,size:D.oneOfType([D.number,D.string]),bsSize:D.string,valid:D.bool,invalid:D.bool,tag:rt,innerRef:D.oneOfType([D.object,D.func,D.string]),plaintext:D.bool,addon:D.bool,className:D.string,cssModule:D.object},Y4=function(e){Qne(n,e);var t=Xne(n);function n(r){var i;return Kne(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(Bw(i)),i.focus=i.focus.bind(Bw(i)),i}return Zne(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,c=i.bsSize,f=i.valid,d=i.invalid,p=i.tag,g=i.addon,v=i.plaintext,y=i.innerRef,x=qne(i,Yne),b=["switch","radio","checkbox"].indexOf(l)>-1,w=/\D/g,S=l==="textarea",C=l==="select",k=l==="range",P=p||(C||S?l:"input"),j="form-control";v?(j="".concat(j,"-plaintext"),P=p||"input"):k?j="form-range":C?j="form-select":b&&(g?j=null:j="form-check-input"),x.size&&w.test(x.size)&&(A1(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var N=He(Ee(o,d&&"is-invalid",f&&"is-valid",c?C?"form-select-".concat(c):"form-control-".concat(c):!1,j),a);return(P==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(v||l==="select"||typeof P!="string"||P==="select")&&(A1('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),Y.createElement(P,Fw({},x,{ref:y,className:N,"aria-invalid":d}))}}]),n}(Y.Component);Y4.propTypes=tre;const Zc=Y4;var nre=["className","cssModule","tag","type","size"];function ev(){return ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ire(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ore={className:D.string,cssModule:D.object,size:D.string,tag:rt,type:D.string};function Ty(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=rre(e,nre),s=He(Ee(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?Y.createElement(gh,ev({},a,{className:s})):Y.createElement(j4.Provider,{value:{insideInputGroup:!0}},Y.createElement(i,ev({},a,{className:s})))}Ty.propTypes=ore;var are=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function Uw(){return Uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ure={children:D.node,className:D.string,listClassName:D.string,cssModule:D.object,size:D.string,tag:rt,listTag:rt,"aria-label":D.string};function iO(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,c=e["aria-label"],f=c===void 0?"pagination":c,d=lre(e,are),p=He(Ee(t),r),g=He(Ee(n,"pagination",sre({},"pagination-".concat(i),!!i)),r);return Y.createElement(a,{className:p,"aria-label":f},Y.createElement(l,Uw({},d,{className:g})))}iO.propTypes=ure;var fre=["active","className","cssModule","disabled","tag"];function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var pre={active:D.bool,children:D.node,className:D.string,cssModule:D.object,disabled:D.bool,tag:rt};function Hs(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=dre(e,fre),l=He(Ee(n,"page-item",{active:t,disabled:i}),r);return Y.createElement(a,zw({},s,{className:l}))}Hs.propTypes=pre;var mre=["className","cssModule","next","previous","first","last","tag"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var yre={"aria-label":D.string,children:D.node,className:D.string,cssModule:D.object,next:D.bool,previous:D.bool,first:D.bool,last:D.bool,tag:rt};function Ws(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,c=gre(e,mre),f=He(Ee(t,"page-link"),n),d;i?d="Previous":r?d="Next":o?d="First":a&&(d="Last");var p=e["aria-label"]||d,g;i?g="‹":r?g="›":o?g="«":a&&(g="»");var v=e.children;return v&&Array.isArray(v)&&v.length===0&&(v=null),!c.href&&l==="a"&&(l="button"),(i||r||o||a)&&(v=[Y.createElement("span",{"aria-hidden":"true",key:"caret"},v||g),Y.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),Y.createElement(l,Vw({},c,{className:f,"aria-label":p}),v)}Ws.propTypes=yre;var _re=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Sre={children:D.node,className:D.string,closeClassName:D.string,closeAriaLabel:D.string,color:D.string,cssModule:D.object,fade:D.bool,innerRef:D.oneOfType([D.object,D.string,D.func]),isOpen:D.bool,tag:rt,toggle:D.func,transition:D.shape(gr.propTypes)};function q4(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,c=l===void 0?"success":l,f=e.isOpen,d=f===void 0?!0:f,p=e.toggle,g=e.children,v=e.transition,y=v===void 0?ef(ef({},gr.defaultProps),{},{unmountOnExit:!0}):v,x=e.fade,b=x===void 0?!0:x,w=e.innerRef,S=wre(e,_re),C=He(Ee(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),k=He(Ee("btn-close",n),o),P=ef(ef(ef({},gr.defaultProps),y),{},{baseClass:b?y.baseClass:"",timeout:b?y.timeout:0});return Y.createElement(gr,Hw({},S,P,{tag:s,className:C,in:d,role:"alert",innerRef:w}),p?Y.createElement("button",{type:"button",className:k,"aria-label":i,onClick:p}):null,g)}q4.propTypes=Sre;var Ore=["className","cssModule","tag","active","disabled","action","color"];function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ere(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var kre={action:D.bool,active:D.bool,className:D.string,cssModule:D.object,color:D.string,disabled:D.bool,tag:rt},Pre=function(t){t.preventDefault()};function G4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,c=Cre(e,Ore),f=He(Ee(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(c.onClick=Pre),Y.createElement(i,Ww({},c,{className:f}))}G4.propTypes=kre;function Yw(e){"@babel/helpers - typeof";return Yw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yw(e)}function MM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tv(e){return tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tv(e)}var Ire=["defaultOpen"],bh=function(e){Lre(n,e);var t=Rre(n);function n(r){var i;return jre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(K4(i)),i}return Dre(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return Y.createElement(gh,qw({isOpen:this.state.isOpen,toggle:this.toggle},rs(this.props,Ire)))}}]),n}(B.Component);bh.propTypes=Tre({defaultOpen:D.bool,onToggle:D.func},gh.propTypes);function Kw(e){"@babel/helpers - typeof";return Kw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kw(e)}function DM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nv(e){return nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nv(e)}var Yre=["defaultOpen"],jr=function(e){zre(n,e);var t=Vre(n);function n(r){var i;return Bre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(Z4(i)),i}return Ure(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return Y.createElement(_h,Zw({isOpen:this.state.isOpen,toggle:this.toggle},rs(this.props,Yre)))}}]),n}(B.Component);jr.propTypes=Fre({defaultOpen:D.bool},_h.propTypes);function Q4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qre(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var X4={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i({error:"border-danger",default:""})[e],Zre=e=>({error:"text-danger",default:"text-muted"})[e],Do=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=fi({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(mr,{className:fi("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Yr,{className:Kre(r),body:!0,children:g.jsxs("h3",{className:fi("text-center mb-0",Zre(r)),children:[n&&g.jsx(Ie,{icon:_A,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},hn=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Yr,{...r,children:[e&&g.jsx(Kc,{role:"heading",children:e}),g.jsx(Gc,{className:n,children:t})]}),zr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(mr,{className:n,children:g.jsx("div",{className:fi({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(hn,{role:"document",className:fi("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:fi({"p-2":r}),children:e})})});let Wp;const Qre=new Uint8Array(16);function Xre(){if(!Wp&&(Wp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wp(Qre)}const Vn=[];for(let e=0;e<256;++e)Vn.push((e+256).toString(16).slice(1));function Jre(e,t=0){return(Vn[e[t+0]]+Vn[e[t+1]]+Vn[e[t+2]]+Vn[e[t+3]]+"-"+Vn[e[t+4]]+Vn[e[t+5]]+"-"+Vn[e[t+6]]+Vn[e[t+7]]+"-"+Vn[e[t+8]]+Vn[e[t+9]]+"-"+Vn[e[t+10]]+Vn[e[t+11]]+Vn[e[t+12]]+Vn[e[t+13]]+Vn[e[t+14]]+Vn[e[t+15]]).toLowerCase()}const eie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),RM={randomUUID:eie};function tie(e,t,n){if(RM.randomUUID&&!t&&!e)return RM.randomUUID();e=e||{};const r=e.random||(e.rng||Xre)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Jre(r)}const mn=(e=!1)=>{const[t,n]=B.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},My=()=>{const{current:e}=B.useRef(`dom-${tie()}`);return e},gl=()=>B.useRef(null),J4=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=My(),s=f=>t==null?void 0:t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return g.jsxs("span",{className:fi("form-check",l,n),style:c,children:[g.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),g.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},e6=e=>g.jsx(J4,{type:"checkbox",...e}),Qc=e=>g.jsx(J4,{type:"switch",...e}),_u=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>g.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[g.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),Nm=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=My();return g.jsx(_u,{label:g.jsxs(g.Fragment,{children:[e,":"]}),className:a??"",labelClassName:s,id:l,children:g.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},nie=500;let Am;const NM=()=>{Am&&clearTimeout(Am),Am=null},wh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=B.useState(i),l=(c,f=nie)=>{s(c),NM(),Am=o(()=>{e(c),NM()},f)};return g.jsxs("div",{className:fi("search-field",t),children:[g.jsx("input",{type:"text",className:fi("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:c=>l(c.target.value)}),g.jsx(Ie,{icon:aK,className:"search-field__icon"}),g.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},Xo=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c})=>{const[f,d]=mn(),p=fi("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),m={minWidth:s&&`${s}px`};return g.jsxs(gh,{isOpen:f,toggle:d,disabled:t,className:i,children:[g.jsx(vh,{size:c,caret:!o,className:p,color:"primary",children:e}),g.jsx(vu,{className:"w-100",end:a,style:m,children:r})]})},jy=({children:e,minWidth:t})=>g.jsx(Xo,{text:g.jsx(Ie,{className:"px-1",icon:QG}),size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),Yf=({children:e,...t})=>g.jsx(m4,{className:"nav-pills__nav-link",tag:HN,...t,children:e}),t6=({children:e,fill:t=!1,className:n=""})=>g.jsx(Yr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:g.jsx(VS,{pills:!0,fill:t,children:B.Children.map(e,r=>{if(!B.isValidElement(r)||r.type!==Yf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),Dy=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",n6=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),r6=e=>e.dir?`${e.field}-${e.dir}`:void 0,rie=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function xh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=Dy(s,t.field,t.dir);n(l?s:void 0,l)};return g.jsxs(bh,{children:[g.jsxs(vh,{caret:!0,color:r?"primary":"link",className:fi({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&g.jsx(g.Fragment,{children:"Order by"}),r&&!t.field&&g.jsx("i",{children:"Order by..."}),r&&t.field&&g.jsxs(g.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",g.jsx("small",{children:t.dir??"DESC"})]})]}),g.jsxs(vu,{end:i,className:fi("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>g.jsxs(Ue,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&g.jsx(Ie,{icon:t.dir==="ASC"?tK:UG,className:"ordering-dropdown__sort-icon"})]},s)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:g.jsx("i",{children:"Clear selection"})})]})]})}const oO="#4696e5",iie="rgba(70, 150, 229, 0.4)",i6="#f77f28",oie="rgba(247, 127, 40, 0.4)",aie="white",sie="#161b22",o6=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},lie=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"};var cie=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0},AM=typeof Symbol<"u"&&Symbol,uie=cie,fie=function(){return typeof AM!="function"||typeof Symbol!="function"||typeof AM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:uie()},IM={foo:{}},die=Object,hie=function(){return{__proto__:IM}.foo===IM.foo&&!({__proto__:null}instanceof die)},pie="Function.prototype.bind called on incompatible ",g_=Array.prototype.slice,mie=Object.prototype.toString,gie="[object Function]",vie=function(e){var t=this;if(typeof t!="function"||mie.call(t)!==gie)throw new TypeError(pie+t);for(var n=g_.call(arguments,1),r,i=function(){if(this instanceof r){var c=t.apply(this,n.concat(g_.call(arguments)));return Object(c)===c?c:this}else return t.apply(e,n.concat(g_.call(arguments)))},o=Math.max(0,t.length-n.length),a=[],s=0;s"u"||!kn?ot:kn(Uint8Array),Ys={"%AggregateError%":typeof AggregateError>"u"?ot:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ot:ArrayBuffer,"%ArrayIteratorPrototype%":Bl&&kn?kn([][Symbol.iterator]()):ot,"%AsyncFromSyncIteratorPrototype%":ot,"%AsyncFunction%":Gl,"%AsyncGenerator%":Gl,"%AsyncGeneratorFunction%":Gl,"%AsyncIteratorPrototype%":Gl,"%Atomics%":typeof Atomics>"u"?ot:Atomics,"%BigInt%":typeof BigInt>"u"?ot:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ot:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ot:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ot:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ot:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ot:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ot:FinalizationRegistry,"%Function%":a6,"%GeneratorFunction%":Gl,"%Int8Array%":typeof Int8Array>"u"?ot:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ot:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ot:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bl&&kn?kn(kn([][Symbol.iterator]())):ot,"%JSON%":typeof JSON=="object"?JSON:ot,"%Map%":typeof Map>"u"?ot:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bl||!kn?ot:kn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ot:Promise,"%Proxy%":typeof Proxy>"u"?ot:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ot:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ot:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bl||!kn?ot:kn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ot:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bl&&kn?kn(""[Symbol.iterator]()):ot,"%Symbol%":Bl?Symbol:ot,"%SyntaxError%":Xc,"%ThrowTypeError%":wie,"%TypedArray%":Sie,"%TypeError%":Cc,"%Uint8Array%":typeof Uint8Array>"u"?ot:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ot:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ot:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ot:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ot:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ot:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ot:WeakSet};if(kn)try{null.error}catch(e){var Oie=kn(kn(e));Ys["%Error.prototype%"]=Oie}var Cie=function e(t){var n;if(t==="%AsyncFunction%")n=v_("async function () {}");else if(t==="%GeneratorFunction%")n=v_("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=v_("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&kn&&(n=kn(i.prototype))}return Ys[t]=n,n},FM={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Sh=aO,rv=bie,Eie=Sh.call(Function.call,Array.prototype.concat),kie=Sh.call(Function.apply,Array.prototype.splice),$M=Sh.call(Function.call,String.prototype.replace),iv=Sh.call(Function.call,String.prototype.slice),Pie=Sh.call(Function.call,RegExp.prototype.exec),Tie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Mie=/\\(\\)?/g,jie=function(e){var t=iv(e,0,1),n=iv(e,-1);if(t==="%"&&n!=="%")throw new Xc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Xc("invalid intrinsic syntax, expected opening `%`");var r=[];return $M(e,Tie,function(i,o,a,s){r[r.length]=a?$M(s,Mie,"$1"):o||i}),r},Die=function(e,t){var n=e,r;if(rv(FM,n)&&(r=FM[n],n="%"+r[0]+"%"),rv(Ys,n)){var i=Ys[n];if(i===Gl&&(i=Cie(n)),typeof i>"u"&&!t)throw new Cc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new Xc("intrinsic "+e+" does not exist!")},sO=function(e,t){if(typeof e!="string"||e.length===0)throw new Cc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Cc('"allowMissing" argument must be a boolean');if(Pie(/^%?[^%]*%?$/,e)===null)throw new Xc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=jie(e),r=n.length>0?n[0]:"",i=Die("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],kie(n,Eie([0,1],l)));for(var c=1,f=!0;c=n.length){var v=Ws(a,d);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[d]}else f=rv(a,d),a=a[d];f&&!s&&(Ys[o]=a)}}return a},s6={exports:{}};(function(e){var t=aO,n=sO,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var d=o(t,i,arguments);if(a&&s){var p=a(d,"length");p.configurable&&s(d,"length",{value:1+l(0,f.length-(arguments.length-1))})}return d};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(s6);var Lie=s6.exports,l6=sO,c6=Lie,Rie=c6(l6("String.prototype.indexOf")),Nie=function(e,t){var n=l6(e,!!t);return typeof n=="function"&&Rie(e,".prototype.")>-1?c6(n):n};const Aie={},Iie=Object.freeze(Object.defineProperty({__proto__:null,default:Aie},Symbol.toStringTag,{value:"Module"})),Fie=qre(Iie);var lO=typeof Map=="function"&&Map.prototype,__=Object.getOwnPropertyDescriptor&&lO?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ov=lO&&__&&typeof __.get=="function"?__.get:null,BM=lO&&Map.prototype.forEach,cO=typeof Set=="function"&&Set.prototype,b_=Object.getOwnPropertyDescriptor&&cO?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,av=cO&&b_&&typeof b_.get=="function"?b_.get:null,UM=cO&&Set.prototype.forEach,$ie=typeof WeakMap=="function"&&WeakMap.prototype,qf=$ie?WeakMap.prototype.has:null,Bie=typeof WeakSet=="function"&&WeakSet.prototype,Gf=Bie?WeakSet.prototype.has:null,Uie=typeof WeakRef=="function"&&WeakRef.prototype,zM=Uie?WeakRef.prototype.deref:null,zie=Boolean.prototype.valueOf,Vie=Object.prototype.toString,Hie=Function.prototype.toString,Wie=String.prototype.match,uO=String.prototype.slice,Ea=String.prototype.replace,Yie=String.prototype.toUpperCase,VM=String.prototype.toLowerCase,u6=RegExp.prototype.test,HM=Array.prototype.concat,Zi=Array.prototype.join,qie=Array.prototype.slice,WM=Math.floor,Xw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,w_=Object.getOwnPropertySymbols,Jw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ar=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Jc||"symbol")?Symbol.toStringTag:null,f6=Object.prototype.propertyIsEnumerable,YM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function qM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||u6.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-WM(-e):WM(e);if(r!==e){var i=String(r),o=uO.call(t,i.length+1);return Ea.call(i,n,"$&_")+"."+Ea.call(Ea.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ea.call(t,n,"$&_")}var ex=Fie,GM=ex.custom,KM=h6(GM)?GM:null,Gie=function e(t,n,r,i){var o=n||{};if(da(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(da(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=da(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(da(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(da(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return m6(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?qM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?qM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return tx(t)?"[Array]":"[Object]";var d=doe(o,r);if(typeof i>"u")i=[];else if(p6(i,t)>=0)return"[Circular]";function p(ee,q,Q){if(q&&(i=qie.call(i),i.push(q)),Q){var oe={depth:o.depth};return da(o,"quoteStyle")&&(oe.quoteStyle=o.quoteStyle),e(ee,oe,r+1,i)}return e(ee,o,r+1,i)}if(typeof t=="function"&&!ZM(t)){var m=roe(t),v=Yp(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+Zi.call(v,", ")+" }":"")}if(h6(t)){var y=Jc?Ea.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Jw.call(t);return typeof t=="object"&&!Jc?tf(y):y}if(coe(t)){for(var x="<"+VM.call(String(t.nodeName)),b=t.attributes||[],w=0;w",x}if(tx(t)){if(t.length===0)return"[]";var S=Yp(t,p);return d&&!foe(S)?"["+nx(S,d)+"]":"[ "+Zi.call(S,", ")+" ]"}if(Qie(t)){var C=Yp(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!f6.call(t,"cause")?"{ ["+String(t)+"] "+Zi.call(HM.call("[cause]: "+p(t.cause),C),", ")+" }":C.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Zi.call(C,", ")+" }"}if(typeof t=="object"&&a){if(KM&&typeof t[KM]=="function"&&ex)return ex(t,{depth:f-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ioe(t)){var k=[];return BM&&BM.call(t,function(ee,q){k.push(p(q,t,!0)+" => "+p(ee,t))}),QM("Map",ov.call(t),k,d)}if(soe(t)){var P=[];return UM&&UM.call(t,function(ee){P.push(p(ee,t))}),QM("Set",av.call(t),P,d)}if(ooe(t))return x_("WeakMap");if(loe(t))return x_("WeakSet");if(aoe(t))return x_("WeakRef");if(Jie(t))return tf(p(Number(t)));if(toe(t))return tf(p(Xw.call(t)));if(eoe(t))return tf(zie.call(t));if(Xie(t))return tf(p(String(t)));if(!Zie(t)&&!ZM(t)){var j=Yp(t,p),N=YM?YM(t)===Object.prototype:t instanceof Object||t.constructor===Object,H=t instanceof Object?"":"null prototype",R=!N&&ar&&Object(t)===t&&ar in t?uO.call(os(t),8,-1):H?"Object":"",V=N||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=V+(R||H?"["+Zi.call(HM.call([],R||[],H||[]),": ")+"] ":"");return j.length===0?W+"{}":d?W+"{"+nx(j,d)+"}":W+"{ "+Zi.call(j,", ")+" }"}return String(t)};function d6(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Kie(e){return Ea.call(String(e),/"/g,""")}function tx(e){return os(e)==="[object Array]"&&(!ar||!(typeof e=="object"&&ar in e))}function Zie(e){return os(e)==="[object Date]"&&(!ar||!(typeof e=="object"&&ar in e))}function ZM(e){return os(e)==="[object RegExp]"&&(!ar||!(typeof e=="object"&&ar in e))}function Qie(e){return os(e)==="[object Error]"&&(!ar||!(typeof e=="object"&&ar in e))}function Xie(e){return os(e)==="[object String]"&&(!ar||!(typeof e=="object"&&ar in e))}function Jie(e){return os(e)==="[object Number]"&&(!ar||!(typeof e=="object"&&ar in e))}function eoe(e){return os(e)==="[object Boolean]"&&(!ar||!(typeof e=="object"&&ar in e))}function h6(e){if(Jc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Jw)return!1;try{return Jw.call(e),!0}catch{}return!1}function toe(e){if(!e||typeof e!="object"||!Xw)return!1;try{return Xw.call(e),!0}catch{}return!1}var noe=Object.prototype.hasOwnProperty||function(e){return e in this};function da(e,t){return noe.call(e,t)}function os(e){return Vie.call(e)}function roe(e){if(e.name)return e.name;var t=Wie.call(Hie.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function p6(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return m6(uO.call(e,0,t.maxStringLength),t)+r}var i=Ea.call(Ea.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,uoe);return d6(i,"single",t)}function uoe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Yie.call(t.toString(16))}function tf(e){return"Object("+e+")"}function x_(e){return e+" { ? }"}function QM(e,t,n,r){var i=r?nx(n,r):Zi.call(n,", ");return e+" ("+t+") {"+i+"}"}function foe(e){for(var t=0;t({error:"border-danger",default:""})[e],Zre=e=>({error:"text-danger",default:"text-muted"})[e],Do=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=fi({"col-md-12":i,"col-md-10 offset-md-1":!i});return m.jsx(mr,{className:fi("g-0",e),children:m.jsx("div",{className:o,children:m.jsx(Yr,{className:Kre(r),body:!0,children:m.jsxs("h3",{className:fi("text-center mb-0",Zre(r)),children:[n&&m.jsx(Ie,{icon:_A,spin:!0}),n&&m.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},hn=({title:e,children:t,bodyClassName:n,...r})=>m.jsxs(Yr,{...r,children:[e&&m.jsx(Kc,{role:"heading",children:e}),m.jsx(Gc,{className:n,children:t})]}),zr=({children:e,type:t,className:n,small:r=!1})=>m.jsx(mr,{className:n,children:m.jsx("div",{className:fi({"col-md-10 offset-md-1":!r,"col-12":r}),children:m.jsx(hn,{role:"document",className:fi("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:fi({"p-2":r}),children:e})})});let Wp;const Qre=new Uint8Array(16);function Xre(){if(!Wp&&(Wp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wp(Qre)}const Vn=[];for(let e=0;e<256;++e)Vn.push((e+256).toString(16).slice(1));function Jre(e,t=0){return(Vn[e[t+0]]+Vn[e[t+1]]+Vn[e[t+2]]+Vn[e[t+3]]+"-"+Vn[e[t+4]]+Vn[e[t+5]]+"-"+Vn[e[t+6]]+Vn[e[t+7]]+"-"+Vn[e[t+8]]+Vn[e[t+9]]+"-"+Vn[e[t+10]]+Vn[e[t+11]]+Vn[e[t+12]]+Vn[e[t+13]]+Vn[e[t+14]]+Vn[e[t+15]]).toLowerCase()}const eie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),RM={randomUUID:eie};function tie(e,t,n){if(RM.randomUUID&&!t&&!e)return RM.randomUUID();e=e||{};const r=e.random||(e.rng||Xre)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Jre(r)}const mn=(e=!1)=>{const[t,n]=B.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},My=()=>{const{current:e}=B.useRef(`dom-${tie()}`);return e},os=()=>B.useRef(null),J4=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=My(),s=f=>t==null?void 0:t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return m.jsxs("span",{className:fi("form-check",l,n),style:c,children:[m.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),m.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},e6=e=>m.jsx(J4,{type:"checkbox",...e}),Qc=e=>m.jsx(J4,{type:"switch",...e}),_u=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>m.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[m.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),Nm=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=My();return m.jsx(_u,{label:m.jsxs(m.Fragment,{children:[e,":"]}),className:a??"",labelClassName:s,id:l,children:m.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},nie=500;let Am;const NM=()=>{Am&&clearTimeout(Am),Am=null},wh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=B.useState(i),l=(c,f=nie)=>{s(c),NM(),Am=o(()=>{e(c),NM()},f)};return m.jsxs("div",{className:fi("search-field",t),children:[m.jsx("input",{type:"text",className:fi("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:c=>l(c.target.value)}),m.jsx(Ie,{icon:aK,className:"search-field__icon"}),m.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},Xo=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c})=>{const[f,d]=mn(),p=fi("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),g={minWidth:s&&`${s}px`};return m.jsxs(gh,{isOpen:f,toggle:d,disabled:t,className:i,children:[m.jsx(vh,{size:c,caret:!o,className:p,color:"primary",children:e}),m.jsx(vu,{className:"w-100",end:a,style:g,children:r})]})},jy=({children:e,minWidth:t})=>m.jsx(Xo,{text:m.jsx(Ie,{className:"px-1",icon:QG}),size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),Yf=({children:e,...t})=>m.jsx(m4,{className:"nav-pills__nav-link",tag:HN,...t,children:e}),t6=({children:e,fill:t=!1,className:n=""})=>m.jsx(Yr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:m.jsx(VS,{pills:!0,fill:t,children:B.Children.map(e,r=>{if(!B.isValidElement(r)||r.type!==Yf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),Dy=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",n6=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),r6=e=>e.dir?`${e.field}-${e.dir}`:void 0,rie=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function xh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=Dy(s,t.field,t.dir);n(l?s:void 0,l)};return m.jsxs(bh,{children:[m.jsxs(vh,{caret:!0,color:r?"primary":"link",className:fi({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&m.jsx(m.Fragment,{children:"Order by"}),r&&!t.field&&m.jsx("i",{children:"Order by..."}),r&&t.field&&m.jsxs(m.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",m.jsx("small",{children:t.dir??"DESC"})]})]}),m.jsxs(vu,{end:i,className:fi("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>m.jsxs(Ue,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&m.jsx(Ie,{icon:t.dir==="ASC"?tK:UG,className:"ordering-dropdown__sort-icon"})]},s)),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:m.jsx("i",{children:"Clear selection"})})]})]})}const oO="#4696e5",iie="rgba(70, 150, 229, 0.4)",i6="#f77f28",oie="rgba(247, 127, 40, 0.4)",aie="white",sie="#161b22",o6=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},lie=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"};var cie=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0},AM=typeof Symbol<"u"&&Symbol,uie=cie,fie=function(){return typeof AM!="function"||typeof Symbol!="function"||typeof AM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:uie()},IM={foo:{}},die=Object,hie=function(){return{__proto__:IM}.foo===IM.foo&&!({__proto__:null}instanceof die)},pie="Function.prototype.bind called on incompatible ",g_=Array.prototype.slice,mie=Object.prototype.toString,gie="[object Function]",vie=function(e){var t=this;if(typeof t!="function"||mie.call(t)!==gie)throw new TypeError(pie+t);for(var n=g_.call(arguments,1),r,i=function(){if(this instanceof r){var c=t.apply(this,n.concat(g_.call(arguments)));return Object(c)===c?c:this}else return t.apply(e,n.concat(g_.call(arguments)))},o=Math.max(0,t.length-n.length),a=[],s=0;s"u"||!kn?ot:kn(Uint8Array),qs={"%AggregateError%":typeof AggregateError>"u"?ot:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ot:ArrayBuffer,"%ArrayIteratorPrototype%":Bl&&kn?kn([][Symbol.iterator]()):ot,"%AsyncFromSyncIteratorPrototype%":ot,"%AsyncFunction%":Gl,"%AsyncGenerator%":Gl,"%AsyncGeneratorFunction%":Gl,"%AsyncIteratorPrototype%":Gl,"%Atomics%":typeof Atomics>"u"?ot:Atomics,"%BigInt%":typeof BigInt>"u"?ot:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ot:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ot:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ot:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ot:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ot:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ot:FinalizationRegistry,"%Function%":a6,"%GeneratorFunction%":Gl,"%Int8Array%":typeof Int8Array>"u"?ot:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ot:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ot:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bl&&kn?kn(kn([][Symbol.iterator]())):ot,"%JSON%":typeof JSON=="object"?JSON:ot,"%Map%":typeof Map>"u"?ot:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bl||!kn?ot:kn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ot:Promise,"%Proxy%":typeof Proxy>"u"?ot:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ot:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ot:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bl||!kn?ot:kn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ot:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bl&&kn?kn(""[Symbol.iterator]()):ot,"%Symbol%":Bl?Symbol:ot,"%SyntaxError%":Xc,"%ThrowTypeError%":wie,"%TypedArray%":Sie,"%TypeError%":Cc,"%Uint8Array%":typeof Uint8Array>"u"?ot:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ot:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ot:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ot:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ot:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ot:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ot:WeakSet};if(kn)try{null.error}catch(e){var Oie=kn(kn(e));qs["%Error.prototype%"]=Oie}var Cie=function e(t){var n;if(t==="%AsyncFunction%")n=v_("async function () {}");else if(t==="%GeneratorFunction%")n=v_("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=v_("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&kn&&(n=kn(i.prototype))}return qs[t]=n,n},FM={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Sh=aO,rv=bie,Eie=Sh.call(Function.call,Array.prototype.concat),kie=Sh.call(Function.apply,Array.prototype.splice),$M=Sh.call(Function.call,String.prototype.replace),iv=Sh.call(Function.call,String.prototype.slice),Pie=Sh.call(Function.call,RegExp.prototype.exec),Tie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Mie=/\\(\\)?/g,jie=function(e){var t=iv(e,0,1),n=iv(e,-1);if(t==="%"&&n!=="%")throw new Xc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Xc("invalid intrinsic syntax, expected opening `%`");var r=[];return $M(e,Tie,function(i,o,a,s){r[r.length]=a?$M(s,Mie,"$1"):o||i}),r},Die=function(e,t){var n=e,r;if(rv(FM,n)&&(r=FM[n],n="%"+r[0]+"%"),rv(qs,n)){var i=qs[n];if(i===Gl&&(i=Cie(n)),typeof i>"u"&&!t)throw new Cc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new Xc("intrinsic "+e+" does not exist!")},sO=function(e,t){if(typeof e!="string"||e.length===0)throw new Cc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Cc('"allowMissing" argument must be a boolean');if(Pie(/^%?[^%]*%?$/,e)===null)throw new Xc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=jie(e),r=n.length>0?n[0]:"",i=Die("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],kie(n,Eie([0,1],l)));for(var c=1,f=!0;c=n.length){var v=Ys(a,d);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[d]}else f=rv(a,d),a=a[d];f&&!s&&(qs[o]=a)}}return a},s6={exports:{}};(function(e){var t=aO,n=sO,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),a=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var d=o(t,i,arguments);if(a&&s){var p=a(d,"length");p.configurable&&s(d,"length",{value:1+l(0,f.length-(arguments.length-1))})}return d};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(s6);var Lie=s6.exports,l6=sO,c6=Lie,Rie=c6(l6("String.prototype.indexOf")),Nie=function(e,t){var n=l6(e,!!t);return typeof n=="function"&&Rie(e,".prototype.")>-1?c6(n):n};const Aie={},Iie=Object.freeze(Object.defineProperty({__proto__:null,default:Aie},Symbol.toStringTag,{value:"Module"})),Fie=qre(Iie);var lO=typeof Map=="function"&&Map.prototype,__=Object.getOwnPropertyDescriptor&&lO?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ov=lO&&__&&typeof __.get=="function"?__.get:null,BM=lO&&Map.prototype.forEach,cO=typeof Set=="function"&&Set.prototype,b_=Object.getOwnPropertyDescriptor&&cO?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,av=cO&&b_&&typeof b_.get=="function"?b_.get:null,UM=cO&&Set.prototype.forEach,$ie=typeof WeakMap=="function"&&WeakMap.prototype,qf=$ie?WeakMap.prototype.has:null,Bie=typeof WeakSet=="function"&&WeakSet.prototype,Gf=Bie?WeakSet.prototype.has:null,Uie=typeof WeakRef=="function"&&WeakRef.prototype,zM=Uie?WeakRef.prototype.deref:null,zie=Boolean.prototype.valueOf,Vie=Object.prototype.toString,Hie=Function.prototype.toString,Wie=String.prototype.match,uO=String.prototype.slice,Ea=String.prototype.replace,Yie=String.prototype.toUpperCase,VM=String.prototype.toLowerCase,u6=RegExp.prototype.test,HM=Array.prototype.concat,Zi=Array.prototype.join,qie=Array.prototype.slice,WM=Math.floor,Xw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,w_=Object.getOwnPropertySymbols,Jw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ar=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Jc||"symbol")?Symbol.toStringTag:null,f6=Object.prototype.propertyIsEnumerable,YM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function qM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||u6.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-WM(-e):WM(e);if(r!==e){var i=String(r),o=uO.call(t,i.length+1);return Ea.call(i,n,"$&_")+"."+Ea.call(Ea.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ea.call(t,n,"$&_")}var ex=Fie,GM=ex.custom,KM=h6(GM)?GM:null,Gie=function e(t,n,r,i){var o=n||{};if(da(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(da(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=da(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(da(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(da(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return m6(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?qM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?qM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return tx(t)?"[Array]":"[Object]";var d=doe(o,r);if(typeof i>"u")i=[];else if(p6(i,t)>=0)return"[Circular]";function p(ee,q,Q){if(q&&(i=qie.call(i),i.push(q)),Q){var oe={depth:o.depth};return da(o,"quoteStyle")&&(oe.quoteStyle=o.quoteStyle),e(ee,oe,r+1,i)}return e(ee,o,r+1,i)}if(typeof t=="function"&&!ZM(t)){var g=roe(t),v=Yp(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Zi.call(v,", ")+" }":"")}if(h6(t)){var y=Jc?Ea.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Jw.call(t);return typeof t=="object"&&!Jc?tf(y):y}if(coe(t)){for(var x="<"+VM.call(String(t.nodeName)),b=t.attributes||[],w=0;w",x}if(tx(t)){if(t.length===0)return"[]";var S=Yp(t,p);return d&&!foe(S)?"["+nx(S,d)+"]":"[ "+Zi.call(S,", ")+" ]"}if(Qie(t)){var C=Yp(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!f6.call(t,"cause")?"{ ["+String(t)+"] "+Zi.call(HM.call("[cause]: "+p(t.cause),C),", ")+" }":C.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Zi.call(C,", ")+" }"}if(typeof t=="object"&&a){if(KM&&typeof t[KM]=="function"&&ex)return ex(t,{depth:f-r});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ioe(t)){var k=[];return BM&&BM.call(t,function(ee,q){k.push(p(q,t,!0)+" => "+p(ee,t))}),QM("Map",ov.call(t),k,d)}if(soe(t)){var P=[];return UM&&UM.call(t,function(ee){P.push(p(ee,t))}),QM("Set",av.call(t),P,d)}if(ooe(t))return x_("WeakMap");if(loe(t))return x_("WeakSet");if(aoe(t))return x_("WeakRef");if(Jie(t))return tf(p(Number(t)));if(toe(t))return tf(p(Xw.call(t)));if(eoe(t))return tf(zie.call(t));if(Xie(t))return tf(p(String(t)));if(!Zie(t)&&!ZM(t)){var j=Yp(t,p),N=YM?YM(t)===Object.prototype:t instanceof Object||t.constructor===Object,H=t instanceof Object?"":"null prototype",R=!N&&ar&&Object(t)===t&&ar in t?uO.call(as(t),8,-1):H?"Object":"",V=N||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=V+(R||H?"["+Zi.call(HM.call([],R||[],H||[]),": ")+"] ":"");return j.length===0?W+"{}":d?W+"{"+nx(j,d)+"}":W+"{ "+Zi.call(j,", ")+" }"}return String(t)};function d6(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Kie(e){return Ea.call(String(e),/"/g,""")}function tx(e){return as(e)==="[object Array]"&&(!ar||!(typeof e=="object"&&ar in e))}function Zie(e){return as(e)==="[object Date]"&&(!ar||!(typeof e=="object"&&ar in e))}function ZM(e){return as(e)==="[object RegExp]"&&(!ar||!(typeof e=="object"&&ar in e))}function Qie(e){return as(e)==="[object Error]"&&(!ar||!(typeof e=="object"&&ar in e))}function Xie(e){return as(e)==="[object String]"&&(!ar||!(typeof e=="object"&&ar in e))}function Jie(e){return as(e)==="[object Number]"&&(!ar||!(typeof e=="object"&&ar in e))}function eoe(e){return as(e)==="[object Boolean]"&&(!ar||!(typeof e=="object"&&ar in e))}function h6(e){if(Jc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Jw)return!1;try{return Jw.call(e),!0}catch{}return!1}function toe(e){if(!e||typeof e!="object"||!Xw)return!1;try{return Xw.call(e),!0}catch{}return!1}var noe=Object.prototype.hasOwnProperty||function(e){return e in this};function da(e,t){return noe.call(e,t)}function as(e){return Vie.call(e)}function roe(e){if(e.name)return e.name;var t=Wie.call(Hie.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function p6(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return m6(uO.call(e,0,t.maxStringLength),t)+r}var i=Ea.call(Ea.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,uoe);return d6(i,"single",t)}function uoe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Yie.call(t.toString(16))}function tf(e){return"Object("+e+")"}function x_(e){return e+" { ? }"}function QM(e,t,n,r){var i=r?nx(n,r):Zi.call(n,", ");return e+" ("+t+") {"+i+"}"}function foe(e){for(var t=0;t=0)return!1;return!0}function doe(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Zi.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Zi.call(Array(t+1),n)}}function nx(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Zi.call(e,","+n)+` -`+t.prev}function Yp(e,t){var n=tx(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var t=e.pop(),n=t.obj[t.prop];if(Ms(n)){for(var r=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===koe.RFC1738&&(l===40||l===41)){a+=o.charAt(s);continue}if(l<128){a=a+Wi[l];continue}if(l<2048){a=a+(Wi[192|l>>6]+Wi[128|l&63]);continue}if(l<55296||l>=57344){a=a+(Wi[224|l>>12]+Wi[128|l>>6&63]+Wi[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),a+=Wi[240|l>>18]+Wi[128|l>>12&63]+Wi[128|l>>6&63]+Wi[128|l&63]}return a},Loe=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r"u"&&(S=0)}if(typeof l=="function"?b=l(n,b):b instanceof Date?b=d(b):r==="comma"&&Oo(b)&&(b=Im.maybeMap(b,function(oe){return oe instanceof Date?d(oe):oe})),b===null){if(o)return s&&!v?s(n,Xn.encoder,y,"key",p):n;b=""}if(Uoe(b)||Im.isBuffer(b)){if(s){var P=v?n:s(n,Xn.encoder,y,"key",p);return[m(P)+"="+m(s(b,Xn.encoder,y,"value",p))]}return[m(n)+"="+m(String(b))]}var j=[];if(typeof b>"u")return j;var N;if(r==="comma"&&Oo(b))v&&s&&(b=Im.maybeMap(b,s)),N=[{value:b.length>0?b.join(",")||null:void 0}];else if(Oo(l))N=l;else{var H=Object.keys(b);N=c?H.sort(c):H}for(var R=i&&Oo(b)&&b.length===1?n+"[]":n,V=0;V"u"?Xn.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Xn.charsetSentinel,delimiter:typeof e.delimiter>"u"?Xn.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Xn.encode,encoder:typeof e.encoder=="function"?e.encoder:Xn.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Xn.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Xn.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Xn.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Xn.strictNullHandling}},Hoe=function(e,t){var n=e,r=Voe(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Oo(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in XM?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=XM[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=y6(),d=0;d0?v+m:""},eu=v6,rx=Object.prototype.hasOwnProperty,Woe=Array.isArray,En={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:eu.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Yoe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},b6=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},qoe="utf8=%26%2310003%3B",Goe="utf8=%E2%9C%93",Koe=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,o=r.split(t.delimiter,i),a=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s-1&&(m=Woe(m)?[m]:m),rx.call(n,p)?n[p]=eu.combine(n[p],m):n[p]=m}return n},Zoe=function(e,t,n,r){for(var i=r?t:b6(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(l,10);!n.parseArrays&&l===""?a={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},Qoe=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(i),l=s?i.slice(0,s.index):i,c=[];if(l){if(!n.plainObjects&&rx.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var f=0;n.depth>0&&(s=a.exec(i))!==null&&f"u"?En.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?En.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:En.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:En.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:En.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:En.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:En.comma,decoder:typeof e.decoder=="function"?e.decoder:En.decoder,delimiter:typeof e.delimiter=="string"||eu.isRegExp(e.delimiter)?e.delimiter:En.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:En.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:En.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:En.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:En.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:En.strictNullHandling}},Joe=function(e,t){var n=Xoe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Koe(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;aw6.parse(e,{ignoreQueryPrefix:!0}),Oh=e=>w6.stringify(e,{arrayFormat:"brackets"});var Ly=(e=>(e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.INVALID_SHORT_URL_DELETION="INVALID_SHORT_URL_DELETION",e.DOMAIN_NOT_FOUND="DOMAIN_NOT_FOUND",e.FORBIDDEN_OPERATION="FORBIDDEN_OPERATION",e.INVALID_URL="INVALID_URL",e.INVALID_SLUG="INVALID_SLUG",e.INVALID_SHORTCODE="INVALID_SHORTCODE",e.TAG_CONFLICT="TAG_CONFLICT",e.TAG_NOT_FOUND="TAG_NOT_FOUND",e.MERCURE_NOT_CONFIGURED="MERCURE_NOT_CONFIGURED",e.INVALID_AUTHORIZATION="INVALID_AUTHORIZATION",e.INVALID_API_KEY="INVALID_API_KEY",e.NOT_FOUND="NOT_FOUND",e))(Ly||{}),Ry=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e))(Ry||{});const iae=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},oae=(e,t)=>`${e}/rest/v${t}`,aae=uh(qo),sae=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:r6(e)}),lae=e=>e===null||!(typeof e=="object"&&"type"in e&&"status"in e)?!1:(e.type===Ly.NOT_FOUND||e.type===Ry.NOT_FOUND)&&e.status===404;class cae{constructor(t,n,r){me(this,"apiVersion");me(this,"listShortUrls",async(t={})=>this.performRequest({url:"/short-urls",query:sae(t)}).then(({shortUrls:n})=>n));me(this,"createShortUrl",async t=>{const n=uh(r=>Kn(r)||qo(r),t);return this.performRequest({url:"/short-urls",method:"POST",body:n})});me(this,"getShortUrlVisits",async(t,n)=>this.performRequest({url:`/short-urls/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getTagVisits",async(t,n)=>this.performRequest({url:`/tags/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getDomainVisits",async(t,n)=>this.performRequest({url:`/domains/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getOrphanVisits",async t=>this.performRequest({url:"/visits/orphan",query:t}).then(({visits:n})=>n));me(this,"getNonOrphanVisits",async t=>this.performRequest({url:"/visits/non-orphan",query:t}).then(({visits:n})=>n));me(this,"getVisitsOverview",async()=>this.performRequest({url:"/visits"}).then(({visits:t})=>t));me(this,"getShortUrl",async(t,n)=>this.performRequest({url:`/short-urls/${t}`,query:{domain:n}}));me(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}}));me(this,"updateShortUrl",async(t,n,r)=>this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r}));me(this,"listTags",async()=>this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));me(this,"tagsStats",async()=>this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));me(this,"deleteTags",async t=>this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t})));me(this,"editTag",async(t,n)=>this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n})));me(this,"health",async t=>this.performRequest({url:"/health",domain:t}));me(this,"mercureInfo",async()=>this.performRequest({url:"/mercure-info"}));me(this,"listDomains",async()=>this.performRequest({url:"/domains"}).then(({domains:t})=>t));me(this,"editDomainRedirects",async t=>this.performRequest({url:"/domains/redirects",method:"PATCH",body:t}));me(this,"performRequest",async t=>this.httpClient.fetchJson(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t)))));me(this,"performEmptyRequest",async t=>this.httpClient.fetchEmpty(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t)))));me(this,"toFetchParams",({url:t,method:n="GET",query:r={},body:i,domain:o})=>{const a=Oh(aae(r)),s=Kn(a)?"":`?${a}`,l=o?iae(this.baseUrl,o):this.baseUrl;return[`${oae(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});me(this,"handleFetchError",t=>n=>{if(!lae(n))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const E_={},uae=e=>typeof e=="function",fae=e=>{const{selectedServer:t}=e();if(!vA(t))throw new Error("There's no selected server or it is not found");return t},dae=e=>t=>{const{url:n,apiKey:r}=uae(t)?fae(t):t,i=`${n}_${r}`;return E_[i]||(E_[i]=new cae(e,n,r)),E_[i]},hae=e=>{e.serviceFactory("buildShlinkApiClient",dae,"HttpClient")};const pae=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=mn(),o=()=>{i(),n()};return g.jsxs(q4,{className:"app-update-banner",isOpen:e,toggle:t,tag:hn,color:"secondary",children:[g.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),g.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",g.jsxs(yt,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(Ie,{icon:fK,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},x6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(hn,{className:"p-4",children:[g.jsx("h2",{children:"Oops! We could not find requested route."}),g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(It,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),mae=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})};const gae=(e,t,n,r,i,o,a,s)=>({fetchServers:l,servers:c,settings:f,appUpdated:d,resetAppUpdate:p})=>{const v=gn().pathname==="/";return B.useEffect(()=>{var y;Object.keys(c).length===0&&l(),o6(((y=f.ui)==null?void 0:y.theme)??"light")},[]),g.jsxs("div",{className:"container-fluid app-container",children:[g.jsx(e,{}),g.jsxs("div",{className:"app",children:[g.jsx("div",{className:Ee("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:g.jsxs(vy,{children:[g.jsx(vt,{index:!0,element:g.jsx(t,{})}),g.jsx(vt,{path:"/settings/*",element:g.jsx(o,{})}),g.jsx(vt,{path:"/manage-servers",element:g.jsx(a,{})}),g.jsx(vt,{path:"/server/create",element:g.jsx(r,{})}),g.jsx(vt,{path:"/server/:serverId/edit",element:g.jsx(i,{})}),g.jsx(vt,{path:"/server/:serverId/*",element:g.jsx(n,{})}),g.jsx(vt,{path:"*",element:g.jsx(x6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(s,{})})]}),g.jsx(pae,{isOpen:d,toggle:p,forceUpdate:mae})]})};function Pi(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:pO(e)?2:mO(e)?3:0}function Ec(e,t){return wu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vae(e,t){return wu(e)===2?e.get(t):e[t]}function S6(e,t,n){var r=wu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function O6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function pO(e){return Sae&&e instanceof Map}function mO(e){return Oae&&e instanceof Set}function ks(e){return e.o||e.t}function gO(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=E6(e);delete t[$t];for(var n=kc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=yae),Object.freeze(e),t&&il(e,function(n,r){return vO(r,!0)},!0)),e}function yae(){Pi(2)}function yO(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ao(e){var t=sx[e];return t||Pi(18,e),t}function _ae(e,t){sx[e]||(sx[e]=t)}function ix(){return Hd}function k_(e,t){t&&(ao("Patches"),e.u=[],e.s=[],e.v=t)}function sv(e){ox(e),e.p.forEach(bae),e.p=null}function ox(e){e===Hd&&(Hd=e.l)}function e3(e){return Hd={p:[],l:Hd,h:e,m:!0,_:0}}function bae(e){var t=e[$t];t.i===0||t.i===1?t.j():t.g=!0}function P_(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||ao("ES5").S(t,e,r),r?(n[$t].P&&(sv(t),Pi(4)),Uo(e)&&(e=lv(t,e),t.l||cv(t,e)),t.u&&ao("Patches").M(n[$t].t,e,t.u,t.s)):e=lv(t,n,[]),sv(t),t.u&&t.v(t.u,t.s),e!==C6?e:void 0}function lv(e,t,n){if(yO(t))return t;var r=t[$t];if(!r)return il(t,function(s,l){return t3(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return cv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=gO(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),il(o,function(s,l){return t3(e,r,i,s,l,n,a)}),cv(e,i,!1),n&&e.u&&ao("Patches").N(r,n,e.u,e.s)}return r.o}function t3(e,t,n,r,i,o,a){if(Ka(i)){var s=lv(e,i,o&&t&&t.i!==3&&!Ec(t.R,r)?o.concat(r):void 0);if(S6(n,r,s),!Ka(s))return;e.m=!1}else a&&n.add(i);if(Uo(i)&&!yO(i)){if(!e.h.D&&e._<1)return;lv(e,i),t&&t.A.l||cv(e,i)}}function cv(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&vO(t,n)}function T_(e,t){var n=e[$t];return(n?ks(n):e)[t]}function n3(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ga(e){e.P||(e.P=!0,e.l&&ga(e.l))}function M_(e){e.o||(e.o=gO(e.t))}function ax(e,t,n){var r=pO(t)?ao("MapSet").F(t,n):mO(t)?ao("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:ix(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,c=Wd;a&&(l=[s],c=wf);var f=Proxy.revocable(l,c),d=f.revoke,p=f.proxy;return s.k=p,s.j=d,p}(t,n):ao("ES5").J(t,n);return(n?n.A:ix()).p.push(r),r}function wae(e){return Ka(e)||Pi(22,e),function t(n){if(!Uo(n))return n;var r,i=n[$t],o=wu(n);if(i){if(!i.P&&(i.i<4||!ao("ES5").K(i)))return i.t;i.I=!0,r=r3(n,o),i.I=!1}else r=r3(n,o);return il(r,function(a,s){i&&vae(i.t,a)===s||S6(r,a,t(s))}),o===3?new Set(r):r}(e)}function r3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return gO(e)}function xae(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[$t];return Wd.get(l,o)},set:function(l){var c=this[$t];Wd.set(c,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][$t];if(!s.P)switch(s.i){case 5:r(s)&&ga(s);break;case 4:n(s)&&ga(s)}}}function n(o){for(var a=o.t,s=o.k,l=kc(s),c=l.length-1;c>=0;c--){var f=l[c];if(f!==$t){var d=a[f];if(d===void 0&&!Ec(a,f))return!0;var p=s[f],m=p&&p[$t];if(m?m.t!==d:!O6(p,d))return!0}}var v=!!a[$t];return l.length!==kc(a).length+(v?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?b-1:0),S=1;S1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=ao("Patches").$;return Ka(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),qr=new Eae,k6=qr.produce;qr.produceWithPatches.bind(qr);qr.setAutoFreeze.bind(qr);qr.setUseProxies.bind(qr);qr.applyPatches.bind(qr);qr.createDraft.bind(qr);qr.finishDraft.bind(qr);function Gr(e){"@babel/helpers - typeof";return Gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(e)}function kae(e,t){if(Gr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function P6(e){var t=kae(e,"string");return Gr(t)==="symbol"?t:String(t)}function Re(e,t,n){return t=P6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function l3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Jn(1));return n(T6)(e,t)}if(typeof e!="function")throw new Error(Jn(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function f(){if(l)throw new Error(Jn(3));return o}function d(y){if(typeof y!="function")throw new Error(Jn(4));if(l)throw new Error(Jn(5));var x=!0;return c(),s.push(y),function(){if(x){if(l)throw new Error(Jn(6));x=!1,c();var w=s.indexOf(y);s.splice(w,1),a=null}}}function p(y){if(!Pae(y))throw new Error(Jn(7));if(typeof y.type>"u")throw new Error(Jn(8));if(l)throw new Error(Jn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=a=s,b=0;b"u")throw new Error(Jn(12));if(typeof n(void 0,{type:uv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Jn(13))})}function bO(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Jn(14));d[m]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?d:l}}function fv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:rse,resetAppUpdate:ise}=tse,ose=nse,ase=(e,t)=>{e.serviceFactory("App",gae,"MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>rse),e.serviceFactory("resetAppUpdate",()=>ise)};const sse=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,a]=mn(),{domains:s}=n,l=Kn(t),c=()=>r("");return B.useEffect(()=>{e()},[]),i?g.jsxs(Ty,{children:[g.jsx(Zc,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),g.jsx(yt,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Ft(c,a),children:g.jsx(Ie,{icon:GG})}),g.jsx(jr,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(Xo,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[s.map(({domain:f,isDefault:d})=>g.jsxs(Ue,{active:(t===f||d)&&l,onClick:()=>r(f),children:[f,d&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:Ft(c,o),children:g.jsx("i",{children:"New domain"})})]})},lse=e=>(e==null?void 0:e.type)===Ly.INVALID_ARGUMENT||(e==null?void 0:e.type)===Ry.INVALID_ARGUMENT,cse=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===Ly.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===Ry.INVALID_SHORT_URL_DELETION,use=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),Jo=e=>use(e)?e:void 0,zo=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,lse(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),fse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,m3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(fse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},g3=e=>e==="*"||e==="x"||e==="X",v3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},dse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],hse=(e,t)=>{if(g3(e)||g3(t))return 0;const[n,r]=dse(v3(e),v3(t));return n>r?1:n{for(let n=0;n{const n=m3(e),r=m3(t),i=n.pop(),o=r.pop(),a=y3(n,r);return a!==0?a:i&&o?y3(i.split("."),o.split(".")):i||o?i?-1:1:0},cx=(e,t,n)=>{mse(n);const r=pse(e,t);return A6[n].includes(r)},A6={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},_3=Object.keys(A6),mse=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(_3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${_3.join("|")}`)},gse=(e,{maxVersion:t,minVersion:n})=>{const r=!n||cx(e,n,">=");return(!t||cx(e,t,"<="))&&r},I6={domainVisits:"3.1.0",excludeBotsOnShortUrls:"3.4.0",filterDisabledUrls:"3.4.0",deviceLongUrls:"3.5.0"};Object.freeze(I6);const Kp=(e,t)=>gse(t,{minVersion:I6[e]}),F6=e=>({domainVisits:Kp("domainVisits",e),excludeBotsOnShortUrls:Kp("excludeBotsOnShortUrls",e),filterDisabledUrls:Kp("filterDisabledUrls",e),deviceLongUrls:Kp("deviceLongUrls",e)}),vse=e=>B.useMemo(()=>F6(e),[e]),$6=B.createContext(F6("0.0.0")),yse=$6.Provider,Ch=e=>B.useContext($6)[e],B6=B.createContext(""),_se=B6.Provider,yl=()=>B.useContext(B6),Zf=(e,t,n)=>qo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,bse=(e,t)=>!e.domain&&t===mI?!0:e.domain===t,wse=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls&&{android:e.deviceLongUrls.android??void 0,ios:e.deviceLongUrls.ios??void 0,desktop:e.deviceLongUrls.desktop??void 0},validateUrl:n}:{longUrl:"",validateUrl:n}},U6="__",xse=e=>e.replaceAll("/",U6),Fm=e=>e.replaceAll(U6,"/");function Ye(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ke(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Pe(e){ke(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Gr(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function _l(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function vi(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var a=o.getDate();return i>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function Sse(e,t){if(ke(2,arguments),!t||Gr(t)!=="object")return new Date(NaN);var n=t.years?Ye(t.years):0,r=t.months?Ye(t.months):0,i=t.weeks?Ye(t.weeks):0,o=t.days?Ye(t.days):0,a=t.hours?Ye(t.hours):0,s=t.minutes?Ye(t.minutes):0,l=t.seconds?Ye(t.seconds):0,c=Pe(e),f=r||n?vi(c,r+n*12):c,d=o||i?_l(f,o+i*7):f,p=s+a*60,m=l+p*60,v=m*1e3,y=new Date(d.getTime()+v);return y}function xO(e,t){ke(2,arguments);var n=Pe(e).getTime(),r=Ye(t);return new Date(n+r)}var Ose=36e5;function Cse(e,t){ke(2,arguments);var n=Ye(t);return xO(e,n*Ose)}var Ese={};function ea(){return Ese}function z6(e,t){var n,r,i,o,a,s,l,c;ke(1,arguments);var f=ea(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Pse(e){ke(1,arguments);var t=kse(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Yd(n);return r}function nu(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Vr(e){ke(1,arguments);var t=Pe(e);return t.setHours(0,0,0,0),t}var Tse=864e5;function qd(e,t){ke(2,arguments);var n=Vr(e),r=Vr(t),i=n.getTime()-nu(n),o=r.getTime()-nu(r);return Math.round((i-o)/Tse)}var Mse=6e4;function ux(e,t){ke(2,arguments);var n=Ye(t);return xO(e,n*Mse)}function V6(e,t){ke(2,arguments);var n=Ye(t),r=n*3;return vi(e,r)}function SO(e,t){ke(2,arguments);var n=Ye(t),r=n*7;return _l(e,r)}function ru(e,t){ke(2,arguments);var n=Ye(t);return vi(e,n*12)}function b3(e){ke(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Gr(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Pe(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function $m(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var OO=6e4,Ny=36e5,jse=1e3;function Dse(e,t){ke(2,arguments);var n=Vr(e),r=Vr(t);return n.getTime()===r.getTime()}function CO(e){return ke(1,arguments),e instanceof Date||Gr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dv(e){if(ke(1,arguments),!CO(e)&&typeof e!="number")return!1;var t=Pe(e);return!isNaN(Number(t))}function Gd(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function hc(e){ke(1,arguments);var t=Pe(e),n=Math.floor(t.getMonth()/3)+1;return n}function hv(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()-r.getFullYear()}function x3(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function EO(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t),i=x3(n,r),o=Math.abs(qd(n,r));n.setDate(n.getDate()-i*o);var a=+(x3(n,r)===-i),s=i*(o-a);return s===0?0:s}function H6(e,t){return ke(2,arguments),Pe(e).getTime()-Pe(t).getTime()}var S3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Lse="trunc";function kO(e){return e?S3[e]:S3[Lse]}function Rse(e,t,n){ke(2,arguments);var r=H6(e,t)/Ny;return kO(n==null?void 0:n.roundingMethod)(r)}function ol(e){ke(1,arguments);var t=Pe(e);return t.setHours(23,59,59,999),t}function W6(e){ke(1,arguments);var t=Pe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Nse(e){ke(1,arguments);var t=Pe(e);return ol(t).getTime()===W6(t).getTime()}function pv(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t),i=$m(n,r),o=Math.abs(Gd(n,r)),a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var s=$m(n,r)===-i;Nse(Pe(e))&&o===1&&$m(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function Ase(e,t,n){ke(2,arguments);var r=H6(e,t)/1e3;return kO(n==null?void 0:n.roundingMethod)(r)}function Ise(e,t,n){ke(2,arguments);var r=EO(e,t)/7;return kO(n==null?void 0:n.roundingMethod)(r)}function fx(e){ke(1,arguments);var t=Pe(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Y6(e){ke(1,arguments);var t=Pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Fse(e){ke(1,arguments);var t=Pe(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function q6(e){ke(1,arguments);var t=Pe(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $se(e,t){var n,r,i,o,a,s,l,c;ke(1,arguments);var f=ea(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Vse(e){ke(1,arguments);var t=K6(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=iu(n);return r}var Hse=6048e5;function Z6(e){ke(1,arguments);var t=Pe(e),n=iu(t).getTime()-Vse(t).getTime();return Math.round(n/Hse)+1}function al(e,t){var n,r,i,o,a,s,l,c;ke(1,arguments);var f=ea(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),m=p.getUTCDay(),v=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(d+1,0,m),v.setUTCHours(0,0,0,0);var y=al(v,t),x=new Date(0);x.setUTCFullYear(d,0,m),x.setUTCHours(0,0,0,0);var b=al(x,t);return f.getTime()>=y.getTime()?d+1:f.getTime()>=b.getTime()?d:d-1}function Wse(e,t){var n,r,i,o,a,s,l,c;ke(1,arguments);var f=ea(),d=Ye((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=PO(e,t),m=new Date(0);m.setUTCFullYear(p,0,d),m.setUTCHours(0,0,0,0);var v=al(m,t);return v}var Yse=6048e5;function Q6(e,t){ke(1,arguments);var n=Pe(e),r=al(n,t).getTime()-Wse(n,t).getTime();return Math.round(r/Yse)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return tt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):tt(r+1,2)},d:function(t,n){return tt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return tt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return tt(t.getUTCHours(),n.length)},m:function(t,n){return tt(t.getUTCMinutes(),n.length)},s:function(t,n){return tt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return tt(o,n.length)}};const aa=qse;var Ul={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gse={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return aa.y(t,n)},Y:function(t,n,r,i){var o=PO(t,i),a=o>0?o:1-o;if(n==="YY"){var s=a%100;return tt(s,2)}return n==="Yo"?r.ordinalNumber(a,{unit:"year"}):tt(a,n.length)},R:function(t,n){var r=K6(t);return tt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return tt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return tt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return aa.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=Q6(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=Z6(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):tt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):aa.d(t,n)},D:function(t,n,r){var i=zse(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return tt(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return tt(a,n.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return tt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=Ul.noon:i===0?o=Ul.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=Ul.evening:i>=12?o=Ul.afternoon:i>=4?o=Ul.morning:o=Ul.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return aa.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):aa.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):aa.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):aa.s(t,n)},S:function(t,n){return aa.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return C3(a);case"XXXX":case"XX":return Ps(a);case"XXXXX":case"XXX":default:return Ps(a,":")}},x:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"x":return C3(a);case"xxxx":case"xx":return Ps(a);case"xxxxx":case"xxx":default:return Ps(a,":")}},O:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+O3(a,":");case"OOOO":default:return"GMT"+Ps(a,":")}},z:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+O3(a,":");case"zzzz":default:return"GMT"+Ps(a,":")}},t:function(t,n,r,i){var o=i._originalDate||t,a=Math.floor(o.getTime()/1e3);return tt(a,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,a=o.getTime();return tt(a,n.length)}};function O3(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var a=t||"";return n+String(i)+a+tt(o,2)}function C3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Ps(e,t)}function Ps(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),a=tt(i%60,2);return r+o+n+a}const Kse=Gse;var E3=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},X6=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Zse=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return E3(t,n);var a;switch(i){case"P":a=n.dateTime({width:"short"});break;case"PP":a=n.dateTime({width:"medium"});break;case"PPP":a=n.dateTime({width:"long"});break;case"PPPP":default:a=n.dateTime({width:"full"});break}return a.replace("{{date}}",E3(i,n)).replace("{{time}}",X6(o,n))},Qse={p:X6,P:Zse};const dx=Qse;var Xse=["D","DD"],Jse=["YY","YYYY"];function J6(e){return Xse.indexOf(e)!==-1}function eI(e){return Jse.indexOf(e)!==-1}function mv(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ele={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},tle=function(t,n,r){var i,o=ele[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const nle=tle;function R_(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var rle={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ile={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ole={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ale={date:R_({formats:rle,defaultWidth:"full"}),time:R_({formats:ile,defaultWidth:"full"}),dateTime:R_({formats:ole,defaultWidth:"full"})};const sle=ale;var lle={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cle=function(t,n,r,i){return lle[t]};const ule=cle;function nf(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var fle={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hle={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ple={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mle={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gle={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},vle=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},yle={ordinalNumber:vle,era:nf({values:fle,defaultWidth:"wide"}),quarter:nf({values:dle,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:nf({values:hle,defaultWidth:"wide"}),day:nf({values:ple,defaultWidth:"wide"}),dayPeriod:nf({values:mle,defaultWidth:"wide",formattingValues:gle,defaultFormattingWidth:"wide"})};const _le=yle;function rf(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?wle(s,function(d){return d.test(a)}):ble(s,function(d){return d.test(a)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(a.length);return{value:c,rest:f}}}function ble(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function wle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var Sle=/^(\d+)(th|st|nd|rd)?/i,Ole=/\d+/i,Cle={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ele={any:[/^b/i,/^(a|c)/i]},kle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ple={any:[/1/i,/2/i,/3/i,/4/i]},Tle={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Mle={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},jle={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Dle={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Lle={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Rle={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nle={ordinalNumber:xle({matchPattern:Sle,parsePattern:Ole,valueCallback:function(t){return parseInt(t,10)}}),era:rf({matchPatterns:Cle,defaultMatchWidth:"wide",parsePatterns:Ele,defaultParseWidth:"any"}),quarter:rf({matchPatterns:kle,defaultMatchWidth:"wide",parsePatterns:Ple,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:rf({matchPatterns:Tle,defaultMatchWidth:"wide",parsePatterns:Mle,defaultParseWidth:"any"}),day:rf({matchPatterns:jle,defaultMatchWidth:"wide",parsePatterns:Dle,defaultParseWidth:"any"}),dayPeriod:rf({matchPatterns:Lle,defaultMatchWidth:"any",parsePatterns:Rle,defaultParseWidth:"any"})};const Ale=Nle;var Ile={code:"en-US",formatDistance:nle,formatLong:sle,formatRelative:ule,localize:_le,match:Ale,options:{weekStartsOn:0,firstWeekContainsDate:1}};const TO=Ile;var Fle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$le=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ble=/^'([^]*?)'?$/,Ule=/''/g,zle=/[a-zA-Z]/;function ou(e,t,n){var r,i,o,a,s,l,c,f,d,p,m,v,y,x,b,w,S,C;ke(2,arguments);var k=String(t),P=ea(),j=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:P.locale)!==null&&r!==void 0?r:TO,N=Ye((o=(a=(s=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:P.firstWeekContainsDate)!==null&&a!==void 0?a:(d=P.locale)===null||d===void 0||(p=d.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(N>=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=Ye((m=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(b=n.locale)===null||b===void 0||(w=b.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:P.weekStartsOn)!==null&&v!==void 0?v:(S=P.locale)===null||S===void 0||(C=S.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&m!==void 0?m:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!j.localize)throw new RangeError("locale must contain localize property");if(!j.formatLong)throw new RangeError("locale must contain formatLong property");var R=Pe(e);if(!dv(R))throw new RangeError("Invalid time value");var V=nu(R),W=G6(R,V),ee={firstWeekContainsDate:N,weekStartsOn:H,locale:j,_originalDate:R},q=k.match($le).map(function(Q){var oe=Q[0];if(oe==="p"||oe==="P"){var le=dx[oe];return le(Q,j.formatLong)}return Q}).join("").match(Fle).map(function(Q){if(Q==="''")return"'";var oe=Q[0];if(oe==="'")return Vle(Q);var le=Kse[oe];if(le)return!(n!=null&&n.useAdditionalWeekYearTokens)&&eI(Q)&&mv(Q,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&J6(Q)&&mv(Q,t,String(e)),le(W,Q,j.localize,ee);if(oe.match(zle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+oe+"`");return Q}).join("");return q}function Vle(e){var t=e.match(Ble);return t?t[1].replace(Ule,"'"):e}function MO(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Hle(e){return MO({},e)}var k3=1440,Wle=2520,N_=43200,Yle=86400;function qle(e,t,n){var r,i;ke(2,arguments);var o=ea(),a=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:TO;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=$m(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=MO(Hle(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:s}),c,f;s>0?(c=Pe(t),f=Pe(e)):(c=Pe(e),f=Pe(t));var d=Ase(f,c),p=(nu(f)-nu(c))/1e3,m=Math.round((d-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?d<5?a.formatDistance("lessThanXSeconds",5,l):d<10?a.formatDistance("lessThanXSeconds",10,l):d<20?a.formatDistance("lessThanXSeconds",20,l):d<40?a.formatDistance("halfAMinute",0,l):d<60?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",1,l):m===0?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",m,l);if(m<45)return a.formatDistance("xMinutes",m,l);if(m<90)return a.formatDistance("aboutXHours",1,l);if(mr.getTime()}function li(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t);return n.getTime()e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function ht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vg(e,t)}function vv(e){return vv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vv(e)}function tce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nce(e,t){if(t&&(Gr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $e(e)}function pt(e){var t=tce();return function(){var r=vv(e),i;if(t){var o=vv(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return nce(this,i)}}function at(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j3(e,t){for(var n=0;n0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return n?i:1-i}function oI(e){return e%400===0||e%4===0&&e%100!==0}var sce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(i,o,a){var s=i.getUTCFullYear();if(a.isTwoDigitYear){var l=iI(a.year,s);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),lce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(i,o,a,s){var l=PO(i,s);if(a.isTwoDigitYear){var c=iI(a.year,l);return i.setUTCFullYear(c,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),al(i,s)}var f=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(f,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),al(i,s)}}]),n}(gt),cce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),dce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),hce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),pce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function mce(e,t,n){ke(2,arguments);var r=Pe(e),i=Ye(t),o=Q6(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var gce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=53}},{key:"set",value:function(i,o,a,s){return al(mce(i,a,s),s)}}]),n}(gt);function vce(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t),i=Z6(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var yce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=53}},{key:"set",value:function(i,o,a){return iu(vce(i,a))}}]),n}(gt),_ce=[31,28,31,30,31,30,31,31,30,31,30,31],bce=[31,29,31,30,31,30,31,31,30,31,30,31],wce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=bce[l]:o>=1&&o<=_ce[l]}},{key:"set",value:function(i,o,a){return i.setUTCDate(a),i.setUTCHours(0,0,0,0),i}}]),n}(gt),xce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,a){return i.setUTCMonth(0,a),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function DO(e,t,n){var r,i,o,a,s,l,c,f;ke(2,arguments);var d=ea(),p=Ye((r=(i=(o=(a=n==null?void 0:n.weekStartsOn)!==null&&a!==void 0?a:n==null||(s=n.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(c=d.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Pe(e),v=Ye(t),y=m.getUTCDay(),x=v%7,b=(x+7)%7,w=(b=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=DO(i,a,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt),Oce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=DO(i,a,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt),Cce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=DO(i,a,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function Ece(e,t){ke(2,arguments);var n=Ye(t);n%7===0&&(n=n-7);var r=1,i=Pe(e),o=i.getUTCDay(),a=n%7,s=(a+7)%7,l=(s=1&&o<=7}},{key:"set",value:function(i,o,a){return i=Ece(i,a),i.setUTCHours(0,0,0,0),i}}]),n}(gt),Pce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=12}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):!s&&a===12?i.setUTCHours(0,0,0,0):i.setUTCHours(a,0,0,0),i}}]),n}(gt),Dce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=23}},{key:"set",value:function(i,o,a){return i.setUTCHours(a,0,0,0),i}}]),n}(gt),Lce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):i.setUTCHours(a,0,0,0),i}}]),n}(gt),Rce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=24}},{key:"set",value:function(i,o,a){var s=a<=24?a%24:a;return i.setUTCHours(s,0,0,0),i}}]),n}(gt),Nce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCMinutes(a,0,0),i}}]),n}(gt),Ace=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCSeconds(a,0),i}}]),n}(gt),Ice=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var V=Ye((v=(y=(x=(b=r==null?void 0:r.weekStartsOn)!==null&&b!==void 0?b:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:N.weekStartsOn)!==null&&y!==void 0?y:(C=N.locale)===null||C===void 0||(k=C.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&v!==void 0?v:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(j==="")return P===""?Pe(n):new Date(NaN);var W={firstWeekContainsDate:R,weekStartsOn:V,locale:H},ee=[new oce],q=j.match(Hce).map(function(E){var M=E[0];if(M in dx){var I=dx[M];return I(E,H.formatLong)}return E}).join("").match(Vce),Q=[],oe=M3(q),le;try{var G=function(){var M=le.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&eI(M)&&mv(M,j,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&J6(M)&&mv(M,j,e);var I=M[0],J=zce[I];if(J){var X=J.incompatibleTokens;if(Array.isArray(X)){var se=Q.find(function(De){return X.includes(De.token)||De.token===I});if(se)throw new RangeError("The format string mustn't contain `".concat(se.fullToken,"` and `").concat(M,"` at the same time"))}else if(J.incompatibleTokens==="*"&&Q.length>0)throw new RangeError("The format string mustn't contain `".concat(M,"` and any other token at the same time"));Q.push({token:I,fullToken:M});var ge=J.run(P,M,H.match,W);if(!ge)return{v:new Date(NaN)};ee.push(ge.setter),P=ge.rest}else{if(I.match(Gce))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(M==="''"?M="'":I==="'"&&(M=Kce(M)),P.indexOf(M)===0)P=P.slice(M.length);else return{v:new Date(NaN)}}};for(oe.s();!(le=oe.n()).done;){var F=G();if(Gr(F)==="object")return F.v}}catch(E){oe.e(E)}finally{oe.f()}if(P.length>0&&qce.test(P))return new Date(NaN);var A=ee.map(function(E){return E.priority}).sort(function(E,M){return M-E}).filter(function(E,M,I){return I.indexOf(E)===M}).map(function(E){return ee.filter(function(M){return M.priority===E}).sort(function(M,I){return I.subPriority-M.subPriority})}).map(function(E){return E[0]}),z=Pe(n);if(isNaN(z.getTime()))return new Date(NaN);var re=G6(z,nu(z)),U={},K=M3(A),ie;try{for(K.s();!(ie=K.n()).done;){var ae=ie.value;if(!ae.validate(re,W))return new Date(NaN);var he=ae.set(re,U,W);Array.isArray(he)?(re=he[0],MO(U,he[1])):re=he}}catch(E){K.e(E)}finally{K.f()}return re}function Kce(e){return e.match(Wce)[1].replace(Yce,"'")}function Zce(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Qce(e,t){ke(2,arguments);var n=fx(e),r=fx(t);return n.getTime()===r.getTime()}function Xce(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()}function au(e,t){ke(2,arguments);var n=Pe(e).getTime(),r=Pe(t.start).getTime(),i=Pe(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function LO(e,t){ke(2,arguments);var n=Ye(t);return _l(e,-n)}function Vo(e,t){var n;ke(1,arguments);var r=Ye((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=nue(e),o;if(i.date){var a=rue(i.date,r);o=iue(a.restDateString,a.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var s=o.getTime(),l=0,c;if(i.time&&(l=oue(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=aue(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(s+l),d=new Date(0);return d.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),d.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),d}return new Date(s+l+c)}var Zp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Jce=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,eue=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,tue=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nue(e){var t={},n=e.split(Zp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Zp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Zp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Zp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function rue(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function iue(e,t){if(t===null)return new Date(NaN);var n=e.match(Jce);if(!n)return new Date(NaN);var r=!!n[4],i=of(n[1]),o=of(n[2])-1,a=of(n[3]),s=of(n[4]),l=of(n[5])-1;if(r)return fue(t,s,l)?sue(t,s,l):new Date(NaN);var c=new Date(0);return!cue(t,o,a)||!uue(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}function of(e){return e?parseInt(e):1}function oue(e){var t=e.match(eue);if(!t)return NaN;var n=F_(t[1]),r=F_(t[2]),i=F_(t[3]);return due(n,r,i)?n*Ny+r*OO+i*1e3:NaN}function F_(e){return e&&parseFloat(e.replace(",","."))||0}function aue(e){if(e==="Z")return 0;var t=e.match(tue);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return hue(r,i)?n*(r*Ny+i*OO):NaN}function sue(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var lue=[31,null,31,30,31,30,31,31,30,31,30,31];function aI(e){return e%400===0||e%4===0&&e%100!==0}function cue(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(lue[t]||(aI(e)?29:28))}function uue(e,t){return t>=1&&t<=(aI(e)?366:365)}function fue(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function due(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function hue(e,t){return t>=0&&t<=59}function hr(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0);a.setFullYear(i,r,15),a.setHours(0,0,0,0);var s=Zle(a);return n.setMonth(r,Math.min(o,s)),n}function pue(e,t){if(ke(2,arguments),Gr(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var n=Pe(e);return isNaN(n.getTime())?new Date(NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=hr(n,t.month)),t.date!=null&&n.setDate(Ye(t.date)),t.hours!=null&&n.setHours(Ye(t.hours)),t.minutes!=null&&n.setMinutes(Ye(t.minutes)),t.seconds!=null&&n.setSeconds(Ye(t.seconds)),t.milliseconds!=null&&n.setMilliseconds(Ye(t.milliseconds)),n)}function Qf(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return n.setHours(r),n}function Xf(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return n.setMinutes(r),n}function zl(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return hr(n,n.getMonth()+o*3)}function mue(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return n.setSeconds(r),n}function Co(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function su(e,t){ke(2,arguments);var n=Ye(t);return vi(e,-n)}function gue(e,t){ke(2,arguments);var n=Ye(t);return V6(e,-n)}function vue(e,t){ke(2,arguments);var n=Ye(t);return SO(e,-n)}function Kd(e,t){ke(2,arguments);var n=Ye(t);return ru(e,-n)}const sI="yyyy-MM-dd",RO="yyyy-MM-dd HH:mm",Qa=()=>new Date,NO=e=>typeof e!="string",AO=(e,t)=>!e||!NO(e)?e:t?ou(e,t):Gle(e),Xa=e=>AO(e,void 0),As=e=>AO(e,sI),_v=e=>AO(e,RO),ji=e=>NO(e)?e:Vo(e),Eh=(e,t,n)=>{try{return au(ji(e),{start:ji(t??e),end:ji(n??e)})}catch{return!1}},vs=(e,t)=>tI(e,t)||li(e,t),kh="all",lI={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[kh]:void 0},cI=Object.keys(lI),uI=e=>e===void 0||Kn(cA(Boolean,e)),bv=e=>typeof e=="string"&&cI.includes(e),yue=cI.filter(e=>e!==kh),D3=e=>e?ji(e):null,fI=(e,t)=>({startDate:D3(e),endDate:D3(t)}),_ue=e=>{if(!(!e||uI(e)))return e.startDate&&!e.endDate?`Since ${As(e.startDate)}`:!e.startDate&&e.endDate?`Until ${As(e.endDate)}`:`${As(e.startDate)} - ${As(e.endDate)}`},dI=e=>{if(!(!e||e===kh))return bv(e)?lI[e]:_ue(e)},ai=e=>Vr(LO(Qa(),e)),Vl=e=>({startDate:e,endDate:ol(Qa())}),ys=e=>t=>e===t,hI=bS([[ys("today"),()=>Vl(Vr(Qa()))],[ys("yesterday"),()=>({startDate:ai(1),endDate:ol(LO(Qa(),1))})],[ys("last7Days"),()=>Vl(ai(7))],[ys("last30Days"),()=>Vl(ai(30))],[ys("last90Days"),()=>Vl(ai(90))],[ys("last180Days"),()=>Vl(ai(180))],[ys("last365Days"),()=>Vl(ai(365))],[nA,()=>({})]]),bue=e=>{const t=ji(e);return bS([[()=>vs(Vr(Qa()),t),()=>"today"],[()=>vs(ai(1),t),()=>"yesterday"],[()=>vs(ai(7),t),()=>"last7Days"],[()=>vs(ai(30),t),()=>"last30Days"],[()=>vs(ai(90),t),()=>"last90Days"],[()=>vs(ai(180),t),()=>"last180Days"],[()=>vs(ai(365),t),()=>"last365Days"],[nA,()=>kh]])()},wue=e=>bv(e)?hI(e):e,Mr=(e,t)=>N6(e,t,{serializeError:vS}),Ph=jn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),L3=5e3,R3=4,N3=2,xue=({currentPage:e,pagesCount:t})=>e>=t,Sue=(e,t)=>t*100/e,Th=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=jn(`${e}/progressChanged`),o=jn(`${e}/large`),a=jn(`${e}/fallbackToInterval`),s=Mr(e,async(l,{getState:c,dispatch:f})=>{var w;const[d,p]=t(l),m=async S=>Promise.all(S.map(async C=>d(C,L3).then(ct("data")))).then(Yq),v=async(S,C=0)=>{if(r(c))return[];const k=await m(S[C]);return f(i(Sue(S.length,C+N3))),C{const{pagination:C,data:k}=await d(S,L3);if(!C||xue(C))return k;const P=xS(N3,C.pagesCount+1),j=jd(R3,P);return C.pagesCount-1>R3&&f(o()),k.concat(await v(j))},[x,b]=await Promise.all([y(),p((w=l.query)==null?void 0:w.excludeBots)]);return!x.length&&b&&f(a(bue(b.date))),{...n(l),visits:x}});return Object.assign(s,{progressChanged:i,large:o,fallbackToInterval:a})},Mh=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),jh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:a,large:s,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:d}=sr({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:Jo(y)})),m.addCase(a,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),m.addCase(s,v=>({...v,loadingLarge:!0})),m.addCase(l,(v,{payload:y})=>({...v,progress:y})),m.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),m.addCase(Ph,(v,{payload:y})=>{const{visits:x}=v,b=r(v,y.createdVisits).map(({visit:w})=>w);return b.length?{...v,visits:[...b,...x]}:v})}}),{cancelGetVisits:p}=d;return{reducer:f,cancelGetVisits:p}},pI="shlink/domainVisits",mI="DEFAULT",Oue={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Cue=e=>Th({typePrefix:`${pI}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1})=>{const{getDomainVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=Mh(r,async s=>i(t,s));return[o,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),Eue=e=>jh({name:pI,initialState:Oue,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>a&&bse(a,t)&&Eh(s.date,i,o))}}),Bm=({className:e="",placement:t,children:n})=>{const r=gl();return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,ref:r,children:g.jsx(Ie,{icon:ES})}),g.jsx(jr,{target:r,placement:t,children:n})]})},Ay=e=>Ft(t=>t.preventDefault(),e),IO=(e,t,n=1)=>xS(n,e+1).map(t),eo=e=>!qo(e)&&!Kn(e),$_=e=>Kn(e)?null:e,gI=e=>e?"true":"false",B_=e=>e===void 0?void 0:gI(e),U_=({isLast:e,...t})=>g.jsx(Nm,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),kue=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var d,p,m;const[i,o]=B.useState(((d=n.redirects)==null?void 0:d.baseUrlRedirect)??""),[a,s]=B.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=B.useState(((m=n.redirects)==null?void 0:m.invalidShortUrlRedirect)??""),f=Ay(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:$_(i),regular404Redirect:$_(a),invalidShortUrlRedirect:$_(l)}}).then(t));return g.jsx(Zo,{isOpen:e,toggle:t,centered:!0,children:g.jsxs("form",{name:"domainRedirectsModal",onSubmit:f,children:[g.jsxs(Qo,{toggle:t,children:["Edit redirects for ",g.jsx("b",{children:n.domain})]}),g.jsxs(fo,{children:[g.jsxs(U_,{value:i,onChange:o,children:[g.jsxs(Bm,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",g.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),g.jsxs(U_,{value:a,onChange:s,children:[g.jsxs(Bm,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",g.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),g.jsxs(U_,{value:l,isLast:!0,onChange:c,children:[g.jsx(Bm,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),g.jsxs(ml,{children:[g.jsx(yt,{color:"link",type:"button",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"primary",children:"Save"})]})]})})},Pue=({domain:e,editDomainRedirects:t})=>{const[n,r]=mn(),i=Ch("domainVisits"),o=yl();return g.jsxs(jy,{children:[i&&g.jsxs(Ue,{tag:It,to:`${o}/domain/${e.domain}${e.isDefault?`_${mI}`:""}/visits`,children:[g.jsx(Ie,{icon:CS,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{onClick:r,children:[g.jsx(Ie,{fixedWidth:!0,icon:OS})," Edit redirects"]}),g.jsx(kue,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},Ni=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Tue=({status:e,matchMedia:t=window.matchMedia})=>{const n=gl(),r=()=>t("(max-width: 991px)").matches,[i,o]=B.useState(r());return B.useEffect(()=>{const a=()=>o(r());return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),e==="validating"?g.jsx(Ie,{fixedWidth:!0,icon:_A,spin:!0}):g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:n,children:e==="valid"?g.jsx(Ie,{fixedWidth:!0,icon:Dd,className:"text-muted"}):g.jsx(Ie,{fixedWidth:!0,icon:w1,className:"text-danger"})}),g.jsx(jr,{target:n,placement:i?"top-start":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":g.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",g.jsx("br",{}),"Check the ",g.jsx(Ni,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},z_=({fallback:e})=>g.jsxs("span",{className:"text-muted",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),Mue=()=>g.jsxs(g.Fragment,{children:[g.jsx(Ie,{fixedWidth:!0,icon:MG,className:"text-primary",id:"defaultDomainIcon"}),g.jsx(jr,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),jue=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:a,status:s}=e;return B.useEffect(()=>{n(e.domain)},[]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:o&&g.jsx(Mue,{})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:i}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??g.jsx(z_,{fallback:r==null?void 0:r.baseUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??g.jsx(z_,{fallback:r==null?void 0:r.regular404Redirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??g.jsx(z_,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:g.jsx(Tue,{status:s})}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(Pue,{domain:e,editDomainRedirects:t})})]})},A3=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],Due=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var p;const{filteredDomains:o,defaultRedirects:a,loading:s,error:l,errorData:c}=t,f=a??((p=o.find(({isDefault:m})=>m))==null?void 0:p.redirects);if(B.useEffect(()=>{e()},[]),s)return g.jsx(Do,{loading:!0});const d=()=>l?g.jsx(zr,{type:"error",children:g.jsx(zo,{errorData:c,fallbackMessage:"Error loading domains :("})}):g.jsx(hn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsx("tr",{children:A3.map((m,v)=>g.jsx("th",{children:m},v))})}),g.jsxs("tbody",{children:[o.length<1&&g.jsx("tr",{children:g.jsx("td",{colSpan:A3.length,className:"text-center",children:"No results found"})}),o.map(m=>g.jsx(jue,{domain:m,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:f},m.domain))]})]})});return g.jsxs(g.Fragment,{children:[g.jsx(wh,{className:"mb-3",onChange:n}),d()]})},Lue="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Rue=e=>Mr(Lue,async({domain:t,redirects:n})=>{const i=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:i}}),Qp="shlink/domainsList",Xp={domains:[],filteredDomains:[],loading:!1,error:!1},I3=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},F3=(e,t)=>n=>n.domain!==e?n:{...n,status:t},Nue=(e,t)=>{const n=Mr(`${Qp}/listDomains`,async()=>{const{data:a,defaultRedirects:s}=await e().listDomains();return{domains:a.map(l=>({...l,status:"validating"})),defaultRedirects:s}}),r=Mr(`${Qp}/checkDomainHealth`,async a=>{try{const{status:s}=await e().health(a);return{domain:a,status:s==="pass"?"valid":"invalid"}}catch{return{domain:a,status:"invalid"}}}),i=jn(`${Qp}/filterDomains`),{reducer:o}=sr({name:Qp,initialState:Xp,reducers:{},extraReducers:a=>{a.addCase(n.pending,()=>({...Xp,loading:!0})),a.addCase(n.rejected,(s,{error:l})=>({...Xp,error:!0,errorData:Jo(l)})),a.addCase(n.fulfilled,(s,{payload:l})=>({...Xp,...l,filteredDomains:l.domains})),a.addCase(r.fulfilled,({domains:s,filteredDomains:l,...c},{payload:f})=>({...c,domains:s.map(F3(f.domain,f.status)),filteredDomains:l.map(F3(f.domain,f.status))})),a.addCase(i,(s,{payload:l})=>({...s,filteredDomains:s.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),a.addCase(t.fulfilled,(s,{payload:l})=>({...s,domains:s.domains.map(I3(l)),filteredDomains:s.filteredDomains.map(I3(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},Aue=(e,t)=>{e.serviceFactory("DomainSelector",()=>sse),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>Due),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",Nue,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",ct("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",ct("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",ct("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",Rue,"apiClientFactory"),e.serviceFactory("checkDomainHealth",ct("checkDomainHealth"),"domainsListReducerCreator")},$3="shlink/mercure",Iue={loading:!0,error:!1},Fue=e=>{const t=Mr(`${$3}/loadMercureInfo`,({realTimeUpdates:r})=>{if(r&&!r.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=sr({name:$3,initialState:Iue,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},$ue=e=>{e.serviceFactory("mercureInfoReducerCreator",Fue,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",ct("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",ct("loadMercureInfo"),"mercureInfoReducerCreator")};var hx={exports:{}};/** @license +`+t.prev}function Yp(e,t){var n=tx(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var t=e.pop(),n=t.obj[t.prop];if(js(n)){for(var r=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===koe.RFC1738&&(l===40||l===41)){a+=o.charAt(s);continue}if(l<128){a=a+Wi[l];continue}if(l<2048){a=a+(Wi[192|l>>6]+Wi[128|l&63]);continue}if(l<55296||l>=57344){a=a+(Wi[224|l>>12]+Wi[128|l>>6&63]+Wi[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),a+=Wi[240|l>>18]+Wi[128|l>>12&63]+Wi[128|l>>6&63]+Wi[128|l&63]}return a},Loe=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r"u"&&(S=0)}if(typeof l=="function"?b=l(n,b):b instanceof Date?b=d(b):r==="comma"&&Oo(b)&&(b=Im.maybeMap(b,function(oe){return oe instanceof Date?d(oe):oe})),b===null){if(o)return s&&!v?s(n,Xn.encoder,y,"key",p):n;b=""}if(Uoe(b)||Im.isBuffer(b)){if(s){var P=v?n:s(n,Xn.encoder,y,"key",p);return[g(P)+"="+g(s(b,Xn.encoder,y,"value",p))]}return[g(n)+"="+g(String(b))]}var j=[];if(typeof b>"u")return j;var N;if(r==="comma"&&Oo(b))v&&s&&(b=Im.maybeMap(b,s)),N=[{value:b.length>0?b.join(",")||null:void 0}];else if(Oo(l))N=l;else{var H=Object.keys(b);N=c?H.sort(c):H}for(var R=i&&Oo(b)&&b.length===1?n+"[]":n,V=0;V"u"?Xn.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Xn.charsetSentinel,delimiter:typeof e.delimiter>"u"?Xn.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Xn.encode,encoder:typeof e.encoder=="function"?e.encoder:Xn.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Xn.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Xn.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Xn.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Xn.strictNullHandling}},Hoe=function(e,t){var n=e,r=Voe(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):Oo(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in XM?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=XM[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=y6(),d=0;d0?v+g:""},eu=v6,rx=Object.prototype.hasOwnProperty,Woe=Array.isArray,En={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:eu.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Yoe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},b6=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},qoe="utf8=%26%2310003%3B",Goe="utf8=%E2%9C%93",Koe=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,o=r.split(t.delimiter,i),a=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s-1&&(g=Woe(g)?[g]:g),rx.call(n,p)?n[p]=eu.combine(n[p],g):n[p]=g}return n},Zoe=function(e,t,n,r){for(var i=r?t:b6(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if(s==="[]"&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(l,10);!n.parseArrays&&l===""?a={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[],a[c]=i):l!=="__proto__"&&(a[l]=i)}i=a}return i},Qoe=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(i),l=s?i.slice(0,s.index):i,c=[];if(l){if(!n.plainObjects&&rx.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var f=0;n.depth>0&&(s=a.exec(i))!==null&&f"u"?En.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?En.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:En.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:En.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:En.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:En.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:En.comma,decoder:typeof e.decoder=="function"?e.decoder:En.decoder,delimiter:typeof e.delimiter=="string"||eu.isRegExp(e.delimiter)?e.delimiter:En.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:En.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:En.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:En.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:En.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:En.strictNullHandling}},Joe=function(e,t){var n=Xoe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Koe(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;aw6.parse(e,{ignoreQueryPrefix:!0}),Oh=e=>w6.stringify(e,{arrayFormat:"brackets"});var Ly=(e=>(e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.INVALID_SHORT_URL_DELETION="INVALID_SHORT_URL_DELETION",e.DOMAIN_NOT_FOUND="DOMAIN_NOT_FOUND",e.FORBIDDEN_OPERATION="FORBIDDEN_OPERATION",e.INVALID_URL="INVALID_URL",e.INVALID_SLUG="INVALID_SLUG",e.INVALID_SHORTCODE="INVALID_SHORTCODE",e.TAG_CONFLICT="TAG_CONFLICT",e.TAG_NOT_FOUND="TAG_NOT_FOUND",e.MERCURE_NOT_CONFIGURED="MERCURE_NOT_CONFIGURED",e.INVALID_AUTHORIZATION="INVALID_AUTHORIZATION",e.INVALID_API_KEY="INVALID_API_KEY",e.NOT_FOUND="NOT_FOUND",e))(Ly||{}),Ry=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e))(Ry||{});const iae=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},oae=(e,t)=>`${e}/rest/v${t}`,aae=uh(qo),sae=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:r6(e)}),lae=e=>e===null||!(typeof e=="object"&&"type"in e&&"status"in e)?!1:(e.type===Ly.NOT_FOUND||e.type===Ry.NOT_FOUND)&&e.status===404;class cae{constructor(t,n,r){me(this,"apiVersion");me(this,"listShortUrls",async(t={})=>this.performRequest({url:"/short-urls",query:sae(t)}).then(({shortUrls:n})=>n));me(this,"createShortUrl",async t=>{const n=uh(r=>Kn(r)||qo(r),t);return this.performRequest({url:"/short-urls",method:"POST",body:n})});me(this,"getShortUrlVisits",async(t,n)=>this.performRequest({url:`/short-urls/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getTagVisits",async(t,n)=>this.performRequest({url:`/tags/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getDomainVisits",async(t,n)=>this.performRequest({url:`/domains/${t}/visits`,query:n}).then(({visits:r})=>r));me(this,"getOrphanVisits",async t=>this.performRequest({url:"/visits/orphan",query:t}).then(({visits:n})=>n));me(this,"getNonOrphanVisits",async t=>this.performRequest({url:"/visits/non-orphan",query:t}).then(({visits:n})=>n));me(this,"getVisitsOverview",async()=>this.performRequest({url:"/visits"}).then(({visits:t})=>t));me(this,"getShortUrl",async(t,n)=>this.performRequest({url:`/short-urls/${t}`,query:{domain:n}}));me(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}}));me(this,"updateShortUrl",async(t,n,r)=>this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r}));me(this,"listTags",async()=>this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));me(this,"tagsStats",async()=>this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));me(this,"deleteTags",async t=>this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t})));me(this,"editTag",async(t,n)=>this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n})));me(this,"health",async t=>this.performRequest({url:"/health",domain:t}));me(this,"mercureInfo",async()=>this.performRequest({url:"/mercure-info"}));me(this,"listDomains",async()=>this.performRequest({url:"/domains"}).then(({domains:t})=>t));me(this,"editDomainRedirects",async t=>this.performRequest({url:"/domains/redirects",method:"PATCH",body:t}));me(this,"performRequest",async t=>this.httpClient.fetchJson(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t)))));me(this,"performEmptyRequest",async t=>this.httpClient.fetchEmpty(...this.toFetchParams(t)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t)))));me(this,"toFetchParams",({url:t,method:n="GET",query:r={},body:i,domain:o})=>{const a=Oh(aae(r)),s=Kn(a)?"":`?${a}`,l=o?iae(this.baseUrl,o):this.baseUrl;return[`${oae(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});me(this,"handleFetchError",t=>n=>{if(!lae(n))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const E_={},uae=e=>typeof e=="function",fae=e=>{const{selectedServer:t}=e();if(!vA(t))throw new Error("There's no selected server or it is not found");return t},dae=e=>t=>{const{url:n,apiKey:r}=uae(t)?fae(t):t,i=`${n}_${r}`;return E_[i]||(E_[i]=new cae(e,n,r)),E_[i]},hae=e=>{e.serviceFactory("buildShlinkApiClient",dae,"HttpClient")};const pae=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=mn(),o=()=>{i(),n()};return m.jsxs(q4,{className:"app-update-banner",isOpen:e,toggle:t,tag:hn,color:"secondary",children:[m.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),m.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",m.jsxs(yt,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&m.jsxs(m.Fragment,{children:["Restart now ",m.jsx(Ie,{icon:fK,className:"ms-1"})]}),r&&m.jsx(m.Fragment,{children:"Restarting..."})]})]})]})},x6=({to:e="/",children:t="Home"})=>m.jsx("div",{className:"home",children:m.jsxs(hn,{className:"p-4",children:[m.jsx("h2",{children:"Oops! We could not find requested route."}),m.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),m.jsx("br",{}),m.jsx(It,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),mae=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})};const gae=(e,t,n,r,i,o,a,s)=>({fetchServers:l,servers:c,settings:f,appUpdated:d,resetAppUpdate:p})=>{const v=gn().pathname==="/";return B.useEffect(()=>{var y;Object.keys(c).length===0&&l(),o6(((y=f.ui)==null?void 0:y.theme)??"light")},[]),m.jsxs("div",{className:"container-fluid app-container",children:[m.jsx(e,{}),m.jsxs("div",{className:"app",children:[m.jsx("div",{className:Ee("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:m.jsxs(vy,{children:[m.jsx(vt,{index:!0,element:m.jsx(t,{})}),m.jsx(vt,{path:"/settings/*",element:m.jsx(o,{})}),m.jsx(vt,{path:"/manage-servers",element:m.jsx(a,{})}),m.jsx(vt,{path:"/server/create",element:m.jsx(r,{})}),m.jsx(vt,{path:"/server/:serverId/edit",element:m.jsx(i,{})}),m.jsx(vt,{path:"/server/:serverId/*",element:m.jsx(n,{})}),m.jsx(vt,{path:"*",element:m.jsx(x6,{})})]})}),m.jsx("div",{className:"shlink-footer",children:m.jsx(s,{})})]}),m.jsx(pae,{isOpen:d,toggle:p,forceUpdate:mae})]})};function Pi(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:pO(e)?2:mO(e)?3:0}function Ec(e,t){return wu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vae(e,t){return wu(e)===2?e.get(t):e[t]}function S6(e,t,n){var r=wu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function O6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function pO(e){return Sae&&e instanceof Map}function mO(e){return Oae&&e instanceof Set}function Ps(e){return e.o||e.t}function gO(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=E6(e);delete t[$t];for(var n=kc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=yae),Object.freeze(e),t&&ol(e,function(n,r){return vO(r,!0)},!0)),e}function yae(){Pi(2)}function yO(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ao(e){var t=sx[e];return t||Pi(18,e),t}function _ae(e,t){sx[e]||(sx[e]=t)}function ix(){return Hd}function k_(e,t){t&&(ao("Patches"),e.u=[],e.s=[],e.v=t)}function sv(e){ox(e),e.p.forEach(bae),e.p=null}function ox(e){e===Hd&&(Hd=e.l)}function e3(e){return Hd={p:[],l:Hd,h:e,m:!0,_:0}}function bae(e){var t=e[$t];t.i===0||t.i===1?t.j():t.g=!0}function P_(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||ao("ES5").S(t,e,r),r?(n[$t].P&&(sv(t),Pi(4)),Uo(e)&&(e=lv(t,e),t.l||cv(t,e)),t.u&&ao("Patches").M(n[$t].t,e,t.u,t.s)):e=lv(t,n,[]),sv(t),t.u&&t.v(t.u,t.s),e!==C6?e:void 0}function lv(e,t,n){if(yO(t))return t;var r=t[$t];if(!r)return ol(t,function(s,l){return t3(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return cv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=gO(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),ol(o,function(s,l){return t3(e,r,i,s,l,n,a)}),cv(e,i,!1),n&&e.u&&ao("Patches").N(r,n,e.u,e.s)}return r.o}function t3(e,t,n,r,i,o,a){if(Ka(i)){var s=lv(e,i,o&&t&&t.i!==3&&!Ec(t.R,r)?o.concat(r):void 0);if(S6(n,r,s),!Ka(s))return;e.m=!1}else a&&n.add(i);if(Uo(i)&&!yO(i)){if(!e.h.D&&e._<1)return;lv(e,i),t&&t.A.l||cv(e,i)}}function cv(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&vO(t,n)}function T_(e,t){var n=e[$t];return(n?Ps(n):e)[t]}function n3(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ga(e){e.P||(e.P=!0,e.l&&ga(e.l))}function M_(e){e.o||(e.o=gO(e.t))}function ax(e,t,n){var r=pO(t)?ao("MapSet").F(t,n):mO(t)?ao("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:ix(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,c=Wd;a&&(l=[s],c=wf);var f=Proxy.revocable(l,c),d=f.revoke,p=f.proxy;return s.k=p,s.j=d,p}(t,n):ao("ES5").J(t,n);return(n?n.A:ix()).p.push(r),r}function wae(e){return Ka(e)||Pi(22,e),function t(n){if(!Uo(n))return n;var r,i=n[$t],o=wu(n);if(i){if(!i.P&&(i.i<4||!ao("ES5").K(i)))return i.t;i.I=!0,r=r3(n,o),i.I=!1}else r=r3(n,o);return ol(r,function(a,s){i&&vae(i.t,a)===s||S6(r,a,t(s))}),o===3?new Set(r):r}(e)}function r3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return gO(e)}function xae(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[$t];return Wd.get(l,o)},set:function(l){var c=this[$t];Wd.set(c,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][$t];if(!s.P)switch(s.i){case 5:r(s)&&ga(s);break;case 4:n(s)&&ga(s)}}}function n(o){for(var a=o.t,s=o.k,l=kc(s),c=l.length-1;c>=0;c--){var f=l[c];if(f!==$t){var d=a[f];if(d===void 0&&!Ec(a,f))return!0;var p=s[f],g=p&&p[$t];if(g?g.t!==d:!O6(p,d))return!0}}var v=!!a[$t];return l.length!==kc(a).length+(v?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?b-1:0),S=1;S1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=ao("Patches").$;return Ka(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),qr=new Eae,k6=qr.produce;qr.produceWithPatches.bind(qr);qr.setAutoFreeze.bind(qr);qr.setUseProxies.bind(qr);qr.applyPatches.bind(qr);qr.createDraft.bind(qr);qr.finishDraft.bind(qr);function Gr(e){"@babel/helpers - typeof";return Gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(e)}function kae(e,t){if(Gr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function P6(e){var t=kae(e,"string");return Gr(t)==="symbol"?t:String(t)}function Re(e,t,n){return t=P6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function l3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Jn(1));return n(T6)(e,t)}if(typeof e!="function")throw new Error(Jn(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function f(){if(l)throw new Error(Jn(3));return o}function d(y){if(typeof y!="function")throw new Error(Jn(4));if(l)throw new Error(Jn(5));var x=!0;return c(),s.push(y),function(){if(x){if(l)throw new Error(Jn(6));x=!1,c();var w=s.indexOf(y);s.splice(w,1),a=null}}}function p(y){if(!Pae(y))throw new Error(Jn(7));if(typeof y.type>"u")throw new Error(Jn(8));if(l)throw new Error(Jn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=a=s,b=0;b"u")throw new Error(Jn(12));if(typeof n(void 0,{type:uv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Jn(13))})}function bO(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Jn(14));d[g]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?d:l}}function fv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:rse,resetAppUpdate:ise}=tse,ose=nse,ase=(e,t)=>{e.serviceFactory("App",gae,"MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>rse),e.serviceFactory("resetAppUpdate",()=>ise)};const sse=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,a]=mn(),{domains:s}=n,l=Kn(t),c=()=>r("");return B.useEffect(()=>{e()},[]),i?m.jsxs(Ty,{children:[m.jsx(Zc,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),m.jsx(yt,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Ft(c,a),children:m.jsx(Ie,{icon:GG})}),m.jsx(jr,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):m.jsxs(Xo,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[s.map(({domain:f,isDefault:d})=>m.jsxs(Ue,{active:(t===f||d)&&l,onClick:()=>r(f),children:[f,d&&m.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{onClick:Ft(c,o),children:m.jsx("i",{children:"New domain"})})]})},lse=e=>(e==null?void 0:e.type)===Ly.INVALID_ARGUMENT||(e==null?void 0:e.type)===Ry.INVALID_ARGUMENT,cse=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===Ly.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===Ry.INVALID_SHORT_URL_DELETION,use=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),Jo=e=>use(e)?e:void 0,zo=({errorData:e,fallbackMessage:t})=>m.jsxs(m.Fragment,{children:[(e==null?void 0:e.detail)??t,lse(e)&&m.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),fse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,m3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(fse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},g3=e=>e==="*"||e==="x"||e==="X",v3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},dse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],hse=(e,t)=>{if(g3(e)||g3(t))return 0;const[n,r]=dse(v3(e),v3(t));return n>r?1:n{for(let n=0;n{const n=m3(e),r=m3(t),i=n.pop(),o=r.pop(),a=y3(n,r);return a!==0?a:i&&o?y3(i.split("."),o.split(".")):i||o?i?-1:1:0},cx=(e,t,n)=>{mse(n);const r=pse(e,t);return A6[n].includes(r)},A6={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},_3=Object.keys(A6),mse=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(_3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${_3.join("|")}`)},gse=(e,{maxVersion:t,minVersion:n})=>{const r=!n||cx(e,n,">=");return(!t||cx(e,t,"<="))&&r},I6={domainVisits:"3.1.0",excludeBotsOnShortUrls:"3.4.0",filterDisabledUrls:"3.4.0",deviceLongUrls:"3.5.0"};Object.freeze(I6);const Kp=(e,t)=>gse(t,{minVersion:I6[e]}),F6=e=>({domainVisits:Kp("domainVisits",e),excludeBotsOnShortUrls:Kp("excludeBotsOnShortUrls",e),filterDisabledUrls:Kp("filterDisabledUrls",e),deviceLongUrls:Kp("deviceLongUrls",e)}),vse=e=>B.useMemo(()=>F6(e),[e]),$6=B.createContext(F6("0.0.0")),yse=$6.Provider,Ch=e=>B.useContext($6)[e],B6=B.createContext(""),_se=B6.Provider,yl=()=>B.useContext(B6),Zf=(e,t,n)=>qo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,bse=(e,t)=>!e.domain&&t===mI?!0:e.domain===t,wse=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls&&{android:e.deviceLongUrls.android??void 0,ios:e.deviceLongUrls.ios??void 0,desktop:e.deviceLongUrls.desktop??void 0},validateUrl:n}:{longUrl:"",validateUrl:n}},U6="__",xse=e=>e.replaceAll("/",U6),Fm=e=>e.replaceAll(U6,"/");function Ye(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ke(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Pe(e){ke(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Gr(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function _l(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function vi(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var a=o.getDate();return i>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function Sse(e,t){if(ke(2,arguments),!t||Gr(t)!=="object")return new Date(NaN);var n=t.years?Ye(t.years):0,r=t.months?Ye(t.months):0,i=t.weeks?Ye(t.weeks):0,o=t.days?Ye(t.days):0,a=t.hours?Ye(t.hours):0,s=t.minutes?Ye(t.minutes):0,l=t.seconds?Ye(t.seconds):0,c=Pe(e),f=r||n?vi(c,r+n*12):c,d=o||i?_l(f,o+i*7):f,p=s+a*60,g=l+p*60,v=g*1e3,y=new Date(d.getTime()+v);return y}function xO(e,t){ke(2,arguments);var n=Pe(e).getTime(),r=Ye(t);return new Date(n+r)}var Ose=36e5;function Cse(e,t){ke(2,arguments);var n=Ye(t);return xO(e,n*Ose)}var Ese={};function ea(){return Ese}function z6(e,t){var n,r,i,o,a,s,l,c;ke(1,arguments);var f=ea(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),g=p.getDay(),v=(g=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Pse(e){ke(1,arguments);var t=kse(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Yd(n);return r}function nu(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Vr(e){ke(1,arguments);var t=Pe(e);return t.setHours(0,0,0,0),t}var Tse=864e5;function qd(e,t){ke(2,arguments);var n=Vr(e),r=Vr(t),i=n.getTime()-nu(n),o=r.getTime()-nu(r);return Math.round((i-o)/Tse)}var Mse=6e4;function ux(e,t){ke(2,arguments);var n=Ye(t);return xO(e,n*Mse)}function V6(e,t){ke(2,arguments);var n=Ye(t),r=n*3;return vi(e,r)}function SO(e,t){ke(2,arguments);var n=Ye(t),r=n*7;return _l(e,r)}function ru(e,t){ke(2,arguments);var n=Ye(t);return vi(e,n*12)}function b3(e){ke(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Gr(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Pe(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function $m(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var OO=6e4,Ny=36e5,jse=1e3;function Dse(e,t){ke(2,arguments);var n=Vr(e),r=Vr(t);return n.getTime()===r.getTime()}function CO(e){return ke(1,arguments),e instanceof Date||Gr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dv(e){if(ke(1,arguments),!CO(e)&&typeof e!="number")return!1;var t=Pe(e);return!isNaN(Number(t))}function Gd(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function hc(e){ke(1,arguments);var t=Pe(e),n=Math.floor(t.getMonth()/3)+1;return n}function hv(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()-r.getFullYear()}function x3(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function EO(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t),i=x3(n,r),o=Math.abs(qd(n,r));n.setDate(n.getDate()-i*o);var a=+(x3(n,r)===-i),s=i*(o-a);return s===0?0:s}function H6(e,t){return ke(2,arguments),Pe(e).getTime()-Pe(t).getTime()}var S3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Lse="trunc";function kO(e){return e?S3[e]:S3[Lse]}function Rse(e,t,n){ke(2,arguments);var r=H6(e,t)/Ny;return kO(n==null?void 0:n.roundingMethod)(r)}function al(e){ke(1,arguments);var t=Pe(e);return t.setHours(23,59,59,999),t}function W6(e){ke(1,arguments);var t=Pe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Nse(e){ke(1,arguments);var t=Pe(e);return al(t).getTime()===W6(t).getTime()}function pv(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t),i=$m(n,r),o=Math.abs(Gd(n,r)),a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var s=$m(n,r)===-i;Nse(Pe(e))&&o===1&&$m(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function Ase(e,t,n){ke(2,arguments);var r=H6(e,t)/1e3;return kO(n==null?void 0:n.roundingMethod)(r)}function Ise(e,t,n){ke(2,arguments);var r=EO(e,t)/7;return kO(n==null?void 0:n.roundingMethod)(r)}function fx(e){ke(1,arguments);var t=Pe(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Y6(e){ke(1,arguments);var t=Pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Fse(e){ke(1,arguments);var t=Pe(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function q6(e){ke(1,arguments);var t=Pe(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $se(e,t){var n,r,i,o,a,s,l,c;ke(1,arguments);var f=ea(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),g=p.getDay(),v=(g=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Vse(e){ke(1,arguments);var t=K6(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=iu(n);return r}var Hse=6048e5;function Z6(e){ke(1,arguments);var t=Pe(e),n=iu(t).getTime()-Vse(t).getTime();return Math.round(n/Hse)+1}function sl(e,t){var n,r,i,o,a,s,l,c;ke(1,arguments);var f=ea(),d=Ye((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pe(e),g=p.getUTCDay(),v=(g=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(d+1,0,g),v.setUTCHours(0,0,0,0);var y=sl(v,t),x=new Date(0);x.setUTCFullYear(d,0,g),x.setUTCHours(0,0,0,0);var b=sl(x,t);return f.getTime()>=y.getTime()?d+1:f.getTime()>=b.getTime()?d:d-1}function Wse(e,t){var n,r,i,o,a,s,l,c;ke(1,arguments);var f=ea(),d=Ye((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=PO(e,t),g=new Date(0);g.setUTCFullYear(p,0,d),g.setUTCHours(0,0,0,0);var v=sl(g,t);return v}var Yse=6048e5;function Q6(e,t){ke(1,arguments);var n=Pe(e),r=sl(n,t).getTime()-Wse(n,t).getTime();return Math.round(r/Yse)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return tt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):tt(r+1,2)},d:function(t,n){return tt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return tt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return tt(t.getUTCHours(),n.length)},m:function(t,n){return tt(t.getUTCMinutes(),n.length)},s:function(t,n){return tt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return tt(o,n.length)}};const aa=qse;var Ul={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gse={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return aa.y(t,n)},Y:function(t,n,r,i){var o=PO(t,i),a=o>0?o:1-o;if(n==="YY"){var s=a%100;return tt(s,2)}return n==="Yo"?r.ordinalNumber(a,{unit:"year"}):tt(a,n.length)},R:function(t,n){var r=K6(t);return tt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return tt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return tt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return aa.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=Q6(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=Z6(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):tt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):aa.d(t,n)},D:function(t,n,r){var i=zse(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return tt(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return tt(a,n.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return tt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=Ul.noon:i===0?o=Ul.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=Ul.evening:i>=12?o=Ul.afternoon:i>=4?o=Ul.morning:o=Ul.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return aa.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):aa.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):aa.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):aa.s(t,n)},S:function(t,n){return aa.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return C3(a);case"XXXX":case"XX":return Ts(a);case"XXXXX":case"XXX":default:return Ts(a,":")}},x:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"x":return C3(a);case"xxxx":case"xx":return Ts(a);case"xxxxx":case"xxx":default:return Ts(a,":")}},O:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+O3(a,":");case"OOOO":default:return"GMT"+Ts(a,":")}},z:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+O3(a,":");case"zzzz":default:return"GMT"+Ts(a,":")}},t:function(t,n,r,i){var o=i._originalDate||t,a=Math.floor(o.getTime()/1e3);return tt(a,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,a=o.getTime();return tt(a,n.length)}};function O3(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var a=t||"";return n+String(i)+a+tt(o,2)}function C3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Ts(e,t)}function Ts(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),a=tt(i%60,2);return r+o+n+a}const Kse=Gse;var E3=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},X6=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Zse=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return E3(t,n);var a;switch(i){case"P":a=n.dateTime({width:"short"});break;case"PP":a=n.dateTime({width:"medium"});break;case"PPP":a=n.dateTime({width:"long"});break;case"PPPP":default:a=n.dateTime({width:"full"});break}return a.replace("{{date}}",E3(i,n)).replace("{{time}}",X6(o,n))},Qse={p:X6,P:Zse};const dx=Qse;var Xse=["D","DD"],Jse=["YY","YYYY"];function J6(e){return Xse.indexOf(e)!==-1}function eI(e){return Jse.indexOf(e)!==-1}function mv(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ele={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},tle=function(t,n,r){var i,o=ele[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const nle=tle;function R_(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var rle={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ile={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ole={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ale={date:R_({formats:rle,defaultWidth:"full"}),time:R_({formats:ile,defaultWidth:"full"}),dateTime:R_({formats:ole,defaultWidth:"full"})};const sle=ale;var lle={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cle=function(t,n,r,i){return lle[t]};const ule=cle;function nf(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{var s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var fle={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hle={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ple={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mle={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gle={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},vle=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},yle={ordinalNumber:vle,era:nf({values:fle,defaultWidth:"wide"}),quarter:nf({values:dle,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:nf({values:hle,defaultWidth:"wide"}),day:nf({values:ple,defaultWidth:"wide"}),dayPeriod:nf({values:mle,defaultWidth:"wide",formattingValues:gle,defaultFormattingWidth:"wide"})};const _le=yle;function rf(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?wle(s,function(d){return d.test(a)}):ble(s,function(d){return d.test(a)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(a.length);return{value:c,rest:f}}}function ble(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function wle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;var s=t.slice(i.length);return{value:a,rest:s}}}var Sle=/^(\d+)(th|st|nd|rd)?/i,Ole=/\d+/i,Cle={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ele={any:[/^b/i,/^(a|c)/i]},kle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ple={any:[/1/i,/2/i,/3/i,/4/i]},Tle={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Mle={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},jle={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Dle={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Lle={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Rle={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nle={ordinalNumber:xle({matchPattern:Sle,parsePattern:Ole,valueCallback:function(t){return parseInt(t,10)}}),era:rf({matchPatterns:Cle,defaultMatchWidth:"wide",parsePatterns:Ele,defaultParseWidth:"any"}),quarter:rf({matchPatterns:kle,defaultMatchWidth:"wide",parsePatterns:Ple,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:rf({matchPatterns:Tle,defaultMatchWidth:"wide",parsePatterns:Mle,defaultParseWidth:"any"}),day:rf({matchPatterns:jle,defaultMatchWidth:"wide",parsePatterns:Dle,defaultParseWidth:"any"}),dayPeriod:rf({matchPatterns:Lle,defaultMatchWidth:"any",parsePatterns:Rle,defaultParseWidth:"any"})};const Ale=Nle;var Ile={code:"en-US",formatDistance:nle,formatLong:sle,formatRelative:ule,localize:_le,match:Ale,options:{weekStartsOn:0,firstWeekContainsDate:1}};const TO=Ile;var Fle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$le=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ble=/^'([^]*?)'?$/,Ule=/''/g,zle=/[a-zA-Z]/;function ou(e,t,n){var r,i,o,a,s,l,c,f,d,p,g,v,y,x,b,w,S,C;ke(2,arguments);var k=String(t),P=ea(),j=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:P.locale)!==null&&r!==void 0?r:TO,N=Ye((o=(a=(s=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:P.firstWeekContainsDate)!==null&&a!==void 0?a:(d=P.locale)===null||d===void 0||(p=d.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(N>=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=Ye((g=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(b=n.locale)===null||b===void 0||(w=b.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:P.weekStartsOn)!==null&&v!==void 0?v:(S=P.locale)===null||S===void 0||(C=S.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&g!==void 0?g:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!j.localize)throw new RangeError("locale must contain localize property");if(!j.formatLong)throw new RangeError("locale must contain formatLong property");var R=Pe(e);if(!dv(R))throw new RangeError("Invalid time value");var V=nu(R),W=G6(R,V),ee={firstWeekContainsDate:N,weekStartsOn:H,locale:j,_originalDate:R},q=k.match($le).map(function(Q){var oe=Q[0];if(oe==="p"||oe==="P"){var le=dx[oe];return le(Q,j.formatLong)}return Q}).join("").match(Fle).map(function(Q){if(Q==="''")return"'";var oe=Q[0];if(oe==="'")return Vle(Q);var le=Kse[oe];if(le)return!(n!=null&&n.useAdditionalWeekYearTokens)&&eI(Q)&&mv(Q,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&J6(Q)&&mv(Q,t,String(e)),le(W,Q,j.localize,ee);if(oe.match(zle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+oe+"`");return Q}).join("");return q}function Vle(e){var t=e.match(Ble);return t?t[1].replace(Ule,"'"):e}function MO(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Hle(e){return MO({},e)}var k3=1440,Wle=2520,N_=43200,Yle=86400;function qle(e,t,n){var r,i;ke(2,arguments);var o=ea(),a=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:TO;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=$m(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=MO(Hle(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:s}),c,f;s>0?(c=Pe(t),f=Pe(e)):(c=Pe(e),f=Pe(t));var d=Ase(f,c),p=(nu(f)-nu(c))/1e3,g=Math.round((d-p)/60),v;if(g<2)return n!=null&&n.includeSeconds?d<5?a.formatDistance("lessThanXSeconds",5,l):d<10?a.formatDistance("lessThanXSeconds",10,l):d<20?a.formatDistance("lessThanXSeconds",20,l):d<40?a.formatDistance("halfAMinute",0,l):d<60?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",1,l):g===0?a.formatDistance("lessThanXMinutes",1,l):a.formatDistance("xMinutes",g,l);if(g<45)return a.formatDistance("xMinutes",g,l);if(g<90)return a.formatDistance("aboutXHours",1,l);if(gr.getTime()}function li(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t);return n.getTime()e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function ht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vg(e,t)}function vv(e){return vv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vv(e)}function tce(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nce(e,t){if(t&&(Gr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $e(e)}function pt(e){var t=tce();return function(){var r=vv(e),i;if(t){var o=vv(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return nce(this,i)}}function at(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j3(e,t){for(var n=0;n0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return n?i:1-i}function oI(e){return e%400===0||e%4===0&&e%100!==0}var sce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(i,o,a){var s=i.getUTCFullYear();if(a.isTwoDigitYear){var l=iI(a.year,s);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),lce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(i,o,a,s){var l=PO(i,s);if(a.isTwoDigitYear){var c=iI(a.year,l);return i.setUTCFullYear(c,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,s)}var f=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(f,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,s)}}]),n}(gt),cce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),dce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),hce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt),pce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function mce(e,t,n){ke(2,arguments);var r=Pe(e),i=Ye(t),o=Q6(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var gce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=53}},{key:"set",value:function(i,o,a,s){return sl(mce(i,a,s),s)}}]),n}(gt);function vce(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t),i=Z6(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var yce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=53}},{key:"set",value:function(i,o,a){return iu(vce(i,a))}}]),n}(gt),_ce=[31,28,31,30,31,30,31,31,30,31,30,31],bce=[31,29,31,30,31,30,31,31,30,31,30,31],wce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=bce[l]:o>=1&&o<=_ce[l]}},{key:"set",value:function(i,o,a){return i.setUTCDate(a),i.setUTCHours(0,0,0,0),i}}]),n}(gt),xce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,a){return i.setUTCMonth(0,a),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function DO(e,t,n){var r,i,o,a,s,l,c,f;ke(2,arguments);var d=ea(),p=Ye((r=(i=(o=(a=n==null?void 0:n.weekStartsOn)!==null&&a!==void 0?a:n==null||(s=n.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&i!==void 0?i:(c=d.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=Pe(e),v=Ye(t),y=g.getUTCDay(),x=v%7,b=(x+7)%7,w=(b=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=DO(i,a,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt),Oce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=DO(i,a,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt),Cce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=DO(i,a,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function Ece(e,t){ke(2,arguments);var n=Ye(t);n%7===0&&(n=n-7);var r=1,i=Pe(e),o=i.getUTCDay(),a=n%7,s=(a+7)%7,l=(s=1&&o<=7}},{key:"set",value:function(i,o,a){return i=Ece(i,a),i.setUTCHours(0,0,0,0),i}}]),n}(gt),Pce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=12}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):!s&&a===12?i.setUTCHours(0,0,0,0):i.setUTCHours(a,0,0,0),i}}]),n}(gt),Dce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=23}},{key:"set",value:function(i,o,a){return i.setUTCHours(a,0,0,0),i}}]),n}(gt),Lce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):i.setUTCHours(a,0,0,0),i}}]),n}(gt),Rce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=24}},{key:"set",value:function(i,o,a){var s=a<=24?a%24:a;return i.setUTCHours(s,0,0,0),i}}]),n}(gt),Nce=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCMinutes(a,0,0),i}}]),n}(gt),Ace=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCSeconds(a,0),i}}]),n}(gt),Ice=function(e){ht(n,e);var t=pt(n);function n(){var r;at(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var V=Ye((v=(y=(x=(b=r==null?void 0:r.weekStartsOn)!==null&&b!==void 0?b:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:N.weekStartsOn)!==null&&y!==void 0?y:(C=N.locale)===null||C===void 0||(k=C.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&v!==void 0?v:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(j==="")return P===""?Pe(n):new Date(NaN);var W={firstWeekContainsDate:R,weekStartsOn:V,locale:H},ee=[new oce],q=j.match(Hce).map(function(E){var M=E[0];if(M in dx){var I=dx[M];return I(E,H.formatLong)}return E}).join("").match(Vce),Q=[],oe=M3(q),le;try{var G=function(){var M=le.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&eI(M)&&mv(M,j,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&J6(M)&&mv(M,j,e);var I=M[0],J=zce[I];if(J){var X=J.incompatibleTokens;if(Array.isArray(X)){var se=Q.find(function(De){return X.includes(De.token)||De.token===I});if(se)throw new RangeError("The format string mustn't contain `".concat(se.fullToken,"` and `").concat(M,"` at the same time"))}else if(J.incompatibleTokens==="*"&&Q.length>0)throw new RangeError("The format string mustn't contain `".concat(M,"` and any other token at the same time"));Q.push({token:I,fullToken:M});var ge=J.run(P,M,H.match,W);if(!ge)return{v:new Date(NaN)};ee.push(ge.setter),P=ge.rest}else{if(I.match(Gce))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(M==="''"?M="'":I==="'"&&(M=Kce(M)),P.indexOf(M)===0)P=P.slice(M.length);else return{v:new Date(NaN)}}};for(oe.s();!(le=oe.n()).done;){var F=G();if(Gr(F)==="object")return F.v}}catch(E){oe.e(E)}finally{oe.f()}if(P.length>0&&qce.test(P))return new Date(NaN);var A=ee.map(function(E){return E.priority}).sort(function(E,M){return M-E}).filter(function(E,M,I){return I.indexOf(E)===M}).map(function(E){return ee.filter(function(M){return M.priority===E}).sort(function(M,I){return I.subPriority-M.subPriority})}).map(function(E){return E[0]}),z=Pe(n);if(isNaN(z.getTime()))return new Date(NaN);var re=G6(z,nu(z)),U={},K=M3(A),ie;try{for(K.s();!(ie=K.n()).done;){var ae=ie.value;if(!ae.validate(re,W))return new Date(NaN);var he=ae.set(re,U,W);Array.isArray(he)?(re=he[0],MO(U,he[1])):re=he}}catch(E){K.e(E)}finally{K.f()}return re}function Kce(e){return e.match(Wce)[1].replace(Yce,"'")}function Zce(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Qce(e,t){ke(2,arguments);var n=fx(e),r=fx(t);return n.getTime()===r.getTime()}function Xce(e,t){ke(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()}function au(e,t){ke(2,arguments);var n=Pe(e).getTime(),r=Pe(t.start).getTime(),i=Pe(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function LO(e,t){ke(2,arguments);var n=Ye(t);return _l(e,-n)}function Vo(e,t){var n;ke(1,arguments);var r=Ye((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=nue(e),o;if(i.date){var a=rue(i.date,r);o=iue(a.restDateString,a.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var s=o.getTime(),l=0,c;if(i.time&&(l=oue(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=aue(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(s+l),d=new Date(0);return d.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),d.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),d}return new Date(s+l+c)}var Zp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Jce=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,eue=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,tue=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nue(e){var t={},n=e.split(Zp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Zp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Zp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Zp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function rue(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function iue(e,t){if(t===null)return new Date(NaN);var n=e.match(Jce);if(!n)return new Date(NaN);var r=!!n[4],i=of(n[1]),o=of(n[2])-1,a=of(n[3]),s=of(n[4]),l=of(n[5])-1;if(r)return fue(t,s,l)?sue(t,s,l):new Date(NaN);var c=new Date(0);return!cue(t,o,a)||!uue(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}function of(e){return e?parseInt(e):1}function oue(e){var t=e.match(eue);if(!t)return NaN;var n=F_(t[1]),r=F_(t[2]),i=F_(t[3]);return due(n,r,i)?n*Ny+r*OO+i*1e3:NaN}function F_(e){return e&&parseFloat(e.replace(",","."))||0}function aue(e){if(e==="Z")return 0;var t=e.match(tue);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return hue(r,i)?n*(r*Ny+i*OO):NaN}function sue(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var lue=[31,null,31,30,31,30,31,31,30,31,30,31];function aI(e){return e%400===0||e%4===0&&e%100!==0}function cue(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(lue[t]||(aI(e)?29:28))}function uue(e,t){return t>=1&&t<=(aI(e)?366:365)}function fue(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function due(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function hue(e,t){return t>=0&&t<=59}function hr(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t),i=n.getFullYear(),o=n.getDate(),a=new Date(0);a.setFullYear(i,r,15),a.setHours(0,0,0,0);var s=Zle(a);return n.setMonth(r,Math.min(o,s)),n}function pue(e,t){if(ke(2,arguments),Gr(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var n=Pe(e);return isNaN(n.getTime())?new Date(NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=hr(n,t.month)),t.date!=null&&n.setDate(Ye(t.date)),t.hours!=null&&n.setHours(Ye(t.hours)),t.minutes!=null&&n.setMinutes(Ye(t.minutes)),t.seconds!=null&&n.setSeconds(Ye(t.seconds)),t.milliseconds!=null&&n.setMilliseconds(Ye(t.milliseconds)),n)}function Qf(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return n.setHours(r),n}function Xf(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return n.setMinutes(r),n}function zl(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return hr(n,n.getMonth()+o*3)}function mue(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return n.setSeconds(r),n}function Co(e,t){ke(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function su(e,t){ke(2,arguments);var n=Ye(t);return vi(e,-n)}function gue(e,t){ke(2,arguments);var n=Ye(t);return V6(e,-n)}function vue(e,t){ke(2,arguments);var n=Ye(t);return SO(e,-n)}function Kd(e,t){ke(2,arguments);var n=Ye(t);return ru(e,-n)}const sI="yyyy-MM-dd",RO="yyyy-MM-dd HH:mm",Qa=()=>new Date,NO=e=>typeof e!="string",AO=(e,t)=>!e||!NO(e)?e:t?ou(e,t):Gle(e),Xa=e=>AO(e,void 0),Is=e=>AO(e,sI),_v=e=>AO(e,RO),ji=e=>NO(e)?e:Vo(e),Eh=(e,t,n)=>{try{return au(ji(e),{start:ji(t??e),end:ji(n??e)})}catch{return!1}},ys=(e,t)=>tI(e,t)||li(e,t),kh="all",lI={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[kh]:void 0},cI=Object.keys(lI),uI=e=>e===void 0||Kn(cA(Boolean,e)),bv=e=>typeof e=="string"&&cI.includes(e),yue=cI.filter(e=>e!==kh),D3=e=>e?ji(e):null,fI=(e,t)=>({startDate:D3(e),endDate:D3(t)}),_ue=e=>{if(!(!e||uI(e)))return e.startDate&&!e.endDate?`Since ${Is(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Is(e.endDate)}`:`${Is(e.startDate)} - ${Is(e.endDate)}`},dI=e=>{if(!(!e||e===kh))return bv(e)?lI[e]:_ue(e)},ai=e=>Vr(LO(Qa(),e)),Vl=e=>({startDate:e,endDate:al(Qa())}),_s=e=>t=>e===t,hI=bS([[_s("today"),()=>Vl(Vr(Qa()))],[_s("yesterday"),()=>({startDate:ai(1),endDate:al(LO(Qa(),1))})],[_s("last7Days"),()=>Vl(ai(7))],[_s("last30Days"),()=>Vl(ai(30))],[_s("last90Days"),()=>Vl(ai(90))],[_s("last180Days"),()=>Vl(ai(180))],[_s("last365Days"),()=>Vl(ai(365))],[nA,()=>({})]]),bue=e=>{const t=ji(e);return bS([[()=>ys(Vr(Qa()),t),()=>"today"],[()=>ys(ai(1),t),()=>"yesterday"],[()=>ys(ai(7),t),()=>"last7Days"],[()=>ys(ai(30),t),()=>"last30Days"],[()=>ys(ai(90),t),()=>"last90Days"],[()=>ys(ai(180),t),()=>"last180Days"],[()=>ys(ai(365),t),()=>"last365Days"],[nA,()=>kh]])()},wue=e=>bv(e)?hI(e):e,Mr=(e,t)=>N6(e,t,{serializeError:vS}),Ph=jn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),L3=5e3,R3=4,N3=2,xue=({currentPage:e,pagesCount:t})=>e>=t,Sue=(e,t)=>t*100/e,Th=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=jn(`${e}/progressChanged`),o=jn(`${e}/large`),a=jn(`${e}/fallbackToInterval`),s=Mr(e,async(l,{getState:c,dispatch:f})=>{var w;const[d,p]=t(l),g=async S=>Promise.all(S.map(async C=>d(C,L3).then(ct("data")))).then(Yq),v=async(S,C=0)=>{if(r(c))return[];const k=await g(S[C]);return f(i(Sue(S.length,C+N3))),C{const{pagination:C,data:k}=await d(S,L3);if(!C||xue(C))return k;const P=xS(N3,C.pagesCount+1),j=jd(R3,P);return C.pagesCount-1>R3&&f(o()),k.concat(await v(j))},[x,b]=await Promise.all([y(),p((w=l.query)==null?void 0:w.excludeBots)]);return!x.length&&b&&f(a(bue(b.date))),{...n(l),visits:x}});return Object.assign(s,{progressChanged:i,large:o,fallbackToInterval:a})},Mh=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),jh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:a,large:s,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:d}=sr({name:e,initialState:n,reducers:{cancelGetVisits:g=>({...g,cancelLoad:!0})},extraReducers:g=>{g.addCase(i,()=>({...n,loading:!0})),g.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:Jo(y)})),g.addCase(a,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),g.addCase(s,v=>({...v,loadingLarge:!0})),g.addCase(l,(v,{payload:y})=>({...v,progress:y})),g.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),g.addCase(Ph,(v,{payload:y})=>{const{visits:x}=v,b=r(v,y.createdVisits).map(({visit:w})=>w);return b.length?{...v,visits:[...b,...x]}:v})}}),{cancelGetVisits:p}=d;return{reducer:f,cancelGetVisits:p}},pI="shlink/domainVisits",mI="DEFAULT",Oue={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Cue=e=>Th({typePrefix:`${pI}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1})=>{const{getDomainVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=Mh(r,async s=>i(t,s));return[o,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),Eue=e=>jh({name:pI,initialState:Oue,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>a&&bse(a,t)&&Eh(s.date,i,o))}}),Bm=({className:e="",placement:t,children:n})=>{const r=os();return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:e,ref:r,children:m.jsx(Ie,{icon:ES})}),m.jsx(jr,{target:r,placement:t,children:n})]})},Ay=e=>Ft(t=>t.preventDefault(),e),IO=(e,t,n=1)=>xS(n,e+1).map(t),eo=e=>!qo(e)&&!Kn(e),$_=e=>Kn(e)?null:e,gI=e=>e?"true":"false",B_=e=>e===void 0?void 0:gI(e),U_=({isLast:e,...t})=>m.jsx(Nm,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),kue=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var d,p,g;const[i,o]=B.useState(((d=n.redirects)==null?void 0:d.baseUrlRedirect)??""),[a,s]=B.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=B.useState(((g=n.redirects)==null?void 0:g.invalidShortUrlRedirect)??""),f=Ay(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:$_(i),regular404Redirect:$_(a),invalidShortUrlRedirect:$_(l)}}).then(t));return m.jsx(Zo,{isOpen:e,toggle:t,centered:!0,children:m.jsxs("form",{name:"domainRedirectsModal",onSubmit:f,children:[m.jsxs(Qo,{toggle:t,children:["Edit redirects for ",m.jsx("b",{children:n.domain})]}),m.jsxs(fo,{children:[m.jsxs(U_,{value:i,onChange:o,children:[m.jsxs(Bm,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",m.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),m.jsxs(U_,{value:a,onChange:s,children:[m.jsxs(Bm,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",m.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),m.jsxs(U_,{value:l,isLast:!0,onChange:c,children:[m.jsx(Bm,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),m.jsxs(gl,{children:[m.jsx(yt,{color:"link",type:"button",onClick:t,children:"Cancel"}),m.jsx(yt,{color:"primary",children:"Save"})]})]})})},Pue=({domain:e,editDomainRedirects:t})=>{const[n,r]=mn(),i=Ch("domainVisits"),o=yl();return m.jsxs(jy,{children:[i&&m.jsxs(Ue,{tag:It,to:`${o}/domain/${e.domain}${e.isDefault?`_${mI}`:""}/visits`,children:[m.jsx(Ie,{icon:CS,fixedWidth:!0})," Visit stats"]}),m.jsxs(Ue,{onClick:r,children:[m.jsx(Ie,{fixedWidth:!0,icon:OS})," Edit redirects"]}),m.jsx(kue,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},Ni=({href:e,children:t,rel:n,...r})=>m.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Tue=({status:e,matchMedia:t=window.matchMedia})=>{const n=os(),r=()=>t("(max-width: 991px)").matches,[i,o]=B.useState(r());return B.useEffect(()=>{const a=()=>o(r());return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),e==="validating"?m.jsx(Ie,{fixedWidth:!0,icon:_A,spin:!0}):m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:n,children:e==="valid"?m.jsx(Ie,{fixedWidth:!0,icon:Dd,className:"text-muted"}):m.jsx(Ie,{fixedWidth:!0,icon:w1,className:"text-danger"})}),m.jsx(jr,{target:n,placement:i?"top-start":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":m.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",m.jsx("br",{}),"Check the ",m.jsx(Ni,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},z_=({fallback:e})=>m.jsxs("span",{className:"text-muted",children:[!e&&m.jsx("small",{children:"No redirect"}),e&&m.jsxs(m.Fragment,{children:[e," ",m.jsx("small",{children:"(as fallback)"})]})]}),Mue=()=>m.jsxs(m.Fragment,{children:[m.jsx(Ie,{fixedWidth:!0,icon:MG,className:"text-primary",id:"defaultDomainIcon"}),m.jsx(jr,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),jue=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:a,status:s}=e;return B.useEffect(()=>{n(e.domain)},[]),m.jsxs("tr",{className:"responsive-table__row",children:[m.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:o&&m.jsx(Mue,{})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:i}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??m.jsx(z_,{fallback:r==null?void 0:r.baseUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??m.jsx(z_,{fallback:r==null?void 0:r.regular404Redirect})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??m.jsx(z_,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:m.jsx(Tue,{status:s})}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(Pue,{domain:e,editDomainRedirects:t})})]})},A3=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],Due=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i})=>{var p;const{filteredDomains:o,defaultRedirects:a,loading:s,error:l,errorData:c}=t,f=a??((p=o.find(({isDefault:g})=>g))==null?void 0:p.redirects);if(B.useEffect(()=>{e()},[]),s)return m.jsx(Do,{loading:!0});const d=()=>l?m.jsx(zr,{type:"error",children:m.jsx(zo,{errorData:c,fallbackMessage:"Error loading domains :("})}):m.jsx(hn,{children:m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsx("thead",{className:"responsive-table__header",children:m.jsx("tr",{children:A3.map((g,v)=>m.jsx("th",{children:g},v))})}),m.jsxs("tbody",{children:[o.length<1&&m.jsx("tr",{children:m.jsx("td",{colSpan:A3.length,className:"text-center",children:"No results found"})}),o.map(g=>m.jsx(jue,{domain:g,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:f},g.domain))]})]})});return m.jsxs(m.Fragment,{children:[m.jsx(wh,{className:"mb-3",onChange:n}),d()]})},Lue="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Rue=e=>Mr(Lue,async({domain:t,redirects:n})=>{const i=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:i}}),Qp="shlink/domainsList",Xp={domains:[],filteredDomains:[],loading:!1,error:!1},I3=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},F3=(e,t)=>n=>n.domain!==e?n:{...n,status:t},Nue=(e,t)=>{const n=Mr(`${Qp}/listDomains`,async()=>{const{data:a,defaultRedirects:s}=await e().listDomains();return{domains:a.map(l=>({...l,status:"validating"})),defaultRedirects:s}}),r=Mr(`${Qp}/checkDomainHealth`,async a=>{try{const{status:s}=await e().health(a);return{domain:a,status:s==="pass"?"valid":"invalid"}}catch{return{domain:a,status:"invalid"}}}),i=jn(`${Qp}/filterDomains`),{reducer:o}=sr({name:Qp,initialState:Xp,reducers:{},extraReducers:a=>{a.addCase(n.pending,()=>({...Xp,loading:!0})),a.addCase(n.rejected,(s,{error:l})=>({...Xp,error:!0,errorData:Jo(l)})),a.addCase(n.fulfilled,(s,{payload:l})=>({...Xp,...l,filteredDomains:l.domains})),a.addCase(r.fulfilled,({domains:s,filteredDomains:l,...c},{payload:f})=>({...c,domains:s.map(F3(f.domain,f.status)),filteredDomains:l.map(F3(f.domain,f.status))})),a.addCase(i,(s,{payload:l})=>({...s,filteredDomains:s.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),a.addCase(t.fulfilled,(s,{payload:l})=>({...s,domains:s.domains.map(I3(l)),filteredDomains:s.filteredDomains.map(I3(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},Aue=(e,t)=>{e.serviceFactory("DomainSelector",()=>sse),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>Due),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",Nue,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",ct("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",ct("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",ct("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",Rue,"apiClientFactory"),e.serviceFactory("checkDomainHealth",ct("checkDomainHealth"),"domainsListReducerCreator")},$3="shlink/mercure",Iue={loading:!0,error:!1},Fue=e=>{const t=Mr(`${$3}/loadMercureInfo`,({realTimeUpdates:r})=>{if(r&&!r.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=sr({name:$3,initialState:Iue,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},$ue=e=>{e.serviceFactory("mercureInfoReducerCreator",Fue,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",ct("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",ct("loadMercureInfo"),"mercureInfoReducerCreator")};var hx={exports:{}};/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ - */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,c=n.document,f=n.Promise,d=n.fetch,p=n.Response,m=n.TextDecoder,v=n.TextEncoder,y=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(ue){c.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ue){function ve(){}return ve.prototype=ue,new ve}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var x=d;d=function(ue,ve){var _e=ve.signal;return x(ue,{headers:ve.headers,credentials:ve.credentials,cache:ve.cache}).then(function(Ce){var Le=Ce.body.getReader();return _e._reader=Le,_e._aborted&&_e._reader.cancel(),{status:Ce.status,statusText:Ce.statusText,headers:Ce.headers,body:{getReader:function(){return Le}}}})},y=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function b(){this.bitsNeeded=0,this.codePoint=0}b.prototype.decode=function(ue){function ve(be,ye,Se){if(Se===1)return be>=128>>ye&&be<=2048>>ye&&be<=57344>>ye&&be<=65536>>ye&&be<>6>15?3:ye>31?2:1;if(be===6*2)return ye>15?3:2;if(be===6*3)return 3;throw new Error}for(var Ce=65533,Le="",Me=this.bitsNeeded,je=this.codePoint,ce=0;ce191||!ve(je<<6|de&63,Me-6,_e(Me,je)))&&(Me=0,je=Ce,Le+=String.fromCharCode(je)),Me===0?(de>=0&&de<=127?(Me=0,je=de):de>=192&&de<=223?(Me=6*1,je=de&31):de>=224&&de<=239?(Me=6*2,je=de&15):de>=240&&de<=247?(Me=6*3,je=de&7):(Me=0,je=Ce),Me!==0&&!ve(je,Me,_e(Me,je))&&(Me=0,je=Ce)):(Me-=6,je=je<<6|de&63),Me===0&&(je<=65535?Le+=String.fromCharCode(je):(Le+=String.fromCharCode(55296+(je-65535-1>>10)),Le+=String.fromCharCode(56320+(je-65535-1&1023))))}return this.bitsNeeded=Me,this.codePoint=je,Le};var w=function(){try{return new m().decode(new v().encode("test"),{stream:!0})==="test"}catch(ue){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ue)}return!1};(m==null||v==null||!w())&&(m=b);var S=function(){};function C(ue){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=S,this.onload=S,this.onerror=S,this.onreadystatechange=S,this._contentType="",this._xhr=ue,this._sendTimeout=0,this._abort=S}C.prototype.open=function(ue,ve){this._abort(!0);var _e=this,Ce=this._xhr,Le=1,Me=0;this._abort=function(Se){_e._sendTimeout!==0&&(i(_e._sendTimeout),_e._sendTimeout=0),(Le===1||Le===2||Le===3)&&(Le=4,Ce.onload=S,Ce.onerror=S,Ce.onabort=S,Ce.onprogress=S,Ce.onreadystatechange=S,Ce.abort(),Me!==0&&(i(Me),Me=0),Se||(_e.readyState=4,_e.onabort(null),_e.onreadystatechange())),Le=0};var je=function(){if(Le===1){var Se=0,Te="",Ne=void 0;if("contentType"in Ce)Se=200,Te="OK",Ne=Ce.contentType;else try{Se=Ce.status,Te=Ce.statusText,Ne=Ce.getResponseHeader("Content-Type")}catch{Se=0,Te="",Ne=void 0}Se!==0&&(Le=2,_e.readyState=2,_e.status=Se,_e.statusText=Te,_e._contentType=Ne,_e.onreadystatechange())}},ce=function(){if(je(),Le===2||Le===3){Le=3;var Se="";try{Se=Ce.responseText}catch{}_e.readyState=3,_e.responseText=Se,_e.onprogress()}},de=function(Se,Te){if((Te==null||Te.preventDefault==null)&&(Te={preventDefault:S}),ce(),Le===1||Le===2||Le===3){if(Le=4,Me!==0&&(i(Me),Me=0),_e.readyState=4,Se==="load")_e.onload(Te);else if(Se==="error")_e.onerror(Te);else if(Se==="abort")_e.onabort(Te);else throw new TypeError;_e.onreadystatechange()}},be=function(Se){Ce!=null&&(Ce.readyState===4?(!("onload"in Ce)||!("onerror"in Ce)||!("onabort"in Ce))&&de(Ce.responseText===""?"error":"load",Se):Ce.readyState===3?"onprogress"in Ce||ce():Ce.readyState===2&&je())},ye=function(){Me=r(function(){ye()},500),Ce.readyState===3&&ce()};"onload"in Ce&&(Ce.onload=function(Se){de("load",Se)}),"onerror"in Ce&&(Ce.onerror=function(Se){de("error",Se)}),"onabort"in Ce&&(Ce.onabort=function(Se){de("abort",Se)}),"onprogress"in Ce&&(Ce.onprogress=ce),"onreadystatechange"in Ce&&(Ce.onreadystatechange=function(Se){be(Se)}),("contentType"in Ce||!("ontimeout"in o.prototype))&&(ve+=(ve.indexOf("?")===-1?"?":"&")+"padding=true"),Ce.open(ue,ve,!0),"readyState"in Ce&&(Me=r(function(){ye()},0))},C.prototype.abort=function(){this._abort(!1)},C.prototype.getResponseHeader=function(ue){return this._contentType},C.prototype.setRequestHeader=function(ue,ve){var _e=this._xhr;"setRequestHeader"in _e&&_e.setRequestHeader(ue,ve)},C.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},C.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var ue=this;ue._sendTimeout=r(function(){ue._sendTimeout=0,ue.send()},4);return}var ve=this._xhr;"withCredentials"in ve&&(ve.withCredentials=this.withCredentials);try{ve.send(void 0)}catch(_e){throw _e}};function k(ue){return ue.replace(/[A-Z]/g,function(ve){return String.fromCharCode(ve.charCodeAt(0)+32)})}function P(ue){for(var ve=Object.create(null),_e=ue.split(`\r -`),Ce=0;Ce<_e.length;Ce+=1){var Le=_e[Ce],Me=Le.split(": "),je=Me.shift(),ce=Me.join(": ");ve[k(je)]=ce}this._map=ve}P.prototype.get=function(ue){return this._map[k(ue)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function j(){}j.prototype.open=function(ue,ve,_e,Ce,Le,Me,je){ue.open("GET",Le);var ce=0;ue.onprogress=function(){var be=ue.responseText,ye=be.slice(ce);ce+=ye.length,_e(ye)},ue.onerror=function(be){be.preventDefault(),Ce(new Error("NetworkError"))},ue.onload=function(){Ce(null)},ue.onabort=function(){Ce(null)},ue.onreadystatechange=function(){if(ue.readyState===o.HEADERS_RECEIVED){var be=ue.status,ye=ue.statusText,Se=ue.getResponseHeader("Content-Type"),Te=ue.getAllResponseHeaders();ve(be,ye,Se,new P(Te))}},ue.withCredentials=Me;for(var de in je)Object.prototype.hasOwnProperty.call(je,de)&&ue.setRequestHeader(de,je[de]);return ue.send(),ue};function N(ue){this._headers=ue}N.prototype.get=function(ue){return this._headers.get(ue)};function H(){}H.prototype.open=function(ue,ve,_e,Ce,Le,Me,je){var ce=null,de=new y,be=de.signal,ye=new m;return d(Le,{headers:je,credentials:Me?"include":"same-origin",signal:be,cache:"no-store"}).then(function(Se){return ce=Se.body.getReader(),ve(Se.status,Se.statusText,Se.headers.get("Content-Type"),new N(Se.headers)),new f(function(Te,Ne){var Qe=function(){ce.read().then(function(et){if(et.done)Te(void 0);else{var qe=ye.decode(et.value,{stream:!0});_e(qe),Qe()}}).catch(function(et){Ne(et)})};Qe()})}).catch(function(Se){if(Se.name!=="AbortError")return Se}).then(function(Se){Ce(Se)}),{abort:function(){ce!=null&&ce.cancel(),de.abort()}}};function R(){this._listeners=Object.create(null)}function V(ue){r(function(){throw ue},0)}R.prototype.dispatchEvent=function(ue){ue.target=this;var ve=this._listeners[ue.type];if(ve!=null)for(var _e=ve.length,Ce=0;Ce<_e;Ce+=1){var Le=ve[Ce];try{typeof Le.handleEvent=="function"?Le.handleEvent(ue):Le.call(this,ue)}catch(Me){V(Me)}}},R.prototype.addEventListener=function(ue,ve){ue=String(ue);var _e=this._listeners,Ce=_e[ue];Ce==null&&(Ce=[],_e[ue]=Ce);for(var Le=!1,Me=0;Me=128>>ye&&be<=2048>>ye&&be<=57344>>ye&&be<=65536>>ye&&be<>6>15?3:ye>31?2:1;if(be===6*2)return ye>15?3:2;if(be===6*3)return 3;throw new Error}for(var Ce=65533,Le="",Me=this.bitsNeeded,je=this.codePoint,ce=0;ce191||!ve(je<<6|de&63,Me-6,_e(Me,je)))&&(Me=0,je=Ce,Le+=String.fromCharCode(je)),Me===0?(de>=0&&de<=127?(Me=0,je=de):de>=192&&de<=223?(Me=6*1,je=de&31):de>=224&&de<=239?(Me=6*2,je=de&15):de>=240&&de<=247?(Me=6*3,je=de&7):(Me=0,je=Ce),Me!==0&&!ve(je,Me,_e(Me,je))&&(Me=0,je=Ce)):(Me-=6,je=je<<6|de&63),Me===0&&(je<=65535?Le+=String.fromCharCode(je):(Le+=String.fromCharCode(55296+(je-65535-1>>10)),Le+=String.fromCharCode(56320+(je-65535-1&1023))))}return this.bitsNeeded=Me,this.codePoint=je,Le};var w=function(){try{return new g().decode(new v().encode("test"),{stream:!0})==="test"}catch(ue){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ue)}return!1};(g==null||v==null||!w())&&(g=b);var S=function(){};function C(ue){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=S,this.onload=S,this.onerror=S,this.onreadystatechange=S,this._contentType="",this._xhr=ue,this._sendTimeout=0,this._abort=S}C.prototype.open=function(ue,ve){this._abort(!0);var _e=this,Ce=this._xhr,Le=1,Me=0;this._abort=function(Se){_e._sendTimeout!==0&&(i(_e._sendTimeout),_e._sendTimeout=0),(Le===1||Le===2||Le===3)&&(Le=4,Ce.onload=S,Ce.onerror=S,Ce.onabort=S,Ce.onprogress=S,Ce.onreadystatechange=S,Ce.abort(),Me!==0&&(i(Me),Me=0),Se||(_e.readyState=4,_e.onabort(null),_e.onreadystatechange())),Le=0};var je=function(){if(Le===1){var Se=0,Te="",Ne=void 0;if("contentType"in Ce)Se=200,Te="OK",Ne=Ce.contentType;else try{Se=Ce.status,Te=Ce.statusText,Ne=Ce.getResponseHeader("Content-Type")}catch{Se=0,Te="",Ne=void 0}Se!==0&&(Le=2,_e.readyState=2,_e.status=Se,_e.statusText=Te,_e._contentType=Ne,_e.onreadystatechange())}},ce=function(){if(je(),Le===2||Le===3){Le=3;var Se="";try{Se=Ce.responseText}catch{}_e.readyState=3,_e.responseText=Se,_e.onprogress()}},de=function(Se,Te){if((Te==null||Te.preventDefault==null)&&(Te={preventDefault:S}),ce(),Le===1||Le===2||Le===3){if(Le=4,Me!==0&&(i(Me),Me=0),_e.readyState=4,Se==="load")_e.onload(Te);else if(Se==="error")_e.onerror(Te);else if(Se==="abort")_e.onabort(Te);else throw new TypeError;_e.onreadystatechange()}},be=function(Se){Ce!=null&&(Ce.readyState===4?(!("onload"in Ce)||!("onerror"in Ce)||!("onabort"in Ce))&&de(Ce.responseText===""?"error":"load",Se):Ce.readyState===3?"onprogress"in Ce||ce():Ce.readyState===2&&je())},ye=function(){Me=r(function(){ye()},500),Ce.readyState===3&&ce()};"onload"in Ce&&(Ce.onload=function(Se){de("load",Se)}),"onerror"in Ce&&(Ce.onerror=function(Se){de("error",Se)}),"onabort"in Ce&&(Ce.onabort=function(Se){de("abort",Se)}),"onprogress"in Ce&&(Ce.onprogress=ce),"onreadystatechange"in Ce&&(Ce.onreadystatechange=function(Se){be(Se)}),("contentType"in Ce||!("ontimeout"in o.prototype))&&(ve+=(ve.indexOf("?")===-1?"?":"&")+"padding=true"),Ce.open(ue,ve,!0),"readyState"in Ce&&(Me=r(function(){ye()},0))},C.prototype.abort=function(){this._abort(!1)},C.prototype.getResponseHeader=function(ue){return this._contentType},C.prototype.setRequestHeader=function(ue,ve){var _e=this._xhr;"setRequestHeader"in _e&&_e.setRequestHeader(ue,ve)},C.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},C.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var ue=this;ue._sendTimeout=r(function(){ue._sendTimeout=0,ue.send()},4);return}var ve=this._xhr;"withCredentials"in ve&&(ve.withCredentials=this.withCredentials);try{ve.send(void 0)}catch(_e){throw _e}};function k(ue){return ue.replace(/[A-Z]/g,function(ve){return String.fromCharCode(ve.charCodeAt(0)+32)})}function P(ue){for(var ve=Object.create(null),_e=ue.split(`\r +`),Ce=0;Ce<_e.length;Ce+=1){var Le=_e[Ce],Me=Le.split(": "),je=Me.shift(),ce=Me.join(": ");ve[k(je)]=ce}this._map=ve}P.prototype.get=function(ue){return this._map[k(ue)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function j(){}j.prototype.open=function(ue,ve,_e,Ce,Le,Me,je){ue.open("GET",Le);var ce=0;ue.onprogress=function(){var be=ue.responseText,ye=be.slice(ce);ce+=ye.length,_e(ye)},ue.onerror=function(be){be.preventDefault(),Ce(new Error("NetworkError"))},ue.onload=function(){Ce(null)},ue.onabort=function(){Ce(null)},ue.onreadystatechange=function(){if(ue.readyState===o.HEADERS_RECEIVED){var be=ue.status,ye=ue.statusText,Se=ue.getResponseHeader("Content-Type"),Te=ue.getAllResponseHeaders();ve(be,ye,Se,new P(Te))}},ue.withCredentials=Me;for(var de in je)Object.prototype.hasOwnProperty.call(je,de)&&ue.setRequestHeader(de,je[de]);return ue.send(),ue};function N(ue){this._headers=ue}N.prototype.get=function(ue){return this._headers.get(ue)};function H(){}H.prototype.open=function(ue,ve,_e,Ce,Le,Me,je){var ce=null,de=new y,be=de.signal,ye=new g;return d(Le,{headers:je,credentials:Me?"include":"same-origin",signal:be,cache:"no-store"}).then(function(Se){return ce=Se.body.getReader(),ve(Se.status,Se.statusText,Se.headers.get("Content-Type"),new N(Se.headers)),new f(function(Te,Ne){var Qe=function(){ce.read().then(function(et){if(et.done)Te(void 0);else{var qe=ye.decode(et.value,{stream:!0});_e(qe),Qe()}}).catch(function(et){Ne(et)})};Qe()})}).catch(function(Se){if(Se.name!=="AbortError")return Se}).then(function(Se){Ce(Se)}),{abort:function(){ce!=null&&ce.cancel(),de.abort()}}};function R(){this._listeners=Object.create(null)}function V(ue){r(function(){throw ue},0)}R.prototype.dispatchEvent=function(ue){ue.target=this;var ve=this._listeners[ue.type];if(ve!=null)for(var _e=ve.length,Ce=0;Ce<_e;Ce+=1){var Le=ve[Ce];try{typeof Le.handleEvent=="function"?Le.handleEvent(ue):Le.call(this,ue)}catch(Me){V(Me)}}},R.prototype.addEventListener=function(ue,ve){ue=String(ue);var _e=this._listeners,Ce=_e[ue];Ce==null&&(Ce=[],_e[ue]=Ce);for(var Le=!1,Me=0;Me"u"?typeof window<"u"?window:typeof self<"u"?self:Zl:globalThis)})(hx,hx.exports);var Bue=hx.exports;const Uue=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:a,error:s}=e;if(a||s||!i)return;const l=({data:d})=>n(JSON.parse(d)),c=({status:d})=>d===401&&r(),f=t.map(d=>{const p=new URL(i);p.searchParams.append("topic",d);const m=new Bue.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>f.forEach(d=>d.close())};function as(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:a}=r,{interval:s}=a,l=hl();return B.useEffect(()=>{const c=m=>s?n.add(m):i([m]),f=t(r,l),d=Uue(a,f,c,o);if(!s)return d;const p=setInterval(()=>{i([...n]),n.clear()},s*1e3*60);return Ft(()=>clearInterval(p),()=>d==null?void 0:d())},[a]),g.jsx(e,{...r})}}class di{}me(di,"visits","https://shlink.io/new-visit"),me(di,"orphanVisits","https://shlink.io/new-orphan-visit"),me(di,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const FO="shlink/shortUrlDeletion",B3={shortCode:"",loading:!1,deleted:!1,error:!1},zue=e=>Mr(`${FO}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),vI=jn(`${FO}/shortUrlDeleted`),Vue=e=>{const{actions:t,reducer:n}=sr({name:FO,initialState:B3,reducers:{resetDeleteShortUrl:()=>B3},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:a})=>({...o,errorData:Jo(a),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:a})=>({...o,shortCode:a.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},yI="shlink/shortUrlsList",_I=5,Hue={loading:!0,error:!1},Wue=e=>Mr(`${yI}/listShortUrls`,t=>e().listShortUrls(t??{})),Yue=(e,t,n)=>sr({name:yI,initialState:Hue,reducers:{},extraReducers:r=>{r.addCase(e.pending,i=>({...i,loading:!0,error:!1})),r.addCase(e.rejected,()=>({loading:!1,error:!0})),r.addCase(e.fulfilled,(i,{payload:o})=>({loading:!1,error:!1,shortUrls:o})),r.addCase(n.fulfilled,Ft((i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,_I-1)],i):i,i=>i.shortUrls?Nl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],i.shortUrls.data.map(a=>{const{shortCode:s,domain:l}=o;return Zf(a,s,l)?o:a}),i):i),r.addCase(vI,Ft((i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],uh(a=>Zf(a,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Nl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(Ph,(i,{payload:o})=>{var a,s;return Nl(["shortUrls","data"],(s=(a=i.shortUrls)==null?void 0:a.data)==null?void 0:s.map(l=>{var c;return((c=zq(o.createdVisits.filter(({shortUrl:f})=>f&&Zf(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),U3=10,{ceil:que}=Math,Gue=new Intl.NumberFormat("en-US"),wn=e=>Gue.format(Number(e)),Kue=e=>que(e/U3)*U3,Zue={field:"dateCreated",dir:"DESC"},bI={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:Zue}},wI=B.createContext(bI),Que=wI.Provider,$O=()=>B.useContext(wI)??bI,bl=e=>$O()[e];var Xue={prefix:"far",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"]},Jue=Xue,efe={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 135.1c-4.2-4.5-10.1-7.1-16.3-7.1C266 128 256 138 256 150.3V208H160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32h96v57.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.3-7.1l99.9-107.1c3.5-3.8 5.5-8.7 5.5-13.8s-2-10.1-5.5-13.8L294.6 135.1z"]},tfe=efe,nfe={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},xI={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]};const rfe=e=>({tag:It,to:e}),px=({children:e,title:t,link:n,tooltip:r})=>{const i=gl();return g.jsxs(g.Fragment,{children:[g.jsxs(Yr,{innerRef:i,className:"highlight-card",body:!0,...rfe(n),children:[g.jsx(Ie,{size:"3x",className:"highlight-card__link-icon",icon:tfe}),g.jsx(F4,{tag:"h5",className:"highlight-card__title",children:t}),g.jsx(I4,{tag:"h2",children:e})]}),r&&g.jsx(jr,{target:i,placement:"bottom",children:r})]})},z3=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(px,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("strong",{children:wn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":wn(t&&n.nonBots?n.nonBots:n.total)}),ife=(e,t)=>as(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,loadVisitsOverview:a,visitsOverview:s})=>{const{loading:l,shortUrls:c}=n,{loading:f}=o,{loading:d,nonOrphanVisits:p,orphanVisits:m}=s,v=yl(),y=uo(),x=bl("visits");return B.useEffect(()=>{r({itemsPerPage:_I,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),g.jsxs(g.Fragment,{children:[g.jsxs(mr,{children:[g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(z3,{title:"Visits",link:`${v}/non-orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:d,visitsSummary:p})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(z3,{title:"Orphan visits",link:`${v}/orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:d,visitsSummary:m})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(px,{title:"Short URLs",link:`${v}/list-short-urls/1`,children:l?"Loading...":wn((c==null?void 0:c.pagination.totalItems)??0)})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(px,{title:"Tags",link:`${v}/manage-tags`,children:f?"Loading...":wn(o.tags.length)})})]}),g.jsxs(Yr,{className:"mb-3",children:[g.jsxs(Kc,{children:[g.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),g.jsx(It,{className:"float-end",to:`${v}/create-short-url`,children:"Advanced options »"})]}),g.jsx(Gc,{children:g.jsx(t,{basicMode:!0})})]}),g.jsxs(Yr,{children:[g.jsxs(Kc,{children:[g.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),g.jsx(It,{className:"float-end",to:`${v}/list-short-urls/1`,children:"See all »"})]}),g.jsx(Gc,{children:g.jsx(e,{shortUrlsList:n,className:"mb-0",onTagClick:b=>y(`${v}/list-short-urls/1?tags=${encodeURIComponent(b)}`)})})]})]})},()=>[di.visits,di.orphanVisits]);function ofe(e,t){e.serviceFactory("Overview",ife,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const afe=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),sfe=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,basicMode:o=!1})=>{const a=bl("shortUrlCreation"),s=B.useMemo(()=>afe(a),[a]);return g.jsxs(g.Fragment,{children:[g.jsx(e,{initialState:s,saving:r.saving,mode:o?"create-basic":"create",onSave:async l=>(i(),n(l))}),g.jsx(t,{creation:r,resetCreateShortUrl:i,canBeClosed:o})]})},lfe="Left",cfe="Right",ufe="Up",ffe="Down",pc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},mx={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},V3="mousemove",H3="mouseup",dfe="touchend",hfe="touchmove",pfe="touchstart";function mfe(e,t,n,r){return e>t?n>0?cfe:lfe:r>0?ffe:ufe}function W3(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function gfe(e,t){const n=f=>{const d="touches"in f;d&&f.touches.length>1||e((p,m)=>{m.trackMouse&&!d&&(document.addEventListener(V3,r),document.addEventListener(H3,a));const{clientX:v,clientY:y}=d?f.touches[0]:f,x=W3([v,y],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),mx),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((d,p)=>{const m="touches"in f;if(m&&f.touches.length>1)return d;if(f.timeStamp-d.start>p.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:v,clientY:y}=m?f.touches[0]:f,[x,b]=W3([v,y],p.rotationAngle),w=x-d.xy[0],S=b-d.xy[1],C=Math.abs(w),k=Math.abs(S),P=(f.timeStamp||0)-d.start,j=Math.sqrt(C*C+k*k)/(P||1),N=[w/(P||1),S/(P||1)],H=mfe(C,k,w,S),R=typeof p.delta=="number"?p.delta:p.delta[H.toLowerCase()]||pc.delta;if(C{e((d,p)=>{let m;if(d.swiping&&d.eventData){if(f.timeStamp-d.start{document.removeEventListener(V3,r),document.removeEventListener(H3,a)},a=f=>{o(),i(f)},s=(f,d)=>{let p=()=>{};if(f&&f.addEventListener){const m=Object.assign(Object.assign({},pc.touchEventOptions),d.touchEventOptions),v=[[pfe,n,m],[hfe,r,Object.assign(Object.assign({},m),d.preventScrollOnSwipe?{passive:!1}:{})],[dfe,i,m]];v.forEach(([y,x,b])=>f.addEventListener(y,x,b)),p=()=>v.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((d,p)=>{if(d.el===f)return d;const m={};return d.el&&d.el!==f&&d.cleanUpTouch&&(d.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&f&&(m.cleanUpTouch=s(f,p)),Object.assign(Object.assign(Object.assign({},d),{el:f}),m)})}};return t.trackMouse&&(c.onMouseDown=n),[c,s]}function vfe(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function yfe(e){const{trackMouse:t}=e,n=B.useRef(Object.assign({},mx)),r=B.useRef(Object.assign({},pc)),i=B.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},pc),e);let o;for(o in pc)r.current[o]===void 0&&(r.current[o]=pc[o]);const[a,s]=B.useMemo(()=>gfe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=vfe(n.current,r.current,i.current,s),a}const _fe=2e3,bfe=(e,t)=>(n=!1,r=_fe)=>{const[i,o]=B.useState(n),a=B.useRef(void 0);return[i,()=>{o(!n),a.current&&t(a.current),a.current=e(()=>o(n),r)}]},wfe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:a})=>a==null?void 0:a.contains("visits-table"))||document.querySelector(".modal")||r()};return yfe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},xfe=(e,t)=>{const[n,r]=B.useState(t);return[n,o=>{const{location:a,history:s}=window,l=vl(a.search);l[e]=o,s.pushState(null,"",`${a.pathname}?${Oh(l)}`),r(o)}]},Sfe=(e,t)=>{const n=B.useRef(!0);B.useEffect(()=>{!n.current&&e(),n.current=!1},t)},xu=()=>{const e=uo();return()=>e(-1)},Ofe=e=>({shortUrlDetail:t,getShortUrlDetail:n,shortUrlEdition:r,editShortUrl:i})=>{const{search:o}=gn(),a=hl(),s=xu(),{loading:l,error:c,errorData:f,shortUrl:d}=t,{saving:p,saved:m,error:v,errorData:y}=r,{domain:x}=vl(o),b=bl("shortUrlCreation"),w=B.useMemo(()=>wse(d,b),[d,b]);return B.useEffect(()=>{a.shortCode&&n({shortCode:Fm(a.shortCode),domain:x})},[]),l?g.jsx(Do,{loading:!0}):c?g.jsx(zr,{type:"error",children:g.jsx(zo,{errorData:f,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs(g.Fragment,{children:[g.jsx("header",{className:"mb-3",children:g.jsx(Yr,{body:!0,children:g.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[g.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:s,children:g.jsx(Ie,{icon:SA})}),g.jsx("span",{className:"text-center",children:g.jsxs("small",{children:["Edit ",g.jsx(Ni,{href:(d==null?void 0:d.shortUrl)??""})]})}),g.jsx("span",{})]})})}),g.jsx(e,{initialState:w,saving:p,mode:"edit",onSave:async S=>{d&&i({...d,data:S})}}),m&&v&&g.jsx(zr,{type:"error",className:"mt-3",children:g.jsx(zo,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),m&&!v&&g.jsx(zr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var Iy={},Cfe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=Y3[t.format]||Y3.default;window.clipboardData.setData(d,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=Pfe("message"in t?t.message:kfe),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var Mfe=Tfe;function gx(e){"@babel/helpers - typeof";return gx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gx(e)}Object.defineProperty(Iy,"__esModule",{value:!0});Iy.CopyToClipboard=void 0;var Jp=SI(B),jfe=SI(Mfe),Dfe=["text","onCopy","options","children"];function SI(e){return e&&e.__esModule?e:{default:e}}function q3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function G3(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rfe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Nfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K3(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wv(e){return wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},wv(e)}function BO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CI=function(e){Ife(n,e);var t=Ffe(n);function n(){var r;Nfe(this,n);for(var i=arguments.length,o=new Array(i),a=0;a({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:a,saved:s}=t;if(B.useEffect(()=>{n()},[]),a)return g.jsxs(zr,{type:"error",className:"mt-3",children:[r&&g.jsx(Ie,{icon:w1,className:"float-end pointer",onClick:n}),g.jsx(zo,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=t.result;return g.jsxs(zr,{type:"success",className:"mt-3",children:[r&&g.jsx(Ie,{icon:w1,className:"float-end pointer",onClick:n}),g.jsxs("span",{children:[g.jsx("b",{children:"Great!"})," The short URL is ",g.jsx("b",{children:l})]}),g.jsx(EI,{text:l,onCopy:o,children:g.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[g.jsx(Ie,{icon:xI})," Copy"]})}),g.jsx(_h,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},V_="delete",Hfe=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=B.useState("");B.useEffect(()=>i,[]);const{loading:c,error:f,deleted:d,errorData:p}=r,m=Ft(i,t),v=Ay(()=>o(e).then(t));return g.jsx(Zo,{isOpen:n,toggle:m,centered:!0,onClosed:()=>d&&a(e),children:g.jsxs("form",{onSubmit:v,children:[g.jsx(Qo,{toggle:m,children:g.jsx("span",{className:"text-danger",children:"Delete short URL"})}),g.jsxs(fo,{children:[g.jsxs("p",{children:[g.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),g.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),g.jsxs("p",{children:["Write ",g.jsx("b",{children:V_})," to confirm deletion."]}),g.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${V_}`,value:s,onChange:y=>l(y.target.value)}),f&&g.jsx(zr,{type:cse(p)?"warning":"error",small:!0,className:"mt-2",children:g.jsx(zo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),g.jsxs(ml,{children:[g.jsx("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),g.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==V_||c,children:c?"Deleting...":"Delete"})]})]})})},kI=({amount:e=0,loading:t=!1,...n})=>g.jsxs(yt,{...n,outline:!0,color:"primary",disabled:t,children:[g.jsx(Ie,{icon:CG})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",wn(e),")"]})]}),Fy=()=>{const e=uo(),{search:t}=gn(),n=yl(),r=B.useMemo(Ft(()=>vl(t),({orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const d=o?rie(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...f,orderBy:d,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]),i=B.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:d,...p}=a,m={...p,orderBy:s&&r6(s),tags:l.length>0?l.join(","):void 0,excludeBots:B_(c),excludeMaxVisitsReached:B_(f),excludePastValidUntil:B_(d)},v=Oh(m),y=Kn(v)?"":`?${v}`;e(`${n}/list-short-urls/1${y}`)},[r,e,n]);return[r,i]},Z3=20,Wfe=(e,{exportShortUrls:t})=>({amount:n=0})=>{const[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=Fy(),[c,,f,d]=mn(),p=B.useCallback(async()=>{const m=n/Z3,v=async(x=1)=>{const{data:b}=await e().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:Z3});return x>=m?b:b.concat(await v(x+1))};f();const y=await v();t(y.map(x=>{var C;const{hostname:b,pathname:w}=new URL(x.shortUrl),S=w.substring(1);return{createdAt:x.dateCreated,domain:b,shortCode:S,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((C=x==null?void 0:x.visitsSummary)==null?void 0:C.total)??x.visitsCount}})),d()},[]);return g.jsx(kI,{loading:c,className:"btn-md-block",amount:n,onClick:p})};const PI=({text:e,onCopy:t})=>g.jsx(EI,{text:e,onCopy:t,children:g.jsx(Ie,{icon:xI,className:"ms-2 copy-to-clipboard-icon"})}),Yfe=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=Oh({...n,margin:t>0?t:void 0});return`${r}${Kn(i)?"":`?${i}`}`},qfe=({errorCorrection:e,setErrorCorrection:t})=>g.jsxs(Xo,{text:`Error correction (${e})`,children:[g.jsxs(Ue,{active:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(Ue,{active:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(Ue,{active:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(Ue,{active:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),Gfe=({format:e,setFormat:t})=>g.jsxs(Xo,{text:`Format (${e})`,children:[g.jsx(Ue,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),g.jsx(Ue,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]});const Kfe=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i})=>{const[o,a]=B.useState(300),[s,l]=B.useState(0),[c,f]=B.useState("png"),[d,p]=B.useState("L"),m=B.useMemo(()=>Yfe(t,{size:o,format:c,margin:s,errorCorrection:d}),[t,o,c,s,d]),v=B.useMemo(()=>o+s,[o,s]),y=B.useMemo(()=>{if(!(v<500))return v<800?"lg":"xl"},[v]);return g.jsxs(Zo,{isOpen:i,toggle:r,centered:!0,size:y,children:[g.jsxs(Qo,{toggle:r,children:["QR code for ",g.jsx(Ni,{href:t,children:t})]}),g.jsxs(fo,{children:[g.jsxs(mr,{children:[g.jsxs(Fr,{className:"d-grid col-md-6",children:[g.jsxs("label",{children:["Size: ",o,"px"]}),g.jsx("input",{type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>a(Number(x.target.value))})]}),g.jsxs(Fr,{className:"d-grid col-md-6",children:[g.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),g.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),g.jsx(Fr,{className:"d-grid col-md-6",children:g.jsx(Gfe,{format:c,setFormat:f})}),g.jsx(Fr,{className:"col-md-6",children:g.jsx(qfe,{errorCorrection:d,setErrorCorrection:p})})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"mb-3",children:[g.jsx(Ni,{href:m}),g.jsx(PI,{text:m})]}),g.jsx("img",{src:m,className:"qr-code-modal__img",alt:"QR code"}),g.jsx("div",{className:"mt-3",children:g.jsxs(yt,{block:!0,color:"primary",onClick:()=>{e.saveImage(m,`${n}-qr-code.${c}`).catch(()=>{})},children:["Download ",g.jsx(Ie,{icon:OA,className:"ms-1"})]})})]})]})]})},xv=({date:e,format:t=RO,relative:n=!1})=>{const r=NO(e)?e:Vo(e);return g.jsx("time",{dateTime:`${Jle(r)}000`,children:n?`${qle(Qa(),r)} ago`:ou(r,t)})},Zfe=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n;return i&&s>=i?{icon:gK,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",g.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:a&&li(ji(a),Qa())?{icon:gT,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be visited since ",g.jsx("b",{className:"indivisible",children:_v(ji(a))}),"."]})}:o&&li(Qa(),ji(o))?{icon:gT,className:"text-warning",description:g.jsxs(g.Fragment,{children:["This short URL will start working on ",g.jsx("b",{className:"indivisible",children:_v(ji(o))}),"."]})}:{icon:Dd,className:"text-primary",description:"This short URL can be visited normally."}},Qfe=({shortUrl:e})=>{const t=gl(),{icon:n,className:r,description:i}=Zfe(e);return g.jsxs(g.Fragment,{children:[g.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:g.jsx(Ie,{icon:n,className:r})}),g.jsx(jr,{target:t,placement:"bottom",children:i})]})},Xfe=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${xse(t)}/${r}${i}`},_x=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=yl();return!n||!e?g.jsx("span",{...i,children:r}):g.jsx(It,{to:Xfe(o,e,t),...i,children:r})};const TI=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:a}=(t==null?void 0:t.meta)??{},s=!!i||!!o||!!a,l=g.jsx(_x,{shortUrl:t,suffix:"visits",asLink:r,children:g.jsx("strong",{className:Ee("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:wn(e)})});if(!s)return l;const c=gl();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"indivisible",children:[l,g.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:c,children:[i&&g.jsxs(g.Fragment,{children:[" / ",wn(i)]}),g.jsx("sup",{className:"ms-1",children:g.jsx(Ie,{icon:ES})})]})]}),g.jsx(jr,{target:c,placement:"bottom",children:g.jsxs("ul",{className:"list-unstyled mb-0",children:[i&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",g.jsx("b",{children:wn(i)})," visit",i===1?"":"s","."]}),o&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",g.jsx("b",{className:"indivisible",children:_v(ji(o))}),"."]}),a&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",g.jsx("b",{className:"indivisible",children:_v(ji(a))}),"."]})]})})]})};const UO=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:a})=>g.jsxs("span",{className:Ee("badge tag",r,{"tag--light-bg":i.isColorLightForKey(e)}),style:{backgroundColor:i.getColorForKey(e),cursor:n||!o?"auto":"pointer"},onClick:o,children:[t??e,n&&g.jsx("span",{"aria-label":`Remove ${e}`,className:"close tag__close-selected-tag",onClick:a,children:"×"})]}),Jfe=({tags:e,onTagClick:t,colorGenerator:n})=>Kn(e)?g.jsx("i",{className:"indivisible",children:g.jsx("small",{children:"No tags"})}):g.jsx(g.Fragment,{children:e.map(r=>g.jsx(UO,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const ede=(e,t,n)=>({shortUrl:r,onTagClick:i})=>{var m,v,y,x;const[o,a]=n(),[s,l]=n(!1,500),c=B.useRef(!0),[{excludeBots:f}]=Fy(),d=bl("visits"),p=f??(d==null?void 0:d.excludeBots);return B.useEffect(()=>{!c.current&&l(),c.current=!1},[(m=r.visitsSummary)==null?void 0:m.total,(v=r.visitsSummary)==null?void 0:v.nonBots,r.visitsCount]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:g.jsx(xv,{date:r.dateCreated})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:g.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[g.jsx("span",{className:"short-urls-row__short-url-wrapper",children:g.jsx(Ni,{href:r.shortUrl})}),g.jsx(PI,{text:r.shortUrl,onCopy:a}),g.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!o,children:"Copied short URL!"})]})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:g.jsx(Ni,{href:r.longUrl,children:r.title??r.longUrl})}),r.title&&g.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:g.jsx(Ni,{href:r.longUrl})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:g.jsx(Jfe,{tags:r.tags,colorGenerator:t,onTagClick:i})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:g.jsx(TI,{visitsCount:(p?(y=r.visitsSummary)==null?void 0:y.nonBots:(x=r.visitsSummary)==null?void 0:x.total)??r.visitsCount,shortUrl:r,active:s,asLink:!0})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:g.jsx(Qfe,{shortUrl:r})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:g.jsx(e,{shortUrl:r})})]})},tde=(e,t)=>({shortUrl:n})=>{const[r,,i,o]=mn(),[a,,s,l]=mn();return g.jsxs(jy,{minWidth:190,children:[g.jsxs(Ue,{tag:_x,shortUrl:n,suffix:"visits",asLink:!0,children:[g.jsx(Ie,{icon:CS,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{tag:_x,shortUrl:n,suffix:"edit",asLink:!0,children:[g.jsx(Ie,{icon:OS,fixedWidth:!0})," Edit short URL"]}),g.jsxs(Ue,{onClick:i,children:[g.jsx(Ie,{icon:pK,fixedWidth:!0})," QR code"]}),g.jsx(t,{shortUrl:n,isOpen:r,toggle:o}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:s,children:[g.jsx(Ie,{icon:SS,fixedWidth:!0})," Delete short URL"]}),g.jsx(e,{shortUrl:n,isOpen:a,toggle:l})]})},MI="shlink/shortUrlCreation",Q3={saving:!1,saved:!1,error:!1},nde=e=>Mr(`${MI}/createShortUrl`,t=>e().createShortUrl(t)),rde=e=>{const{reducer:t,actions:n}=sr({name:MI,initialState:Q3,reducers:{resetCreateShortUrl:()=>Q3},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:Jo(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},X3="shlink/shortUrlDetail",J3={loading:!1,error:!1},ide=e=>{const t=Mr(`${X3}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var l;const{shortUrlsList:a}=o();return((l=a==null?void 0:a.shortUrls)==null?void 0:l.data.find(c=>Zf(c,r,i)))??await e().getShortUrl(r,i)}),{reducer:n}=sr({name:X3,initialState:J3,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:Jo(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...J3,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},jI="shlink/shortUrlEdition",ode={saving:!1,saved:!1,error:!1},ade=e=>Mr(`${jI}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),sde=e=>sr({name:jI,initialState:ode,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,saving:!0,error:!1,saved:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:Jo(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var lde={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},cde={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]};const ude=/\s+/g,DI=e=>e.trim().toLowerCase().replace(ude,"-");const fde=({icon:e,className:t,...n})=>{const r=gl(),i=Ee("icon-input-container__input",t);return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(Zc,{className:i,innerRef:r,...n}),g.jsx(Ie,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})};function dde(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bx(e,t)}function bx(e,t){return bx=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},bx(e,t)}function hde(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function ej(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pde(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function mde(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&pde(e,t,n))return!0;e=e.parentNode||e.host}return e}function gde(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var vde=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function yde(e){return e===void 0&&(e=0),function(){return++e}}var _de=yde(),wx,em={},H_={},bde=["touchstart","touchmove"],wde="ignore-react-onclickoutside";function tj(e,t){var n={},r=bde.indexOf(t)!==-1;return r&&wx&&(n.passive=!e.props.preventDefault),n}function $y(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){dde(a,o);function a(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(f){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(f);return}var d=c.getInstance();if(typeof d.props.handleClickOutside=="function"){d.props.handleClickOutside(f);return}if(typeof d.handleClickOutside=="function"){d.handleClickOutside(f);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var f=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(f):typeof f.setClickOutsideRef=="function"?f.setClickOutsideRef():fu.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||H_[c._uid])){typeof wx>"u"&&(wx=vde()),H_[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),em[c._uid]=function(d){if(c.componentNode!==null&&(c.props.preventDefault&&d.preventDefault(),c.props.stopPropagation&&d.stopPropagation(),!(c.props.excludeScrollbar&&gde(d)))){var p=d.composed&&d.composedPath&&d.composedPath().shift()||d.target;mde(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(d)}},f.forEach(function(d){document.addEventListener(d,em[c._uid],tj(ej(c),d))})}},c.disableOnClickOutside=function(){delete H_[c._uid];var f=em[c._uid];if(f&&typeof document<"u"){var d=c.props.eventTypes;d.forEach||(d=[d]),d.forEach(function(p){return document.removeEventListener(p,f,tj(ej(c),p))}),delete em[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=_de(),c}var s=a.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var c=this.props;c.excludeScrollbar;var f=hde(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,B.createElement(e,f)},a}(B.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:wde,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}function nj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rj(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Sv(e);if(t){var i=Sv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return te(o)}(this,n)}}function Ox(e){return function(t){if(Array.isArray(t))return W_(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return W_(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W_(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,a=t.includeDates,s=t.includeDateIntervals,l=t.filterDate;return Uy(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return pr(e,c)})||o&&o.some(function(c){var f=c.start,d=c.end;return au(e,{start:f,end:d})})||a&&!a.some(function(c){return pr(e,c)})||s&&!s.some(function(c){var f=c.start,d=c.end;return au(e,{start:f,end:d})})||l&&!l(Ot(e))||!1}function HO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,a=i.end;return au(e,{start:o,end:a})}):n&&n.some(function(i){return pr(e,i)})||!1}function NI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return Uy(e,{minDate:Y6(n),maxDate:W6(r)})||i&&i.some(function(s){return ki(e,s)})||o&&!o.some(function(s){return ki(e,s)})||a&&!a(Ot(e))||!1}function Y_(e,t,n,r){var i=Je(e),o=nr(e),a=Je(t),s=nr(t),l=Je(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function Ode(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return Uy(e,{minDate:n,maxDate:r})||i&&i.some(function(s){return Ov(e,s)})||o&&!o.some(function(s){return Ov(e,s)})||a&&!a(Ot(e))||!1}function q_(e,t,n){if(!dv(t)||!dv(n))return!1;var r=Je(t),i=Je(n);return r<=e&&i>=e}function AI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate,s=new Date(e,0,1);return Uy(s,{minDate:q6(n),maxDate:Fse(r)})||i&&i.some(function(l){return ka(s,l)})||o&&!o.some(function(l){return ka(s,l)})||a&&!a(Ot(s))||!1}function G_(e,t,n,r){var i=Je(e),o=hc(e),a=Je(t),s=hc(t),l=Je(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function Uy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&qd(e,n)<0||r&&qd(e,r)>0}function uj(e,t){return t.some(function(n){return $r(n)===$r(e)&&Br(n)===Br(e)})}function fj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&uj(e,n)||r&&!uj(e,r)||i&&!i(e)||!1}function dj(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=Ot(),a=Qf(Xf(o,Br(e)),$r(e)),s=Qf(Xf(o,Br(n)),$r(n)),l=Qf(Xf(o,Br(r)),$r(r));try{i=!au(a,{start:s,end:l})}catch{i=!1}return i}function hj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=su(e,1);return n&&Gd(n,i)>0||r&&r.every(function(o){return Gd(o,i)>0})||!1}function pj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=vi(e,1);return n&&Gd(i,n)>0||r&&r.every(function(o){return Gd(i,o)>0})||!1}function mj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Kd(e,1);return n&&hv(n,i)>0||r&&r.every(function(o){return hv(o,i)>0})||!1}function gj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=ru(e,1);return n&&hv(i,n)>0||r&&r.every(function(o){return hv(i,o)>0})||!1}function II(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return qd(i,t)>=0});return w3(r)}return n?w3(n):t}function FI(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return qd(i,t)<=0});return b3(r)}return n?b3(n):t}function vj(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r1&&arguments[1]!==void 0?arguments[1]:Jf,n=Math.ceil(Je(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function Ede(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var a=e+t-o,s=!0;n&&(s=Je(n)<=a),r&&s&&(s=Je(r)>=a),s&&i.push(a)}return i}var kde=$y(function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;Ln(this,n),Z(te(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return Y.createElement("div",{className:l===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:i.onChange.bind(te(i),p),"aria-selected":l===p?"true":void 0},l===p?Y.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),f=i.props.minDate?Je(i.props.minDate):null,d=i.props.maxDate?Je(i.props.maxDate):null;return d&&i.state.yearsList.find(function(p){return p===d})||c.unshift(Y.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),f&&i.state.yearsList.find(function(p){return p===f})||c.push(Y.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),Z(te(i),"onChange",function(l){i.props.onChange(l)}),Z(te(i),"handleClickOutside",function(){i.props.onCancel()}),Z(te(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),Z(te(i),"incrementYears",function(){return i.shiftYears(1)}),Z(te(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,a=r.scrollableYearDropdown,s=o||(a?10:5);return i.state={yearsList:Ede(i.props.year,s,i.props.minDate,i.props.maxDate)},i.dropdownRef=B.createRef(),i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;if(r){var i=r.children?Array.from(r.children):null,o=i?i.find(function(a){return a.ariaSelected}):null;r.scrollTop=o?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}}},{key:"render",value:function(){var r=Ee({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return Y.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),Pde=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!s.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(l=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(l=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0),r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()&&(l=!1),r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()&&(l=!1)),l&&r.dayEl.current.focus({preventScroll:!0})}),Z(te(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(P3(r.props.day),r.props.day):P3(r.props.day)}),Z(te(r),"render",function(){return Y.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option","aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents())}),r}return Rn(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),Nde=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=6,m=!l&&!r.isWeekInMonth(d);if(p||m){if(!r.props.peekNextMonth)break;f=!0}}return s}),Z(te(r),"onMonthClick",function(s,l){r.handleDayClick(Ba(hr(r.props.day,l)),s)}),Z(te(r),"onMonthMouseEnter",function(s){r.handleDayMouseEnter(Ba(hr(r.props.day,s)))}),Z(te(r),"handleMonthNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[s].current&&r.MONTH_REFS[s].current.focus())}),Z(te(r),"onMonthKeyDown",function(s,l){var c=r.props,f=c.selected,d=c.preSelection,p=c.disabledKeyboardNavigation,m=c.showTwoColumnMonthYearPicker,v=c.showFourColumnMonthYearPicker,y=c.setPreSelection,x=s.key;if(x!=="Tab"&&s.preventDefault(),!p){var b=_j(v,m),w=K_[b].verticalNavigationOffset,S=K_[b].grid;switch(x){case"Enter":r.onMonthClick(s,l),y(f);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,vi(d,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,su(d,1));break;case"ArrowUp":r.handleMonthNavigation(S[0].includes(l)?l+12-w:l-w,su(d,w));break;case"ArrowDown":r.handleMonthNavigation(S[S.length-1].includes(l)?l-12+w:l+w,vi(d,w))}}}),Z(te(r),"onQuarterClick",function(s,l){r.handleDayClick(lj(zl(r.props.day,l)),s)}),Z(te(r),"onQuarterMouseEnter",function(s){r.handleDayMouseEnter(lj(zl(r.props.day,s)))}),Z(te(r),"handleQuarterNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.QUARTER_REFS[s-1].current&&r.QUARTER_REFS[s-1].current.focus())}),Z(te(r),"onQuarterKeyDown",function(s,l){var c=s.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onQuarterClick(s,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleQuarterNavigation(l===4?1:l+1,V6(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(l===1?4:l-1,gue(r.props.preSelection,1))}}),Z(te(r),"getMonthClassNames",function(s){var l=r.props,c=l.day,f=l.startDate,d=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,b=l.excludeDates,w=l.includeDates,S=x?x(hr(c,s)):void 0,C=hr(c,s);return Ee("react-datepicker__month-text","react-datepicker__month-".concat(s),S,{"react-datepicker__month-text--disabled":(m||v||b||w)&&NI(C,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(c,s,p),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&nr(y)===s,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(s),"react-datepicker__month-text--in-range":Y_(f,d,s,c),"react-datepicker__month-text--range-start":r.isRangeStartMonth(s),"react-datepicker__month-text--range-end":r.isRangeEndMonth(s),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(s),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(s),"react-datepicker__month-text--today":r.isCurrentMonth(c,s)})}),Z(te(r),"getTabIndex",function(s){var l=nr(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Z(te(r),"getQuarterTabIndex",function(s){var l=hc(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Z(te(r),"getAriaLabel",function(s){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,d=l.disabledDayAriaLabelPrefix,p=d===void 0?"Not available":d,m=l.day,v=hr(m,s),y=r.isDisabled(v)||r.isExcluded(v)?p:f;return"".concat(y," ").concat(ln(v,"MMMM yyyy"))}),Z(te(r),"getQuarterClassNames",function(s){var l=r.props,c=l.day,f=l.startDate,d=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection;return Ee("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter-text--disabled":(m||v)&&Ode(zl(c,s),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(c,s,p),"react-datepicker__quarter-text--keyboard-selected":hc(y)===s,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(s),"react-datepicker__quarter-text--in-range":G_(f,d,s,c),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(s),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(s)})}),Z(te(r),"getMonthContent",function(s){var l=r.props,c=l.showFullMonthYearPicker,f=l.renderMonthContent,d=l.locale,p=RI(s,d),m=VO(s,d);return f?f(s,p,m):c?m:p}),Z(te(r),"getQuarterContent",function(s){var l=r.props,c=l.renderQuarterContent,f=function(d,p){return ln(zl(Ot(),d),"QQQ",p)}(s,l.locale);return c?c(s,f):f}),Z(te(r),"renderMonths",function(){var s=r.props,l=s.showTwoColumnMonthYearPicker,c=s.showFourColumnMonthYearPicker,f=s.day,d=s.selected;return K_[_j(c,l)].grid.map(function(p,m){return Y.createElement("div",{className:"react-datepicker__month-wrapper",key:m},p.map(function(v,y){return Y.createElement("div",{ref:r.MONTH_REFS[v],key:y,onClick:function(x){r.onMonthClick(x,v)},onKeyDown:function(x){r.onMonthKeyDown(x,v)},onMouseEnter:function(){return r.onMonthMouseEnter(v)},tabIndex:r.getTabIndex(v),className:r.getMonthClassNames(v),role:"option","aria-label":r.getAriaLabel(v),"aria-current":r.isCurrentMonth(f,v)?"date":void 0,"aria-selected":r.isSelectedMonth(f,v,d)},r.getMonthContent(v))}))})}),Z(te(r),"renderQuarters",function(){var s=r.props,l=s.day,c=s.selected;return Y.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(f,d){return Y.createElement("div",{key:d,ref:r.QUARTER_REFS[d],role:"option",onClick:function(p){r.onQuarterClick(p,f)},onKeyDown:function(p){r.onQuarterKeyDown(p,f)},onMouseEnter:function(){return r.onQuarterMouseEnter(f)},className:r.getQuarterClassNames(f),"aria-selected":r.isSelectedQuarter(l,f,c),tabIndex:r.getQuarterTabIndex(f),"aria-current":r.isCurrentQuarter(l,f)?"date":void 0},r.getQuarterContent(f))}))}),Z(te(r),"getClassNames",function(){var s=r.props,l=s.selectingDate,c=s.selectsStart,f=s.selectsEnd,d=s.showMonthYearPicker,p=s.showQuarterYearPicker;return Ee("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":p})}),r}return Rn(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,a=r.day,s=r.ariaLabelPrefix,l=s===void 0?"month ":s;return Y.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(ln(a,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),zI=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Ude.some(function(s){return a.indexOf(s)>=0})})(o.target)&&i.props.onDropdownFocus()}),Z(te(i),"getDateInView",function(){var o=i.props,a=o.preSelection,s=o.selected,l=o.openToDate,c=II(i.props),f=FI(i.props),d=Ot(),p=l||s||a;return p||(c&&li(d,c)?c:f&&Za(d,f)?f:d)}),Z(te(i),"increaseMonth",function(){i.setState(function(o){var a=o.date;return{date:vi(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Z(te(i),"decreaseMonth",function(){i.setState(function(o){var a=o.date;return{date:su(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Z(te(i),"handleDayClick",function(o,a,s){i.props.onSelect(o,a,s),i.props.setPreSelection&&i.props.setPreSelection(o)}),Z(te(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),Z(te(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),Z(te(i),"handleYearMouseEnter",function(o,a){i.setState({selectingDate:Co(Ot(),a)}),i.props.onYearMouseEnter&&i.props.onYearMouseEnter(o,a)}),Z(te(i),"handleYearMouseLeave",function(o,a){i.props.onYearMouseLeave&&i.props.onYearMouseLeave(o,a)}),Z(te(i),"handleYearChange",function(o){i.props.onYearChange&&(i.props.onYearChange(o),i.setState({isRenderAriaLiveMessage:!0})),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Z(te(i),"handleMonthChange",function(o){i.handleCustomMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Z(te(i),"handleCustomMonthChange",function(o){i.props.onMonthChange&&(i.props.onMonthChange(o),i.setState({isRenderAriaLiveMessage:!0}))}),Z(te(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),Z(te(i),"changeYear",function(o){i.setState(function(a){var s=a.date;return{date:Co(s,o)}},function(){return i.handleYearChange(i.state.date)})}),Z(te(i),"changeMonth",function(o){i.setState(function(a){var s=a.date;return{date:hr(s,o)}},function(){return i.handleMonthChange(i.state.date)})}),Z(te(i),"changeMonthYear",function(o){i.setState(function(a){var s=a.date;return{date:Co(hr(s,nr(o)),Je(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),Z(te(i),"header",function(){var o=zO(arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(Y.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(s){var l=_l(o,s),c=i.formatWeekday(l,i.props.locale),f=i.props.weekDayClassName?i.props.weekDayClassName(l):void 0;return Y.createElement("div",{key:s,className:Ee("react-datepicker__day-name",f)},c)}))}),Z(te(i),"formatWeekday",function(o,a){return i.props.formatWeekDay?function(s,l,c){return l(ln(s,"EEEE",c))}(o,i.props.formatWeekDay,a):i.props.useWeekdaysShort?function(s,l){return ln(s,"EEE",l)}(o,a):function(s,l){return ln(s,"EEEEEE",l)}(o,a)}),Z(te(i),"decreaseYear",function(){i.setState(function(o){var a=o.date;return{date:Kd(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Z(te(i),"clearSelectingDate",function(){i.setState({selectingDate:null})}),Z(te(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=mj(i.state.date,i.props);break;case i.props.showYearPicker:o=function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.minDate,C=w.yearItemNumber,k=C===void 0?Jf:C,P=mc(xf(Kd(b,k)),k).endPeriod,j=S&&Je(S);return j&&j>P||!1}(i.state.date,i.props);break;default:o=hj(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var a=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(s=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--previous--disabled"),s=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,f=c.previousMonthButtonLabel,d=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,v=m===void 0?typeof f=="string"?f:"Previous Month":m,y=p.previousYearAriaLabel,x=y===void 0?typeof d=="string"?d:"Previous Year":y;return Y.createElement("button",{type:"button",className:a.join(" "),onClick:s,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},Y.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),Z(te(i),"increaseYear",function(){i.setState(function(o){var a=o.date;return{date:ru(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Z(te(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=gj(i.state.date,i.props);break;case i.props.showYearPicker:o=function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.maxDate,C=w.yearItemNumber,k=C===void 0?Jf:C,P=mc(ru(b,k),k).startPeriod,j=S&&Je(S);return j&&j0&&arguments[0]!==void 0?arguments[0]:i.state.date,a=["react-datepicker__current-month"];return i.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),Y.createElement("div",{className:a.join(" ")},ln(o,i.props.dateFormat,i.props.locale))}),Z(te(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return Y.createElement(Pde,{adjustDateOnChange:i.props.adjustDateOnChange,date:i.state.date,onSelect:i.props.onSelect,setOpen:i.props.setOpen,dropdownMode:i.props.dropdownMode,onChange:i.changeYear,minDate:i.props.minDate,maxDate:i.props.maxDate,year:Je(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),Z(te(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return Y.createElement(Mde,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:nr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),Z(te(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return Y.createElement(Lde,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,dateFormat:i.props.dateFormat,onChange:i.changeMonthYear,minDate:i.props.minDate,maxDate:i.props.maxDate,date:i.state.date,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown})}),Z(te(i),"handleTodayButtonClick",function(o){i.props.onSelect(cj(),o),i.props.setPreSelection&&i.props.setPreSelection(cj())}),Z(te(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return Y.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.handleTodayButtonClick(o)}},i.props.todayButton)}),Z(te(i),"renderDefaultHeader",function(o){var a=o.monthDate,s=o.i;return Y.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(a),Y.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(s!==0),i.renderMonthYearDropdown(s!==0),i.renderYearDropdown(s!==0)),Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Z(te(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=o.monthDate,s=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=hj(i.state.date,i.props),c=pj(i.state.date,i.props),f=mj(i.state.date,i.props),d=gj(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return Y.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(rj(rj({},i.state),{},{customHeaderCount:s,monthDate:a,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:d})),p&&Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Z(te(i),"renderYearHeader",function(){var o=i.state.date,a=i.props,s=a.showYearPicker,l=mc(o,a.yearItemNumber),c=l.startPeriod,f=l.endPeriod;return Y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(c," - ").concat(f):Je(o))}),Z(te(i),"renderHeader",function(o){switch(!0){case i.props.renderCustomHeader!==void 0:return i.renderCustomHeader(o);case(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker):return i.renderYearHeader(o);default:return i.renderDefaultHeader(o)}}),Z(te(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],a=i.props.showPreviousMonths?i.props.monthsShown-1:0,s=su(i.state.date,a),l=0;l0;o.push(Y.createElement("div",{key:d,ref:function(v){i.monthContainer=v},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),Y.createElement(Ide,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:f,dayClassName:i.props.dayClassName,calendarStartDay:i.props.calendarStartDay,monthClassName:i.props.monthClassName,onDayClick:i.handleDayClick,handleOnKeyDown:i.props.handleOnDayKeyDown,onDayMouseEnter:i.handleDayMouseEnter,onMouseLeave:i.handleMonthMouseLeave,onWeekSelect:i.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:i.props.formatWeekNumber,locale:i.props.locale,minDate:i.props.minDate,maxDate:i.props.maxDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,highlightDates:i.props.highlightDates,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:m})))}return o}}),Z(te(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?Y.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),Y.createElement(Fde,Zd({onDayClick:i.handleDayClick,selectingDate:i.state.selectingDate,clearSelectingDate:i.clearSelectingDate,date:i.state.date},i.props,{onYearMouseEnter:i.handleYearMouseEnter,onYearMouseLeave:i.handleYearMouseLeave}))):void 0}),Z(te(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return Y.createElement(zI,{selected:i.props.selected,openToDate:i.props.openToDate,onChange:i.props.onTimeChange,timeClassName:i.props.timeClassName,format:i.props.timeFormat,includeTimes:i.props.includeTimes,intervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,todayButton:i.props.todayButton,showMonthDropdown:i.props.showMonthDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,monthRef:i.state.monthContainer,injectTimes:i.props.injectTimes,locale:i.props.locale,handleOnKeyDown:i.props.handleOnKeyDown,showTimeSelectOnly:i.props.showTimeSelectOnly})}),Z(te(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),a=ha(o)&&i.props.selected?"".concat(yj(o.getHours()),":").concat(yj(o.getMinutes())):"";if(i.props.showTimeInput)return Y.createElement($de,{date:o,timeString:a,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),Z(te(i),"renderAriaLiveRegion",function(){var o,a=mc(i.state.date,i.props.yearItemNumber),s=a.startPeriod,l=a.endPeriod;return o=i.props.showYearPicker?"".concat(s," - ").concat(l):i.props.showMonthYearPicker||i.props.showQuarterYearPicker?Je(i.state.date):"".concat(VO(nr(i.state.date),i.props.locale)," ").concat(Je(i.state.date)),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},i.state.isRenderAriaLiveMessage&&o)}),Z(te(i),"renderChildren",function(){if(i.props.children)return Y.createElement("div",{className:"react-datepicker__children-container"},i.props.children)}),i.containerRef=Y.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){var i=this;if(!this.props.preSelection||pr(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!pr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var o=!ki(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&i.handleCustomMonthChange(i.state.date)})}}},{key:"render",value:function(){var r=this.props.container||Bde;return Y.createElement("div",{ref:this.containerRef},Y.createElement(r,{className:Ee("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:Jf}}}]),n}(),VI=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Rn(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return Us.createPortal(this.props.children,this.el)}}]),n}(),Vde=function(e){return!e.disabled&&e.tabIndex!==-1},HI=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),Z(te(i=t.call(this,r)),"getTabChildren",function(){return Array.prototype.slice.call(i.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Vde)}),Z(te(i),"handleFocusStart",function(){var o=i.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),Z(te(i),"handleFocusEnd",function(){var o=i.getTabChildren();o&&o.length>1&&o[0].focus()}),i.tabLoopRef=Y.createRef(),i}return Rn(n,[{key:"render",value:function(){return this.props.enableTabLoop?Y.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},Y.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,Y.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),Hde=function(e){Nn(n,Y.Component);var t=An(n);function n(){return Ln(this,n),t.apply(this,arguments)}return Rn(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,a=i.wrapperClassName,s=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,f=i.popperPlacement,d=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!s){var b=Ee("react-datepicker-popper",o);r=Y.createElement(QS,Zd({modifiers:c,placement:f},d),function(S){var C=S.ref,k=S.style,P=S.placement,j=S.arrowProps;return Y.createElement(HI,{enableTabLoop:m},Y.createElement("div",{ref:C,style:k,className:b,"data-placement":P,onKeyDown:v},Y.cloneElement(l,{arrowProps:j})))})}this.props.popperContainer&&(r=Y.createElement(this.props.popperContainer,{},r)),y&&!s&&(r=Y.createElement(VI,{portalId:y,portalHost:x},r));var w=Ee("react-datepicker-wrapper",a);return Y.createElement(K1,{className:"react-datepicker-manager"},Y.createElement(M4,null,function(S){var C=S.ref;return Y.createElement("div",{ref:C,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),bj="react-datepicker-ignore-onclickoutside",Wde=$y(zde),Z_="Date input not valid.",Yde=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),Z(te(i=t.call(this,r)),"getPreSelection",function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:Ot()}),Z(te(i),"calcInitialState",function(){var o,a=i.getPreSelection(),s=II(i.props),l=FI(i.props),c=s&&li(a,Vr(s))?s:l&&Za(a,ol(l))?l:a;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(o=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&o!==void 0?o:c,highlightDates:vj(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),Z(te(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),Z(te(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),Z(te(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),Z(te(i),"setOpen",function(o){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i.setState({open:o,preSelection:o&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:Q_},function(){o||i.setState(function(s){return{focused:!!a&&s.focused}},function(){!a&&i.setBlur(),i.setState({inputValue:null})})})}),Z(te(i),"inputOk",function(){return CO(i.state.preSelection)}),Z(te(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),Z(te(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),Z(te(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),Z(te(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),Z(te(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),Z(te(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),Z(te(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),Z(te(i),"handleChange",function(){for(var o=arguments.length,a=new Array(o),s=0;s0&&(v=I_(c,f.slice(0,c.length),new Date)),ha(v)||(v=new Date(c))),ha(v)&&x?v:null));i.props.showTimeSelectOnly&&i.props.selected&&!pr(b,i.props.selected)&&(b=pue(i.props.selected,b==null?{hours:$r(i.props.selected),minutes:Br(i.props.selected),seconds:A_(i.props.selected)}:{hours:$r(b),minutes:Br(b),seconds:A_(b)})),!b&&l.target.value||i.setSelected(b,l,!0)}}),Z(te(i),"handleSelect",function(o,a,s){if(i.setState({preventFocus:!0},function(){return i.preventFocusTimeout=setTimeout(function(){return i.setState({preventFocus:!1})},50),i.preventFocusTimeout}),i.props.onChangeRaw&&i.props.onChangeRaw(a),i.setSelected(o,a,!1,s),i.props.showDateSelect&&i.setState({isRenderAriaLiveMessage:!0}),!i.props.shouldCloseOnSelect||i.props.showTimeSelect)i.setPreSelection(o);else if(!i.props.inline){i.props.selectsRange||i.setOpen(!1);var l=i.props,c=l.startDate,f=l.endDate;!c||f||li(o,c)||i.setOpen(!1)}}),Z(te(i),"setSelected",function(o,a,s,l){var c=o;if(i.props.showYearPicker){if(c!==null&&AI(Je(c),i.props))return}else if(i.props.showMonthYearPicker){if(c!==null&&NI(c,i.props))return}else if(c!==null&&By(c,i.props))return;var f=i.props,d=f.onChange,p=f.selectsRange,m=f.startDate,v=f.endDate;if(!Pa(i.props.selected,c)||i.props.allowSameDay||p)if(c!==null&&(!i.props.selected||s&&(i.props.showTimeSelect||i.props.showTimeSelectOnly||i.props.showTimeInput)||(c=sj(c,{hour:$r(i.props.selected),minute:Br(i.props.selected),second:A_(i.props.selected)})),i.props.inline||i.setState({preSelection:c}),i.props.focusSelectedMonth||i.setState({monthSelectedIn:l})),p){var y=m&&!v,x=m&&v;!m&&!v?d([c,null],a):y&&(li(c,m)?d([c,null],a):d([m,c],a)),x&&d([c,null],a)}else d(c,a);s||(i.props.onSelect(c,a),i.setState({inputValue:null}))}),Z(te(i),"setPreSelection",function(o){var a=i.props.minDate!==void 0,s=i.props.maxDate!==void 0,l=!0;if(o){var c=Vr(o);if(a&&s)l=Um(o,i.props.minDate,i.props.maxDate);else if(a){var f=Vr(i.props.minDate);l=Za(o,f)||Pa(c,f)}else if(s){var d=ol(i.props.maxDate);l=li(o,d)||Pa(c,d)}}l&&i.setState({preSelection:o})}),Z(te(i),"handleTimeChange",function(o){var a=sj(i.props.selected?i.props.selected:i.getPreSelection(),{hour:$r(o),minute:Br(o)});i.setState({preSelection:a}),i.props.onChange(a),i.props.shouldCloseOnSelect&&i.setOpen(!1),i.props.showTimeInput&&i.setOpen(!0),(i.props.showTimeSelectOnly||i.props.showTimeSelect)&&i.setState({isRenderAriaLiveMessage:!0}),i.setState({inputValue:null})}),Z(te(i),"onInputClick",function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()}),Z(te(i),"onInputKeyDown",function(o){i.props.onKeyDown(o);var a=o.key;if(i.state.open||i.props.inline||i.props.preventOpenOnFocus){if(i.state.open){if(a==="ArrowDown"||a==="ArrowUp"){o.preventDefault();var s=i.calendar.componentNode&&i.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(s&&s.focus({preventScroll:!0}))}var l=Ot(i.state.preSelection);a==="Enter"?(o.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===Q_?(i.handleSelect(l,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(l)):i.setOpen(!1)):a==="Escape"?(o.preventDefault(),i.setOpen(!1)):a==="Tab"&&o.shiftKey&&i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:Z_})}}else a!=="ArrowDown"&&a!=="ArrowUp"&&a!=="Enter"||i.onInputClick()}),Z(te(i),"onPortalKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Z(te(i),"onDayKeyDown",function(o){i.props.onKeyDown(o);var a=o.key,s=Ot(i.state.preSelection);if(a==="Enter")o.preventDefault(),i.handleSelect(s,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(s);else if(a==="Escape")o.preventDefault(),i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:Z_});else if(!i.props.disabledKeyboardNavigation){var l;switch(a){case"ArrowLeft":l=LO(s,1);break;case"ArrowRight":l=_l(s,1);break;case"ArrowUp":l=vue(s,1);break;case"ArrowDown":l=SO(s,1);break;case"PageUp":l=su(s,1);break;case"PageDown":l=vi(s,1);break;case"Home":l=Kd(s,1);break;case"End":l=ru(s,1)}if(!l)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:Z_}));if(o.preventDefault(),i.setState({lastPreSelectChange:Q_}),i.props.adjustDateOnChange&&i.setSelected(l),i.setPreSelection(l),i.props.inline){var c=nr(s),f=nr(l),d=Je(s),p=Je(l);c!==f||d!==p?i.setState({shouldFocusDayInline:!0}):i.setState({shouldFocusDayInline:!1})}}}),Z(te(i),"onPopperKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Z(te(i),"onClearClick",function(o){o&&o.preventDefault&&o.preventDefault(),i.props.selectsRange?i.props.onChange([null,null],o):i.props.onChange(null,o),i.setState({inputValue:null})}),Z(te(i),"clear",function(){i.onClearClick()}),Z(te(i),"onScroll",function(o){typeof i.props.closeOnScroll=="boolean"&&i.props.closeOnScroll?o.target!==document&&o.target!==document.documentElement&&o.target!==document.body||i.setOpen(!1):typeof i.props.closeOnScroll=="function"&&i.props.closeOnScroll(o)&&i.setOpen(!1)}),Z(te(i),"renderCalendar",function(){return i.props.inline||i.isCalendarOpen()?Y.createElement(Wde,{ref:function(o){i.calendar=o},locale:i.props.locale,calendarStartDay:i.props.calendarStartDay,chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,monthAriaLabelPrefix:i.props.monthAriaLabelPrefix,adjustDateOnChange:i.props.adjustDateOnChange,setOpen:i.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,dateFormat:i.props.dateFormatCalendar,useWeekdaysShort:i.props.useWeekdaysShort,formatWeekDay:i.props.formatWeekDay,dropdownMode:i.props.dropdownMode,selected:i.props.selected,preSelection:i.state.preSelection,onSelect:i.handleSelect,onWeekSelect:i.props.onWeekSelect,openToDate:i.props.openToDate,minDate:i.props.minDate,maxDate:i.props.maxDate,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,startDate:i.props.startDate,endDate:i.props.endDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,filterDate:i.props.filterDate,onClickOutside:i.handleCalendarClickOutside,formatWeekNumber:i.props.formatWeekNumber,highlightDates:i.state.highlightDates,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,includeTimes:i.props.includeTimes,injectTimes:i.props.injectTimes,inline:i.props.inline,shouldFocusDayInline:i.state.shouldFocusDayInline,peekNextMonth:i.props.peekNextMonth,showMonthDropdown:i.props.showMonthDropdown,showPreviousMonths:i.props.showPreviousMonths,useShortMonthInDropdown:i.props.useShortMonthInDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showWeekNumbers:i.props.showWeekNumbers,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,forceShowMonthNavigation:i.props.forceShowMonthNavigation,showDisabledMonthNavigation:i.props.showDisabledMonthNavigation,scrollableYearDropdown:i.props.scrollableYearDropdown,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown,todayButton:i.props.todayButton,weekLabel:i.props.weekLabel,outsideClickIgnoreClass:bj,fixedHeight:i.props.fixedHeight,monthsShown:i.props.monthsShown,monthSelectedIn:i.state.monthSelectedIn,onDropdownFocus:i.handleDropdownFocus,onMonthChange:i.props.onMonthChange,onYearChange:i.props.onYearChange,dayClassName:i.props.dayClassName,weekDayClassName:i.props.weekDayClassName,monthClassName:i.props.monthClassName,timeClassName:i.props.timeClassName,showDateSelect:i.props.showDateSelect,showTimeSelect:i.props.showTimeSelect,showTimeSelectOnly:i.props.showTimeSelectOnly,onTimeChange:i.handleTimeChange,timeFormat:i.props.timeFormat,timeIntervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,className:i.props.calendarClassName,container:i.props.calendarContainer,yearItemNumber:i.props.yearItemNumber,yearDropdownItemNumber:i.props.yearDropdownItemNumber,previousMonthAriaLabel:i.props.previousMonthAriaLabel,previousMonthButtonLabel:i.props.previousMonthButtonLabel,nextMonthAriaLabel:i.props.nextMonthAriaLabel,nextMonthButtonLabel:i.props.nextMonthButtonLabel,previousYearAriaLabel:i.props.previousYearAriaLabel,previousYearButtonLabel:i.props.previousYearButtonLabel,nextYearAriaLabel:i.props.nextYearAriaLabel,nextYearButtonLabel:i.props.nextYearButtonLabel,timeInputLabel:i.props.timeInputLabel,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,renderCustomHeader:i.props.renderCustomHeader,popperProps:i.props.popperProps,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,onDayMouseEnter:i.props.onDayMouseEnter,onMonthMouseLeave:i.props.onMonthMouseLeave,onYearMouseEnter:i.props.onYearMouseEnter,onYearMouseLeave:i.props.onYearMouseLeave,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showTimeInput:i.props.showTimeInput,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,showPopperArrow:i.props.showPopperArrow,excludeScrollbar:i.props.excludeScrollbar,handleOnKeyDown:i.props.onKeyDown,handleOnDayKeyDown:i.onDayKeyDown,isInputFocused:i.state.focused,customTimeInput:i.props.customTimeInput,setPreSelection:i.setPreSelection},i.props.children):null}),Z(te(i),"renderAriaLiveRegion",function(){var o,a=i.props,s=a.dateFormat,l=a.locale,c=i.props.showTimeInput||i.props.showTimeSelect?"PPPPp":"PPPP";return o=i.props.selectsRange?"Selected start date: ".concat(Yi(i.props.startDate,{dateFormat:c,locale:l}),". ").concat(i.props.endDate?"End date: "+Yi(i.props.endDate,{dateFormat:c,locale:l}):""):i.props.showTimeSelectOnly?"Selected time: ".concat(Yi(i.props.selected,{dateFormat:s,locale:l})):i.props.showYearPicker?"Selected year: ".concat(Yi(i.props.selected,{dateFormat:"yyyy",locale:l})):i.props.showMonthYearPicker?"Selected month: ".concat(Yi(i.props.selected,{dateFormat:"MMMM yyyy",locale:l})):i.props.showQuarterYearPicker?"Selected quarter: ".concat(Yi(i.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):"Selected date: ".concat(Yi(i.props.selected,{dateFormat:c,locale:l})),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)}),Z(te(i),"renderDateInput",function(){var o,a=Ee(i.props.className,Z({},bj,i.state.open)),s=i.props.customInput||Y.createElement("input",{type:"text"}),l=i.props.customInputRef||"ref",c=typeof i.props.value=="string"?i.props.value:typeof i.state.inputValue=="string"?i.state.inputValue:i.props.selectsRange?function(f,d,p){if(!f)return"";var m=Yi(f,p),v=d?Yi(d,p):"";return"".concat(m," - ").concat(v)}(i.props.startDate,i.props.endDate,i.props):Yi(i.props.selected,i.props);return Y.cloneElement(s,(Z(o={},l,function(f){i.input=f}),Z(o,"value",c),Z(o,"onBlur",i.handleBlur),Z(o,"onChange",i.handleChange),Z(o,"onClick",i.onInputClick),Z(o,"onFocus",i.handleFocus),Z(o,"onKeyDown",i.onInputKeyDown),Z(o,"id",i.props.id),Z(o,"name",i.props.name),Z(o,"form",i.props.form),Z(o,"autoFocus",i.props.autoFocus),Z(o,"placeholder",i.props.placeholderText),Z(o,"disabled",i.props.disabled),Z(o,"autoComplete",i.props.autoComplete),Z(o,"className",Ee(s.props.className,a)),Z(o,"title",i.props.title),Z(o,"readOnly",i.props.readOnly),Z(o,"required",i.props.required),Z(o,"tabIndex",i.props.tabIndex),Z(o,"aria-describedby",i.props.ariaDescribedBy),Z(o,"aria-invalid",i.props.ariaInvalid),Z(o,"aria-labelledby",i.props.ariaLabelledBy),Z(o,"aria-required",i.props.ariaRequired),o))}),Z(te(i),"renderClearButton",function(){var o=i.props,a=o.isClearable,s=o.selected,l=o.startDate,c=o.endDate,f=o.clearButtonTitle,d=o.clearButtonClassName,p=d===void 0?"":d,m=o.ariaLabelClose,v=m===void 0?"Close":m;return!a||s==null&&l==null&&c==null?null:Y.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(p).trim(),"aria-label":v,onClick:i.onClearClick,title:f,tabIndex:-1})}),i.state=i.calcInitialState(),i}return Rn(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(r,i){var o,a;r.inline&&(o=r.selected,a=this.props.selected,o&&a?nr(o)!==nr(a)||Je(o)!==Je(a):o!==a)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:vj(this.props.highlightDates)}),i.focused||Pa(r.selected,this.props.selected)||this.setState({inputValue:null}),i.open!==this.state.open&&(i.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),i.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var r=this.props.showIcon;return Y.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&Y.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},Y.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var i=this.state.open?Y.createElement(HI,{enableTabLoop:this.props.enableTabLoop},Y.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(i=Y.createElement(VI,{portalId:this.props.portalId,portalHost:this.props.portalHost},i)),Y.createElement("div",null,this.renderInputContainer(),i)}return Y.createElement(Hde,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:r,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Jf,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),qde="input",Q_="navigate";const Cx=e=>{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||qo(r),a=B.useRef();return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(Yde,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??sI,className:Ee("icon-input-container__input form-control",t),ref:a}),o&&g.jsx(Ie,{icon:Jue,className:"icon-input-container__icon",onClick:()=>{var s;return(s=a.current)==null?void 0:s.input.focus()}})]})},Gde=e=>g.jsx(Cx,{...e,dateFormat:RO,showTimeSelect:!0,timeIntervals:10}),X_=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("p",{children:[g.jsx(e6,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&g.jsx(Bm,{placement:"right",children:t})]});const Kde=({isOpen:e,toggle:t})=>g.jsxs(Zo,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[g.jsx(Qo,{toggle:t,children:"Info"}),g.jsxs(fo,{children:[g.jsxs("p",{children:["When the ",g.jsx("b",{children:g.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),g.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),g.jsxs("ul",{children:[g.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),g.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",g.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),g.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),Zde=()=>{const[e,t]=mn();return g.jsxs(g.Fragment,{children:[g.jsx("span",{title:"What does this mean?",children:g.jsx(Ie,{icon:ES,style:{cursor:"pointer"},onClick:t})}),g.jsx(Kde,{isOpen:e,toggle:t})]})};const J_=e=>typeof e=="string"?Vo(e):e,Qde=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,Xde=(e,t)=>function({mode:r,saving:i,onSave:o,initialState:a}){const[s,l]=B.useState(a),c=()=>l(a),f=Ch("deviceLongUrls"),d=r==="edit",p=Qde(s),m=r==="create-basic",v=k=>l({...s,tags:k.map(DI)}),y=(k,P)=>eo(k)?k:eo(P)?null:void 0,x=Ay(async()=>o({...s,validSince:Xa(s.validSince)??null,validUntil:Xa(s.validUntil)??null,maxVisits:eo(s.maxVisits)?Number(s.maxVisits):null}).then(()=>!d&&c()).catch(()=>{}));B.useEffect(()=>{l(a)},[a]);const b=(k,P,j="text",N={},H={})=>g.jsx(Fr,{...H,children:g.jsx(Zc,{id:k,type:j,placeholder:P,value:s[k]??"",onChange:N.onChange??(R=>l({...s,[k]:R.target.value})),...N})}),w=(k,P,j)=>{var N;return g.jsx(fde,{icon:j,id:k,type:"url",placeholder:P,value:((N=s.deviceLongUrls)==null?void 0:N[k])??"",onChange:H=>{var R;return l({...s,deviceLongUrls:{...s.deviceLongUrls??{},[k]:y(H.target.value,(R=a.deviceLongUrls)==null?void 0:R[k])}})}})},S=(k,P,j={})=>g.jsx(Gde,{selected:s[k]?J_(s[k]):null,placeholderText:P,isClearable:!0,onChange:N=>l({...s,[k]:N}),...j}),C=g.jsxs(g.Fragment,{children:[g.jsx(Fr,{children:g.jsx(Zc,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:s.longUrl,onChange:k=>l({...s,longUrl:k.target.value})})}),g.jsxs(mr,{children:[m&&b("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),g.jsx("div",{className:m?"col-lg-6 mb-3":"col-12",children:g.jsx(e,{selectedTags:s.tags??[],onChange:v})})]})]});return g.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:x,children:[m&&C,!m&&g.jsxs(g.Fragment,{children:[g.jsxs(mr,{children:[g.jsx("div",{className:Ee("mb-3",{"col-sm-6":f,"col-12":!f}),children:g.jsx(hn,{title:"Main options",className:"mb-3",children:C})}),f&&g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(hn,{title:"Device-specific long URLs",children:[g.jsx(Fr,{children:w("android","Android-specific redirection",cde)}),g.jsx(Fr,{children:w("ios","iOS-specific redirection",lde)}),w("desktop","Desktop-specific redirection",vK)]})})]}),g.jsxs(mr,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(hn,{title:"Customize the short URL",children:[b("title","Title","text",{onChange:({target:k})=>l({...s,title:y(k.value,a.title)})}),!d&&p&&g.jsxs(g.Fragment,{children:[g.jsxs(mr,{children:[g.jsx("div",{className:"col-lg-6",children:b("customSlug","Custom slug","text",{disabled:eo(s.shortCodeLength)})}),g.jsx("div",{className:"col-lg-6",children:b("shortCodeLength","Short code length","number",{min:4,disabled:eo(s.customSlug)})})]}),g.jsx(t,{value:s.domain,onChange:k=>l({...s,domain:k})})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(hn,{title:"Limit access to the short URL",children:[b("maxVisits","Maximum number of visits allowed","number",{min:1}),g.jsx("div",{className:"mb-3",children:S("validSince","Enabled since...",{maxDate:s.validUntil?J_(s.validUntil):void 0})}),S("validUntil","Enabled until...",{minDate:s.validSince?J_(s.validSince):void 0})]})})]}),g.jsxs(mr,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(hn,{title:"Extra checks",children:[g.jsx(X_,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:s.validateUrl,onChange:k=>l({...s,validateUrl:k}),children:"Validate URL"}),!d&&p&&g.jsxs("p",{children:[g.jsx(e6,{inline:!0,className:"me-2",checked:s.findIfExists,onChange:k=>l({...s,findIfExists:k}),children:"Use existing URL if found"}),g.jsx(Zde,{})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(hn,{title:"Configure behavior",children:[g.jsx(X_,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:s.crawlable,onChange:k=>l({...s,crawlable:k}),children:"Make it crawlable"}),g.jsx(X_,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:s.forwardQuery,onChange:k=>l({...s,forwardQuery:k}),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(yt,{outline:!0,color:"primary",disabled:i||Kn(s.longUrl),className:"btn-xs-block",children:i?"Saving...":"Save"})})]})},Jde=({active:e,allText:t,onChange:n})=>g.jsxs(g.Fragment,{children:[g.jsx(Ue,{active:e==="all",onClick:()=>n("all"),children:t}),g.jsx(Ue,{divider:!0}),yue.map(r=>g.jsx(Ue,{active:e===r,onClick:()=>n(r),children:dI(r)},r))]}),ehe=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(Cx,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"col-md-6",children:g.jsx(Cx,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&ol(o))})})]}),WI=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=bv(t),[a,s]=B.useState(o?t:void 0),[l,c]=B.useState(o?void 0:t),f=p=>{s(uI(p)?kh:void 0),c(p),e(p)},d=p=>{s(p),c(void 0),e(hI(p))};return i&&Sfe(()=>{const p=bv(t);p&&d(t),t&&!p&&f(t)},[t]),g.jsxs(Xo,{disabled:r,text:dI(a??l)??n,children:[g.jsx(Jde,{allText:n,active:a,onChange:d}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Custom:"}),g.jsx(Ue,{text:!0,children:g.jsx(ehe,{...l,onStartDateChange:p=>f({...l,startDate:p}),onEndDateChange:p=>f({...l,endDate:p})})})]})},the={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},nhe=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return g.jsxs(Xo,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Visits:"}),g.jsx(Ue,{active:i,onClick:s("excludeBots"),children:"Ignore visits from bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Short URLs:"}),g.jsx(Ue,{active:o,onClick:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(Ue,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!eo(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:g.jsx("i",{children:"Clear filters"})})]})};const rhe=(e,t)=>({className:n,shortUrlsAmount:r,order:i,handleOrderBy:o})=>{const[a,s]=Fy(),{search:l,tags:c,startDate:f,endDate:d,excludeBots:p,excludeMaxVisitsReached:m,excludePastValidUntil:v,tagsMode:y="any"}=a,x=Ch("filterDisabledUrls"),b=bl("visits"),w=Ft(({startDate:P,endDate:j})=>({startDate:Xa(P)??void 0,endDate:Xa(j)??void 0}),s),S=Ft(P=>Kn(P)?void 0:P,P=>s({search:P})),C=P=>s({tags:P}),k=Ft(()=>y==="any"?"all":"any",P=>s({tagsMode:P}));return g.jsxs("div",{className:Ee("short-urls-filtering-bar-container",n),children:[g.jsx(wh,{initialValue:l,onChange:S}),g.jsxs(Ty,{className:"mt-3",children:[g.jsx(t,{allowNew:!1,placeholder:"With tags...",selectedTags:c,onChange:C}),c.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(yt,{outline:!0,color:"secondary",onClick:k,id:"tagsModeBtn","aria-label":"Change tags mode",children:g.jsx(Ie,{className:"short-urls-filtering-bar__tags-icon",icon:y==="all"?xA:WG})}),g.jsx(jr,{target:"tagsModeBtn",placement:"left",children:y==="all"?"With all the tags.":"With any of the tags."})]})]}),g.jsxs(mr,{className:"flex-lg-row-reverse",children:[g.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(WI,{defaultText:"All short URLs",initialDateRange:fI(f,d),onDatesChange:w})}),g.jsx(nhe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:p??(b==null?void 0:b.excludeBots),excludeMaxVisitsReached:m,excludePastValidUntil:v},onChange:s,supportsDisabledFiltering:x})]})}),g.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:g.jsx(e,{amount:r})}),g.jsx("div",{className:"col-6 d-lg-none mt-3",children:g.jsx(xh,{prefixed:!1,items:the,order:i,onChange:o})})]})]})};function ed({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:g.jsx(Ie,{icon:e.dir==="ASC"?FG:KG,className:n})}const Hl=2,Ex="...",YI=(e,t)=>{const n=xS(rA(Hl,e-Hl),mA(t-1,e+Hl)+1);return e-Hl>Hl&&n.unshift(Ex),e+Hle===Ex,qI=e=>Qd(e)?e:wn(e),GI=(e,t)=>Qd(e)?`${e}_${t}`:`${e}`,ihe=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=yl(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return g.jsx("div",{className:"pb-3"});const a=()=>YI(n,r).map((s,l)=>g.jsx(Vs,{disabled:Qd(s),active:n===s,children:g.jsx(Hs,{tag:It,to:o(s),children:qI(s)})},GI(s,l)));return g.jsxs(iO,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[g.jsx(Vs,{disabled:n===1,children:g.jsx(Hs,{previous:!0,tag:It,to:o(n-1)})}),a(),g.jsx(Vs,{disabled:n>=r,children:g.jsx(Hs,{next:!0,tag:It,to:o(n+1)})})]})},ohe={field:"dateCreated",dir:"DESC"},ahe=(e,t)=>as(({listShortUrls:n,shortUrlsList:r})=>{var W,ee,q;const{page:i}=hl(),o=gn(),[a,s]=Fy(),l=$O(),{tags:c,search:f,startDate:d,endDate:p,orderBy:m,tagsMode:v,excludeBots:y,excludePastValidUntil:x,excludeMaxVisitsReached:b}=a,[w,S]=B.useState(m??((W=l.shortUrlsList)==null?void 0:W.defaultOrdering)??ohe),{pagination:C}=(r==null?void 0:r.shortUrls)??{},k=y??((ee=l.visits)==null?void 0:ee.excludeBots),P=Ch("excludeBotsOnShortUrls"),j=(Q,oe)=>{s({orderBy:{field:Q,dir:oe}}),S({field:Q,dir:oe})},N=Q=>()=>j(Q,Dy(Q,w.field,w.dir)),H=Q=>g.jsx(ed,{currentOrder:w,field:Q}),R=Ft(Q=>[...new Set([...c,Q])],Q=>s({tags:Q})),V=({field:Q,dir:oe})=>P&&k&&Q==="visits"?{field:"nonBotVisits",dir:oe}:{field:Q,dir:oe};return B.useEffect(()=>{n({page:i,searchTerm:f,tags:c,startDate:d,endDate:p,orderBy:V(w),tagsMode:v,excludePastValidUntil:x,excludeMaxVisitsReached:b})},[i,f,c,d,p,w.field,w.dir,v,x,b]),g.jsxs(g.Fragment,{children:[g.jsx(t,{shortUrlsAmount:(q=r.shortUrls)==null?void 0:q.pagination.totalItems,order:w,handleOrderBy:j,className:"mb-3"}),g.jsxs(Yr,{body:!0,className:"pb-0",children:[g.jsx(e,{shortUrlsList:r,orderByColumn:N,renderOrderIcon:H,onTagClick:R}),g.jsx(ihe,{paginator:C,currentQueryString:o.search})]})]})},()=>[di.visits]);const she=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,className:o})=>{const{error:a,loading:s,shortUrls:l}=r,c=Ee({"short-urls-table__header-cell--with-action":!!t}),f=Ee("short-urls-table__header-cell",c),d=Ee("table table-hover responsive-table short-urls-table",o),p=()=>a?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):s?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&Kn(l==null?void 0:l.data)?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(m=>g.jsx(e,{shortUrl:m,onTagClick:i},m.shortUrl));return g.jsxs("table",{className:d,children:[g.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:g.jsxs("tr",{children:[g.jsxs("th",{className:f,onClick:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),g.jsxs("th",{className:f,onClick:t==null?void 0:t("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),g.jsxs("th",{className:"short-urls-table__header-cell",children:[g.jsxs("span",{className:c,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",g.jsxs("span",{className:c,onClick:t==null?void 0:t("longUrl"),children:[g.jsx("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),g.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),g.jsx("th",{className:f,onClick:t==null?void 0:t("visits"),children:g.jsxs("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),g.jsx("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),g.jsx("tbody",{children:p()})]})},lhe=(e,t)=>{e.serviceFactory("ShortUrlsList",ahe,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",she,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",ede,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.serviceFactory("ShortUrlsRowMenu",tde,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Vfe,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",Xde,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",sfe,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",Ofe,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>Hfe),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",Kfe,"ImageDownloader"),e.serviceFactory("ShortUrlsFilteringBar",rhe,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",Wfe,"apiClientFactory","ReportExporter"),e.serviceFactory("shortUrlsListReducerCreator",Yue,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",ct("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",rde,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",ct("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",sde,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",ct("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Vue,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",ct("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",ide,"apiClientFactory"),e.serviceFactory("shortUrlDetailReducer",ct("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Wue,"apiClientFactory"),e.serviceFactory("createShortUrl",nde,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",ct("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",zue,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",ct("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>vI),e.serviceFactory("getShortUrlDetail",ct("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",ade,"apiClientFactory")},che=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:c}=i,f=async()=>{await r(e),t()};return g.jsxs(Zo,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[g.jsx(Qo,{toggle:t,className:"text-danger",children:"Delete tag"}),g.jsxs(fo,{children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",s&&g.jsx(zr,{type:"error",small:!0,className:"mt-2",children:g.jsx(zo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),g.jsxs(ml,{children:[g.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"danger",disabled:a,onClick:f,children:a?"Deleting tag...":"Delete tag"})]})]})};function zy(){return(zy=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function kx(e){var t=B.useRef(e),n=B.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Xd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:x.buttons>0)&&i.current?o(wj(i.current,x,s.current)):y(!1)},v=function(){return y(!1)};function y(x){var b=l.current,w=Px(i.current),S=x?w.addEventListener:w.removeEventListener;S(b?"touchmove":"mousemove",m),S(b?"touchend":"mouseup",v)}return[function(x){var b=x.nativeEvent,w=i.current;if(w&&(xj(b),!function(C,k){return k&&!td(C)}(b,l.current)&&w)){if(td(b)){l.current=!0;var S=b.changedTouches||[];S.length&&(s.current=S[0].identifier)}w.focus(),o(wj(w,b,s.current)),y(!0)}},function(x){var b=x.which||x.keyCode;b<37||b>40||(x.preventDefault(),a({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},y]},[a,o]),f=c[0],d=c[1],p=c[2];return B.useEffect(function(){return p},[p]),Y.createElement("div",zy({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:d,tabIndex:0,role:"slider"}))}),WO=function(e){return e.filter(Boolean).join(" ")},QI=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=WO(["react-colorful__pointer",e.className]);return Y.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},Y.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Yn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},uhe=function(e){return mhe(Tx(e))},Tx=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Yn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Yn(parseInt(e.substring(6,8),16)/255,2):1}},fhe=function(e){return phe(hhe(e))},dhe=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Yn(e.h),s:Yn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Yn(i/2),a:Yn(r,2)}},Mx=function(e){var t=dhe(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},hhe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Yn(255*[r,s,a,a,l,r][c]),g:Yn(255*[l,r,r,s,a,a][c]),b:Yn(255*[a,a,l,r,r,s][c]),a:Yn(i,2)}},nm=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},phe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?nm(Yn(255*i)):"";return"#"+nm(t)+nm(n)+nm(r)+o},mhe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:Yn(60*(s<0?s+6:s)),s:Yn(o?a/o*100:0),v:Yn(o/255*100),a:i}},ghe=Y.memo(function(e){var t=e.hue,n=e.onChange,r=WO(["react-colorful__hue",e.className]);return Y.createElement("div",{className:r},Y.createElement(ZI,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Xd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Yn(t),"aria-valuemax":"360","aria-valuemin":"0"},Y.createElement(QI,{className:"react-colorful__hue-pointer",left:t/360,color:Mx({h:t,s:100,v:100,a:1})})))}),vhe=Y.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Mx({h:t.h,s:100,v:100,a:1})};return Y.createElement("div",{className:"react-colorful__saturation",style:r},Y.createElement(ZI,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Xd(t.s+100*i.left,0,100),v:Xd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Yn(t.s)+"%, Brightness "+Yn(t.v)+"%"},Y.createElement(QI,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Mx(t)})))}),XI=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},yhe=function(e,t){return e.toLowerCase()===t.toLowerCase()||XI(Tx(e),Tx(t))};function _he(e,t,n){var r=kx(n),i=B.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=B.useRef({color:t,hsva:o});B.useEffect(function(){if(!e.equal(t,s.current.color)){var c=e.toHsva(t);s.current={hsva:c,color:t},a(c)}},[t,e]),B.useEffect(function(){var c;XI(o,s.current.hsva)||e.equal(c=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:c},r(c))},[o,e,r]);var l=B.useCallback(function(c){a(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var bhe=typeof window<"u"?B.useLayoutEffect:B.useEffect,whe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Sj=new Map,xhe=function(e){bhe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Sj.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Sj.set(t,n);var r=whe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},She=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=KI(e,["className","colorModel","color","onChange"]),s=B.useRef(null);xhe(s);var l=_he(n,i,o),c=l[0],f=l[1],d=WO(["react-colorful",t]);return Y.createElement("div",zy({},a,{ref:s,className:d}),Y.createElement(vhe,{hsva:c,onChange:f}),Y.createElement(ghe,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},Ohe={defaultColor:"000",toHsva:uhe,fromHsva:function(e){return fhe({h:e.h,s:e.s,v:e.v,a:1})},equal:yhe},Che=function(e){return Y.createElement(She,zy({},e,{colorModel:Ohe}))};const Ehe=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:a})=>{const[s,l]=B.useState(t),[c,f]=B.useState(e(t)),[d,p,,m]=mn(),{editing:v,error:y,edited:x,errorData:b}=a,w=Ay(async()=>{await n({oldName:t,newName:s,color:c}),r()}),S=Ft(m,()=>x&&i({oldName:t,newName:s,color:c}));return g.jsx(Zo,{isOpen:o,toggle:r,centered:!0,onClosed:S,children:g.jsxs("form",{name:"editTag",onSubmit:w,children:[g.jsx(Qo,{toggle:r,children:"Edit tag"}),g.jsxs(fo,{children:[g.jsxs(Ty,{children:[g.jsx("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:c,borderColor:c},onClick:p,children:g.jsx(Ie,{icon:$G,className:"edit-tag-modal__color-icon"})}),g.jsx(rO,{isOpen:d,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:g.jsx(Che,{color:c,onChange:f})}),g.jsx(Zc,{value:s,placeholder:"Tag",required:!0,onChange:({target:C})=>l(C.value)})]}),y&&g.jsx(zr,{type:"error",small:!0,className:"mt-2",children:g.jsx(zo,{errorData:b,fallbackMessage:"Something went wrong while editing the tag :("})})]}),g.jsxs(ml,{children:[g.jsx(yt,{type:"button",color:"link",onClick:r,children:"Cancel"}),g.jsx(yt,{color:"primary",disabled:v,children:v?"Saving...":"Save"})]})]})})},Ts={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},YO=Symbol("Create new tag"),JI=Symbol("No options"),Kl=()=>{},In=Y.createContext(void 0);function Oj(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function khe(e){return e.selectionStart===0&&e.selectionEnd===0}function Phe(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function Vy(e){return`${e}-label`}function The(e){return`${e}-combobox`}function Mhe(e){return`${e}-input`}function e5(e){return`${e}-listbox`}function t5(e,t){return`${e}-option-${Ihe(t)}`}function jhe(e,t){if((e==null?void 0:e.value)===YO&&e.disabled===!1)return{value:t,label:t}}function Dhe(e){const t=jhe(e.activeOption,e.value)||e.activeOption||Uhe(e.value,e.options);return t&&!t.disabled?t:void 0}function Lhe(e,t,n){const r=t-1;return e>r?n:en===e.value)}const Fhe=/[-\\^$*+?.()|[\]{}]/g;function n5(e){return e.replace(Fhe,"\\$&")}function r5(e){return new RegExp(n5(e),"i")}function $he(e){return new RegExp(`^${n5(e)}$`,"i")}function Bhe(e,t){if(e){const n=r5(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function Uhe(e,t){const n=$he(e);return t.find(r=>n.test(r.label))||null}const zhe={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function Vhe({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:c}=B.useContext(In),f=B.useMemo(()=>{const v=R=>{const V=R.currentTarget.value;c.current.updateInputValue(V),document.activeElement===a.current&&c.current.listBoxExpand()},y=()=>{c.current.listBoxExpand()},x=R=>{var V;((V=o.current)==null?void 0:V.contains(R.relatedTarget))===!1&&c.current.listBoxCollapse()},b=()=>{c.current.listBoxExpand()},w=R=>{const{activeIndex:V,isExpanded:W}=c.current.state;W?(R.preventDefault(),c.current.updateActiveIndex(V+1)):(Phe(R.currentTarget)||R.altKey)&&(R.preventDefault(),c.current.listBoxExpand())},S=R=>{const{activeIndex:V,isExpanded:W}=c.current.state;W?(R.preventDefault(),c.current.updateActiveIndex(V-1)):khe(R.currentTarget)&&(R.preventDefault(),c.current.listBoxExpand())},C=R=>{const{isExpanded:V,options:W}=c.current.state;V&&(R.preventDefault(),c.current.updateActiveIndex(W.length-1))},k=R=>{c.current.state.isExpanded&&(R.preventDefault(),c.current.updateActiveIndex(0))},P=()=>{c.current.state.isExpanded?c.current.listBoxCollapse():c.current.updateInputValue("")},j=()=>{if(e){const{value:R,selected:V}=c.current.state,W=V[V.length-1];R===""&&W&&c.current.selectTag(W)}},N=R=>{c.current.state.isExpanded&&(R.preventDefault(),c.current.selectTag())};return{onBlur:x,onChange:v,onClick:b,onFocus:y,onKeyDown:R=>{if(R.key===Ts.UpArrow)return S(R);if(R.key===Ts.DownArrow)return w(R);if(R.key===Ts.PageUp)return k(R);if(R.key===Ts.PageDown)return C(R);if(R.key===Ts.Escape)return P();if(R.key===Ts.Backspace)return j();if(r.includes(R.key))return N(R)}}},[e,o,r,a,c]),{activeOption:d,isExpanded:p,value:m}=c.current.state;return{...zhe,"aria-autocomplete":"list","aria-activedescendant":d?t5(i,d):void 0,"aria-controls":e5(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":Vy(i),"aria-expanded":p,id:Mhe(i),onBlur:s?Kl:f.onBlur,onChange:s?Kl:f.onChange,onClick:s?Kl:f.onClick,onFocus:s?Kl:f.onFocus,onKeyDown:s?Kl:f.onKeyDown,ref:a,role:"combobox",type:"text",value:m}}const Hhe={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},Whe=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function Yhe({allowResize:e=!0,text:t}){const n=B.useRef(null),{inputRef:r}=B.useContext(In),[i,o]=B.useState(null);return B.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);Whe.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),B.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:Hhe}}}function qhe(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=B.useContext(In),i=r.current.state.activeIndex===-1,o=B.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return B.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":Vy(e),id:e5(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function Ghe({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:c,onShouldCollapse:f,onShouldExpand:d,onValidate:p,selected:m,suggestions:v,suggestionsTransform:y}){const x=B.useRef(),[b,w]=B.useState(null),[S,C]=B.useState(!1),[k,P]=B.useState(""),j=B.useMemo(()=>{const q=y(k,v);return k&&(t&&q.push({disabled:typeof p=="function"?!p(k):!1,label:r,value:YO}),q.length===0&&q.push({disabled:!0,label:i,value:JI})),q},[t,r,i,p,v,y,k]),N=b?Dx(b,j):-1,H=e?Math.max(N,0):N,R=j[H],V={activeIndex:H,activeOption:R,isExpanded:S,options:j,selected:m,value:k},W={tagsAdded:x.current?Oj(m,x.current.state.selected):[],tagsDeleted:x.current?Oj(x.current.state.selected,m):[]},ee={listBoxCollapse(){S&&((f==null?void 0:f(V.value))??!0)&&(C(!1),w(null),s==null||s())},listBoxExpand(){!S&&((d==null?void 0:d(V.value))??!0)&&(C(!0),w(j[H]),l==null||l())},updateActiveIndex(q){const Q=Lhe(q,j.length,e?0:-1);w(j[Q])},updateInputValue(q){k!==q&&(P(q),c==null||c(q))},selectTag(q){if(q??(q=Dhe(V)),q){const Q=Dx(q,V.selected);Q>-1?a(Q):o(q),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return x.current={...ee,flags:W,state:V},x}function Khe(e){const{id:t,inputRef:n,managerRef:r}=B.useContext(In),i=B.useRef(null),o=r.current.state.options[e],a=e===r.current.state.activeIndex,s=o.disabled??!1,l=Dx(o,r.current.state.selected)>-1,c=B.useCallback(()=>{var d;r.current.selectTag(),(d=n.current)==null||d.focus()},[n,r]),f=B.useCallback(()=>{e!==r.current.state.activeIndex&&r.current.updateActiveIndex(e)},[e,r]);return B.useEffect(()=>{var d;a&&((d=i.current)==null||d.scrollIntoView({block:"nearest",inline:"start"}))},[a,r.current.state.options]),{option:{...o,active:a,disabled:s,index:e,selected:l},optionProps:{"aria-disabled":s,"aria-posinset":e+1,"aria-selected":s?void 0:l,"aria-setsize":r.current.state.options.length,id:t5(t,o),onClick:c,onMouseDown:f,ref:i,role:"option",tabIndex:-1}}}function Zhe({inputRef:e,managerRef:t}){return B.useRef({input:{blur(){var r;(r=e.current)==null||r.blur()},focus(){var r;(r=e.current)==null||r.focus()},get value(){return t.current.state.value},set value(r){typeof r!="string"&&(r=String(r)),t.current.updateInputValue(r)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(r){t.current.selectTag(r)}}).current}function Qhe({onBlur:e,onFocus:t}){const[n,r]=B.useState(!1),{id:i,inputRef:o}=B.useContext(In),a=B.useRef(null),s=B.useMemo(()=>({"aria-describedby":Vy(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function Xhe(e,t){const{isDisabled:n,managerRef:r}=B.useContext(In),i=r.current.state.selected[e],o=B.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:Cv(t,i.label),onClick:n?Kl:o}}}function Jhe(){var e;const{inputRef:t,managerRef:n}=B.useContext(In),r=B.useRef(),i=n.current.flags.tagsDeleted.length,o=(e=r.current)==null?void 0:e.contains(document.activeElement);return B.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[t,o,r,i]),{listRef:r}}const epe={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function tpe({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=B.useContext(In),r=B.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(Cv(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(Cv(t,i.label))}),Y.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:epe},r.current.join(` -`))}function npe({children:e}){const{classNames:t,comboBoxRef:n,id:r}=B.useContext(In);return Y.createElement("div",{className:t.comboBox,id:The(r),ref:n},e)}const rpe=({classNames:e,text:t})=>Y.createElement("mark",{className:e.highlight},t);function ipe({option:e,query:t,render:n=rpe}){const{classNames:r}=B.useContext(In);if(e.value===YO||e.value===JI)return Y.createElement(Y.Fragment,null,Cv(e.label,t));if(t){const i=Nhe(e.label,t);if(i){const o=n({text:i[1],classNames:r});return Y.createElement(Y.Fragment,null,i[0],o,i[2])}}return Y.createElement(Y.Fragment,null,e.label)}const ope=Y.memo(ipe),ape=({classNames:e,inputWidth:t,...n})=>Y.createElement("input",{className:e.input,style:{width:t},...n});function spe({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=ape}){const{classNames:s}=B.useContext(In),{value:l,...c}=Vhe({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),f=l.lengthY.createElement("div",{className:t.label,id:n},e);function cpe({children:e,render:t=lpe}){const{classNames:n,id:r}=B.useContext(In);return t({children:e,classNames:n,id:Vy(r)})}function upe({children:e}){const{classNames:t,managerRef:n}=B.useContext(In),r=qhe();return!n.current.state.isExpanded||Y.Children.count(e)===0?null:Y.createElement("div",{className:t.listBox,...r},e)}const fpe=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),Y.createElement("div",{className:i.join(" "),...r},e)};function dpe({children:e,index:t,render:n=fpe}){const{classNames:r}=B.useContext(In),{option:i,optionProps:o}=Khe(t);return n({classNames:r,children:e,option:i,...o})}const hpe=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),Y.createElement("div",{className:a.join(" "),...o},e)};function ppe({children:e,onBlur:t,onFocus:n,render:r=hpe}){const{classNames:i,isDisabled:o,isInvalid:a}=B.useContext(In),{isActive:s,rootProps:l}=Qhe({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const mpe=({classNames:e,tag:t,...n})=>Y.createElement("button",{type:"button",className:e.tag,...n},Y.createElement("span",{className:e.tagName},t.label));function gpe({render:e=mpe,index:t,title:n}){const{classNames:r}=B.useContext(In),{tag:i,tagProps:o}=Xhe(t,n);return e({classNames:r,tag:i,...o})}function vpe({children:e,label:t}){const{classNames:n}=B.useContext(In),{listRef:r}=Jhe();return Y.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>Y.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const ype={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},_pe=[Ts.Enter];function bpe({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=ype,collapseOnSelect:c=!1,deleteButtonText:f="Remove %value% from the list",delimiterKeys:d=_pe,id:p="react-tags",isDisabled:m=!1,isInvalid:v=!1,labelText:y="Select tags",newOptionText:x="Add %value%",noOptionsText:b="No options found for %value%",onAdd:w,onBlur:S,onCollapse:C,onDelete:k,onExpand:P,onFocus:j,onInput:N,onShouldCollapse:H,onShouldExpand:R,onValidate:V,placeholderText:W="Add a tag",renderHighlight:ee,renderInput:q,renderLabel:Q,renderOption:oe,renderRoot:le,renderTag:G,selected:F=[],suggestions:A=[],suggestionsTransform:z=Bhe,tagListLabelText:re="Selected tags"},U){const K=B.useRef(null),ie=B.useRef(null),ae=B.useRef(null),he=Ghe({activateFirstOption:e,allowNew:n,collapseOnSelect:c,newOptionText:x,noOptionsText:b,onAdd:w,onDelete:k,onCollapse:C,onExpand:P,onInput:N,onShouldCollapse:H,onShouldExpand:R,onValidate:V,selected:F,suggestions:A,suggestionsTransform:z}),E=Zhe({inputRef:ie,managerRef:he});return U&&(typeof U=="function"?U(E):U.current=E),Y.createElement(In.Provider,{value:{classNames:l,comboBoxRef:K,id:p,inputRef:ie,isDisabled:m,isInvalid:v,listBoxRef:ae,managerRef:he}},Y.createElement(ppe,{onBlur:S,onFocus:j,render:le},Y.createElement(cpe,{render:Q},y),Y.createElement(vpe,{label:re},he.current.state.selected.map((M,I)=>Y.createElement(gpe,{key:jx(M),index:I,render:G,title:f}))),Y.createElement(npe,null,Y.createElement(spe,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:d,placeholderText:W,render:q}),Y.createElement(upe,null,he.current.state.options.map((M,I)=>Y.createElement(dpe,{key:jx(M),index:I,render:oe},Y.createElement(ope,{option:M,query:he.current.state.value,render:ee}))))),Y.createElement(tpe,{ariaAddedText:i,ariaDeletedText:s})))}const wpe=Y.forwardRef(bpe);const i5=({tag:e,colorGenerator:t})=>g.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),o5="Tag not found",a5="Add tag",xpe=e=>e!==o5,Spe=e=>e===a5,Cj=e=>({label:e,value:e}),Ope=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,allowNew:a=!0})=>{B.useEffect(()=>{i()},[]);const s=bl("shortUrlCreation"),l=(s==null?void 0:s.tagFilteringMode)??"startsWith",c=B.useRef(null),f=({tag:p,onClick:m})=>g.jsx(UO,{colorGenerator:e,text:p.label,clearable:!0,className:"react-tags__tag",onClose:m}),d=({option:p,classNames:m,...v})=>{var b;const y=xpe(p.label),x=Spe(p.label);return g.jsx("div",{className:Ee(m.option,{[m.optionIsActive]:y&&p.active,"react-tags__listbox-option--not-selectable":!y}),...v,children:y?g.jsxs(g.Fragment,{children:[!x&&g.jsx(i5,{tag:`${p.label}`,colorGenerator:e}),x?g.jsxs("i",{children:['Add "',DI(((b=c.current)==null?void 0:b.input.value)??""),'"']}):p.label]}):g.jsx("i",{children:p.label})})};return g.jsx(wpe,{ref:c,selected:t.map(Cj),suggestions:o.tags.filter(p=>!t.includes(p)).map(Cj),renderTag:f,renderOption:d,activateFirstOption:!0,allowNew:a,newOptionText:a5,noOptionsText:o5,placeholderText:r??"Add tags to the URL",delimiterKeys:["Enter","Tab",","],suggestionsTransform:(p,m)=>{const v=p.toLowerCase().trim();return v.length<1?[]:[...m.filter(({label:y})=>l==="includes"?y.includes(v):y.startsWith(v))].slice(0,5)},onDelete:p=>{const m=[...t];m.splice(p,1),n(m)},onAdd:({label:p})=>n([...new Set([...t,...p.split(",")])])})},Lx="shlink/tagDelete",Cpe={deleting:!1,deleted:!1,error:!1},s5=jn(`${Lx}/tagDeleted`),Epe=e=>{const t=Mr(`${Lx}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=sr({name:Lx,initialState:Cpe,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:Jo(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},qO="shlink/tagEdit",kpe={editing:!1,edited:!1,error:!1},l5=jn(`${qO}/tagEdited`),Ppe=(e,t)=>Mr(`${qO}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),Tpe=e=>sr({name:qO,initialState:kpe,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:Jo(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...wS(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),GO="shlink/tagsList",eb={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},Ej=(e,t)=>n=>n===e?t:n,kj=(e,t)=>uh(n=>n===t,e),Mpe=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:s.visitsCount+o+a}}},{...t}),jpe=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),Dpe=(e,t=!0)=>Mr(`${GO}/listTags`,async(n,{getState:r})=>{const{tagsList:i}=r();if(!t&&!Kn(i.tags))return i;const{tags:o,stats:a}=await e().tagsStats(),s=a.reduce((l,{tag:c,...f})=>(l[c]=f,l),{});return{tags:o,stats:s}}),c5=jn(`${GO}/filterTags`),Lpe=(e,t)=>sr({name:GO,initialState:eb,reducers:{},extraReducers:n=>{n.addCase(c5,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...eb,error:!0,errorData:Jo(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...eb,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(s5,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:kj(r,a),filteredTags:kj(i,a)})),n.addCase(l5,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map(Ej(s.oldName,s.newName)).sort(),filteredTags:i.map(Ej(s.oldName,s.newName)).sort()})),n.addCase(Ph,(r,{payload:i})=>({...r,stats:Mpe(jpe(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),Rpe={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Npe=e=>as(({filterTags:t,forceListTags:n,tagsList:r})=>{var f;const i=$O(),[o,a]=B.useState(((f=i.tags)==null?void 0:f.defaultOrdering)??{}),s=Ft(()=>r.filteredTags.map(d=>{var v,y,x;const p=r.stats[d],m=((v=i.visits)!=null&&v.excludeBots?(y=p==null?void 0:p.visitsSummary)==null?void 0:y.nonBots:(x=p==null?void 0:p.visitsSummary)==null?void 0:x.total)??(p==null?void 0:p.visitsCount)??0;return{tag:d,visits:m,shortUrls:(p==null?void 0:p.shortUrlsCount)??0}}),d=>n6(d,o));if(B.useEffect(()=>{n()},[]),r.loading)return g.jsx(Do,{loading:!0});if(r.error)return g.jsx(zr,{type:"error",children:g.jsx(zo,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const l=d=>()=>{const p=Dy(d,o.field,o.dir);a({field:p?d:void 0,dir:p})},c=()=>{if(r.filteredTags.length<1)return g.jsx(Do,{children:"No tags found"});const d=s();return g.jsx(e,{sortedTags:d,currentOrder:o,orderByColumn:l})};return g.jsxs(g.Fragment,{children:[g.jsx(wh,{className:"mb-3",onChange:t}),g.jsx(mr,{className:"mb-3",children:g.jsx("div",{className:"col-lg-6 offset-lg-6",children:g.jsx(xh,{items:Rpe,order:o,onChange:(d,p)=>a({field:d,dir:p})})})}),c()]})},()=>[di.visits]);const KO=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Qd(o)&&n(o);return g.jsxs(iO,{listClassName:Ee("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[g.jsx(Vs,{disabled:t<=1,children:g.jsx(Hs,{previous:!0,tag:"span",onClick:i(t-1)})}),YI(t,e).map((o,a)=>g.jsx(Vs,{disabled:Qd(o),active:t===o,children:g.jsx(Hs,{role:"link",tag:"span",onClick:i(o),children:qI(o)})},GI(o,a))),g.jsx(Vs,{disabled:t>=e,children:g.jsx(Hs,{next:!0,tag:"span",onClick:i(t+1)})})]})};const Ape=20,Ipe=e=>({sortedTags:t,orderByColumn:n,currentOrder:r})=>{const i=B.useRef(!0),{search:o}=gn(),{page:a=1}=vl(o),[s,l]=xfe("page",Number(a)),c=jd(Ape,t),f=c.length>1,d=c[s-1]??[];return B.useEffect(()=>{!i.current&&l(1),i.current=!1},[t]),B.useEffect(()=>{scrollTo(0,0)},[s]),g.jsxs(hn,{bodyClassName:f?"pb-1":"",children:[g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsxs("thead",{className:"responsive-table__header",children:[g.jsxs("tr",{children:[g.jsxs("th",{className:"tags-table__header-cell",onClick:n("tag"),children:["Tag ",g.jsx(ed,{currentOrder:r,field:"tag"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("shortUrls"),children:["Short URLs ",g.jsx(ed,{currentOrder:r,field:"shortUrls"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("visits"),children:["Visits ",g.jsx(ed,{currentOrder:r,field:"visits"})]}),g.jsx("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),g.jsx("tr",{children:g.jsx("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),g.jsxs("tbody",{children:[d.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),d.map(p=>g.jsx(e,{tag:p},p.tag))]})]}),f&&g.jsx("div",{className:"sticky-card-paginator",children:g.jsx(KO,{pagesCount:c.length,currentPage:s,setCurrentPage:l})})]},s)},Fpe=(e,t,n)=>({tag:r})=>{const[i,o]=mn(),[a,s]=mn(),l=yl();return g.jsxs("tr",{className:"responsive-table__row",children:[g.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[g.jsx(i5,{tag:r.tag,colorGenerator:n})," ",r.tag]}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:g.jsx(It,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:wn(r.shortUrls)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:g.jsx(It,{to:`${l}/tag/${r.tag}/visits`,children:wn(r.visits)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end",children:g.jsxs(jy,{children:[g.jsxs(Ue,{onClick:s,children:[g.jsx(Ie,{icon:kG,fixedWidth:!0,className:"me-1"})," Edit"]}),g.jsxs(Ue,{onClick:o,children:[g.jsx(Ie,{icon:zG,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),g.jsx(t,{tag:r.tag,toggle:s,isOpen:a}),g.jsx(e,{tag:r.tag,toggle:o,isOpen:i})]})},$pe=(e,t)=>{e.serviceFactory("TagsSelector",Ope,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>che),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Ehe,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",Fpe,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Ipe,"TagsTableRow"),e.serviceFactory("TagsList",Npe,"TagsTable"),e.decorator("TagsList",t(["tagsList","mercureInfo"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",Tpe,"editTag"),e.serviceFactory("tagEditReducer",ct("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Epe,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",ct("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",Lpe,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",ct("reducer"),"tagsListReducerCreator");const n=r=>({apiClientFactory:i})=>Dpe(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>c5),e.serviceFactory("deleteTag",ct("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>s5),e.serviceFactory("editTag",Ppe,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>l5)};var Bpe="Expected a function",u5="__lodash_hash_undefined__",f5=1/0,Upe="[object Function]",zpe="[object GeneratorFunction]",Vpe="[object Symbol]",Hpe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wpe=/^\w*$/,Ype=/^\./,qpe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gpe=/[\\^$.*+?()[\]{}|]/g,Kpe=/\\(\\)?/g,Zpe=/^\[object .+?Constructor\]$/,Qpe=typeof Zl=="object"&&Zl&&Zl.Object===Object&&Zl,Xpe=typeof self=="object"&&self&&self.Object===Object&&self,ZO=Qpe||Xpe||Function("return this")();function Jpe(e,t){return e==null?void 0:e[t]}function eme(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var tme=Array.prototype,nme=Function.prototype,d5=Object.prototype,tb=ZO["__core-js_shared__"],Pj=function(){var e=/[^.]+$/.exec(tb&&tb.keys&&tb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),h5=nme.toString,QO=d5.hasOwnProperty,p5=d5.toString,rme=RegExp("^"+h5.call(QO).replace(Gpe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tj=ZO.Symbol,ime=tme.splice,ome=m5(ZO,"Map"),Jd=m5(Object,"create"),Mj=Tj?Tj.prototype:void 0,jj=Mj?Mj.toString:void 0;function sl(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function mme(e,t){var n=this.__data__,r=Hy(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Su.prototype.clear=fme;Su.prototype.delete=dme;Su.prototype.get=hme;Su.prototype.has=pme;Su.prototype.set=mme;function wl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function eC(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function Fme(e={stringFormatter:eC()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function $me(e={stringFormatter:eC()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function Lj(e,t,n){const r=e[t];return r===void 0?n:r}function y5(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function Rx(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var Rj;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(Rj||(Rj={}));class Bme{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||eC(),i=$me({stringFormatter:r}),o={header:r,undefined:nb,boolean:nb,number:Ime(),bigint:nb,string:r,symbol:Fme({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` -`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>Dj(i,r,n):i=>Lj(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?a=>Dj(a,o,i):a=>Lj(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return Rx(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(y5,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return Rx(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class _5 extends Bme{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(y5,[])}processData(t){return Rx(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Cn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(Cn||(Cn={}));Cn.QUOTATION_MARK+"",Cn.QUOTATION_MARK,Cn.REVERSE_SOLIDUS+"",Cn.REVERSE_SOLIDUS,Cn.SOLIDUS+"",Cn.SOLIDUS,Cn.LATIN_SMALL_LETTER_B+"",Cn.BACKSPACE,Cn.LATIN_SMALL_LETTER_F+"",Cn.FORM_FEED,Cn.LATIN_SMALL_LETTER_N+"",Cn.NEWLINE,Cn.LATIN_SMALL_LETTER_R+"",Cn.CARRIAGE_RETURN,Cn.LATIN_SMALL_LETTER_T+"",Cn.TAB;var Nj;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(Nj||(Nj={}));var Aj;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(Aj||(Aj={}));var Ij;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(Ij||(Ij={}));var Fj;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(Fj||(Fj={}));const Ume=new _5,zme=e=>Ume.parse(e),Vme=6,$j="0123456789ABCDEF",Hme=128,{floor:Wme,random:Yme,sqrt:qme,round:Gme}=Math,Kme=()=>`#${IO(Vme,()=>$j[Wme(Yme()*$j.length)]).join("")}`,Bj=e=>e.toLowerCase().trim(),Zme=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),Qme=(e=0,t=0,n=0)=>Gme(qme(.299*e**2+.587*t**2+.114*n**2));class Xme{constructor(t){me(this,"colors");me(this,"lights");me(this,"getColorForKey",t=>{const n=Bj(t),r=this.colors[n];return r||this.setColorForKey(n,Kme())});me(this,"setColorForKey",(t,n)=>{var i;const r=Bj(t);return this.colors[r]=n,(i=this.storage)==null||i.storeTagColors(this.colors),n});me(this,"isColorLightForKey",t=>{const n=this.getColorForKey(t).substring(1);if(qo(this.lights[n])){const r=Zme(n);this.lights[n]=Qme(...r)>=Hme}return this.lights[n]});var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}}const b5=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},Jme=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);b5(e,i,n)};class ege{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);b5(this.window,i,n)}}class tge{constructor(t,n){me(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});me(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});me(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);Jme(this.window,r,t)});this.window=t,this.jsonToCsv=n}}function nge(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",ege,"fetch","window"),e.service("ColorGenerator",Xme,"TagColorsStorage"),e.constant("jsonToCsv",zme),e.service("ReportExporter",tge,"window","jsonToCsv"),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",bfe,"setTimeout","clearTimeout")}const tC=e=>e.visitedUrl!==void 0,rge=e=>e.visitedUrl!==void 0,ige=Ft(Kq(e=>tC(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),rm=(e,t)=>dA(ct(t),e),Dh=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&Xa(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&Xa(r==null?void 0:r.endDate))??void 0,a=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:a}},Lh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>g.jsx("header",{children:g.jsxs(Yr,{body:!0,children:[g.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[g.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:g.jsx(Ie,{icon:SA})}),g.jsx("span",{className:"text-center d-none d-sm-block",children:g.jsx("small",{children:i})}),g.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",g.jsx(TI,{visitsCount:e.length,shortUrl:n})]})]}),g.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:g.jsx("small",{children:i})}),r&&g.jsx("div",{className:"mt-md-2",children:r})]})});const w5=({title:e,footer:t,children:n})=>g.jsxs(Yr,{role:"document",children:[g.jsx(Kc,{className:"chart-card__header",children:typeof e=="function"?e():e}),g.jsx(Gc,{children:n}),t&&g.jsx(A4,{className:"chart-card__footer--sticky",children:t})]}),x5="label";function Uj(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function oge(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function S5(e,t){e.labels=t}function O5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x5;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function age(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x5;const n={labels:[],datasets:[]};return S5(n,e.labels),O5(n,e.datasets,t),n}function C5(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function sge(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:f,updateMode:d,...p}=e,m=B.useRef(null),v=B.useRef(),y=()=>{m.current&&(v.current=new Dv(m.current,{type:a,data:age(s,o),options:l&&{...l},plugins:c}),Uj(t,v.current))},x=()=>{Uj(t,null),v.current&&(v.current.destroy(),v.current=null)};return B.useEffect(()=>{!i&&v.current&&l&&oge(v.current,l)},[i,l]),B.useEffect(()=>{!i&&v.current&&S5(v.current.config.data,s.labels)},[i,s.labels]),B.useEffect(()=>{!i&&v.current&&s.datasets&&O5(v.current.config.data,s.datasets,o)},[i,s.datasets]),B.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(d))},[i,l,s.labels,s.datasets,d]),B.useEffect(()=>{v.current&&(x(),setTimeout(y))},[a]),B.useEffect(()=>(y(),()=>x()),[]),Y.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),f)}const lge=B.forwardRef(sge);function nC(e,t){return Dv.register(t),B.forwardRef((n,r)=>Y.createElement(lge,Object.assign({},n,{ref:r,type:e})))}const cge=nC("line",Tf),uge=nC("bar",Pf),fge=nC("doughnut",_a),E5=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},k5=({dataset:e,raw:t})=>`${e.label}: ${wn(`${t}`)}`,dge=({label:e,raw:t})=>`${e}: ${wn(`${t}`)}`;const hge=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return g.jsx("ul",{className:"doughnut-chart-legend",children:n.map((a,s)=>g.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[g.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[s]??o}}),g.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:a})]},a))})},pge=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:lie()?sie:aie,borderWidth:2}],mge=(e,t)=>({labels:e,datasets:pge(t)}),gge=B.memo(({stats:e})=>{const[t,n]=B.useState(),r=lo(e),i=mu(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:dge}}}},a=mge(r,i);return g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-sm-12 col-md-7",children:g.jsx(fge,{height:300,data:a,options:o,ref:s=>{s&&n(s)}})}),g.jsx("div",{className:"col-sm-12 col-md-5",children:t&&g.jsx(hge,{chart:t})})]})}),zj=({title:e,stats:t})=>g.jsx(w5,{title:e,children:g.jsx(gge,{stats:t})}),vge={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},P5={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},rn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fr={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ca={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class we{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=we.getVersionPrecision(t),o=we.getVersionPrecision(n);let a=Math.max(i,o),s=0;const l=we.map([t,n],c=>{const f=a-we.getVersionPrecision(c),d=c+new Array(f+1).join(".0");return we.map(d.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===s)return 0;a-=1}else if(l[0][a]{r[l]=a[l]})}return t}static getBrowserAlias(t){return vge[t]}static getBrowserTypeByAlias(t){return P5[t]||""}}const Ct=/version\/(\d+(\.?_?\d+)+)/i,yge=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=we.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=we.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=we.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=we.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=we.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=we.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=we.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=we.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=we.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=we.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=we.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=we.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=we.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=we.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=we.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=we.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=we.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=we.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=we.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=we.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=we.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=we.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=we.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=we.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=we.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=we.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:we.getFirstMatch(i,e),version:we.getSecondMatch(i,e)}}}],_ge=[{test:[/Roku\/DVP/],describe(e){const t=we.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:fr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=we.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:fr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=we.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=we.getWindowsVersionName(t);return{name:fr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:fr.iOS},n=we.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=we.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=we.getMacOSVersionName(t),r={name:fr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=we.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:fr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=we.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=we.getAndroidVersionName(t),r={name:fr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=we.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:fr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=we.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||we.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||we.getFirstMatch(/\bbb(\d+)/i,e);return{name:fr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=we.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:fr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=we.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:fr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:fr.Linux}}},{test:[/CrOS/],describe(){return{name:fr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=we.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:fr.PlayStation4,version:t}}}],bge=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=we.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:rn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:rn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:rn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:rn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:rn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:rn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:rn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=we.getFirstMatch(/(ipod|iphone)/i,e);return{type:rn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:rn.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:rn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:rn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:rn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:rn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:rn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:rn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:rn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:rn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:rn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:rn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:rn.tv}}}],wge=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:ca.Blink};const n=we.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ca.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:ca.Trident},n=we.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:ca.Presto},n=we.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:ca.Gecko},n=we.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ca.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:ca.WebKit},n=we.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Vj{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=we.find(yge,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=we.find(_ge,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=we.find(bge,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=we.find(wge,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return we.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(s=>{const l=t[s];typeof l=="string"?(i[s]=l,o+=1):typeof l=="object"&&(n[s]=l,r+=1)}),r>0){const s=Object.keys(n),l=we.find(s,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=we.find(s,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const s=Object.keys(i),l=we.find(s,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=we.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(we.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! +`,zt+=bi):_i==="id"?Sn=bi:_i==="event"?lr=bi:_i==="retry"?(Me=E(bi,Me),de=Me):_i==="heartbeatTimeout"&&(je=E(bi,je),qe!==0&&(i(qe),qe=r(function(){ls()},je)))}if(Fn===z){if(zt!==""){ce=Sn,lr===""&&(lr="message");var Un=new ee(lr,{data:zt.slice(1),lastEventId:Sn});if(ue.dispatchEvent(Un),lr==="open"?I(ue,ue.onopen,Un):lr==="message"?I(ue,ue.onmessage,Un):lr==="error"&&I(ue,ue.onerror,Un),Gt===F)return}zt="",lr=""}Fn=$n==="\r".charCodeAt(0)?A:z}else Fn===z&&(Cu=vn,Fn=re),Fn===re?$n===":".charCodeAt(0)&&(Bi=vn+1,Fn=U):Fn===U&&(Fn=K)}}},$h=function(un){if(Gt===G||Gt===le){Gt=oe,qe!==0&&(i(qe),qe=0),qe=r(function(){ls()},de),de=M(Math.min(Me*16,de*2)),ue.readyState=le;var tn=new Q("error",{error:un});ue.dispatchEvent(tn),I(ue,ue.onerror,tn),un!=null&&console.error(un)}},Eu=function(){Gt=F,et!=null&&(et.abort(),et=void 0),qe!==0&&(i(qe),qe=0),ue.readyState=F},ls=function(){if(qe=0,Gt!==oe){if(!be&&et!=null)$h(new Error("No activity within "+je+" milliseconds. "+(Gt===le?"No response received.":ye+" chars received.")+" Reconnecting.")),et!=null&&(et.abort(),et=void 0);else{var un=Math.max((be||Date.now())+je-Date.now(),1);be=!1,qe=r(function(){ls()},un)}return}be=!1,ye=0,qe=r(function(){ls()},je),Gt=le,zt="",lr="",Sn=ce,$i="",Cu=0,Bi=0,Fn=z;var tn=ve;if(ve.slice(0,5)!=="data:"&&ve.slice(0,5)!=="blob:"&&ce!==""){var cr=ve.indexOf("?");tn=cr===-1?ve:ve.slice(0,cr+1)+ve.slice(cr+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(bi,Un){return Un===Le?"":bi}),tn+=(ve.indexOf("?")===-1?"?":"&")+Le+"="+encodeURIComponent(ce)}var $n=ue.withCredentials,Bn={};Bn.Accept="text/event-stream";var vn=ue.headers;if(vn!=null)for(var _i in vn)Object.prototype.hasOwnProperty.call(vn,_i)&&(Bn[_i]=vn[_i]);try{et=Qe.open(Ne,Ih,Fh,$h,tn,$n,Bn)}catch(bi){throw Eu(),bi}};ue.url=ve,ue.readyState=le,ue.withCredentials=Ce,ue.headers=Se,ue._close=Eu,ls()}J.prototype=Object.create(R.prototype),J.prototype.CONNECTING=le,J.prototype.OPEN=G,J.prototype.CLOSED=F,J.prototype.close=function(){this._close()},J.CONNECTING=le,J.OPEN=G,J.CLOSED=F,J.prototype.withCredentials=void 0;var De=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(De=J),function(ue){{var ve=ue(t);ve!==void 0&&(e.exports=ve)}}(function(ue){ue.EventSourcePolyfill=J,ue.NativeEventSource=l,ue.EventSource=De})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Zl:globalThis)})(hx,hx.exports);var Bue=hx.exports;const Uue=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:a,error:s}=e;if(a||s||!i)return;const l=({data:d})=>n(JSON.parse(d)),c=({status:d})=>d===401&&r(),f=t.map(d=>{const p=new URL(i);p.searchParams.append("topic",d);const g=new Bue.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return g.onmessage=l,g.onerror=c,g});return()=>f.forEach(d=>d.close())};function ss(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:a}=r,{interval:s}=a,l=pl();return B.useEffect(()=>{const c=g=>s?n.add(g):i([g]),f=t(r,l),d=Uue(a,f,c,o);if(!s)return d;const p=setInterval(()=>{i([...n]),n.clear()},s*1e3*60);return Ft(()=>clearInterval(p),()=>d==null?void 0:d())},[a]),m.jsx(e,{...r})}}class di{}me(di,"visits","https://shlink.io/new-visit"),me(di,"orphanVisits","https://shlink.io/new-orphan-visit"),me(di,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const FO="shlink/shortUrlDeletion",B3={shortCode:"",loading:!1,deleted:!1,error:!1},zue=e=>Mr(`${FO}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),vI=jn(`${FO}/shortUrlDeleted`),Vue=e=>{const{actions:t,reducer:n}=sr({name:FO,initialState:B3,reducers:{resetDeleteShortUrl:()=>B3},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:a})=>({...o,errorData:Jo(a),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:a})=>({...o,shortCode:a.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},yI="shlink/shortUrlsList",_I=5,Hue={loading:!0,error:!1},Wue=e=>Mr(`${yI}/listShortUrls`,t=>e().listShortUrls(t??{})),Yue=(e,t,n)=>sr({name:yI,initialState:Hue,reducers:{},extraReducers:r=>{r.addCase(e.pending,i=>({...i,loading:!0,error:!1})),r.addCase(e.rejected,()=>({loading:!1,error:!0})),r.addCase(e.fulfilled,(i,{payload:o})=>({loading:!1,error:!1,shortUrls:o})),r.addCase(n.fulfilled,Ft((i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,_I-1)],i):i,i=>i.shortUrls?Nl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],i.shortUrls.data.map(a=>{const{shortCode:s,domain:l}=o;return Zf(a,s,l)?o:a}),i):i),r.addCase(vI,Ft((i,{payload:o})=>i.shortUrls?Nl(["shortUrls","data"],uh(a=>Zf(a,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Nl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(Ph,(i,{payload:o})=>{var a,s;return Nl(["shortUrls","data"],(s=(a=i.shortUrls)==null?void 0:a.data)==null?void 0:s.map(l=>{var c;return((c=zq(o.createdVisits.filter(({shortUrl:f})=>f&&Zf(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),U3=10,{ceil:que}=Math,Gue=new Intl.NumberFormat("en-US"),wn=e=>Gue.format(Number(e)),Kue=e=>que(e/U3)*U3,Zue={field:"dateCreated",dir:"DESC"},bI={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:Zue}},wI=B.createContext(bI),Que=wI.Provider,$O=()=>B.useContext(wI)??bI,bl=e=>$O()[e];var Xue={prefix:"far",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"]},Jue=Xue,efe={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 135.1c-4.2-4.5-10.1-7.1-16.3-7.1C266 128 256 138 256 150.3V208H160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32h96v57.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.3-7.1l99.9-107.1c3.5-3.8 5.5-8.7 5.5-13.8s-2-10.1-5.5-13.8L294.6 135.1z"]},tfe=efe,nfe={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},xI={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]};const rfe=e=>({tag:It,to:e}),px=({children:e,title:t,link:n,tooltip:r})=>{const i=os();return m.jsxs(m.Fragment,{children:[m.jsxs(Yr,{innerRef:i,className:"highlight-card",body:!0,...rfe(n),children:[m.jsx(Ie,{size:"3x",className:"highlight-card__link-icon",icon:tfe}),m.jsx(F4,{tag:"h5",className:"highlight-card__title",children:t}),m.jsx(I4,{tag:"h2",children:e})]}),r&&m.jsx(jr,{target:i,placement:"bottom",children:r})]})},z3=({loading:e,excludeBots:t,visitsSummary:n,...r})=>m.jsx(px,{tooltip:n.bots!==void 0?m.jsxs(m.Fragment,{children:[t?"Plus":"Including"," ",m.jsx("strong",{children:wn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":wn(t&&n.nonBots?n.nonBots:n.total)}),ife=(e,t)=>ss(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,loadVisitsOverview:a,visitsOverview:s})=>{const{loading:l,shortUrls:c}=n,{loading:f}=o,{loading:d,nonOrphanVisits:p,orphanVisits:g}=s,v=yl(),y=uo(),x=bl("visits");return B.useEffect(()=>{r({itemsPerPage:_I,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),m.jsxs(m.Fragment,{children:[m.jsxs(mr,{children:[m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(z3,{title:"Visits",link:`${v}/non-orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:d,visitsSummary:p})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(z3,{title:"Orphan visits",link:`${v}/orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:d,visitsSummary:g})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(px,{title:"Short URLs",link:`${v}/list-short-urls/1`,children:l?"Loading...":wn((c==null?void 0:c.pagination.totalItems)??0)})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(px,{title:"Tags",link:`${v}/manage-tags`,children:f?"Loading...":wn(o.tags.length)})})]}),m.jsxs(Yr,{className:"mb-3",children:[m.jsxs(Kc,{children:[m.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),m.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),m.jsx(It,{className:"float-end",to:`${v}/create-short-url`,children:"Advanced options »"})]}),m.jsx(Gc,{children:m.jsx(t,{basicMode:!0})})]}),m.jsxs(Yr,{children:[m.jsxs(Kc,{children:[m.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),m.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),m.jsx(It,{className:"float-end",to:`${v}/list-short-urls/1`,children:"See all »"})]}),m.jsx(Gc,{children:m.jsx(e,{shortUrlsList:n,className:"mb-0",onTagClick:b=>y(`${v}/list-short-urls/1?tags=${encodeURIComponent(b)}`)})})]})]})},()=>[di.visits,di.orphanVisits]);function ofe(e,t){e.serviceFactory("Overview",ife,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const afe=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),sfe=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,basicMode:o=!1})=>{const a=bl("shortUrlCreation"),s=B.useMemo(()=>afe(a),[a]);return m.jsxs(m.Fragment,{children:[m.jsx(e,{initialState:s,saving:r.saving,mode:o?"create-basic":"create",onSave:async l=>(i(),n(l))}),m.jsx(t,{creation:r,resetCreateShortUrl:i,canBeClosed:o})]})},lfe="Left",cfe="Right",ufe="Up",ffe="Down",pc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},mx={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},V3="mousemove",H3="mouseup",dfe="touchend",hfe="touchmove",pfe="touchstart";function mfe(e,t,n,r){return e>t?n>0?cfe:lfe:r>0?ffe:ufe}function W3(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function gfe(e,t){const n=f=>{const d="touches"in f;d&&f.touches.length>1||e((p,g)=>{g.trackMouse&&!d&&(document.addEventListener(V3,r),document.addEventListener(H3,a));const{clientX:v,clientY:y}=d?f.touches[0]:f,x=W3([v,y],g.rotationAngle);return g.onTouchStartOrOnMouseDown&&g.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),mx),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((d,p)=>{const g="touches"in f;if(g&&f.touches.length>1)return d;if(f.timeStamp-d.start>p.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:v,clientY:y}=g?f.touches[0]:f,[x,b]=W3([v,y],p.rotationAngle),w=x-d.xy[0],S=b-d.xy[1],C=Math.abs(w),k=Math.abs(S),P=(f.timeStamp||0)-d.start,j=Math.sqrt(C*C+k*k)/(P||1),N=[w/(P||1),S/(P||1)],H=mfe(C,k,w,S),R=typeof p.delta=="number"?p.delta:p.delta[H.toLowerCase()]||pc.delta;if(C{e((d,p)=>{let g;if(d.swiping&&d.eventData){if(f.timeStamp-d.start{document.removeEventListener(V3,r),document.removeEventListener(H3,a)},a=f=>{o(),i(f)},s=(f,d)=>{let p=()=>{};if(f&&f.addEventListener){const g=Object.assign(Object.assign({},pc.touchEventOptions),d.touchEventOptions),v=[[pfe,n,g],[hfe,r,Object.assign(Object.assign({},g),d.preventScrollOnSwipe?{passive:!1}:{})],[dfe,i,g]];v.forEach(([y,x,b])=>f.addEventListener(y,x,b)),p=()=>v.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((d,p)=>{if(d.el===f)return d;const g={};return d.el&&d.el!==f&&d.cleanUpTouch&&(d.cleanUpTouch(),g.cleanUpTouch=void 0),p.trackTouch&&f&&(g.cleanUpTouch=s(f,p)),Object.assign(Object.assign(Object.assign({},d),{el:f}),g)})}};return t.trackMouse&&(c.onMouseDown=n),[c,s]}function vfe(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function yfe(e){const{trackMouse:t}=e,n=B.useRef(Object.assign({},mx)),r=B.useRef(Object.assign({},pc)),i=B.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},pc),e);let o;for(o in pc)r.current[o]===void 0&&(r.current[o]=pc[o]);const[a,s]=B.useMemo(()=>gfe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=vfe(n.current,r.current,i.current,s),a}const _fe=2e3,bfe=(e,t)=>(n=!1,r=_fe)=>{const[i,o]=B.useState(n),a=B.useRef(void 0);return[i,()=>{o(!n),a.current&&t(a.current),a.current=e(()=>o(n),r)}]},wfe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:a})=>a==null?void 0:a.contains("visits-table"))||document.querySelector(".modal")||r()};return yfe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},xfe=(e,t)=>{const[n,r]=B.useState(t);return[n,o=>{const{location:a,history:s}=window,l=vl(a.search);l[e]=o,s.pushState(null,"",`${a.pathname}?${Oh(l)}`),r(o)}]},Sfe=(e,t)=>{const n=B.useRef(!0);B.useEffect(()=>{!n.current&&e(),n.current=!1},t)},xu=()=>{const e=uo();return()=>e(-1)},Ofe=e=>({shortUrlDetail:t,getShortUrlDetail:n,shortUrlEdition:r,editShortUrl:i})=>{const{search:o}=gn(),a=pl(),s=xu(),{loading:l,error:c,errorData:f,shortUrl:d}=t,{saving:p,saved:g,error:v,errorData:y}=r,{domain:x}=vl(o),b=bl("shortUrlCreation"),w=B.useMemo(()=>wse(d,b),[d,b]);return B.useEffect(()=>{a.shortCode&&n({shortCode:Fm(a.shortCode),domain:x})},[]),l?m.jsx(Do,{loading:!0}):c?m.jsx(zr,{type:"error",children:m.jsx(zo,{errorData:f,fallbackMessage:"An error occurred while loading short URL detail :("})}):m.jsxs(m.Fragment,{children:[m.jsx("header",{className:"mb-3",children:m.jsx(Yr,{body:!0,children:m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:s,children:m.jsx(Ie,{icon:SA})}),m.jsx("span",{className:"text-center",children:m.jsxs("small",{children:["Edit ",m.jsx(Ni,{href:(d==null?void 0:d.shortUrl)??""})]})}),m.jsx("span",{})]})})}),m.jsx(e,{initialState:w,saving:p,mode:"edit",onSave:async S=>{d&&i({...d,data:S})}}),g&&v&&m.jsx(zr,{type:"error",className:"mt-3",children:m.jsx(zo,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),g&&!v&&m.jsx(zr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var Iy={},Cfe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=Y3[t.format]||Y3.default;window.clipboardData.setData(d,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=Pfe("message"in t?t.message:kfe),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var Mfe=Tfe;function gx(e){"@babel/helpers - typeof";return gx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gx(e)}Object.defineProperty(Iy,"__esModule",{value:!0});Iy.CopyToClipboard=void 0;var Jp=SI(B),jfe=SI(Mfe),Dfe=["text","onCopy","options","children"];function SI(e){return e&&e.__esModule?e:{default:e}}function q3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function G3(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rfe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Nfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K3(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wv(e){return wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},wv(e)}function BO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CI=function(e){Ife(n,e);var t=Ffe(n);function n(){var r;Nfe(this,n);for(var i=arguments.length,o=new Array(i),a=0;a({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:a,saved:s}=t;if(B.useEffect(()=>{n()},[]),a)return m.jsxs(zr,{type:"error",className:"mt-3",children:[r&&m.jsx(Ie,{icon:w1,className:"float-end pointer",onClick:n}),m.jsx(zo,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=t.result;return m.jsxs(zr,{type:"success",className:"mt-3",children:[r&&m.jsx(Ie,{icon:w1,className:"float-end pointer",onClick:n}),m.jsxs("span",{children:[m.jsx("b",{children:"Great!"})," The short URL is ",m.jsx("b",{children:l})]}),m.jsx(EI,{text:l,onCopy:o,children:m.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[m.jsx(Ie,{icon:xI})," Copy"]})}),m.jsx(_h,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},V_="delete",Hfe=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=B.useState("");B.useEffect(()=>i,[]);const{loading:c,error:f,deleted:d,errorData:p}=r,g=Ft(i,t),v=Ay(()=>o(e).then(t));return m.jsx(Zo,{isOpen:n,toggle:g,centered:!0,onClosed:()=>d&&a(e),children:m.jsxs("form",{onSubmit:v,children:[m.jsx(Qo,{toggle:g,children:m.jsx("span",{className:"text-danger",children:"Delete short URL"})}),m.jsxs(fo,{children:[m.jsxs("p",{children:[m.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),m.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),m.jsxs("p",{children:["Write ",m.jsx("b",{children:V_})," to confirm deletion."]}),m.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${V_}`,value:s,onChange:y=>l(y.target.value)}),f&&m.jsx(zr,{type:cse(p)?"warning":"error",small:!0,className:"mt-2",children:m.jsx(zo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),m.jsxs(gl,{children:[m.jsx("button",{type:"button",className:"btn btn-link",onClick:g,children:"Cancel"}),m.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==V_||c,children:c?"Deleting...":"Delete"})]})]})})},kI=({amount:e=0,loading:t=!1,...n})=>m.jsxs(yt,{...n,outline:!0,color:"primary",disabled:t,children:[m.jsx(Ie,{icon:CG})," ",t?"Exporting...":m.jsxs(m.Fragment,{children:["Export (",wn(e),")"]})]}),Fy=()=>{const e=uo(),{search:t}=gn(),n=yl(),r=B.useMemo(Ft(()=>vl(t),({orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const d=o?rie(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...f,orderBy:d,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]),i=B.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:d,...p}=a,g={...p,orderBy:s&&r6(s),tags:l.length>0?l.join(","):void 0,excludeBots:B_(c),excludeMaxVisitsReached:B_(f),excludePastValidUntil:B_(d)},v=Oh(g),y=Kn(v)?"":`?${v}`;e(`${n}/list-short-urls/1${y}`)},[r,e,n]);return[r,i]},Z3=20,Wfe=(e,{exportShortUrls:t})=>({amount:n=0})=>{const[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=Fy(),[c,,f,d]=mn(),p=B.useCallback(async()=>{const g=n/Z3,v=async(x=1)=>{const{data:b}=await e().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:Z3});return x>=g?b:b.concat(await v(x+1))};f();const y=await v();t(y.map(x=>{var C;const{hostname:b,pathname:w}=new URL(x.shortUrl),S=w.substring(1);return{createdAt:x.dateCreated,domain:b,shortCode:S,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((C=x==null?void 0:x.visitsSummary)==null?void 0:C.total)??x.visitsCount}})),d()},[]);return m.jsx(kI,{loading:c,className:"btn-md-block",amount:n,onClick:p})};const PI=({text:e,onCopy:t})=>m.jsx(EI,{text:e,onCopy:t,children:m.jsx(Ie,{icon:xI,className:"ms-2 copy-to-clipboard-icon"})}),Yfe=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=Oh({...n,margin:t>0?t:void 0});return`${r}${Kn(i)?"":`?${i}`}`},qfe=({errorCorrection:e,setErrorCorrection:t})=>m.jsxs(Xo,{text:`Error correction (${e})`,children:[m.jsxs(Ue,{active:e==="L",onClick:()=>t("L"),children:[m.jsx("b",{children:"L"}),"ow"]}),m.jsxs(Ue,{active:e==="M",onClick:()=>t("M"),children:[m.jsx("b",{children:"M"}),"edium"]}),m.jsxs(Ue,{active:e==="Q",onClick:()=>t("Q"),children:[m.jsx("b",{children:"Q"}),"uartile"]}),m.jsxs(Ue,{active:e==="H",onClick:()=>t("H"),children:[m.jsx("b",{children:"H"}),"igh"]})]}),Gfe=({format:e,setFormat:t})=>m.jsxs(Xo,{text:`Format (${e})`,children:[m.jsx(Ue,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),m.jsx(Ue,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]});const Kfe=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i})=>{const[o,a]=B.useState(300),[s,l]=B.useState(0),[c,f]=B.useState("png"),[d,p]=B.useState("L"),g=B.useMemo(()=>Yfe(t,{size:o,format:c,margin:s,errorCorrection:d}),[t,o,c,s,d]),v=B.useMemo(()=>o+s,[o,s]),y=B.useMemo(()=>{if(!(v<500))return v<800?"lg":"xl"},[v]);return m.jsxs(Zo,{isOpen:i,toggle:r,centered:!0,size:y,children:[m.jsxs(Qo,{toggle:r,children:["QR code for ",m.jsx(Ni,{href:t,children:t})]}),m.jsxs(fo,{children:[m.jsxs(mr,{children:[m.jsxs(Fr,{className:"d-grid col-md-6",children:[m.jsxs("label",{children:["Size: ",o,"px"]}),m.jsx("input",{type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>a(Number(x.target.value))})]}),m.jsxs(Fr,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),m.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),m.jsx(Fr,{className:"d-grid col-md-6",children:m.jsx(Gfe,{format:c,setFormat:f})}),m.jsx(Fr,{className:"col-md-6",children:m.jsx(qfe,{errorCorrection:d,setErrorCorrection:p})})]}),m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"mb-3",children:[m.jsx(Ni,{href:g}),m.jsx(PI,{text:g})]}),m.jsx("img",{src:g,className:"qr-code-modal__img",alt:"QR code"}),m.jsx("div",{className:"mt-3",children:m.jsxs(yt,{block:!0,color:"primary",onClick:()=>{e.saveImage(g,`${n}-qr-code.${c}`).catch(()=>{})},children:["Download ",m.jsx(Ie,{icon:OA,className:"ms-1"})]})})]})]})]})},xv=({date:e,format:t=RO,relative:n=!1})=>{const r=NO(e)?e:Vo(e);return m.jsx("time",{dateTime:`${Jle(r)}000`,children:n?`${qle(Qa(),r)} ago`:ou(r,t)})},Zfe=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n;return i&&s>=i?{icon:gK,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",m.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:a&&li(ji(a),Qa())?{icon:gT,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be visited since ",m.jsx("b",{className:"indivisible",children:_v(ji(a))}),"."]})}:o&&li(Qa(),ji(o))?{icon:gT,className:"text-warning",description:m.jsxs(m.Fragment,{children:["This short URL will start working on ",m.jsx("b",{className:"indivisible",children:_v(ji(o))}),"."]})}:{icon:Dd,className:"text-primary",description:"This short URL can be visited normally."}},Qfe=({shortUrl:e})=>{const t=os(),{icon:n,className:r,description:i}=Zfe(e);return m.jsxs(m.Fragment,{children:[m.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:m.jsx(Ie,{icon:n,className:r})}),m.jsx(jr,{target:t,placement:"bottom",children:i})]})},Xfe=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${xse(t)}/${r}${i}`},_x=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=yl();return!n||!e?m.jsx("span",{...i,children:r}):m.jsx(It,{to:Xfe(o,e,t),...i,children:r})};const TI=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:a}=(t==null?void 0:t.meta)??{},s=!!i||!!o||!!a,l=m.jsx(_x,{shortUrl:t,suffix:"visits",asLink:r,children:m.jsx("strong",{className:Ee("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:wn(e)})});if(!s)return l;const c=os();return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"indivisible",children:[l,m.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:c,children:[i&&m.jsxs(m.Fragment,{children:[" / ",wn(i)]}),m.jsx("sup",{className:"ms-1",children:m.jsx(Ie,{icon:ES})})]})]}),m.jsx(jr,{target:c,placement:"bottom",children:m.jsxs("ul",{className:"list-unstyled mb-0",children:[i&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",m.jsx("b",{children:wn(i)})," visit",i===1?"":"s","."]}),o&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",m.jsx("b",{className:"indivisible",children:_v(ji(o))}),"."]}),a&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",m.jsx("b",{className:"indivisible",children:_v(ji(a))}),"."]})]})})]})};const UO=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:a})=>m.jsxs("span",{className:Ee("badge tag",r,{"tag--light-bg":i.isColorLightForKey(e)}),style:{backgroundColor:i.getColorForKey(e),cursor:n||!o?"auto":"pointer"},onClick:o,children:[t??e,n&&m.jsx("span",{"aria-label":`Remove ${e}`,className:"close tag__close-selected-tag",onClick:a,children:"×"})]}),Jfe=({tags:e,onTagClick:t,colorGenerator:n})=>Kn(e)?m.jsx("i",{className:"indivisible",children:m.jsx("small",{children:"No tags"})}):m.jsx(m.Fragment,{children:e.map(r=>m.jsx(UO,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const ede=(e,t,n)=>({shortUrl:r,onTagClick:i})=>{var g,v,y,x;const[o,a]=n(),[s,l]=n(!1,500),c=B.useRef(!0),[{excludeBots:f}]=Fy(),d=bl("visits"),p=f??(d==null?void 0:d.excludeBots);return B.useEffect(()=>{!c.current&&l(),c.current=!1},[(g=r.visitsSummary)==null?void 0:g.total,(v=r.visitsSummary)==null?void 0:v.nonBots,r.visitsCount]),m.jsxs("tr",{className:"responsive-table__row",children:[m.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:m.jsx(xv,{date:r.dateCreated})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:m.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[m.jsx("span",{className:"short-urls-row__short-url-wrapper",children:m.jsx(Ni,{href:r.shortUrl})}),m.jsx(PI,{text:r.shortUrl,onCopy:a}),m.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!o,children:"Copied short URL!"})]})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:m.jsx(Ni,{href:r.longUrl,children:r.title??r.longUrl})}),r.title&&m.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:m.jsx(Ni,{href:r.longUrl})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:m.jsx(Jfe,{tags:r.tags,colorGenerator:t,onTagClick:i})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:m.jsx(TI,{visitsCount:(p?(y=r.visitsSummary)==null?void 0:y.nonBots:(x=r.visitsSummary)==null?void 0:x.total)??r.visitsCount,shortUrl:r,active:s,asLink:!0})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:m.jsx(Qfe,{shortUrl:r})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:m.jsx(e,{shortUrl:r})})]})},tde=(e,t)=>({shortUrl:n})=>{const[r,,i,o]=mn(),[a,,s,l]=mn();return m.jsxs(jy,{minWidth:190,children:[m.jsxs(Ue,{tag:_x,shortUrl:n,suffix:"visits",asLink:!0,children:[m.jsx(Ie,{icon:CS,fixedWidth:!0})," Visit stats"]}),m.jsxs(Ue,{tag:_x,shortUrl:n,suffix:"edit",asLink:!0,children:[m.jsx(Ie,{icon:OS,fixedWidth:!0})," Edit short URL"]}),m.jsxs(Ue,{onClick:i,children:[m.jsx(Ie,{icon:pK,fixedWidth:!0})," QR code"]}),m.jsx(t,{shortUrl:n,isOpen:r,toggle:o}),m.jsx(Ue,{divider:!0}),m.jsxs(Ue,{className:"dropdown-item--danger",onClick:s,children:[m.jsx(Ie,{icon:SS,fixedWidth:!0})," Delete short URL"]}),m.jsx(e,{shortUrl:n,isOpen:a,toggle:l})]})},MI="shlink/shortUrlCreation",Q3={saving:!1,saved:!1,error:!1},nde=e=>Mr(`${MI}/createShortUrl`,t=>e().createShortUrl(t)),rde=e=>{const{reducer:t,actions:n}=sr({name:MI,initialState:Q3,reducers:{resetCreateShortUrl:()=>Q3},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:Jo(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},X3="shlink/shortUrlDetail",J3={loading:!1,error:!1},ide=e=>{const t=Mr(`${X3}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var l;const{shortUrlsList:a}=o();return((l=a==null?void 0:a.shortUrls)==null?void 0:l.data.find(c=>Zf(c,r,i)))??await e().getShortUrl(r,i)}),{reducer:n}=sr({name:X3,initialState:J3,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:Jo(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...J3,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},jI="shlink/shortUrlEdition",ode={saving:!1,saved:!1,error:!1},ade=e=>Mr(`${jI}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),sde=e=>sr({name:jI,initialState:ode,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,saving:!0,error:!1,saved:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:Jo(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var lde={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},cde={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]};const ude=({icon:e,className:t,...n})=>{const r=os(),i=Ee("icon-input-container__input",t);return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Zc,{className:i,innerRef:r,...n}),m.jsx(Ie,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})};function fde(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bx(e,t)}function bx(e,t){return bx=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},bx(e,t)}function dde(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function ej(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hde(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function pde(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&hde(e,t,n))return!0;e=e.parentNode||e.host}return e}function mde(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var gde=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function vde(e){return e===void 0&&(e=0),function(){return++e}}var yde=vde(),wx,em={},H_={},_de=["touchstart","touchmove"],bde="ignore-react-onclickoutside";function tj(e,t){var n={},r=_de.indexOf(t)!==-1;return r&&wx&&(n.passive=!e.props.preventDefault),n}function $y(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){fde(a,o);function a(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(f){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(f);return}var d=c.getInstance();if(typeof d.props.handleClickOutside=="function"){d.props.handleClickOutside(f);return}if(typeof d.handleClickOutside=="function"){d.handleClickOutside(f);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var f=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(f):typeof f.setClickOutsideRef=="function"?f.setClickOutsideRef():fu.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||H_[c._uid])){typeof wx>"u"&&(wx=gde()),H_[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),em[c._uid]=function(d){if(c.componentNode!==null&&(c.props.preventDefault&&d.preventDefault(),c.props.stopPropagation&&d.stopPropagation(),!(c.props.excludeScrollbar&&mde(d)))){var p=d.composed&&d.composedPath&&d.composedPath().shift()||d.target;pde(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(d)}},f.forEach(function(d){document.addEventListener(d,em[c._uid],tj(ej(c),d))})}},c.disableOnClickOutside=function(){delete H_[c._uid];var f=em[c._uid];if(f&&typeof document<"u"){var d=c.props.eventTypes;d.forEach||(d=[d]),d.forEach(function(p){return document.removeEventListener(p,f,tj(ej(c),p))}),delete em[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=yde(),c}var s=a.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var c=this.props;c.excludeScrollbar;var f=dde(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,B.createElement(e,f)},a}(B.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:bde,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}function nj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rj(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Sv(e);if(t){var i=Sv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return te(o)}(this,n)}}function Ox(e){return function(t){if(Array.isArray(t))return W_(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return W_(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W_(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,a=t.includeDates,s=t.includeDateIntervals,l=t.filterDate;return Uy(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return pr(e,c)})||o&&o.some(function(c){var f=c.start,d=c.end;return au(e,{start:f,end:d})})||a&&!a.some(function(c){return pr(e,c)})||s&&!s.some(function(c){var f=c.start,d=c.end;return au(e,{start:f,end:d})})||l&&!l(Ot(e))||!1}function HO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,a=i.end;return au(e,{start:o,end:a})}):n&&n.some(function(i){return pr(e,i)})||!1}function RI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return Uy(e,{minDate:Y6(n),maxDate:W6(r)})||i&&i.some(function(s){return ki(e,s)})||o&&!o.some(function(s){return ki(e,s)})||a&&!a(Ot(e))||!1}function Y_(e,t,n,r){var i=Je(e),o=nr(e),a=Je(t),s=nr(t),l=Je(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function Sde(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate;return Uy(e,{minDate:n,maxDate:r})||i&&i.some(function(s){return Ov(e,s)})||o&&!o.some(function(s){return Ov(e,s)})||a&&!a(Ot(e))||!1}function q_(e,t,n){if(!dv(t)||!dv(n))return!1;var r=Je(t),i=Je(n);return r<=e&&i>=e}function NI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,a=t.filterDate,s=new Date(e,0,1);return Uy(s,{minDate:q6(n),maxDate:Fse(r)})||i&&i.some(function(l){return ka(s,l)})||o&&!o.some(function(l){return ka(s,l)})||a&&!a(Ot(s))||!1}function G_(e,t,n,r){var i=Je(e),o=hc(e),a=Je(t),s=hc(t),l=Je(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function Uy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&qd(e,n)<0||r&&qd(e,r)>0}function uj(e,t){return t.some(function(n){return $r(n)===$r(e)&&Br(n)===Br(e)})}function fj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&uj(e,n)||r&&!uj(e,r)||i&&!i(e)||!1}function dj(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=Ot(),a=Qf(Xf(o,Br(e)),$r(e)),s=Qf(Xf(o,Br(n)),$r(n)),l=Qf(Xf(o,Br(r)),$r(r));try{i=!au(a,{start:s,end:l})}catch{i=!1}return i}function hj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=su(e,1);return n&&Gd(n,i)>0||r&&r.every(function(o){return Gd(o,i)>0})||!1}function pj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=vi(e,1);return n&&Gd(i,n)>0||r&&r.every(function(o){return Gd(i,o)>0})||!1}function mj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Kd(e,1);return n&&hv(n,i)>0||r&&r.every(function(o){return hv(o,i)>0})||!1}function gj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=ru(e,1);return n&&hv(i,n)>0||r&&r.every(function(o){return hv(i,o)>0})||!1}function AI(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return qd(i,t)>=0});return w3(r)}return n?w3(n):t}function II(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return qd(i,t)<=0});return b3(r)}return n?b3(n):t}function vj(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r1&&arguments[1]!==void 0?arguments[1]:Jf,n=Math.ceil(Je(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function Cde(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var a=e+t-o,s=!0;n&&(s=Je(n)<=a),r&&s&&(s=Je(r)>=a),s&&i.push(a)}return i}var Ede=$y(function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;Ln(this,n),Z(te(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return Y.createElement("div",{className:l===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:i.onChange.bind(te(i),p),"aria-selected":l===p?"true":void 0},l===p?Y.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),f=i.props.minDate?Je(i.props.minDate):null,d=i.props.maxDate?Je(i.props.maxDate):null;return d&&i.state.yearsList.find(function(p){return p===d})||c.unshift(Y.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),f&&i.state.yearsList.find(function(p){return p===f})||c.push(Y.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},Y.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),Z(te(i),"onChange",function(l){i.props.onChange(l)}),Z(te(i),"handleClickOutside",function(){i.props.onCancel()}),Z(te(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),Z(te(i),"incrementYears",function(){return i.shiftYears(1)}),Z(te(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,a=r.scrollableYearDropdown,s=o||(a?10:5);return i.state={yearsList:Cde(i.props.year,s,i.props.minDate,i.props.maxDate)},i.dropdownRef=B.createRef(),i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;if(r){var i=r.children?Array.from(r.children):null,o=i?i.find(function(a){return a.ariaSelected}):null;r.scrollTop=o?o.offsetTop+(o.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}}},{key:"render",value:function(){var r=Ee({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return Y.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),kde=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!s.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(l=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(l=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0),r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()&&(l=!1),r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()&&(l=!1)),l&&r.dayEl.current.focus({preventScroll:!0})}),Z(te(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(P3(r.props.day),r.props.day):P3(r.props.day)}),Z(te(r),"render",function(){return Y.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option","aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents())}),r}return Rn(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),Rde=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=6,g=!l&&!r.isWeekInMonth(d);if(p||g){if(!r.props.peekNextMonth)break;f=!0}}return s}),Z(te(r),"onMonthClick",function(s,l){r.handleDayClick(Ba(hr(r.props.day,l)),s)}),Z(te(r),"onMonthMouseEnter",function(s){r.handleDayMouseEnter(Ba(hr(r.props.day,s)))}),Z(te(r),"handleMonthNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[s].current&&r.MONTH_REFS[s].current.focus())}),Z(te(r),"onMonthKeyDown",function(s,l){var c=r.props,f=c.selected,d=c.preSelection,p=c.disabledKeyboardNavigation,g=c.showTwoColumnMonthYearPicker,v=c.showFourColumnMonthYearPicker,y=c.setPreSelection,x=s.key;if(x!=="Tab"&&s.preventDefault(),!p){var b=_j(v,g),w=K_[b].verticalNavigationOffset,S=K_[b].grid;switch(x){case"Enter":r.onMonthClick(s,l),y(f);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,vi(d,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,su(d,1));break;case"ArrowUp":r.handleMonthNavigation(S[0].includes(l)?l+12-w:l-w,su(d,w));break;case"ArrowDown":r.handleMonthNavigation(S[S.length-1].includes(l)?l-12+w:l+w,vi(d,w))}}}),Z(te(r),"onQuarterClick",function(s,l){r.handleDayClick(lj(zl(r.props.day,l)),s)}),Z(te(r),"onQuarterMouseEnter",function(s){r.handleDayMouseEnter(lj(zl(r.props.day,s)))}),Z(te(r),"handleQuarterNavigation",function(s,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.QUARTER_REFS[s-1].current&&r.QUARTER_REFS[s-1].current.focus())}),Z(te(r),"onQuarterKeyDown",function(s,l){var c=s.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onQuarterClick(s,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleQuarterNavigation(l===4?1:l+1,V6(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(l===1?4:l-1,gue(r.props.preSelection,1))}}),Z(te(r),"getMonthClassNames",function(s){var l=r.props,c=l.day,f=l.startDate,d=l.endDate,p=l.selected,g=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,b=l.excludeDates,w=l.includeDates,S=x?x(hr(c,s)):void 0,C=hr(c,s);return Ee("react-datepicker__month-text","react-datepicker__month-".concat(s),S,{"react-datepicker__month-text--disabled":(g||v||b||w)&&RI(C,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(c,s,p),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&nr(y)===s,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(s),"react-datepicker__month-text--in-range":Y_(f,d,s,c),"react-datepicker__month-text--range-start":r.isRangeStartMonth(s),"react-datepicker__month-text--range-end":r.isRangeEndMonth(s),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(s),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(s),"react-datepicker__month-text--today":r.isCurrentMonth(c,s)})}),Z(te(r),"getTabIndex",function(s){var l=nr(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Z(te(r),"getQuarterTabIndex",function(s){var l=hc(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),Z(te(r),"getAriaLabel",function(s){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,d=l.disabledDayAriaLabelPrefix,p=d===void 0?"Not available":d,g=l.day,v=hr(g,s),y=r.isDisabled(v)||r.isExcluded(v)?p:f;return"".concat(y," ").concat(ln(v,"MMMM yyyy"))}),Z(te(r),"getQuarterClassNames",function(s){var l=r.props,c=l.day,f=l.startDate,d=l.endDate,p=l.selected,g=l.minDate,v=l.maxDate,y=l.preSelection;return Ee("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter-text--disabled":(g||v)&&Sde(zl(c,s),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(c,s,p),"react-datepicker__quarter-text--keyboard-selected":hc(y)===s,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(s),"react-datepicker__quarter-text--in-range":G_(f,d,s,c),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(s),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(s)})}),Z(te(r),"getMonthContent",function(s){var l=r.props,c=l.showFullMonthYearPicker,f=l.renderMonthContent,d=l.locale,p=LI(s,d),g=VO(s,d);return f?f(s,p,g):c?g:p}),Z(te(r),"getQuarterContent",function(s){var l=r.props,c=l.renderQuarterContent,f=function(d,p){return ln(zl(Ot(),d),"QQQ",p)}(s,l.locale);return c?c(s,f):f}),Z(te(r),"renderMonths",function(){var s=r.props,l=s.showTwoColumnMonthYearPicker,c=s.showFourColumnMonthYearPicker,f=s.day,d=s.selected;return K_[_j(c,l)].grid.map(function(p,g){return Y.createElement("div",{className:"react-datepicker__month-wrapper",key:g},p.map(function(v,y){return Y.createElement("div",{ref:r.MONTH_REFS[v],key:y,onClick:function(x){r.onMonthClick(x,v)},onKeyDown:function(x){r.onMonthKeyDown(x,v)},onMouseEnter:function(){return r.onMonthMouseEnter(v)},tabIndex:r.getTabIndex(v),className:r.getMonthClassNames(v),role:"option","aria-label":r.getAriaLabel(v),"aria-current":r.isCurrentMonth(f,v)?"date":void 0,"aria-selected":r.isSelectedMonth(f,v,d)},r.getMonthContent(v))}))})}),Z(te(r),"renderQuarters",function(){var s=r.props,l=s.day,c=s.selected;return Y.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(f,d){return Y.createElement("div",{key:d,ref:r.QUARTER_REFS[d],role:"option",onClick:function(p){r.onQuarterClick(p,f)},onKeyDown:function(p){r.onQuarterKeyDown(p,f)},onMouseEnter:function(){return r.onQuarterMouseEnter(f)},className:r.getQuarterClassNames(f),"aria-selected":r.isSelectedQuarter(l,f,c),tabIndex:r.getQuarterTabIndex(f),"aria-current":r.isCurrentQuarter(l,f)?"date":void 0},r.getQuarterContent(f))}))}),Z(te(r),"getClassNames",function(){var s=r.props,l=s.selectingDate,c=s.selectsStart,f=s.selectsEnd,d=s.showMonthYearPicker,p=s.showQuarterYearPicker;return Ee("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":p})}),r}return Rn(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,a=r.day,s=r.ariaLabelPrefix,l=s===void 0?"month ":s;return Y.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(ln(a,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),UI=function(e){Nn(n,Y.Component);var t=An(n);function n(){var r;Ln(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return Bde.some(function(s){return a.indexOf(s)>=0})})(o.target)&&i.props.onDropdownFocus()}),Z(te(i),"getDateInView",function(){var o=i.props,a=o.preSelection,s=o.selected,l=o.openToDate,c=AI(i.props),f=II(i.props),d=Ot(),p=l||s||a;return p||(c&&li(d,c)?c:f&&Za(d,f)?f:d)}),Z(te(i),"increaseMonth",function(){i.setState(function(o){var a=o.date;return{date:vi(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Z(te(i),"decreaseMonth",function(){i.setState(function(o){var a=o.date;return{date:su(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),Z(te(i),"handleDayClick",function(o,a,s){i.props.onSelect(o,a,s),i.props.setPreSelection&&i.props.setPreSelection(o)}),Z(te(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),Z(te(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),Z(te(i),"handleYearMouseEnter",function(o,a){i.setState({selectingDate:Co(Ot(),a)}),i.props.onYearMouseEnter&&i.props.onYearMouseEnter(o,a)}),Z(te(i),"handleYearMouseLeave",function(o,a){i.props.onYearMouseLeave&&i.props.onYearMouseLeave(o,a)}),Z(te(i),"handleYearChange",function(o){i.props.onYearChange&&(i.props.onYearChange(o),i.setState({isRenderAriaLiveMessage:!0})),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Z(te(i),"handleMonthChange",function(o){i.handleCustomMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),Z(te(i),"handleCustomMonthChange",function(o){i.props.onMonthChange&&(i.props.onMonthChange(o),i.setState({isRenderAriaLiveMessage:!0}))}),Z(te(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),Z(te(i),"changeYear",function(o){i.setState(function(a){var s=a.date;return{date:Co(s,o)}},function(){return i.handleYearChange(i.state.date)})}),Z(te(i),"changeMonth",function(o){i.setState(function(a){var s=a.date;return{date:hr(s,o)}},function(){return i.handleMonthChange(i.state.date)})}),Z(te(i),"changeMonthYear",function(o){i.setState(function(a){var s=a.date;return{date:Co(hr(s,nr(o)),Je(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),Z(te(i),"header",function(){var o=zO(arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(Y.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(s){var l=_l(o,s),c=i.formatWeekday(l,i.props.locale),f=i.props.weekDayClassName?i.props.weekDayClassName(l):void 0;return Y.createElement("div",{key:s,className:Ee("react-datepicker__day-name",f)},c)}))}),Z(te(i),"formatWeekday",function(o,a){return i.props.formatWeekDay?function(s,l,c){return l(ln(s,"EEEE",c))}(o,i.props.formatWeekDay,a):i.props.useWeekdaysShort?function(s,l){return ln(s,"EEE",l)}(o,a):function(s,l){return ln(s,"EEEEEE",l)}(o,a)}),Z(te(i),"decreaseYear",function(){i.setState(function(o){var a=o.date;return{date:Kd(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Z(te(i),"clearSelectingDate",function(){i.setState({selectingDate:null})}),Z(te(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=mj(i.state.date,i.props);break;case i.props.showYearPicker:o=function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.minDate,C=w.yearItemNumber,k=C===void 0?Jf:C,P=mc(xf(Kd(b,k)),k).endPeriod,j=S&&Je(S);return j&&j>P||!1}(i.state.date,i.props);break;default:o=hj(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var a=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(s=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--previous--disabled"),s=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,f=c.previousMonthButtonLabel,d=c.previousYearButtonLabel,p=i.props,g=p.previousMonthAriaLabel,v=g===void 0?typeof f=="string"?f:"Previous Month":g,y=p.previousYearAriaLabel,x=y===void 0?typeof d=="string"?d:"Previous Year":y;return Y.createElement("button",{type:"button",className:a.join(" "),onClick:s,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},Y.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),Z(te(i),"increaseYear",function(){i.setState(function(o){var a=o.date;return{date:ru(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),Z(te(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=gj(i.state.date,i.props);break;case i.props.showYearPicker:o=function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.maxDate,C=w.yearItemNumber,k=C===void 0?Jf:C,P=mc(ru(b,k),k).startPeriod,j=S&&Je(S);return j&&j0&&arguments[0]!==void 0?arguments[0]:i.state.date,a=["react-datepicker__current-month"];return i.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),Y.createElement("div",{className:a.join(" ")},ln(o,i.props.dateFormat,i.props.locale))}),Z(te(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return Y.createElement(kde,{adjustDateOnChange:i.props.adjustDateOnChange,date:i.state.date,onSelect:i.props.onSelect,setOpen:i.props.setOpen,dropdownMode:i.props.dropdownMode,onChange:i.changeYear,minDate:i.props.minDate,maxDate:i.props.maxDate,year:Je(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),Z(te(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return Y.createElement(Tde,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:nr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),Z(te(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return Y.createElement(Dde,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,dateFormat:i.props.dateFormat,onChange:i.changeMonthYear,minDate:i.props.minDate,maxDate:i.props.maxDate,date:i.state.date,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown})}),Z(te(i),"handleTodayButtonClick",function(o){i.props.onSelect(cj(),o),i.props.setPreSelection&&i.props.setPreSelection(cj())}),Z(te(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return Y.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.handleTodayButtonClick(o)}},i.props.todayButton)}),Z(te(i),"renderDefaultHeader",function(o){var a=o.monthDate,s=o.i;return Y.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(a),Y.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(s!==0),i.renderMonthYearDropdown(s!==0),i.renderYearDropdown(s!==0)),Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Z(te(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=o.monthDate,s=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=hj(i.state.date,i.props),c=pj(i.state.date,i.props),f=mj(i.state.date,i.props),d=gj(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return Y.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(rj(rj({},i.state),{},{customHeaderCount:s,monthDate:a,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:d})),p&&Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),Z(te(i),"renderYearHeader",function(){var o=i.state.date,a=i.props,s=a.showYearPicker,l=mc(o,a.yearItemNumber),c=l.startPeriod,f=l.endPeriod;return Y.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(c," - ").concat(f):Je(o))}),Z(te(i),"renderHeader",function(o){switch(!0){case i.props.renderCustomHeader!==void 0:return i.renderCustomHeader(o);case(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker):return i.renderYearHeader(o);default:return i.renderDefaultHeader(o)}}),Z(te(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],a=i.props.showPreviousMonths?i.props.monthsShown-1:0,s=su(i.state.date,a),l=0;l0;o.push(Y.createElement("div",{key:d,ref:function(v){i.monthContainer=v},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),Y.createElement(Ade,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:f,dayClassName:i.props.dayClassName,calendarStartDay:i.props.calendarStartDay,monthClassName:i.props.monthClassName,onDayClick:i.handleDayClick,handleOnKeyDown:i.props.handleOnDayKeyDown,onDayMouseEnter:i.handleDayMouseEnter,onMouseLeave:i.handleMonthMouseLeave,onWeekSelect:i.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:i.props.formatWeekNumber,locale:i.props.locale,minDate:i.props.minDate,maxDate:i.props.maxDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,highlightDates:i.props.highlightDates,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:g})))}return o}}),Z(te(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?Y.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),Y.createElement(Ide,Zd({onDayClick:i.handleDayClick,selectingDate:i.state.selectingDate,clearSelectingDate:i.clearSelectingDate,date:i.state.date},i.props,{onYearMouseEnter:i.handleYearMouseEnter,onYearMouseLeave:i.handleYearMouseLeave}))):void 0}),Z(te(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return Y.createElement(UI,{selected:i.props.selected,openToDate:i.props.openToDate,onChange:i.props.onTimeChange,timeClassName:i.props.timeClassName,format:i.props.timeFormat,includeTimes:i.props.includeTimes,intervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,todayButton:i.props.todayButton,showMonthDropdown:i.props.showMonthDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,monthRef:i.state.monthContainer,injectTimes:i.props.injectTimes,locale:i.props.locale,handleOnKeyDown:i.props.handleOnKeyDown,showTimeSelectOnly:i.props.showTimeSelectOnly})}),Z(te(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),a=ha(o)&&i.props.selected?"".concat(yj(o.getHours()),":").concat(yj(o.getMinutes())):"";if(i.props.showTimeInput)return Y.createElement(Fde,{date:o,timeString:a,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),Z(te(i),"renderAriaLiveRegion",function(){var o,a=mc(i.state.date,i.props.yearItemNumber),s=a.startPeriod,l=a.endPeriod;return o=i.props.showYearPicker?"".concat(s," - ").concat(l):i.props.showMonthYearPicker||i.props.showQuarterYearPicker?Je(i.state.date):"".concat(VO(nr(i.state.date),i.props.locale)," ").concat(Je(i.state.date)),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},i.state.isRenderAriaLiveMessage&&o)}),Z(te(i),"renderChildren",function(){if(i.props.children)return Y.createElement("div",{className:"react-datepicker__children-container"},i.props.children)}),i.containerRef=Y.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null,isRenderAriaLiveMessage:!1},i}return Rn(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){var i=this;if(!this.props.preSelection||pr(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!pr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var o=!ki(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&i.handleCustomMonthChange(i.state.date)})}}},{key:"render",value:function(){var r=this.props.container||$de;return Y.createElement("div",{ref:this.containerRef},Y.createElement(r,{className:Ee("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren()))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:Jf}}}]),n}(),zI=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Rn(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return zs.createPortal(this.props.children,this.el)}}]),n}(),zde=function(e){return!e.disabled&&e.tabIndex!==-1},VI=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),Z(te(i=t.call(this,r)),"getTabChildren",function(){return Array.prototype.slice.call(i.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(zde)}),Z(te(i),"handleFocusStart",function(){var o=i.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),Z(te(i),"handleFocusEnd",function(){var o=i.getTabChildren();o&&o.length>1&&o[0].focus()}),i.tabLoopRef=Y.createRef(),i}return Rn(n,[{key:"render",value:function(){return this.props.enableTabLoop?Y.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},Y.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,Y.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),Vde=function(e){Nn(n,Y.Component);var t=An(n);function n(){return Ln(this,n),t.apply(this,arguments)}return Rn(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,a=i.wrapperClassName,s=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,f=i.popperPlacement,d=i.popperProps,p=i.targetComponent,g=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!s){var b=Ee("react-datepicker-popper",o);r=Y.createElement(QS,Zd({modifiers:c,placement:f},d),function(S){var C=S.ref,k=S.style,P=S.placement,j=S.arrowProps;return Y.createElement(VI,{enableTabLoop:g},Y.createElement("div",{ref:C,style:k,className:b,"data-placement":P,onKeyDown:v},Y.cloneElement(l,{arrowProps:j})))})}this.props.popperContainer&&(r=Y.createElement(this.props.popperContainer,{},r)),y&&!s&&(r=Y.createElement(zI,{portalId:y,portalHost:x},r));var w=Ee("react-datepicker-wrapper",a);return Y.createElement(K1,{className:"react-datepicker-manager"},Y.createElement(M4,null,function(S){var C=S.ref;return Y.createElement("div",{ref:C,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),bj="react-datepicker-ignore-onclickoutside",Hde=$y(Ude),Z_="Date input not valid.",Wde=function(e){Nn(n,Y.Component);var t=An(n);function n(r){var i;return Ln(this,n),Z(te(i=t.call(this,r)),"getPreSelection",function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:Ot()}),Z(te(i),"calcInitialState",function(){var o,a=i.getPreSelection(),s=AI(i.props),l=II(i.props),c=s&&li(a,Vr(s))?s:l&&Za(a,al(l))?l:a;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(o=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&o!==void 0?o:c,highlightDates:vj(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),Z(te(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),Z(te(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),Z(te(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),Z(te(i),"setOpen",function(o){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i.setState({open:o,preSelection:o&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:Q_},function(){o||i.setState(function(s){return{focused:!!a&&s.focused}},function(){!a&&i.setBlur(),i.setState({inputValue:null})})})}),Z(te(i),"inputOk",function(){return CO(i.state.preSelection)}),Z(te(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),Z(te(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),Z(te(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),Z(te(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),Z(te(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),Z(te(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),Z(te(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),Z(te(i),"handleChange",function(){for(var o=arguments.length,a=new Array(o),s=0;s0&&(v=I_(c,f.slice(0,c.length),new Date)),ha(v)||(v=new Date(c))),ha(v)&&x?v:null));i.props.showTimeSelectOnly&&i.props.selected&&!pr(b,i.props.selected)&&(b=pue(i.props.selected,b==null?{hours:$r(i.props.selected),minutes:Br(i.props.selected),seconds:A_(i.props.selected)}:{hours:$r(b),minutes:Br(b),seconds:A_(b)})),!b&&l.target.value||i.setSelected(b,l,!0)}}),Z(te(i),"handleSelect",function(o,a,s){if(i.setState({preventFocus:!0},function(){return i.preventFocusTimeout=setTimeout(function(){return i.setState({preventFocus:!1})},50),i.preventFocusTimeout}),i.props.onChangeRaw&&i.props.onChangeRaw(a),i.setSelected(o,a,!1,s),i.props.showDateSelect&&i.setState({isRenderAriaLiveMessage:!0}),!i.props.shouldCloseOnSelect||i.props.showTimeSelect)i.setPreSelection(o);else if(!i.props.inline){i.props.selectsRange||i.setOpen(!1);var l=i.props,c=l.startDate,f=l.endDate;!c||f||li(o,c)||i.setOpen(!1)}}),Z(te(i),"setSelected",function(o,a,s,l){var c=o;if(i.props.showYearPicker){if(c!==null&&NI(Je(c),i.props))return}else if(i.props.showMonthYearPicker){if(c!==null&&RI(c,i.props))return}else if(c!==null&&By(c,i.props))return;var f=i.props,d=f.onChange,p=f.selectsRange,g=f.startDate,v=f.endDate;if(!Pa(i.props.selected,c)||i.props.allowSameDay||p)if(c!==null&&(!i.props.selected||s&&(i.props.showTimeSelect||i.props.showTimeSelectOnly||i.props.showTimeInput)||(c=sj(c,{hour:$r(i.props.selected),minute:Br(i.props.selected),second:A_(i.props.selected)})),i.props.inline||i.setState({preSelection:c}),i.props.focusSelectedMonth||i.setState({monthSelectedIn:l})),p){var y=g&&!v,x=g&&v;!g&&!v?d([c,null],a):y&&(li(c,g)?d([c,null],a):d([g,c],a)),x&&d([c,null],a)}else d(c,a);s||(i.props.onSelect(c,a),i.setState({inputValue:null}))}),Z(te(i),"setPreSelection",function(o){var a=i.props.minDate!==void 0,s=i.props.maxDate!==void 0,l=!0;if(o){var c=Vr(o);if(a&&s)l=Um(o,i.props.minDate,i.props.maxDate);else if(a){var f=Vr(i.props.minDate);l=Za(o,f)||Pa(c,f)}else if(s){var d=al(i.props.maxDate);l=li(o,d)||Pa(c,d)}}l&&i.setState({preSelection:o})}),Z(te(i),"handleTimeChange",function(o){var a=sj(i.props.selected?i.props.selected:i.getPreSelection(),{hour:$r(o),minute:Br(o)});i.setState({preSelection:a}),i.props.onChange(a),i.props.shouldCloseOnSelect&&i.setOpen(!1),i.props.showTimeInput&&i.setOpen(!0),(i.props.showTimeSelectOnly||i.props.showTimeSelect)&&i.setState({isRenderAriaLiveMessage:!0}),i.setState({inputValue:null})}),Z(te(i),"onInputClick",function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()}),Z(te(i),"onInputKeyDown",function(o){i.props.onKeyDown(o);var a=o.key;if(i.state.open||i.props.inline||i.props.preventOpenOnFocus){if(i.state.open){if(a==="ArrowDown"||a==="ArrowUp"){o.preventDefault();var s=i.calendar.componentNode&&i.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(s&&s.focus({preventScroll:!0}))}var l=Ot(i.state.preSelection);a==="Enter"?(o.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===Q_?(i.handleSelect(l,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(l)):i.setOpen(!1)):a==="Escape"?(o.preventDefault(),i.setOpen(!1)):a==="Tab"&&o.shiftKey&&i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:Z_})}}else a!=="ArrowDown"&&a!=="ArrowUp"&&a!=="Enter"||i.onInputClick()}),Z(te(i),"onPortalKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Z(te(i),"onDayKeyDown",function(o){i.props.onKeyDown(o);var a=o.key,s=Ot(i.state.preSelection);if(a==="Enter")o.preventDefault(),i.handleSelect(s,o),!i.props.shouldCloseOnSelect&&i.setPreSelection(s);else if(a==="Escape")o.preventDefault(),i.setOpen(!1),i.inputOk()||i.props.onInputError({code:1,msg:Z_});else if(!i.props.disabledKeyboardNavigation){var l;switch(a){case"ArrowLeft":l=LO(s,1);break;case"ArrowRight":l=_l(s,1);break;case"ArrowUp":l=vue(s,1);break;case"ArrowDown":l=SO(s,1);break;case"PageUp":l=su(s,1);break;case"PageDown":l=vi(s,1);break;case"Home":l=Kd(s,1);break;case"End":l=ru(s,1)}if(!l)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:Z_}));if(o.preventDefault(),i.setState({lastPreSelectChange:Q_}),i.props.adjustDateOnChange&&i.setSelected(l),i.setPreSelection(l),i.props.inline){var c=nr(s),f=nr(l),d=Je(s),p=Je(l);c!==f||d!==p?i.setState({shouldFocusDayInline:!0}):i.setState({shouldFocusDayInline:!1})}}}),Z(te(i),"onPopperKeyDown",function(o){o.key==="Escape"&&(o.preventDefault(),i.setState({preventFocus:!0},function(){i.setOpen(!1),setTimeout(function(){i.setFocus(),i.setState({preventFocus:!1})})}))}),Z(te(i),"onClearClick",function(o){o&&o.preventDefault&&o.preventDefault(),i.props.selectsRange?i.props.onChange([null,null],o):i.props.onChange(null,o),i.setState({inputValue:null})}),Z(te(i),"clear",function(){i.onClearClick()}),Z(te(i),"onScroll",function(o){typeof i.props.closeOnScroll=="boolean"&&i.props.closeOnScroll?o.target!==document&&o.target!==document.documentElement&&o.target!==document.body||i.setOpen(!1):typeof i.props.closeOnScroll=="function"&&i.props.closeOnScroll(o)&&i.setOpen(!1)}),Z(te(i),"renderCalendar",function(){return i.props.inline||i.isCalendarOpen()?Y.createElement(Hde,{ref:function(o){i.calendar=o},locale:i.props.locale,calendarStartDay:i.props.calendarStartDay,chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,monthAriaLabelPrefix:i.props.monthAriaLabelPrefix,adjustDateOnChange:i.props.adjustDateOnChange,setOpen:i.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,dateFormat:i.props.dateFormatCalendar,useWeekdaysShort:i.props.useWeekdaysShort,formatWeekDay:i.props.formatWeekDay,dropdownMode:i.props.dropdownMode,selected:i.props.selected,preSelection:i.state.preSelection,onSelect:i.handleSelect,onWeekSelect:i.props.onWeekSelect,openToDate:i.props.openToDate,minDate:i.props.minDate,maxDate:i.props.maxDate,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,startDate:i.props.startDate,endDate:i.props.endDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,filterDate:i.props.filterDate,onClickOutside:i.handleCalendarClickOutside,formatWeekNumber:i.props.formatWeekNumber,highlightDates:i.state.highlightDates,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,includeTimes:i.props.includeTimes,injectTimes:i.props.injectTimes,inline:i.props.inline,shouldFocusDayInline:i.state.shouldFocusDayInline,peekNextMonth:i.props.peekNextMonth,showMonthDropdown:i.props.showMonthDropdown,showPreviousMonths:i.props.showPreviousMonths,useShortMonthInDropdown:i.props.useShortMonthInDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showWeekNumbers:i.props.showWeekNumbers,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,forceShowMonthNavigation:i.props.forceShowMonthNavigation,showDisabledMonthNavigation:i.props.showDisabledMonthNavigation,scrollableYearDropdown:i.props.scrollableYearDropdown,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown,todayButton:i.props.todayButton,weekLabel:i.props.weekLabel,outsideClickIgnoreClass:bj,fixedHeight:i.props.fixedHeight,monthsShown:i.props.monthsShown,monthSelectedIn:i.state.monthSelectedIn,onDropdownFocus:i.handleDropdownFocus,onMonthChange:i.props.onMonthChange,onYearChange:i.props.onYearChange,dayClassName:i.props.dayClassName,weekDayClassName:i.props.weekDayClassName,monthClassName:i.props.monthClassName,timeClassName:i.props.timeClassName,showDateSelect:i.props.showDateSelect,showTimeSelect:i.props.showTimeSelect,showTimeSelectOnly:i.props.showTimeSelectOnly,onTimeChange:i.handleTimeChange,timeFormat:i.props.timeFormat,timeIntervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,className:i.props.calendarClassName,container:i.props.calendarContainer,yearItemNumber:i.props.yearItemNumber,yearDropdownItemNumber:i.props.yearDropdownItemNumber,previousMonthAriaLabel:i.props.previousMonthAriaLabel,previousMonthButtonLabel:i.props.previousMonthButtonLabel,nextMonthAriaLabel:i.props.nextMonthAriaLabel,nextMonthButtonLabel:i.props.nextMonthButtonLabel,previousYearAriaLabel:i.props.previousYearAriaLabel,previousYearButtonLabel:i.props.previousYearButtonLabel,nextYearAriaLabel:i.props.nextYearAriaLabel,nextYearButtonLabel:i.props.nextYearButtonLabel,timeInputLabel:i.props.timeInputLabel,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,renderCustomHeader:i.props.renderCustomHeader,popperProps:i.props.popperProps,renderDayContents:i.props.renderDayContents,renderMonthContent:i.props.renderMonthContent,renderQuarterContent:i.props.renderQuarterContent,renderYearContent:i.props.renderYearContent,onDayMouseEnter:i.props.onDayMouseEnter,onMonthMouseLeave:i.props.onMonthMouseLeave,onYearMouseEnter:i.props.onYearMouseEnter,onYearMouseLeave:i.props.onYearMouseLeave,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showTimeInput:i.props.showTimeInput,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,showPopperArrow:i.props.showPopperArrow,excludeScrollbar:i.props.excludeScrollbar,handleOnKeyDown:i.props.onKeyDown,handleOnDayKeyDown:i.onDayKeyDown,isInputFocused:i.state.focused,customTimeInput:i.props.customTimeInput,setPreSelection:i.setPreSelection},i.props.children):null}),Z(te(i),"renderAriaLiveRegion",function(){var o,a=i.props,s=a.dateFormat,l=a.locale,c=i.props.showTimeInput||i.props.showTimeSelect?"PPPPp":"PPPP";return o=i.props.selectsRange?"Selected start date: ".concat(Yi(i.props.startDate,{dateFormat:c,locale:l}),". ").concat(i.props.endDate?"End date: "+Yi(i.props.endDate,{dateFormat:c,locale:l}):""):i.props.showTimeSelectOnly?"Selected time: ".concat(Yi(i.props.selected,{dateFormat:s,locale:l})):i.props.showYearPicker?"Selected year: ".concat(Yi(i.props.selected,{dateFormat:"yyyy",locale:l})):i.props.showMonthYearPicker?"Selected month: ".concat(Yi(i.props.selected,{dateFormat:"MMMM yyyy",locale:l})):i.props.showQuarterYearPicker?"Selected quarter: ".concat(Yi(i.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):"Selected date: ".concat(Yi(i.props.selected,{dateFormat:c,locale:l})),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)}),Z(te(i),"renderDateInput",function(){var o,a=Ee(i.props.className,Z({},bj,i.state.open)),s=i.props.customInput||Y.createElement("input",{type:"text"}),l=i.props.customInputRef||"ref",c=typeof i.props.value=="string"?i.props.value:typeof i.state.inputValue=="string"?i.state.inputValue:i.props.selectsRange?function(f,d,p){if(!f)return"";var g=Yi(f,p),v=d?Yi(d,p):"";return"".concat(g," - ").concat(v)}(i.props.startDate,i.props.endDate,i.props):Yi(i.props.selected,i.props);return Y.cloneElement(s,(Z(o={},l,function(f){i.input=f}),Z(o,"value",c),Z(o,"onBlur",i.handleBlur),Z(o,"onChange",i.handleChange),Z(o,"onClick",i.onInputClick),Z(o,"onFocus",i.handleFocus),Z(o,"onKeyDown",i.onInputKeyDown),Z(o,"id",i.props.id),Z(o,"name",i.props.name),Z(o,"form",i.props.form),Z(o,"autoFocus",i.props.autoFocus),Z(o,"placeholder",i.props.placeholderText),Z(o,"disabled",i.props.disabled),Z(o,"autoComplete",i.props.autoComplete),Z(o,"className",Ee(s.props.className,a)),Z(o,"title",i.props.title),Z(o,"readOnly",i.props.readOnly),Z(o,"required",i.props.required),Z(o,"tabIndex",i.props.tabIndex),Z(o,"aria-describedby",i.props.ariaDescribedBy),Z(o,"aria-invalid",i.props.ariaInvalid),Z(o,"aria-labelledby",i.props.ariaLabelledBy),Z(o,"aria-required",i.props.ariaRequired),o))}),Z(te(i),"renderClearButton",function(){var o=i.props,a=o.isClearable,s=o.selected,l=o.startDate,c=o.endDate,f=o.clearButtonTitle,d=o.clearButtonClassName,p=d===void 0?"":d,g=o.ariaLabelClose,v=g===void 0?"Close":g;return!a||s==null&&l==null&&c==null?null:Y.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(p).trim(),"aria-label":v,onClick:i.onClearClick,title:f,tabIndex:-1})}),i.state=i.calcInitialState(),i}return Rn(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(r,i){var o,a;r.inline&&(o=r.selected,a=this.props.selected,o&&a?nr(o)!==nr(a)||Je(o)!==Je(a):o!==a)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:vj(this.props.highlightDates)}),i.focused||Pa(r.selected,this.props.selected)||this.setState({inputValue:null}),i.open!==this.state.open&&(i.open===!1&&this.state.open===!0&&this.props.onCalendarOpen(),i.open===!0&&this.state.open===!1&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"renderInputContainer",value:function(){var r=this.props.showIcon;return Y.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&Y.createElement("svg",{className:"react-datepicker__calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},Y.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"})),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}},{key:"render",value:function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var i=this.state.open?Y.createElement(VI,{enableTabLoop:this.props.enableTabLoop},Y.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(i=Y.createElement(zI,{portalId:this.props.portalId,portalHost:this.props.portalHost},i)),Y.createElement("div",null,this.renderInputContainer(),i)}return Y.createElement(Vde,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,portalHost:this.props.portalHost,popperModifiers:this.props.popperModifiers,targetComponent:this.renderInputContainer(),popperContainer:this.props.popperContainer,popperComponent:r,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Jf,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),Yde="input",Q_="navigate";const Cx=e=>{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||qo(r),a=B.useRef();return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Wde,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??sI,className:Ee("icon-input-container__input form-control",t),ref:a}),o&&m.jsx(Ie,{icon:Jue,className:"icon-input-container__icon",onClick:()=>{var s;return(s=a.current)==null?void 0:s.input.focus()}})]})},qde=e=>m.jsx(Cx,{...e,dateFormat:RO,showTimeSelect:!0,timeIntervals:10}),X_=({children:e,infoTooltip:t,checked:n,onChange:r})=>m.jsxs("p",{children:[m.jsx(e6,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&m.jsx(Bm,{placement:"right",children:t})]});const Gde=({isOpen:e,toggle:t})=>m.jsxs(Zo,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[m.jsx(Qo,{toggle:t,children:"Info"}),m.jsxs(fo,{children:[m.jsxs("p",{children:["When the ",m.jsx("b",{children:m.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),m.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),m.jsxs("ul",{children:[m.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),m.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",m.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),m.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),Kde=()=>{const[e,t]=mn();return m.jsxs(m.Fragment,{children:[m.jsx("span",{title:"What does this mean?",children:m.jsx(Ie,{icon:ES,style:{cursor:"pointer"},onClick:t})}),m.jsx(Gde,{isOpen:e,toggle:t})]})};const J_=e=>typeof e=="string"?Vo(e):e,Zde=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,Qde=(e,t)=>function({mode:r,saving:i,onSave:o,initialState:a}){const[s,l]=B.useState(a),c=()=>l(a),f=Ch("deviceLongUrls"),d=r==="edit",p=Zde(s),g=r==="create-basic",v=k=>l({...s,tags:k}),y=(k,P)=>eo(k)?k:eo(P)?null:void 0,x=Ay(async()=>o({...s,validSince:Xa(s.validSince)??null,validUntil:Xa(s.validUntil)??null,maxVisits:eo(s.maxVisits)?Number(s.maxVisits):null}).then(()=>!d&&c()).catch(()=>{}));B.useEffect(()=>{l(a)},[a]);const b=(k,P,j="text",N={},H={})=>m.jsx(Fr,{...H,children:m.jsx(Zc,{id:k,type:j,placeholder:P,value:s[k]??"",onChange:N.onChange??(R=>l({...s,[k]:R.target.value})),...N})}),w=(k,P,j)=>{var N;return m.jsx(ude,{icon:j,id:k,type:"url",placeholder:P,value:((N=s.deviceLongUrls)==null?void 0:N[k])??"",onChange:H=>{var R;return l({...s,deviceLongUrls:{...s.deviceLongUrls??{},[k]:y(H.target.value,(R=a.deviceLongUrls)==null?void 0:R[k])}})}})},S=(k,P,j={})=>m.jsx(qde,{selected:s[k]?J_(s[k]):null,placeholderText:P,isClearable:!0,onChange:N=>l({...s,[k]:N}),...j}),C=m.jsxs(m.Fragment,{children:[m.jsx(Fr,{children:m.jsx(Zc,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:s.longUrl,onChange:k=>l({...s,longUrl:k.target.value})})}),m.jsxs(mr,{children:[g&&b("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),m.jsx("div",{className:g?"col-lg-6 mb-3":"col-12",children:m.jsx(e,{selectedTags:s.tags??[],onChange:v})})]})]});return m.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:x,children:[g&&C,!g&&m.jsxs(m.Fragment,{children:[m.jsxs(mr,{children:[m.jsx("div",{className:Ee("mb-3",{"col-sm-6":f,"col-12":!f}),children:m.jsx(hn,{title:"Main options",className:"mb-3",children:C})}),f&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Device-specific long URLs",children:[m.jsx(Fr,{children:w("android","Android-specific redirection",cde)}),m.jsx(Fr,{children:w("ios","iOS-specific redirection",lde)}),w("desktop","Desktop-specific redirection",vK)]})})]}),m.jsxs(mr,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Customize the short URL",children:[b("title","Title","text",{onChange:({target:k})=>l({...s,title:y(k.value,a.title)})}),!d&&p&&m.jsxs(m.Fragment,{children:[m.jsxs(mr,{children:[m.jsx("div",{className:"col-lg-6",children:b("customSlug","Custom slug","text",{disabled:eo(s.shortCodeLength)})}),m.jsx("div",{className:"col-lg-6",children:b("shortCodeLength","Short code length","number",{min:4,disabled:eo(s.customSlug)})})]}),m.jsx(t,{value:s.domain,onChange:k=>l({...s,domain:k})})]})]})}),m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Limit access to the short URL",children:[b("maxVisits","Maximum number of visits allowed","number",{min:1}),m.jsx("div",{className:"mb-3",children:S("validSince","Enabled since...",{maxDate:s.validUntil?J_(s.validUntil):void 0})}),S("validUntil","Enabled until...",{minDate:s.validSince?J_(s.validSince):void 0})]})})]}),m.jsxs(mr,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Extra checks",children:[m.jsx(X_,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:s.validateUrl,onChange:k=>l({...s,validateUrl:k}),children:"Validate URL"}),!d&&p&&m.jsxs("p",{children:[m.jsx(e6,{inline:!0,className:"me-2",checked:s.findIfExists,onChange:k=>l({...s,findIfExists:k}),children:"Use existing URL if found"}),m.jsx(Kde,{})]})]})}),m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Configure behavior",children:[m.jsx(X_,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:s.crawlable,onChange:k=>l({...s,crawlable:k}),children:"Make it crawlable"}),m.jsx(X_,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:s.forwardQuery,onChange:k=>l({...s,forwardQuery:k}),children:"Forward query params on redirect"})]})})]})]}),m.jsx("div",{className:"text-center",children:m.jsx(yt,{outline:!0,color:"primary",disabled:i||Kn(s.longUrl),className:"btn-xs-block",children:i?"Saving...":"Save"})})]})},Xde=({active:e,allText:t,onChange:n})=>m.jsxs(m.Fragment,{children:[m.jsx(Ue,{active:e==="all",onClick:()=>n("all"),children:t}),m.jsx(Ue,{divider:!0}),yue.map(r=>m.jsx(Ue,{active:e===r,onClick:()=>n(r),children:dI(r)},r))]}),Jde=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(Cx,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),m.jsx("div",{className:"col-md-6",children:m.jsx(Cx,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&al(o))})})]}),HI=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=bv(t),[a,s]=B.useState(o?t:void 0),[l,c]=B.useState(o?void 0:t),f=p=>{s(uI(p)?kh:void 0),c(p),e(p)},d=p=>{s(p),c(void 0),e(hI(p))};return i&&Sfe(()=>{const p=bv(t);p&&d(t),t&&!p&&f(t)},[t]),m.jsxs(Xo,{disabled:r,text:dI(a??l)??n,children:[m.jsx(Xde,{allText:n,active:a,onChange:d}),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{header:!0,children:"Custom:"}),m.jsx(Ue,{text:!0,children:m.jsx(Jde,{...l,onStartDateChange:p=>f({...l,startDate:p}),onEndDateChange:p=>f({...l,endDate:p})})})]})},ehe={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},the=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return m.jsxs(Xo,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[m.jsx(Ue,{header:!0,children:"Visits:"}),m.jsx(Ue,{active:i,onClick:s("excludeBots"),children:"Ignore visits from bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ue,{divider:!0}),m.jsx(Ue,{header:!0,children:"Short URLs:"}),m.jsx(Ue,{active:o,onClick:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),m.jsx(Ue,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{disabled:!eo(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:m.jsx("i",{children:"Clear filters"})})]})};const nhe=(e,t)=>({className:n,shortUrlsAmount:r,order:i,handleOrderBy:o})=>{const[a,s]=Fy(),{search:l,tags:c,startDate:f,endDate:d,excludeBots:p,excludeMaxVisitsReached:g,excludePastValidUntil:v,tagsMode:y="any"}=a,x=Ch("filterDisabledUrls"),b=bl("visits"),w=Ft(({startDate:P,endDate:j})=>({startDate:Xa(P)??void 0,endDate:Xa(j)??void 0}),s),S=Ft(P=>Kn(P)?void 0:P,P=>s({search:P})),C=P=>s({tags:P}),k=Ft(()=>y==="any"?"all":"any",P=>s({tagsMode:P}));return m.jsxs("div",{className:Ee("short-urls-filtering-bar-container",n),children:[m.jsx(wh,{initialValue:l,onChange:S}),m.jsxs(Ty,{className:"mt-3",children:[m.jsx(t,{allowNew:!1,placeholder:"With tags...",selectedTags:c,onChange:C}),c.length>1&&m.jsxs(m.Fragment,{children:[m.jsx(yt,{outline:!0,color:"secondary",onClick:k,id:"tagsModeBtn","aria-label":"Change tags mode",children:m.jsx(Ie,{className:"short-urls-filtering-bar__tags-icon",icon:y==="all"?xA:WG})}),m.jsx(jr,{target:"tagsModeBtn",placement:"left",children:y==="all"?"With all the tags.":"With any of the tags."})]})]}),m.jsxs(mr,{className:"flex-lg-row-reverse",children:[m.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-fill",children:m.jsx(HI,{defaultText:"All short URLs",initialDateRange:fI(f,d),onDatesChange:w})}),m.jsx(the,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:p??(b==null?void 0:b.excludeBots),excludeMaxVisitsReached:g,excludePastValidUntil:v},onChange:s,supportsDisabledFiltering:x})]})}),m.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:m.jsx(e,{amount:r})}),m.jsx("div",{className:"col-6 d-lg-none mt-3",children:m.jsx(xh,{prefixed:!1,items:ehe,order:i,onChange:o})})]})]})};function ed({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:m.jsx(Ie,{icon:e.dir==="ASC"?FG:KG,className:n})}const Hl=2,Ex="...",WI=(e,t)=>{const n=xS(rA(Hl,e-Hl),mA(t-1,e+Hl)+1);return e-Hl>Hl&&n.unshift(Ex),e+Hle===Ex,YI=e=>Qd(e)?e:wn(e),qI=(e,t)=>Qd(e)?`${e}_${t}`:`${e}`,rhe=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=yl(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return m.jsx("div",{className:"pb-3"});const a=()=>WI(n,r).map((s,l)=>m.jsx(Hs,{disabled:Qd(s),active:n===s,children:m.jsx(Ws,{tag:It,to:o(s),children:YI(s)})},qI(s,l)));return m.jsxs(iO,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[m.jsx(Hs,{disabled:n===1,children:m.jsx(Ws,{previous:!0,tag:It,to:o(n-1)})}),a(),m.jsx(Hs,{disabled:n>=r,children:m.jsx(Ws,{next:!0,tag:It,to:o(n+1)})})]})},ihe={field:"dateCreated",dir:"DESC"},ohe=(e,t)=>ss(({listShortUrls:n,shortUrlsList:r})=>{var W,ee,q;const{page:i}=pl(),o=gn(),[a,s]=Fy(),l=$O(),{tags:c,search:f,startDate:d,endDate:p,orderBy:g,tagsMode:v,excludeBots:y,excludePastValidUntil:x,excludeMaxVisitsReached:b}=a,[w,S]=B.useState(g??((W=l.shortUrlsList)==null?void 0:W.defaultOrdering)??ihe),{pagination:C}=(r==null?void 0:r.shortUrls)??{},k=y??((ee=l.visits)==null?void 0:ee.excludeBots),P=Ch("excludeBotsOnShortUrls"),j=(Q,oe)=>{s({orderBy:{field:Q,dir:oe}}),S({field:Q,dir:oe})},N=Q=>()=>j(Q,Dy(Q,w.field,w.dir)),H=Q=>m.jsx(ed,{currentOrder:w,field:Q}),R=Ft(Q=>[...new Set([...c,Q])],Q=>s({tags:Q})),V=({field:Q,dir:oe})=>P&&k&&Q==="visits"?{field:"nonBotVisits",dir:oe}:{field:Q,dir:oe};return B.useEffect(()=>{n({page:i,searchTerm:f,tags:c,startDate:d,endDate:p,orderBy:V(w),tagsMode:v,excludePastValidUntil:x,excludeMaxVisitsReached:b})},[i,f,c,d,p,w.field,w.dir,v,x,b]),m.jsxs(m.Fragment,{children:[m.jsx(t,{shortUrlsAmount:(q=r.shortUrls)==null?void 0:q.pagination.totalItems,order:w,handleOrderBy:j,className:"mb-3"}),m.jsxs(Yr,{body:!0,className:"pb-0",children:[m.jsx(e,{shortUrlsList:r,orderByColumn:N,renderOrderIcon:H,onTagClick:R}),m.jsx(rhe,{paginator:C,currentQueryString:o.search})]})]})},()=>[di.visits]);const ahe=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,className:o})=>{const{error:a,loading:s,shortUrls:l}=r,c=Ee({"short-urls-table__header-cell--with-action":!!t}),f=Ee("short-urls-table__header-cell",c),d=Ee("table table-hover responsive-table short-urls-table",o),p=()=>a?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):s?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&Kn(l==null?void 0:l.data)?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(g=>m.jsx(e,{shortUrl:g,onTagClick:i},g.shortUrl));return m.jsxs("table",{className:d,children:[m.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:m.jsxs("tr",{children:[m.jsxs("th",{className:f,onClick:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),m.jsxs("th",{className:f,onClick:t==null?void 0:t("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),m.jsxs("th",{className:"short-urls-table__header-cell",children:[m.jsxs("span",{className:c,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",m.jsxs("span",{className:c,onClick:t==null?void 0:t("longUrl"),children:[m.jsx("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),m.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),m.jsx("th",{className:f,onClick:t==null?void 0:t("visits"),children:m.jsxs("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),m.jsx("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),m.jsx("tbody",{children:p()})]})},she=(e,t)=>{e.serviceFactory("ShortUrlsList",ohe,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",ahe,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",ede,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.serviceFactory("ShortUrlsRowMenu",tde,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Vfe,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",Qde,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",sfe,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",Ofe,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>Hfe),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",Kfe,"ImageDownloader"),e.serviceFactory("ShortUrlsFilteringBar",nhe,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",Wfe,"apiClientFactory","ReportExporter"),e.serviceFactory("shortUrlsListReducerCreator",Yue,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",ct("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",rde,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",ct("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",sde,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",ct("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Vue,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",ct("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",ide,"apiClientFactory"),e.serviceFactory("shortUrlDetailReducer",ct("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Wue,"apiClientFactory"),e.serviceFactory("createShortUrl",nde,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",ct("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",zue,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",ct("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>vI),e.serviceFactory("getShortUrlDetail",ct("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",ade,"apiClientFactory")},lhe=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:c}=i,f=async()=>{await r(e),t()};return m.jsxs(Zo,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[m.jsx(Qo,{toggle:t,className:"text-danger",children:"Delete tag"}),m.jsxs(fo,{children:["Are you sure you want to delete tag ",m.jsx("b",{children:e}),"?",s&&m.jsx(zr,{type:"error",small:!0,className:"mt-2",children:m.jsx(zo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),m.jsxs(gl,{children:[m.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),m.jsx(yt,{color:"danger",disabled:a,onClick:f,children:a?"Deleting tag...":"Delete tag"})]})]})};function zy(){return(zy=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function kx(e){var t=B.useRef(e),n=B.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Xd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:x.buttons>0)&&i.current?o(wj(i.current,x,s.current)):y(!1)},v=function(){return y(!1)};function y(x){var b=l.current,w=Px(i.current),S=x?w.addEventListener:w.removeEventListener;S(b?"touchmove":"mousemove",g),S(b?"touchend":"mouseup",v)}return[function(x){var b=x.nativeEvent,w=i.current;if(w&&(xj(b),!function(C,k){return k&&!td(C)}(b,l.current)&&w)){if(td(b)){l.current=!0;var S=b.changedTouches||[];S.length&&(s.current=S[0].identifier)}w.focus(),o(wj(w,b,s.current)),y(!0)}},function(x){var b=x.which||x.keyCode;b<37||b>40||(x.preventDefault(),a({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},y]},[a,o]),f=c[0],d=c[1],p=c[2];return B.useEffect(function(){return p},[p]),Y.createElement("div",zy({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:d,tabIndex:0,role:"slider"}))}),WO=function(e){return e.filter(Boolean).join(" ")},ZI=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=WO(["react-colorful__pointer",e.className]);return Y.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},Y.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Yn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},che=function(e){return phe(Tx(e))},Tx=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Yn(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Yn(parseInt(e.substring(6,8),16)/255,2):1}},uhe=function(e){return hhe(dhe(e))},fhe=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Yn(e.h),s:Yn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Yn(i/2),a:Yn(r,2)}},Mx=function(e){var t=fhe(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},dhe=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Yn(255*[r,s,a,a,l,r][c]),g:Yn(255*[l,r,r,s,a,a][c]),b:Yn(255*[a,a,l,r,r,s][c]),a:Yn(i,2)}},nm=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},hhe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?nm(Yn(255*i)):"";return"#"+nm(t)+nm(n)+nm(r)+o},phe=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:Yn(60*(s<0?s+6:s)),s:Yn(o?a/o*100:0),v:Yn(o/255*100),a:i}},mhe=Y.memo(function(e){var t=e.hue,n=e.onChange,r=WO(["react-colorful__hue",e.className]);return Y.createElement("div",{className:r},Y.createElement(KI,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Xd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Yn(t),"aria-valuemax":"360","aria-valuemin":"0"},Y.createElement(ZI,{className:"react-colorful__hue-pointer",left:t/360,color:Mx({h:t,s:100,v:100,a:1})})))}),ghe=Y.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Mx({h:t.h,s:100,v:100,a:1})};return Y.createElement("div",{className:"react-colorful__saturation",style:r},Y.createElement(KI,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Xd(t.s+100*i.left,0,100),v:Xd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Yn(t.s)+"%, Brightness "+Yn(t.v)+"%"},Y.createElement(ZI,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Mx(t)})))}),QI=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},vhe=function(e,t){return e.toLowerCase()===t.toLowerCase()||QI(Tx(e),Tx(t))};function yhe(e,t,n){var r=kx(n),i=B.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=B.useRef({color:t,hsva:o});B.useEffect(function(){if(!e.equal(t,s.current.color)){var c=e.toHsva(t);s.current={hsva:c,color:t},a(c)}},[t,e]),B.useEffect(function(){var c;QI(o,s.current.hsva)||e.equal(c=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:c},r(c))},[o,e,r]);var l=B.useCallback(function(c){a(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var _he=typeof window<"u"?B.useLayoutEffect:B.useEffect,bhe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Sj=new Map,whe=function(e){_he(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Sj.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Sj.set(t,n);var r=bhe();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},xhe=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=GI(e,["className","colorModel","color","onChange"]),s=B.useRef(null);whe(s);var l=yhe(n,i,o),c=l[0],f=l[1],d=WO(["react-colorful",t]);return Y.createElement("div",zy({},a,{ref:s,className:d}),Y.createElement(ghe,{hsva:c,onChange:f}),Y.createElement(mhe,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},She={defaultColor:"000",toHsva:che,fromHsva:function(e){return uhe({h:e.h,s:e.s,v:e.v,a:1})},equal:vhe},Ohe=function(e){return Y.createElement(xhe,zy({},e,{colorModel:She}))};const Che=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:a})=>{const[s,l]=B.useState(t),[c,f]=B.useState(e(t)),[d,p,,g]=mn(),{editing:v,error:y,edited:x,errorData:b}=a,w=Ay(async()=>{await n({oldName:t,newName:s,color:c}),r()}),S=Ft(g,()=>x&&i({oldName:t,newName:s,color:c}));return m.jsx(Zo,{isOpen:o,toggle:r,centered:!0,onClosed:S,children:m.jsxs("form",{name:"editTag",onSubmit:w,children:[m.jsx(Qo,{toggle:r,children:"Edit tag"}),m.jsxs(fo,{children:[m.jsxs(Ty,{children:[m.jsx("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:c,borderColor:c},onClick:p,children:m.jsx(Ie,{icon:$G,className:"edit-tag-modal__color-icon"})}),m.jsx(rO,{isOpen:d,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:m.jsx(Ohe,{color:c,onChange:f})}),m.jsx(Zc,{value:s,placeholder:"Tag",required:!0,onChange:({target:C})=>l(C.value)})]}),y&&m.jsx(zr,{type:"error",small:!0,className:"mt-2",children:m.jsx(zo,{errorData:b,fallbackMessage:"Something went wrong while editing the tag :("})})]}),m.jsxs(gl,{children:[m.jsx(yt,{type:"button",color:"link",onClick:r,children:"Cancel"}),m.jsx(yt,{color:"primary",disabled:v,children:v?"Saving...":"Save"})]})]})})},Ms={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},YO=Symbol("Create new tag"),XI=Symbol("No options"),Kl=()=>{},In=Y.createContext(void 0);function Oj(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function Ehe(e){return e.selectionStart===0&&e.selectionEnd===0}function khe(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function Vy(e){return`${e}-label`}function Phe(e){return`${e}-combobox`}function The(e){return`${e}-input`}function JI(e){return`${e}-listbox`}function e5(e,t){return`${e}-option-${Ahe(t)}`}function Mhe(e,t){if((e==null?void 0:e.value)===YO&&e.disabled===!1)return{value:t,label:t}}function jhe(e){const t=Mhe(e.activeOption,e.value)||e.activeOption||Bhe(e.value,e.options);return t&&!t.disabled?t:void 0}function Dhe(e,t,n){const r=t-1;return e>r?n:en===e.value)}const Ihe=/[-\\^$*+?.()|[\]{}]/g;function t5(e){return e.replace(Ihe,"\\$&")}function n5(e){return new RegExp(t5(e),"i")}function Fhe(e){return new RegExp(`^${t5(e)}$`,"i")}function $he(e,t){if(e){const n=n5(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function Bhe(e,t){const n=Fhe(e);return t.find(r=>n.test(r.label))||null}const Uhe={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function zhe({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:c}=B.useContext(In),f=B.useMemo(()=>{const v=R=>{const V=R.currentTarget.value;c.current.updateInputValue(V),document.activeElement===a.current&&c.current.listBoxExpand()},y=()=>{c.current.listBoxExpand()},x=R=>{var V;((V=o.current)==null?void 0:V.contains(R.relatedTarget))===!1&&c.current.listBoxCollapse()},b=()=>{c.current.listBoxExpand()},w=R=>{const{activeIndex:V,isExpanded:W}=c.current.state;W?(R.preventDefault(),c.current.updateActiveIndex(V+1)):(khe(R.currentTarget)||R.altKey)&&(R.preventDefault(),c.current.listBoxExpand())},S=R=>{const{activeIndex:V,isExpanded:W}=c.current.state;W?(R.preventDefault(),c.current.updateActiveIndex(V-1)):Ehe(R.currentTarget)&&(R.preventDefault(),c.current.listBoxExpand())},C=R=>{const{isExpanded:V,options:W}=c.current.state;V&&(R.preventDefault(),c.current.updateActiveIndex(W.length-1))},k=R=>{c.current.state.isExpanded&&(R.preventDefault(),c.current.updateActiveIndex(0))},P=()=>{c.current.state.isExpanded?c.current.listBoxCollapse():c.current.updateInputValue("")},j=()=>{if(e){const{value:R,selected:V}=c.current.state,W=V[V.length-1];R===""&&W&&c.current.selectTag(W)}},N=R=>{c.current.state.isExpanded&&(R.preventDefault(),c.current.selectTag())};return{onBlur:x,onChange:v,onClick:b,onFocus:y,onKeyDown:R=>{if(R.key===Ms.UpArrow)return S(R);if(R.key===Ms.DownArrow)return w(R);if(R.key===Ms.PageUp)return k(R);if(R.key===Ms.PageDown)return C(R);if(R.key===Ms.Escape)return P();if(R.key===Ms.Backspace)return j();if(r.includes(R.key))return N(R)}}},[e,o,r,a,c]),{activeOption:d,isExpanded:p,value:g}=c.current.state;return{...Uhe,"aria-autocomplete":"list","aria-activedescendant":d?e5(i,d):void 0,"aria-controls":JI(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":Vy(i),"aria-expanded":p,id:The(i),onBlur:s?Kl:f.onBlur,onChange:s?Kl:f.onChange,onClick:s?Kl:f.onClick,onFocus:s?Kl:f.onFocus,onKeyDown:s?Kl:f.onKeyDown,ref:a,role:"combobox",type:"text",value:g}}const Vhe={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},Hhe=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function Whe({allowResize:e=!0,text:t}){const n=B.useRef(null),{inputRef:r}=B.useContext(In),[i,o]=B.useState(null);return B.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);Hhe.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),B.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:Vhe}}}function Yhe(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=B.useContext(In),i=r.current.state.activeIndex===-1,o=B.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return B.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":Vy(e),id:JI(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function qhe({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:c,onShouldCollapse:f,onShouldExpand:d,onValidate:p,selected:g,suggestions:v,suggestionsTransform:y}){const x=B.useRef(),[b,w]=B.useState(null),[S,C]=B.useState(!1),[k,P]=B.useState(""),j=B.useMemo(()=>{const q=y(k,v);return k&&(t&&q.push({disabled:typeof p=="function"?!p(k):!1,label:r,value:YO}),q.length===0&&q.push({disabled:!0,label:i,value:XI})),q},[t,r,i,p,v,y,k]),N=b?Dx(b,j):-1,H=e?Math.max(N,0):N,R=j[H],V={activeIndex:H,activeOption:R,isExpanded:S,options:j,selected:g,value:k},W={tagsAdded:x.current?Oj(g,x.current.state.selected):[],tagsDeleted:x.current?Oj(x.current.state.selected,g):[]},ee={listBoxCollapse(){S&&((f==null?void 0:f(V.value))??!0)&&(C(!1),w(null),s==null||s())},listBoxExpand(){!S&&((d==null?void 0:d(V.value))??!0)&&(C(!0),w(j[H]),l==null||l())},updateActiveIndex(q){const Q=Dhe(q,j.length,e?0:-1);w(j[Q])},updateInputValue(q){k!==q&&(P(q),c==null||c(q))},selectTag(q){if(q??(q=jhe(V)),q){const Q=Dx(q,V.selected);Q>-1?a(Q):o(q),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return x.current={...ee,flags:W,state:V},x}function Ghe(e){const{id:t,inputRef:n,managerRef:r}=B.useContext(In),i=B.useRef(null),o=r.current.state.options[e],a=e===r.current.state.activeIndex,s=o.disabled??!1,l=Dx(o,r.current.state.selected)>-1,c=B.useCallback(()=>{var d;r.current.selectTag(),(d=n.current)==null||d.focus()},[n,r]),f=B.useCallback(()=>{e!==r.current.state.activeIndex&&r.current.updateActiveIndex(e)},[e,r]);return B.useEffect(()=>{var d;a&&((d=i.current)==null||d.scrollIntoView({block:"nearest",inline:"start"}))},[a,r.current.state.options]),{option:{...o,active:a,disabled:s,index:e,selected:l},optionProps:{"aria-disabled":s,"aria-posinset":e+1,"aria-selected":s?void 0:l,"aria-setsize":r.current.state.options.length,id:e5(t,o),onClick:c,onMouseDown:f,ref:i,role:"option",tabIndex:-1}}}function Khe({inputRef:e,managerRef:t}){return B.useRef({input:{blur(){var r;(r=e.current)==null||r.blur()},focus(){var r;(r=e.current)==null||r.focus()},get value(){return t.current.state.value},set value(r){typeof r!="string"&&(r=String(r)),t.current.updateInputValue(r)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(r){t.current.selectTag(r)}}).current}function Zhe({onBlur:e,onFocus:t}){const[n,r]=B.useState(!1),{id:i,inputRef:o}=B.useContext(In),a=B.useRef(null),s=B.useMemo(()=>({"aria-describedby":Vy(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function Qhe(e,t){const{isDisabled:n,managerRef:r}=B.useContext(In),i=r.current.state.selected[e],o=B.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:Cv(t,i.label),onClick:n?Kl:o}}}function Xhe(){var e;const{inputRef:t,managerRef:n}=B.useContext(In),r=B.useRef(),i=n.current.flags.tagsDeleted.length,o=(e=r.current)==null?void 0:e.contains(document.activeElement);return B.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[t,o,r,i]),{listRef:r}}const Jhe={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function epe({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=B.useContext(In),r=B.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(Cv(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(Cv(t,i.label))}),Y.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:Jhe},r.current.join(` +`))}function tpe({children:e}){const{classNames:t,comboBoxRef:n,id:r}=B.useContext(In);return Y.createElement("div",{className:t.comboBox,id:Phe(r),ref:n},e)}const npe=({classNames:e,text:t})=>Y.createElement("mark",{className:e.highlight},t);function rpe({option:e,query:t,render:n=npe}){const{classNames:r}=B.useContext(In);if(e.value===YO||e.value===XI)return Y.createElement(Y.Fragment,null,Cv(e.label,t));if(t){const i=Rhe(e.label,t);if(i){const o=n({text:i[1],classNames:r});return Y.createElement(Y.Fragment,null,i[0],o,i[2])}}return Y.createElement(Y.Fragment,null,e.label)}const ipe=Y.memo(rpe),ope=({classNames:e,inputWidth:t,...n})=>Y.createElement("input",{className:e.input,style:{width:t},...n});function ape({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=ope}){const{classNames:s}=B.useContext(In),{value:l,...c}=zhe({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),f=l.lengthY.createElement("div",{className:t.label,id:n},e);function lpe({children:e,render:t=spe}){const{classNames:n,id:r}=B.useContext(In);return t({children:e,classNames:n,id:Vy(r)})}function cpe({children:e}){const{classNames:t,managerRef:n}=B.useContext(In),r=Yhe();return!n.current.state.isExpanded||Y.Children.count(e)===0?null:Y.createElement("div",{className:t.listBox,...r},e)}const upe=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),Y.createElement("div",{className:i.join(" "),...r},e)};function fpe({children:e,index:t,render:n=upe}){const{classNames:r}=B.useContext(In),{option:i,optionProps:o}=Ghe(t);return n({classNames:r,children:e,option:i,...o})}const dpe=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),Y.createElement("div",{className:a.join(" "),...o},e)};function hpe({children:e,onBlur:t,onFocus:n,render:r=dpe}){const{classNames:i,isDisabled:o,isInvalid:a}=B.useContext(In),{isActive:s,rootProps:l}=Zhe({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const ppe=({classNames:e,tag:t,...n})=>Y.createElement("button",{type:"button",className:e.tag,...n},Y.createElement("span",{className:e.tagName},t.label));function mpe({render:e=ppe,index:t,title:n}){const{classNames:r}=B.useContext(In),{tag:i,tagProps:o}=Qhe(t,n);return e({classNames:r,tag:i,...o})}function gpe({children:e,label:t}){const{classNames:n}=B.useContext(In),{listRef:r}=Xhe();return Y.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>Y.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const vpe={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},ype=[Ms.Enter];function _pe({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=vpe,collapseOnSelect:c=!1,deleteButtonText:f="Remove %value% from the list",delimiterKeys:d=ype,id:p="react-tags",isDisabled:g=!1,isInvalid:v=!1,labelText:y="Select tags",newOptionText:x="Add %value%",noOptionsText:b="No options found for %value%",onAdd:w,onBlur:S,onCollapse:C,onDelete:k,onExpand:P,onFocus:j,onInput:N,onShouldCollapse:H,onShouldExpand:R,onValidate:V,placeholderText:W="Add a tag",renderHighlight:ee,renderInput:q,renderLabel:Q,renderOption:oe,renderRoot:le,renderTag:G,selected:F=[],suggestions:A=[],suggestionsTransform:z=$he,tagListLabelText:re="Selected tags"},U){const K=B.useRef(null),ie=B.useRef(null),ae=B.useRef(null),he=qhe({activateFirstOption:e,allowNew:n,collapseOnSelect:c,newOptionText:x,noOptionsText:b,onAdd:w,onDelete:k,onCollapse:C,onExpand:P,onInput:N,onShouldCollapse:H,onShouldExpand:R,onValidate:V,selected:F,suggestions:A,suggestionsTransform:z}),E=Khe({inputRef:ie,managerRef:he});return U&&(typeof U=="function"?U(E):U.current=E),Y.createElement(In.Provider,{value:{classNames:l,comboBoxRef:K,id:p,inputRef:ie,isDisabled:g,isInvalid:v,listBoxRef:ae,managerRef:he}},Y.createElement(hpe,{onBlur:S,onFocus:j,render:le},Y.createElement(lpe,{render:Q},y),Y.createElement(gpe,{label:re},he.current.state.selected.map((M,I)=>Y.createElement(mpe,{key:jx(M),index:I,render:G,title:f}))),Y.createElement(tpe,null,Y.createElement(ape,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:d,placeholderText:W,render:q}),Y.createElement(cpe,null,he.current.state.options.map((M,I)=>Y.createElement(fpe,{key:jx(M),index:I,render:oe},Y.createElement(ipe,{option:M,query:he.current.state.value,render:ee}))))),Y.createElement(epe,{ariaAddedText:i,ariaDeletedText:s})))}const bpe=Y.forwardRef(_pe),wpe=/\s+/g,r5=e=>e.trim().toLowerCase().replace(wpe,"-");const i5=({tag:e,colorGenerator:t})=>m.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),o5="Tag not found",a5="Add tag",xpe=e=>e!==o5,Spe=e=>e===a5,Cj=e=>({label:e,value:e}),Ope=e=>({tag:t,onClick:n})=>m.jsx(UO,{colorGenerator:e,text:t.label,clearable:!0,className:"react-tags__tag",onClose:n}),Cpe=(e,t)=>({option:n,classNames:r,...i})=>{const o=xpe(n.label),a=Spe(n.label);return m.jsx("div",{className:Ee(r.option,{[r.optionIsActive]:o&&n.active,"react-tags__listbox-option--not-selectable":!o}),...i,children:o?m.jsxs(m.Fragment,{children:[!a&&m.jsx(i5,{tag:`${n.label}`,colorGenerator:e}),a?m.jsxs("i",{children:['Add "',r5((t==null?void 0:t.input.value)??""),'"']}):n.label]}):m.jsx("i",{children:n.label})})},Epe=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,allowNew:a=!0})=>{B.useEffect(()=>{i()},[]);const s=bl("shortUrlCreation"),l=(s==null?void 0:s.tagFilteringMode)??"startsWith",c=os();return m.jsx(bpe,{ref:c,selected:t.map(Cj),suggestions:o.tags.filter(f=>!t.includes(f)).map(Cj),renderTag:Ope(e),renderOption:Cpe(e,c.current),activateFirstOption:!0,allowNew:a,newOptionText:a5,noOptionsText:o5,placeholderText:r??"Add tags to the URL",delimiterKeys:["Enter","Tab",","],suggestionsTransform:(f,d)=>{const p=f.toLowerCase().trim();return p.length<1?[]:[...d.filter(({label:g})=>l==="includes"?g.includes(p):g.startsWith(p))].slice(0,5)},onDelete:f=>{const d=[...t];d.splice(f,1),n(d)},onAdd:({label:f})=>n([...t,...f.split(",").map(r5)])})},Lx="shlink/tagDelete",kpe={deleting:!1,deleted:!1,error:!1},s5=jn(`${Lx}/tagDeleted`),Ppe=e=>{const t=Mr(`${Lx}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=sr({name:Lx,initialState:kpe,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:Jo(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},qO="shlink/tagEdit",Tpe={editing:!1,edited:!1,error:!1},l5=jn(`${qO}/tagEdited`),Mpe=(e,t)=>Mr(`${qO}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),jpe=e=>sr({name:qO,initialState:Tpe,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:Jo(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...wS(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),GO="shlink/tagsList",eb={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},Ej=(e,t)=>n=>n===e?t:n,kj=(e,t)=>uh(n=>n===t,e),Dpe=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:s.visitsCount+o+a}}},{...t}),Lpe=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),Rpe=(e,t=!0)=>Mr(`${GO}/listTags`,async(n,{getState:r})=>{const{tagsList:i}=r();if(!t&&!Kn(i.tags))return i;const{tags:o,stats:a}=await e().tagsStats(),s=a.reduce((l,{tag:c,...f})=>(l[c]=f,l),{});return{tags:o,stats:s}}),c5=jn(`${GO}/filterTags`),Npe=(e,t)=>sr({name:GO,initialState:eb,reducers:{},extraReducers:n=>{n.addCase(c5,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...eb,error:!0,errorData:Jo(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...eb,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(s5,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:kj(r,a),filteredTags:kj(i,a)})),n.addCase(l5,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map(Ej(s.oldName,s.newName)).sort(),filteredTags:i.map(Ej(s.oldName,s.newName)).sort()})),n.addCase(Ph,(r,{payload:i})=>({...r,stats:Dpe(Lpe(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),Ape={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Ipe=e=>ss(({filterTags:t,forceListTags:n,tagsList:r})=>{var f;const i=$O(),[o,a]=B.useState(((f=i.tags)==null?void 0:f.defaultOrdering)??{}),s=Ft(()=>r.filteredTags.map(d=>{var v,y,x;const p=r.stats[d],g=((v=i.visits)!=null&&v.excludeBots?(y=p==null?void 0:p.visitsSummary)==null?void 0:y.nonBots:(x=p==null?void 0:p.visitsSummary)==null?void 0:x.total)??(p==null?void 0:p.visitsCount)??0;return{tag:d,visits:g,shortUrls:(p==null?void 0:p.shortUrlsCount)??0}}),d=>n6(d,o));if(B.useEffect(()=>{n()},[]),r.loading)return m.jsx(Do,{loading:!0});if(r.error)return m.jsx(zr,{type:"error",children:m.jsx(zo,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const l=d=>()=>{const p=Dy(d,o.field,o.dir);a({field:p?d:void 0,dir:p})},c=()=>{if(r.filteredTags.length<1)return m.jsx(Do,{children:"No tags found"});const d=s();return m.jsx(e,{sortedTags:d,currentOrder:o,orderByColumn:l})};return m.jsxs(m.Fragment,{children:[m.jsx(wh,{className:"mb-3",onChange:t}),m.jsx(mr,{className:"mb-3",children:m.jsx("div",{className:"col-lg-6 offset-lg-6",children:m.jsx(xh,{items:Ape,order:o,onChange:(d,p)=>a({field:d,dir:p})})})}),c()]})},()=>[di.visits]);const KO=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Qd(o)&&n(o);return m.jsxs(iO,{listClassName:Ee("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[m.jsx(Hs,{disabled:t<=1,children:m.jsx(Ws,{previous:!0,tag:"span",onClick:i(t-1)})}),WI(t,e).map((o,a)=>m.jsx(Hs,{disabled:Qd(o),active:t===o,children:m.jsx(Ws,{role:"link",tag:"span",onClick:i(o),children:YI(o)})},qI(o,a))),m.jsx(Hs,{disabled:t>=e,children:m.jsx(Ws,{next:!0,tag:"span",onClick:i(t+1)})})]})};const Fpe=20,$pe=e=>({sortedTags:t,orderByColumn:n,currentOrder:r})=>{const i=B.useRef(!0),{search:o}=gn(),{page:a=1}=vl(o),[s,l]=xfe("page",Number(a)),c=jd(Fpe,t),f=c.length>1,d=c[s-1]??[];return B.useEffect(()=>{!i.current&&l(1),i.current=!1},[t]),B.useEffect(()=>{scrollTo(0,0)},[s]),m.jsxs(hn,{bodyClassName:f?"pb-1":"",children:[m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsxs("thead",{className:"responsive-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:"tags-table__header-cell",onClick:n("tag"),children:["Tag ",m.jsx(ed,{currentOrder:r,field:"tag"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("shortUrls"),children:["Short URLs ",m.jsx(ed,{currentOrder:r,field:"shortUrls"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("visits"),children:["Visits ",m.jsx(ed,{currentOrder:r,field:"visits"})]}),m.jsx("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),m.jsx("tr",{children:m.jsx("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),m.jsxs("tbody",{children:[d.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),d.map(p=>m.jsx(e,{tag:p},p.tag))]})]}),f&&m.jsx("div",{className:"sticky-card-paginator",children:m.jsx(KO,{pagesCount:c.length,currentPage:s,setCurrentPage:l})})]},s)},Bpe=(e,t,n)=>({tag:r})=>{const[i,o]=mn(),[a,s]=mn(),l=yl();return m.jsxs("tr",{className:"responsive-table__row",children:[m.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[m.jsx(i5,{tag:r.tag,colorGenerator:n})," ",r.tag]}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:m.jsx(It,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:wn(r.shortUrls)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:m.jsx(It,{to:`${l}/tag/${r.tag}/visits`,children:wn(r.visits)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end",children:m.jsxs(jy,{children:[m.jsxs(Ue,{onClick:s,children:[m.jsx(Ie,{icon:kG,fixedWidth:!0,className:"me-1"})," Edit"]}),m.jsxs(Ue,{onClick:o,children:[m.jsx(Ie,{icon:zG,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),m.jsx(t,{tag:r.tag,toggle:s,isOpen:a}),m.jsx(e,{tag:r.tag,toggle:o,isOpen:i})]})},Upe=(e,t)=>{e.serviceFactory("TagsSelector",Epe,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>lhe),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Che,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",Bpe,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",$pe,"TagsTableRow"),e.serviceFactory("TagsList",Ipe,"TagsTable"),e.decorator("TagsList",t(["tagsList","mercureInfo"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",jpe,"editTag"),e.serviceFactory("tagEditReducer",ct("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Ppe,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",ct("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",Npe,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",ct("reducer"),"tagsListReducerCreator");const n=r=>({apiClientFactory:i})=>Rpe(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>c5),e.serviceFactory("deleteTag",ct("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>s5),e.serviceFactory("editTag",Mpe,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>l5)};var zpe="Expected a function",u5="__lodash_hash_undefined__",f5=1/0,Vpe="[object Function]",Hpe="[object GeneratorFunction]",Wpe="[object Symbol]",Ype=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qpe=/^\w*$/,Gpe=/^\./,Kpe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zpe=/[\\^$.*+?()[\]{}|]/g,Qpe=/\\(\\)?/g,Xpe=/^\[object .+?Constructor\]$/,Jpe=typeof Zl=="object"&&Zl&&Zl.Object===Object&&Zl,eme=typeof self=="object"&&self&&self.Object===Object&&self,ZO=Jpe||eme||Function("return this")();function tme(e,t){return e==null?void 0:e[t]}function nme(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var rme=Array.prototype,ime=Function.prototype,d5=Object.prototype,tb=ZO["__core-js_shared__"],Pj=function(){var e=/[^.]+$/.exec(tb&&tb.keys&&tb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),h5=ime.toString,QO=d5.hasOwnProperty,p5=d5.toString,ome=RegExp("^"+h5.call(QO).replace(Zpe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tj=ZO.Symbol,ame=rme.splice,sme=m5(ZO,"Map"),Jd=m5(Object,"create"),Mj=Tj?Tj.prototype:void 0,jj=Mj?Mj.toString:void 0;function ll(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function vme(e,t){var n=this.__data__,r=Hy(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Su.prototype.clear=hme;Su.prototype.delete=pme;Su.prototype.get=mme;Su.prototype.has=gme;Su.prototype.set=vme;function wl(e){var t=-1,n=e?e.length:0;for(this.clear();++tr.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function eC(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function Bme(e={stringFormatter:eC()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function Ume(e={stringFormatter:eC()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}function Lj(e,t,n){const r=e[t];return r===void 0?n:r}function y5(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function Rx(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var Rj;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(Rj||(Rj={}));class zme{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||eC(),i=Ume({stringFormatter:r}),o={header:r,undefined:nb,boolean:nb,number:$me(),bigint:nb,string:r,symbol:Bme({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` +`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>Dj(i,r,n):i=>Lj(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?a=>Dj(a,o,i):a=>Lj(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return Rx(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(y5,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return Rx(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class _5 extends zme{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(y5,[])}processData(t){return Rx(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Cn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(Cn||(Cn={}));Cn.QUOTATION_MARK+"",Cn.QUOTATION_MARK,Cn.REVERSE_SOLIDUS+"",Cn.REVERSE_SOLIDUS,Cn.SOLIDUS+"",Cn.SOLIDUS,Cn.LATIN_SMALL_LETTER_B+"",Cn.BACKSPACE,Cn.LATIN_SMALL_LETTER_F+"",Cn.FORM_FEED,Cn.LATIN_SMALL_LETTER_N+"",Cn.NEWLINE,Cn.LATIN_SMALL_LETTER_R+"",Cn.CARRIAGE_RETURN,Cn.LATIN_SMALL_LETTER_T+"",Cn.TAB;var Nj;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(Nj||(Nj={}));var Aj;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(Aj||(Aj={}));var Ij;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(Ij||(Ij={}));var Fj;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(Fj||(Fj={}));const Vme=new _5,Hme=e=>Vme.parse(e),Wme=6,$j="0123456789ABCDEF",Yme=128,{floor:qme,random:Gme,sqrt:Kme,round:Zme}=Math,Qme=()=>`#${IO(Wme,()=>$j[qme(Gme()*$j.length)]).join("")}`,Bj=e=>e.toLowerCase().trim(),Xme=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),Jme=(e=0,t=0,n=0)=>Zme(Kme(.299*e**2+.587*t**2+.114*n**2));class ege{constructor(t){me(this,"colors");me(this,"lights");me(this,"getColorForKey",t=>{const n=Bj(t),r=this.colors[n];return r||this.setColorForKey(n,Qme())});me(this,"setColorForKey",(t,n)=>{var i;const r=Bj(t);return this.colors[r]=n,(i=this.storage)==null||i.storeTagColors(this.colors),n});me(this,"isColorLightForKey",t=>{const n=this.getColorForKey(t).substring(1);if(qo(this.lights[n])){const r=Xme(n);this.lights[n]=Jme(...r)>=Yme}return this.lights[n]});var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}}const b5=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},tge=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);b5(e,i,n)};class nge{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);b5(this.window,i,n)}}class rge{constructor(t,n){me(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});me(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});me(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);tge(this.window,r,t)});this.window=t,this.jsonToCsv=n}}function ige(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",nge,"fetch","window"),e.service("ColorGenerator",ege,"TagColorsStorage"),e.constant("jsonToCsv",Hme),e.service("ReportExporter",rge,"window","jsonToCsv"),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",bfe,"setTimeout","clearTimeout")}const tC=e=>e.visitedUrl!==void 0,oge=e=>e.visitedUrl!==void 0,age=Ft(Kq(e=>tC(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),rm=(e,t)=>dA(ct(t),e),Dh=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&Xa(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&Xa(r==null?void 0:r.endDate))??void 0,a=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:a}},Lh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>m.jsx("header",{children:m.jsxs(Yr,{body:!0,children:[m.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[m.jsx(yt,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:m.jsx(Ie,{icon:SA})}),m.jsx("span",{className:"text-center d-none d-sm-block",children:m.jsx("small",{children:i})}),m.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",m.jsx(TI,{visitsCount:e.length,shortUrl:n})]})]}),m.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:m.jsx("small",{children:i})}),r&&m.jsx("div",{className:"mt-md-2",children:r})]})});const w5=({title:e,footer:t,children:n})=>m.jsxs(Yr,{role:"document",children:[m.jsx(Kc,{className:"chart-card__header",children:typeof e=="function"?e():e}),m.jsx(Gc,{children:n}),t&&m.jsx(A4,{className:"chart-card__footer--sticky",children:t})]}),x5="label";function Uj(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sge(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function S5(e,t){e.labels=t}function O5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x5;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function lge(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x5;const n={labels:[],datasets:[]};return S5(n,e.labels),O5(n,e.datasets,t),n}function C5(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function cge(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:f,updateMode:d,...p}=e,g=B.useRef(null),v=B.useRef(),y=()=>{g.current&&(v.current=new Dv(g.current,{type:a,data:lge(s,o),options:l&&{...l},plugins:c}),Uj(t,v.current))},x=()=>{Uj(t,null),v.current&&(v.current.destroy(),v.current=null)};return B.useEffect(()=>{!i&&v.current&&l&&sge(v.current,l)},[i,l]),B.useEffect(()=>{!i&&v.current&&S5(v.current.config.data,s.labels)},[i,s.labels]),B.useEffect(()=>{!i&&v.current&&s.datasets&&O5(v.current.config.data,s.datasets,o)},[i,s.datasets]),B.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(d))},[i,l,s.labels,s.datasets,d]),B.useEffect(()=>{v.current&&(x(),setTimeout(y))},[a]),B.useEffect(()=>(y(),()=>x()),[]),Y.createElement("canvas",Object.assign({ref:g,role:"img",height:n,width:r},p),f)}const uge=B.forwardRef(cge);function nC(e,t){return Dv.register(t),B.forwardRef((n,r)=>Y.createElement(uge,Object.assign({},n,{ref:r,type:e})))}const fge=nC("line",Tf),dge=nC("bar",Pf),hge=nC("doughnut",_a),E5=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},k5=({dataset:e,raw:t})=>`${e.label}: ${wn(`${t}`)}`,pge=({label:e,raw:t})=>`${e}: ${wn(`${t}`)}`;const mge=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return m.jsx("ul",{className:"doughnut-chart-legend",children:n.map((a,s)=>m.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[m.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[s]??o}}),m.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:a})]},a))})},gge=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:lie()?sie:aie,borderWidth:2}],vge=(e,t)=>({labels:e,datasets:gge(t)}),yge=B.memo(({stats:e})=>{const[t,n]=B.useState(),r=lo(e),i=mu(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:pge}}}},a=vge(r,i);return m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-sm-12 col-md-7",children:m.jsx(hge,{height:300,data:a,options:o,ref:s=>{s&&n(s)}})}),m.jsx("div",{className:"col-sm-12 col-md-5",children:t&&m.jsx(mge,{chart:t})})]})}),zj=({title:e,stats:t})=>m.jsx(w5,{title:e,children:m.jsx(yge,{stats:t})}),_ge={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},P5={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},rn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},fr={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ca={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class we{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=we.getVersionPrecision(t),o=we.getVersionPrecision(n);let a=Math.max(i,o),s=0;const l=we.map([t,n],c=>{const f=a-we.getVersionPrecision(c),d=c+new Array(f+1).join(".0");return we.map(d.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===s)return 0;a-=1}else if(l[0][a]{r[l]=a[l]})}return t}static getBrowserAlias(t){return _ge[t]}static getBrowserTypeByAlias(t){return P5[t]||""}}const Ct=/version\/(\d+(\.?_?\d+)+)/i,bge=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=we.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=we.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=we.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=we.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=we.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=we.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=we.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=we.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=we.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=we.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=we.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=we.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=we.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=we.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=we.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=we.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=we.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=we.getFirstMatch(Ct,e)||we.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=we.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=we.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=we.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=we.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=we.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=we.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=we.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=we.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=we.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=we.getFirstMatch(Ct,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:we.getFirstMatch(i,e),version:we.getSecondMatch(i,e)}}}],wge=[{test:[/Roku\/DVP/],describe(e){const t=we.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:fr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=we.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:fr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=we.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=we.getWindowsVersionName(t);return{name:fr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:fr.iOS},n=we.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=we.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=we.getMacOSVersionName(t),r={name:fr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=we.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:fr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=we.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=we.getAndroidVersionName(t),r={name:fr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=we.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:fr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=we.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||we.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||we.getFirstMatch(/\bbb(\d+)/i,e);return{name:fr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=we.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:fr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=we.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:fr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:fr.Linux}}},{test:[/CrOS/],describe(){return{name:fr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=we.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:fr.PlayStation4,version:t}}}],xge=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=we.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:rn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:rn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:rn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:rn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:rn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:rn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:rn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=we.getFirstMatch(/(ipod|iphone)/i,e);return{type:rn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:rn.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:rn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:rn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:rn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:rn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:rn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:rn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:rn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:rn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:rn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:rn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:rn.tv}}}],Sge=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:ca.Blink};const n=we.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ca.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:ca.Trident},n=we.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:ca.Presto},n=we.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:ca.Gecko},n=we.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ca.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:ca.WebKit},n=we.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Vj{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=we.find(bge,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=we.find(wge,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=we.find(xge,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=we.find(Sge,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return we.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(s=>{const l=t[s];typeof l=="string"?(i[s]=l,o+=1):typeof l=="object"&&(n[s]=l,r+=1)}),r>0){const s=Object.keys(n),l=we.find(s,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=we.find(s,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const s=Object.keys(i),l=we.find(s,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=we.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(we.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 - */class xge{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Vj(t,n)}static parse(t){return new Vj(t).getResult()}static get BROWSER_MAP(){return P5}static get ENGINE_MAP(){return ca}static get OS_MAP(){return fr}static get PLATFORMS_MAP(){return rn}}const im="Others",Sge=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Oge=e=>{if(!eo(e))return{browser:im,os:im};const{browser:{name:t},os:{name:n}}=xge.parse(e);return{os:n??im,browser:t&&Sge.includes(t)?t:im}},Cge=e=>{var t;return eo(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},rC=(e,t)=>Object.values({...gA(t,t.map(()=>0)),...e});const Hj={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},Ege={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},kge={hourly:Rse,daily:EO,weekly:Ise,monthly:pv},iC={hourly:e=>ou(e,"yyyy-MM-dd HH:00"),daily:e=>As(e),weekly(e){const t=As(Yd(e)),n=As(Bse(e));return`${t} - ${n}`},monthly:e=>ou(e,"yyyy-MM")},Pge=e=>{const t=new Date,n=Vo(e);return bS([[()=>EO(t,n)<=2,a_("hourly")],[()=>pv(t,n)<=1,a_("daily")],[()=>pv(t,n)<=6,a_("weekly")]])()??"monthly"},Wj=(e,t)=>dA(n=>iC[e](Vo(n.date)),t),Tge=(e,t)=>t.reduce((n,r)=>{const i=iC[e](Vo(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),Mge=(e,t)=>{const n=kge[e],r=iC[e],i=Vo(t[0].date),o=Vo(t[t.length-1].date),a=n(i,o),s=Ege[e];return[r(o),...IO(a,l=>r(Sse(o,s(l))))]},jge=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=Mge(n,e);return[i,rC(t,i)]},Yj=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let rb=null;const Dge=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;rb===e[i]?(r([]),rb=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),rb=e[i]??null)},Lge=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,a]=B.useState(t.length>0?Pge(t[t.length-1].date):"monthly"),[s,l]=mn(!0),c=B.useRef(null),f=B.useRef(null),d=B.useMemo(()=>Tge(o,t),[o,t]),p=B.useMemo(()=>Wj(o,_1(t)),[o,t]),[m,v]=B.useMemo(()=>jge(t,p,o,s),[t,o,s]),y=B.useMemo(()=>rC(Wj(o,_1(n)),m),[n,o,m]),x=()=>{const C=Yj(v,"Visits",oO);if(n.length===0)return[C];const k=Yj(y,r,i6);return[C,k]},b=()=>({labels:m,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:k5}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:wn}},x:{title:{display:!0,text:Hj[o]}}},onHover:E5},S=C=>g.jsx(cge,{ref:C,data:b(),options:w,onClick:k=>Dge(m,d,C5(C.current,k),i)});return g.jsxs(Yr,{children:[g.jsxs(Kc,{role:"heading",children:[e,g.jsx("div",{className:"float-end",children:g.jsxs(bh,{children:[g.jsx(vh,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),g.jsx(vu,{end:!0,children:Object.entries(Hj).map(([C,k])=>g.jsx(Ue,{active:o===C,onClick:()=>a(C),children:k},C))})]})}),g.jsx("div",{className:"float-end me-2",children:g.jsx(Qc,{checked:s,onChange:l,children:g.jsx("small",{children:"Skip dates with no visits"})})})]}),g.jsxs(Gc,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(f)]})]})},Rge=({toggleClassName:e,ranges:t,value:n,setValue:r})=>g.jsxs(bh,{children:[g.jsx(vh,{caret:!0,color:"link",className:e,children:"Paginate"}),g.jsxs(vu,{end:!0,children:[t.map(i=>g.jsxs(Ue,{active:i===n,onClick:()=>r(i),children:[g.jsx("b",{children:i})," items per page"]},i)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:n===1/0,onClick:()=>r(1/0),children:g.jsx("i",{children:"Clear pagination"})})]})]}),Nge=e=>e.startsWith("hidden")?"":e,Age=e=>!!e&&Object.keys(e).length>0,Ige=e=>e.length>20?e.length*10:void 0,Fge=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:iie,borderColor:oO,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:oie,borderColor:i6,borderWidth:2}]},$ge=(e,t,n,r)=>({labels:e,datasets:Fge(t,n,r)}),Bge=(e,[t],n)=>{!n||!t||n(e[t.index])},Uge=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=lo(e).map(Nge),a=mu(Age(t)?lo(t).reduce((v,y)=>(v[y]&&(v[y]-=t[y]),v),{...e}):e),s=rC(t??{},o),l=B.useRef(null),c=B.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:v})=>v!=="",callbacks:{label:k5}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:wn}},y:{stacked:!0}},onHover:E5,indexAxis:"y"},d=$ge(o,a,s,n),p=Ige(o),m=(v,y)=>g.jsx(uge,{ref:y,data:d,options:f,height:p,onClick:x=>Bge(o,C5(y.current,x),r)},`${p}_${v}`);return g.jsxs(g.Fragment,{children:[t!==void 0&&m("with_stats",l),t===void 0&&m("without_stats",c)]})},zge=e=>kg(e)==="String"?gG(e):e,qj=([e])=>e,Gj=([,e])=>e,om=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...a})=>{const[s,l]=B.useState({}),[c,f]=B.useState(1),[d,p]=B.useState(50),m=(j,N)=>{const H=b1(j),R=s.field?hG(Ft(s.field===Object.keys(N)[0]?qj:Gj,zge),H):H;return!s.dir||s.dir==="ASC"?R:_1(R)},v=j=>{const N=j[c-1];if(c[`hidden_${R}`,0])]},y=j=>g.jsx(KO,{currentPage:c,pagesCount:j,setCurrentPage:f}),x=(j,N,H)=>{const R=m(j,N),V=R.map(qj),W=H&&b1({...gA(V,V.map(()=>0)),...H});if(R.length<=d)return{currentPageStats:vf(R),currentPageHighlightedStats:W&&vf(W)};const ee=jd(d,R),q=W&&jd(d,W);return{currentPageStats:vf(v(ee)),currentPageHighlightedStats:q&&vf(v(q)),pagination:y(ee.length),max:Kue(Math.max(...R.map(Gj)))}},{currentPageStats:b,currentPageHighlightedStats:w,pagination:S,max:C}=x(e,r,t&&Object.keys(t).length>0?t:void 0),k=Object.keys(b),P=()=>g.jsxs(g.Fragment,{children:[n,g.jsx("div",{className:"float-end",children:g.jsx(xh,{isButton:!1,right:!0,items:r,order:s,onChange:(j,N)=>{l({field:j,dir:N}),f(1)}})}),o&&Object.keys(e).length>50&&g.jsx("div",{className:"float-end",children:g.jsx(Rge,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:d,setValue:j=>{p(j),f(1)}})}),i&&g.jsx("div",{className:"float-end",children:i(S?k:void 0)})]});return g.jsx(w5,{title:P,footer:S,children:g.jsx(Uge,{stats:b,highlightedStats:w,max:C,...a})})},Vge=()=>{const e=uo(),{search:t}=gn(),{filtering:n,domain:r}=B.useMemo(Ft(()=>vl(t),({startDate:o,endDate:a,orphanVisitsType:s,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||a!=null?fI(o,a):void 0,visitsFilter:{orphanVisitsType:s,excludeBots:qo(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:a,visitsFilter:s}=pA(n,o),{excludeBots:l,orphanVisitsType:c}=s,f={startDate:(a==null?void 0:a.startDate)&&Xa(a.startDate)||"",endDate:(a==null?void 0:a.endDate)&&Xa(a.endDate)||"",excludeBots:l===void 0?void 0:gI(l),orphanVisitsType:c,domain:r},d=Oh(f),p=Kn(d)?"":`?${d}`;e(p,{replace:!0,relative:"route"})}]};function T5(e,t){const n=B.useRef(t);B.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const Hge=1;function Wge(e){return Object.freeze({__version:Hge,map:e})}function Yge(e,t){return Object.freeze({...e,...t})}const M5=B.createContext(null),j5=M5.Provider;function D5(){const e=B.useContext(M5);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function qge(e){function t(n,r){const{instance:i,context:o}=e(n).current;return B.useImperativeHandle(r,()=>i),n.children==null?null:Y.createElement(j5,{value:o},n.children)}return B.forwardRef(t)}function Gge(e){function t(n,r){const[i,o]=B.useState(!1),{instance:a}=e(n,o).current;B.useImperativeHandle(r,()=>a),B.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?fu.createPortal(n.children,s):null}return B.forwardRef(t)}function Kge(e){function t(n,r){const{instance:i}=e(n).current;return B.useImperativeHandle(r,()=>i),null}return B.forwardRef(t)}function L5(e,t){const n=B.useRef();B.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function oC(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Zge(e,t){return function(r,i){const o=D5(),a=e(oC(r,o),o);return T5(o.map,r.attribution),L5(a.current,r.eventHandlers),t(a.current,o,r,i),a}}var Nx={exports:{}};/* @preserve + */class Oge{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Vj(t,n)}static parse(t){return new Vj(t).getResult()}static get BROWSER_MAP(){return P5}static get ENGINE_MAP(){return ca}static get OS_MAP(){return fr}static get PLATFORMS_MAP(){return rn}}const im="Others",Cge=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Ege=e=>{if(!eo(e))return{browser:im,os:im};const{browser:{name:t},os:{name:n}}=Oge.parse(e);return{os:n??im,browser:t&&Cge.includes(t)?t:im}},kge=e=>{var t;return eo(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},rC=(e,t)=>Object.values({...gA(t,t.map(()=>0)),...e});const Hj={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},Pge={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},Tge={hourly:Rse,daily:EO,weekly:Ise,monthly:pv},iC={hourly:e=>ou(e,"yyyy-MM-dd HH:00"),daily:e=>Is(e),weekly(e){const t=Is(Yd(e)),n=Is(Bse(e));return`${t} - ${n}`},monthly:e=>ou(e,"yyyy-MM")},Mge=e=>{const t=new Date,n=Vo(e);return bS([[()=>EO(t,n)<=2,a_("hourly")],[()=>pv(t,n)<=1,a_("daily")],[()=>pv(t,n)<=6,a_("weekly")]])()??"monthly"},Wj=(e,t)=>dA(n=>iC[e](Vo(n.date)),t),jge=(e,t)=>t.reduce((n,r)=>{const i=iC[e](Vo(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),Dge=(e,t)=>{const n=Tge[e],r=iC[e],i=Vo(t[0].date),o=Vo(t[t.length-1].date),a=n(i,o),s=Pge[e];return[r(o),...IO(a,l=>r(Sse(o,s(l))))]},Lge=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=Dge(n,e);return[i,rC(t,i)]},Yj=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let rb=null;const Rge=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;rb===e[i]?(r([]),rb=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),rb=e[i]??null)},Nge=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,a]=B.useState(t.length>0?Mge(t[t.length-1].date):"monthly"),[s,l]=mn(!0),c=B.useRef(null),f=B.useRef(null),d=B.useMemo(()=>jge(o,t),[o,t]),p=B.useMemo(()=>Wj(o,_1(t)),[o,t]),[g,v]=B.useMemo(()=>Lge(t,p,o,s),[t,o,s]),y=B.useMemo(()=>rC(Wj(o,_1(n)),g),[n,o,g]),x=()=>{const C=Yj(v,"Visits",oO);if(n.length===0)return[C];const k=Yj(y,r,i6);return[C,k]},b=()=>({labels:g,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:k5}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:wn}},x:{title:{display:!0,text:Hj[o]}}},onHover:E5},S=C=>m.jsx(fge,{ref:C,data:b(),options:w,onClick:k=>Rge(g,d,C5(C.current,k),i)});return m.jsxs(Yr,{children:[m.jsxs(Kc,{role:"heading",children:[e,m.jsx("div",{className:"float-end",children:m.jsxs(bh,{children:[m.jsx(vh,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),m.jsx(vu,{end:!0,children:Object.entries(Hj).map(([C,k])=>m.jsx(Ue,{active:o===C,onClick:()=>a(C),children:k},C))})]})}),m.jsx("div",{className:"float-end me-2",children:m.jsx(Qc,{checked:s,onChange:l,children:m.jsx("small",{children:"Skip dates with no visits"})})})]}),m.jsxs(Gc,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(f)]})]})},Age=({toggleClassName:e,ranges:t,value:n,setValue:r})=>m.jsxs(bh,{children:[m.jsx(vh,{caret:!0,color:"link",className:e,children:"Paginate"}),m.jsxs(vu,{end:!0,children:[t.map(i=>m.jsxs(Ue,{active:i===n,onClick:()=>r(i),children:[m.jsx("b",{children:i})," items per page"]},i)),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{disabled:n===1/0,onClick:()=>r(1/0),children:m.jsx("i",{children:"Clear pagination"})})]})]}),Ige=e=>e.startsWith("hidden")?"":e,Fge=e=>!!e&&Object.keys(e).length>0,$ge=e=>e.length>20?e.length*10:void 0,Bge=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:iie,borderColor:oO,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:oie,borderColor:i6,borderWidth:2}]},Uge=(e,t,n,r)=>({labels:e,datasets:Bge(t,n,r)}),zge=(e,[t],n)=>{!n||!t||n(e[t.index])},Vge=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=lo(e).map(Ige),a=mu(Fge(t)?lo(t).reduce((v,y)=>(v[y]&&(v[y]-=t[y]),v),{...e}):e),s=rC(t??{},o),l=B.useRef(null),c=B.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:v})=>v!=="",callbacks:{label:k5}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:wn}},y:{stacked:!0}},onHover:E5,indexAxis:"y"},d=Uge(o,a,s,n),p=$ge(o),g=(v,y)=>m.jsx(dge,{ref:y,data:d,options:f,height:p,onClick:x=>zge(o,C5(y.current,x),r)},`${p}_${v}`);return m.jsxs(m.Fragment,{children:[t!==void 0&&g("with_stats",l),t===void 0&&g("without_stats",c)]})},Hge=e=>kg(e)==="String"?gG(e):e,qj=([e])=>e,Gj=([,e])=>e,om=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...a})=>{const[s,l]=B.useState({}),[c,f]=B.useState(1),[d,p]=B.useState(50),g=(j,N)=>{const H=b1(j),R=s.field?hG(Ft(s.field===Object.keys(N)[0]?qj:Gj,Hge),H):H;return!s.dir||s.dir==="ASC"?R:_1(R)},v=j=>{const N=j[c-1];if(c[`hidden_${R}`,0])]},y=j=>m.jsx(KO,{currentPage:c,pagesCount:j,setCurrentPage:f}),x=(j,N,H)=>{const R=g(j,N),V=R.map(qj),W=H&&b1({...gA(V,V.map(()=>0)),...H});if(R.length<=d)return{currentPageStats:vf(R),currentPageHighlightedStats:W&&vf(W)};const ee=jd(d,R),q=W&&jd(d,W);return{currentPageStats:vf(v(ee)),currentPageHighlightedStats:q&&vf(v(q)),pagination:y(ee.length),max:Kue(Math.max(...R.map(Gj)))}},{currentPageStats:b,currentPageHighlightedStats:w,pagination:S,max:C}=x(e,r,t&&Object.keys(t).length>0?t:void 0),k=Object.keys(b),P=()=>m.jsxs(m.Fragment,{children:[n,m.jsx("div",{className:"float-end",children:m.jsx(xh,{isButton:!1,right:!0,items:r,order:s,onChange:(j,N)=>{l({field:j,dir:N}),f(1)}})}),o&&Object.keys(e).length>50&&m.jsx("div",{className:"float-end",children:m.jsx(Age,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:d,setValue:j=>{p(j),f(1)}})}),i&&m.jsx("div",{className:"float-end",children:i(S?k:void 0)})]});return m.jsx(w5,{title:P,footer:S,children:m.jsx(Vge,{stats:b,highlightedStats:w,max:C,...a})})},Wge=()=>{const e=uo(),{search:t}=gn(),{filtering:n,domain:r}=B.useMemo(Ft(()=>vl(t),({startDate:o,endDate:a,orphanVisitsType:s,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||a!=null?fI(o,a):void 0,visitsFilter:{orphanVisitsType:s,excludeBots:qo(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:a,visitsFilter:s}=pA(n,o),{excludeBots:l,orphanVisitsType:c}=s,f={startDate:(a==null?void 0:a.startDate)&&Xa(a.startDate)||"",endDate:(a==null?void 0:a.endDate)&&Xa(a.endDate)||"",excludeBots:l===void 0?void 0:gI(l),orphanVisitsType:c,domain:r},d=Oh(f),p=Kn(d)?"":`?${d}`;e(p,{replace:!0,relative:"route"})}]};function T5(e,t){const n=B.useRef(t);B.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const Yge=1;function qge(e){return Object.freeze({__version:Yge,map:e})}function Gge(e,t){return Object.freeze({...e,...t})}const M5=B.createContext(null),j5=M5.Provider;function D5(){const e=B.useContext(M5);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function Kge(e){function t(n,r){const{instance:i,context:o}=e(n).current;return B.useImperativeHandle(r,()=>i),n.children==null?null:Y.createElement(j5,{value:o},n.children)}return B.forwardRef(t)}function Zge(e){function t(n,r){const[i,o]=B.useState(!1),{instance:a}=e(n,o).current;B.useImperativeHandle(r,()=>a),B.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?fu.createPortal(n.children,s):null}return B.forwardRef(t)}function Qge(e){function t(n,r){const{instance:i}=e(n).current;return B.useImperativeHandle(r,()=>i),null}return B.forwardRef(t)}function L5(e,t){const n=B.useRef();B.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function oC(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Xge(e,t){return function(r,i){const o=D5(),a=e(oC(r,o),o);return T5(o.map,r.attribution),L5(a.current,r.eventHandlers),t(a.current,o,r,i),a}}var Nx={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,r){r(t)})(Zl,function(n){var r="1.9.4";function i(u){var h,_,O,T;for(_=1,O=arguments.length;_"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var h=0;h0?Math.floor(u):Math.ceil(u)};G.prototype={clone:function(){return new G(this.x,this.y)},add:function(u){return this.clone()._add(A(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(A(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new G(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new G(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=F(this.x),this.y=F(this.y),this},distanceTo:function(u){u=A(u);var h=u.x-this.x,_=u.y-this.y;return Math.sqrt(h*h+_*_)},equals:function(u){return u=A(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=A(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function A(u,h,_){return u instanceof G?u:S(u)?new G(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new G(u.x,u.y):new G(u,h,_)}function z(u,h){if(u)for(var _=h?[u,h]:u,O=0,T=_.length;O=this.min.x&&_.x<=this.max.x&&h.y>=this.min.y&&_.y<=this.max.y},intersects:function(u){u=re(u);var h=this.min,_=this.max,O=u.min,T=u.max,$=T.x>=h.x&&O.x<=_.x,ne=T.y>=h.y&&O.y<=_.y;return $&&ne},overlaps:function(u){u=re(u);var h=this.min,_=this.max,O=u.min,T=u.max,$=T.x>h.x&&O.x<_.x,ne=T.y>h.y&&O.y<_.y;return $&&ne},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var h=this.min,_=this.max,O=Math.abs(h.x-_.x)*u,T=Math.abs(h.y-_.y)*u;return re(A(h.x-O,h.y-T),A(_.x+O,_.y+T))},equals:function(u){return u?(u=re(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function re(u,h){return!u||u instanceof z?u:new z(u,h)}function U(u,h){if(u)for(var _=h?[u,h]:u,O=0,T=_.length;O=h.lat&&T.lat<=_.lat&&O.lng>=h.lng&&T.lng<=_.lng},intersects:function(u){u=K(u);var h=this._southWest,_=this._northEast,O=u.getSouthWest(),T=u.getNorthEast(),$=T.lat>=h.lat&&O.lat<=_.lat,ne=T.lng>=h.lng&&O.lng<=_.lng;return $&&ne},overlaps:function(u){u=K(u);var h=this._southWest,_=this._northEast,O=u.getSouthWest(),T=u.getNorthEast(),$=T.lat>h.lat&&O.lat<_.lat,ne=T.lng>h.lng&&O.lng<_.lng;return $&&ne},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,h){return u?(u=K(u),this._southWest.equals(u.getSouthWest(),h)&&this._northEast.equals(u.getNorthEast(),h)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function K(u,h){return u instanceof U?u:new U(u,h)}function ie(u,h,_){if(isNaN(u)||isNaN(h))throw new Error("Invalid LatLng object: ("+u+", "+h+")");this.lat=+u,this.lng=+h,_!==void 0&&(this.alt=+_)}ie.prototype={equals:function(u,h){if(!u)return!1;u=ae(u);var _=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return _<=(h===void 0?1e-9:h)},toString:function(u){return"LatLng("+p(this.lat,u)+", "+p(this.lng,u)+")"},distanceTo:function(u){return E.distance(this,ae(u))},wrap:function(){return E.wrapLatLng(this)},toBounds:function(u){var h=180*u/40075017,_=h/Math.cos(Math.PI/180*this.lat);return K([this.lat-h,this.lng-_],[this.lat+h,this.lng+_])},clone:function(){return new ie(this.lat,this.lng,this.alt)}};function ae(u,h,_){return u instanceof ie?u:S(u)&&typeof u[0]!="object"?u.length===3?new ie(u[0],u[1],u[2]):u.length===2?new ie(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new ie(u.lat,"lng"in u?u.lng:u.lon,u.alt):h===void 0?null:new ie(u,h,_)}var he={latLngToPoint:function(u,h){var _=this.projection.project(u),O=this.scale(h);return this.transformation._transform(_,O)},pointToLatLng:function(u,h){var _=this.scale(h),O=this.transformation.untransform(u,_);return this.projection.unproject(O)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var h=this.projection.bounds,_=this.scale(u),O=this.transformation.transform(h.min,_),T=this.transformation.transform(h.max,_);return new z(O,T)},infinite:!1,wrapLatLng:function(u){var h=this.wrapLng?f(u.lng,this.wrapLng,!0):u.lng,_=this.wrapLat?f(u.lat,this.wrapLat,!0):u.lat,O=u.alt;return new ie(_,h,O)},wrapLatLngBounds:function(u){var h=u.getCenter(),_=this.wrapLatLng(h),O=h.lat-_.lat,T=h.lng-_.lng;if(O===0&&T===0)return u;var $=u.getSouthWest(),ne=u.getNorthEast(),fe=new ie($.lat-O,$.lng-T),pe=new ie(ne.lat-O,ne.lng-T);return new U(fe,pe)}},E=i({},he,{wrapLng:[-180,180],R:6371e3,distance:function(u,h){var _=Math.PI/180,O=u.lat*_,T=h.lat*_,$=Math.sin((h.lat-u.lat)*_/2),ne=Math.sin((h.lng-u.lng)*_/2),fe=$*$+Math.cos(O)*Math.cos(T)*ne*ne,pe=2*Math.atan2(Math.sqrt(fe),Math.sqrt(1-fe));return this.R*pe}}),M=6378137,I={R:M,MAX_LATITUDE:85.0511287798,project:function(u){var h=Math.PI/180,_=this.MAX_LATITUDE,O=Math.max(Math.min(_,u.lat),-_),T=Math.sin(O*h);return new G(this.R*u.lng*h,this.R*Math.log((1+T)/(1-T))/2)},unproject:function(u){var h=180/Math.PI;return new ie((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*h,u.x*h/this.R)},bounds:function(){var u=M*Math.PI;return new z([-u,-u],[u,u])}()};function J(u,h,_,O){if(S(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=h,this._c=_,this._d=O}J.prototype={transform:function(u,h){return this._transform(u.clone(),h)},_transform:function(u,h){return h=h||1,u.x=h*(this._a*u.x+this._b),u.y=h*(this._c*u.y+this._d),u},untransform:function(u,h){return h=h||1,new G((u.x/h-this._b)/this._a,(u.y/h-this._d)/this._c)}};function X(u,h,_,O){return new J(u,h,_,O)}var se=i({},E,{code:"EPSG:3857",projection:I,transformation:function(){var u=.5/(Math.PI*I.R);return X(u,.5,-u,.5)}()}),ge=i({},se,{code:"EPSG:900913"});function De(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function ue(u,h){var _="",O,T,$,ne,fe,pe;for(O=0,$=u.length;O<$;O++){for(fe=u[O],T=0,ne=fe.length;T1,tn=function(){var u=!1;try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",d,h),window.removeEventListener("testPassiveEventSupport",d,h)}catch{}return u}(),cr=function(){return!!document.createElement("canvas").getContext}(),$n=!!(document.createElementNS&&De("svg").createSVGRect),Bn=!!$n&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),vn=!$n&&function(){try{var u=document.createElement("div");u.innerHTML='';var h=u.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),_i=navigator.platform.indexOf("Mac")===0,bi=navigator.platform.indexOf("Linux")===0;function Un(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var Ve={ie:_e,ielt9:Ce,edge:Le,webkit:Me,android:je,android23:ce,androidStock:be,opera:ye,chrome:Se,gecko:Te,safari:Ne,phantom:Qe,opera12:et,win:qe,ie3d:Gt,webkit3d:zt,gecko3d:Sn,any3d:lr,mobile:$i,mobileWebkit:Fn,mobileWebkit3d:Cu,msPointer:Bi,pointer:Ih,touch:$h,touchNative:Fh,mobileOpera:Eu,mobileGecko:ss,retina:un,passiveEvents:tn,canvas:cr,svg:$n,vml:vn,inlineSvg:Bn,mac:_i,linux:bi},dC=Ve.msPointer?"MSPointerDown":"pointerdown",hC=Ve.msPointer?"MSPointerMove":"pointermove",pC=Ve.msPointer?"MSPointerUp":"pointerup",mC=Ve.msPointer?"MSPointerCancel":"pointercancel",qy={touchstart:dC,touchmove:hC,touchend:pC,touchcancel:mC},gC={touchstart:h8,touchmove:Bh,touchend:Bh,touchcancel:Bh},Sl={},vC=!1;function l8(u,h,_){return h==="touchstart"&&d8(),gC[h]?(_=gC[h].bind(this,_),u.addEventListener(qy[h],_,!1),_):(console.warn("wrong event specified:",h),d)}function c8(u,h,_){if(!qy[h]){console.warn("wrong event specified:",h);return}u.removeEventListener(qy[h],_,!1)}function u8(u){Sl[u.pointerId]=u}function f8(u){Sl[u.pointerId]&&(Sl[u.pointerId]=u)}function yC(u){delete Sl[u.pointerId]}function d8(){vC||(document.addEventListener(dC,u8,!0),document.addEventListener(hC,f8,!0),document.addEventListener(pC,yC,!0),document.addEventListener(mC,yC,!0),vC=!0)}function Bh(u,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var _ in Sl)h.touches.push(Sl[_]);h.changedTouches=[h],u(h)}}function h8(u,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&zn(h),Bh(u,h)}function p8(u){var h={},_,O;for(O in u)_=u[O],h[O]=_&&_.bind?_.bind(u):_;return u=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var m8=200;function g8(u,h){u.addEventListener("dblclick",h);var _=0,O;function T($){if($.detail!==1){O=$.detail;return}if(!($.pointerType==="mouse"||$.sourceCapabilities&&!$.sourceCapabilities.firesTouchEvents)){var ne=SC($);if(!(ne.some(function(pe){return pe instanceof HTMLLabelElement&&pe.attributes.for})&&!ne.some(function(pe){return pe instanceof HTMLInputElement||pe instanceof HTMLSelectElement}))){var fe=Date.now();fe-_<=m8?(O++,O===2&&h(p8($))):O=1,_=fe}}}return u.addEventListener("click",T),{dblclick:h,simDblclick:T}}function v8(u,h){u.removeEventListener("dblclick",h.dblclick),u.removeEventListener("click",h.simDblclick)}var Gy=Vh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ku=Vh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_C=ku==="webkitTransition"||ku==="OTransition"?ku+"End":"transitionend";function bC(u){return typeof u=="string"?document.getElementById(u):u}function Pu(u,h){var _=u.style[h]||u.currentStyle&&u.currentStyle[h];if((!_||_==="auto")&&document.defaultView){var O=document.defaultView.getComputedStyle(u,null);_=O?O[h]:null}return _==="auto"?null:_}function mt(u,h,_){var O=document.createElement(u);return O.className=h||"",_&&_.appendChild(O),O}function Vt(u){var h=u.parentNode;h&&h.removeChild(u)}function Uh(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Ol(u){var h=u.parentNode;h&&h.lastChild!==u&&h.appendChild(u)}function Cl(u){var h=u.parentNode;h&&h.firstChild!==u&&h.insertBefore(u,h.firstChild)}function Ky(u,h){if(u.classList!==void 0)return u.classList.contains(h);var _=zh(u);return _.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(_)}function Ze(u,h){if(u.classList!==void 0)for(var _=v(h),O=0,T=_.length;O0?2*window.devicePixelRatio:1;function CC(u){return Ve.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/b8:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function s0(u,h){var _=h.relatedTarget;if(!_)return!0;try{for(;_&&_!==u;)_=_.parentNode}catch{return!1}return _!==u}var w8={__proto__:null,on:Ge,off:kt,stopPropagation:us,disableScrollPropagation:a0,disableClickPropagation:Du,preventDefault:zn,stop:fs,getPropagationPath:SC,getMousePosition:OC,getWheelDelta:CC,isExternalTarget:s0,addListener:Ge,removeListener:kt},EC=le.extend({run:function(u,h,_,O){this.stop(),this._el=u,this._inProgress=!0,this._duration=_||.25,this._easeOutPower=1/Math.max(O||.5,.2),this._startPos=cs(u),this._offset=h.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=V(this._animate,this),this._step()},_step:function(u){var h=+new Date-this._startTime,_=this._duration*1e3;h<_?this._runFrame(this._easeOut(h/_),u):(this._runFrame(1),this._complete())},_runFrame:function(u,h){var _=this._startPos.add(this._offset.multiplyBy(u));h&&_._round(),fn(this._el,_),this.fire("step")},_complete:function(){W(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),lt=le.extend({options:{crs:se,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,h){h=y(this,h),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),h.maxBounds&&this.setMaxBounds(h.maxBounds),h.zoom!==void 0&&(this._zoom=this._limitZoom(h.zoom)),h.center&&h.zoom!==void 0&&this.setView(ae(h.center),h.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ku&&Ve.any3d&&!Ve.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ge(this._proxy,_C,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,h,_){if(h=h===void 0?this._zoom:this._limitZoom(h),u=this._limitCenter(ae(u),h,this.options.maxBounds),_=_||{},this._stop(),this._loaded&&!_.reset&&_!==!0){_.animate!==void 0&&(_.zoom=i({animate:_.animate},_.zoom),_.pan=i({animate:_.animate,duration:_.duration},_.pan));var O=this._zoom!==h?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,h,_.zoom):this._tryAnimatedPan(u,_.pan);if(O)return clearTimeout(this._sizeTimer),this}return this._resetView(u,h,_.pan&&_.pan.noMoveStart),this},setZoom:function(u,h){return this._loaded?this.setView(this.getCenter(),u,{zoom:h}):(this._zoom=u,this)},zoomIn:function(u,h){return u=u||(Ve.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,h)},zoomOut:function(u,h){return u=u||(Ve.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,h)},setZoomAround:function(u,h,_){var O=this.getZoomScale(h),T=this.getSize().divideBy(2),$=u instanceof G?u:this.latLngToContainerPoint(u),ne=$.subtract(T).multiplyBy(1-1/O),fe=this.containerPointToLatLng(T.add(ne));return this.setView(fe,h,{zoom:_})},_getBoundsCenterZoom:function(u,h){h=h||{},u=u.getBounds?u.getBounds():K(u);var _=A(h.paddingTopLeft||h.padding||[0,0]),O=A(h.paddingBottomRight||h.padding||[0,0]),T=this.getBoundsZoom(u,!1,_.add(O));if(T=typeof h.maxZoom=="number"?Math.min(h.maxZoom,T):T,T===1/0)return{center:u.getCenter(),zoom:T};var $=O.subtract(_).divideBy(2),ne=this.project(u.getSouthWest(),T),fe=this.project(u.getNorthEast(),T),pe=this.unproject(ne.add(fe).divideBy(2).add($),T);return{center:pe,zoom:T}},fitBounds:function(u,h){if(u=K(u),!u.isValid())throw new Error("Bounds are not valid.");var _=this._getBoundsCenterZoom(u,h);return this.setView(_.center,_.zoom,h)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,h){return this.setView(u,this._zoom,{pan:h})},panBy:function(u,h){if(u=A(u).round(),h=h||{},!u.x&&!u.y)return this.fire("moveend");if(h.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new EC,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),h.noMoveStart||this.fire("movestart"),h.animate!==!1){Ze(this._mapPane,"leaflet-pan-anim");var _=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,_,h.duration||.25,h.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,h,_){if(_=_||{},_.animate===!1||!Ve.any3d)return this.setView(u,h,_);this._stop();var O=this.project(this.getCenter()),T=this.project(u),$=this.getSize(),ne=this._zoom;u=ae(u),h=h===void 0?ne:h;var fe=Math.max($.x,$.y),pe=fe*this.getZoomScale(ne,h),xe=T.distanceTo(O)||1,Ae=1.42,We=Ae*Ae;function Xe(dn){var rp=dn?-1:1,cF=dn?pe:fe,uF=pe*pe-fe*fe+rp*We*We*xe*xe,fF=2*cF*We*xe,y0=uF/fF,aE=Math.sqrt(y0*y0+1)-y0,dF=aE<1e-9?-18:Math.log(aE);return dF}function ur(dn){return(Math.exp(dn)-Math.exp(-dn))/2}function On(dn){return(Math.exp(dn)+Math.exp(-dn))/2}function ti(dn){return ur(dn)/On(dn)}var br=Xe(0);function jl(dn){return fe*(On(br)/On(br+Ae*dn))}function oF(dn){return fe*(On(br)*ti(br+Ae*dn)-ur(br))/We}function aF(dn){return 1-Math.pow(1-dn,1.5)}var sF=Date.now(),iE=(Xe(1)-br)/Ae,lF=_.duration?1e3*_.duration:1e3*iE*.8;function oE(){var dn=(Date.now()-sF)/lF,rp=aF(dn)*iE;dn<=1?(this._flyToFrame=V(oE,this),this._move(this.unproject(O.add(T.subtract(O).multiplyBy(oF(rp)/xe)),ne),this.getScaleZoom(fe/jl(rp),ne),{flyTo:!0})):this._move(u,h)._moveEnd(!0)}return this._moveStart(!0,_.noMoveStart),oE.call(this),this},flyToBounds:function(u,h){var _=this._getBoundsCenterZoom(u,h);return this.flyTo(_.center,_.zoom,h)},setMaxBounds:function(u){return u=K(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var h=this.options.minZoom;return this.options.minZoom=u,this._loaded&&h!==u&&(this.fire("zoomlevelschange"),this.getZoom()this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,h){this._enforcingBounds=!0;var _=this.getCenter(),O=this._limitCenter(_,this._zoom,K(u));return _.equals(O)||this.panTo(O,h),this._enforcingBounds=!1,this},panInside:function(u,h){h=h||{};var _=A(h.paddingTopLeft||h.padding||[0,0]),O=A(h.paddingBottomRight||h.padding||[0,0]),T=this.project(this.getCenter()),$=this.project(u),ne=this.getPixelBounds(),fe=re([ne.min.add(_),ne.max.subtract(O)]),pe=fe.getSize();if(!fe.contains($)){this._enforcingBounds=!0;var xe=$.subtract(fe.getCenter()),Ae=fe.extend($).getSize().subtract(pe);T.x+=xe.x<0?-Ae.x:Ae.x,T.y+=xe.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(T),h),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var _=this.getSize(),O=h.divideBy(2).round(),T=_.divideBy(2).round(),$=O.subtract(T);return!$.x&&!$.y?this:(u.animate&&u.pan?this.panBy($):(u.pan&&this._rawPanBy($),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:_}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=a(this._handleGeolocationResponse,this),_=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,_,u):navigator.geolocation.getCurrentPosition(h,_,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var h=u.code,_=u.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+_+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var h=u.coords.latitude,_=u.coords.longitude,O=new ie(h,_),T=O.toBounds(u.coords.accuracy*2),$=this._locateOptions;if($.setView){var ne=this.getBoundsZoom(T);this.setView(O,$.maxZoom?Math.min(ne,$.maxZoom):ne)}var fe={latlng:O,bounds:T,timestamp:u.timestamp};for(var pe in u.coords)typeof u.coords[pe]=="number"&&(fe[pe]=u.coords[pe]);this.fire("locationfound",fe)}},addHandler:function(u,h){if(!h)return this;var _=this[u]=new h(this);return this._handlers.push(_),this.options[u]&&_.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Vt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(W(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)Vt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,h){var _="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),O=mt("div",_,h||this._mapPane);return u&&(this._panes[u]=O),O},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),h=this.unproject(u.getBottomLeft()),_=this.unproject(u.getTopRight());return new U(h,_)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,h,_){u=K(u),_=A(_||[0,0]);var O=this.getZoom()||0,T=this.getMinZoom(),$=this.getMaxZoom(),ne=u.getNorthWest(),fe=u.getSouthEast(),pe=this.getSize().subtract(_),xe=re(this.project(fe,O),this.project(ne,O)).getSize(),Ae=Ve.any3d?this.options.zoomSnap:1,We=pe.x/xe.x,Xe=pe.y/xe.y,ur=h?Math.max(We,Xe):Math.min(We,Xe);return O=this.getScaleZoom(ur,O),Ae&&(O=Math.round(O/(Ae/100))*(Ae/100),O=h?Math.ceil(O/Ae)*Ae:Math.floor(O/Ae)*Ae),Math.max(T,Math.min($,O))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new G(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,h){var _=this._getTopLeftPoint(u,h);return new z(_,_.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,h){var _=this.options.crs;return h=h===void 0?this._zoom:h,_.scale(u)/_.scale(h)},getScaleZoom:function(u,h){var _=this.options.crs;h=h===void 0?this._zoom:h;var O=_.zoom(u*_.scale(h));return isNaN(O)?1/0:O},project:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(ae(u),h)},unproject:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(A(u),h)},layerPointToLatLng:function(u){var h=A(u).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(u){var h=this.project(ae(u))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(K(u))},distance:function(u,h){return this.options.crs.distance(ae(u),ae(h))},containerPointToLayerPoint:function(u){return A(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return A(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var h=this.containerPointToLayerPoint(A(u));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return OC(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var h=this._container=bC(u);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ge(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ve.any3d,Ze(u,"leaflet-container"+(Ve.touch?" leaflet-touch":"")+(Ve.retina?" leaflet-retina":"")+(Ve.ielt9?" leaflet-oldie":"")+(Ve.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=Pu(u,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),fn(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ze(u.markerPane,"leaflet-zoom-hide"),Ze(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,h,_){fn(this._mapPane,new G(0,0));var O=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var T=this._zoom!==h;this._moveStart(T,_)._move(u,h)._moveEnd(T),this.fire("viewreset"),O&&this.fire("load")},_moveStart:function(u,h){return u&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(u,h,_,O){h===void 0&&(h=this._zoom);var T=this._zoom!==h;return this._zoom=h,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),O?_&&_.pinch&&this.fire("zoom",_):((T||_&&_.pinch)&&this.fire("zoom",_),this.fire("move",_)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return W(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){fn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var h=u?kt:Ge;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),Ve.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){W(this._resizeRequest),this._resizeRequest=V(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,h){for(var _=[],O,T=h==="mouseout"||h==="mouseover",$=u.target||u.srcElement,ne=!1;$;){if(O=this._targets[l($)],O&&(h==="click"||h==="preclick")&&this._draggableMoved(O)){ne=!0;break}if(O&&O.listens(h,!0)&&(T&&!s0($,u)||(_.push(O),T))||$===this._container)break;$=$.parentNode}return!_.length&&!ne&&!T&&this.listens(h,!0)&&(_=[this]),_},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var h=u.target||u.srcElement;if(!(!this._loaded||h._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(h))){var _=u.type;_==="mousedown"&&t0(h),this._fireDOMEvent(u,_)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,h,_){if(u.type==="click"){var O=i({},u);O.type="preclick",this._fireDOMEvent(O,O.type,_)}var T=this._findEventTargets(u,h);if(_){for(var $=[],ne=0;ne<_.length;ne++)_[ne].listens(h,!0)&&$.push(_[ne]);T=$.concat(T)}if(T.length){h==="contextmenu"&&zn(u);var fe=T[0],pe={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var xe=fe.getLatLng&&(!fe._radius||fe._radius<=10);pe.containerPoint=xe?this.latLngToContainerPoint(fe.getLatLng()):this.mouseEventToContainerPoint(u),pe.layerPoint=this.containerPointToLayerPoint(pe.containerPoint),pe.latlng=xe?fe.getLatLng():this.layerPointToLatLng(pe.layerPoint)}for(ne=0;ne0?Math.round(u-h)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(h))},_limitZoom:function(u){var h=this.getMinZoom(),_=this.getMaxZoom(),O=Ve.any3d?this.options.zoomSnap:1;return O&&(u=Math.round(u/O)*O),Math.max(h,Math.min(_,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){nn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,h){var _=this._getCenterOffset(u)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(_)?!1:(this.panBy(_,h),!0)},_createAnimProxy:function(){var u=this._proxy=mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(h){var _=Gy,O=this._proxy.style[_];ls(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),O===this._proxy.style[_]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Vt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),h=this.getZoom();ls(this._proxy,this.project(u,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,h,_){if(this._animatingZoom)return!0;if(_=_||{},!this._zoomAnimated||_.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var O=this.getZoomScale(h),T=this._getCenterOffset(u)._divideBy(1-1/O);return _.animate!==!0&&!this.getSize().contains(T)?!1:(V(function(){this._moveStart(!0,_.noMoveStart||!1)._animateZoom(u,h,!0)},this),!0)},_animateZoom:function(u,h,_,O){this._mapPane&&(_&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=h,Ze(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:h,noUpdate:O}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&nn(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function x8(u,h){return new lt(u,h)}var wi=q.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var h=this._map;return h&&h.removeControl(this),this.options.position=u,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var h=this._container=this.onAdd(u),_=this.getPosition(),O=u._controlCorners[_];return Ze(h,"leaflet-control"),_.indexOf("bottom")!==-1?O.insertBefore(h,O.firstChild):O.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Vt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),Lu=function(u){return new wi(u)};lt.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},h="leaflet-",_=this._controlContainer=mt("div",h+"control-container",this._container);function O(T,$){var ne=h+T+" "+h+$;u[T+$]=mt("div",ne,_)}O("top","left"),O("top","right"),O("bottom","left"),O("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Vt(this._controlCorners[u]);Vt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var kC=wi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,h,_,O){return _1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=h&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var h=this._getLayer(l(u.target)),_=h.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;_&&this._map.fire(_,h)},_createRadioElement:function(u,h){var _='",O=document.createElement("div");return O.innerHTML=_,O.firstChild},_addItem:function(u){var h=document.createElement("label"),_=this._map.hasLayer(u.layer),O;u.overlay?(O=document.createElement("input"),O.type="checkbox",O.className="leaflet-control-layers-selector",O.defaultChecked=_):O=this._createRadioElement("leaflet-base-layers_"+l(this),_),this._layerControlInputs.push(O),O.layerId=l(u.layer),Ge(O,"click",this._onInputClick,this);var T=document.createElement("span");T.innerHTML=" "+u.name;var $=document.createElement("span");h.appendChild($),$.appendChild(O),$.appendChild(T);var ne=u.overlay?this._overlaysList:this._baseLayersList;return ne.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,h,_,O=[],T=[];this._handlingClick=!0;for(var $=u.length-1;$>=0;$--)h=u[$],_=this._getLayer(h.layerId).layer,h.checked?O.push(_):h.checked||T.push(_);for($=0;$=0;T--)h=u[T],_=this._getLayer(h.layerId).layer,h.disabled=_.options.minZoom!==void 0&&O<_.options.minZoom||_.options.maxZoom!==void 0&&O>_.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,Ge(u,"click",zn),this.expand();var h=this;setTimeout(function(){kt(u,"click",zn),h._preventClick=!1})}}),S8=function(u,h,_){return new kC(u,h,_)},l0=wi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var h="leaflet-control-zoom",_=mt("div",h+" leaflet-bar"),O=this.options;return this._zoomInButton=this._createButton(O.zoomInText,O.zoomInTitle,h+"-in",_,this._zoomIn),this._zoomOutButton=this._createButton(O.zoomOutText,O.zoomOutTitle,h+"-out",_,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),_},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,h,_,O,T){var $=mt("a",_,O);return $.innerHTML=u,$.href="#",$.title=h,$.setAttribute("role","button"),$.setAttribute("aria-label",h),Du($),Ge($,"click",fs),Ge($,"click",T,this),Ge($,"click",this._refocusOnMap,this),$},_updateDisabled:function(){var u=this._map,h="leaflet-disabled";nn(this._zoomInButton,h),nn(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Ze(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Ze(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});lt.mergeOptions({zoomControl:!0}),lt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new l0,this.addControl(this.zoomControl))});var O8=function(u){return new l0(u)},PC=wi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var h="leaflet-control-scale",_=mt("div",h),O=this.options;return this._addScales(O,h+"-line",_),u.on(O.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),_},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,h,_){u.metric&&(this._mScale=mt("div",h,_)),u.imperial&&(this._iScale=mt("div",h,_))},_update:function(){var u=this._map,h=u.getSize().y/2,_=u.distance(u.containerPointToLatLng([0,h]),u.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(_)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var h=this._getRoundNum(u),_=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,_,h/u)},_updateImperial:function(u){var h=u*3.2808399,_,O,T;h>5280?(_=h/5280,O=this._getRoundNum(_),this._updateScale(this._iScale,O+" mi",O/_)):(T=this._getRoundNum(h),this._updateScale(this._iScale,T+" ft",T/h))},_updateScale:function(u,h,_){u.style.width=Math.round(this.options.maxWidth*_)+"px",u.innerHTML=h},_getRoundNum:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),_=u/h;return _=_>=10?10:_>=5?5:_>=3?3:_>=2?2:1,h*_}}),C8=function(u){return new PC(u)},E8='',c0=wi.extend({options:{position:"bottomright",prefix:''+(Ve.inlineSvg?E8+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=mt("div","leaflet-control-attribution"),Du(this._container);for(var h in u._layers)u._layers[h].getAttribution&&this.addAttribution(u._layers[h].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var h in this._attributions)this._attributions[h]&&u.push(h);var _=[];this.options.prefix&&_.push(this.options.prefix),u.length&&_.push(u.join(", ")),this._container.innerHTML=_.join(' ')}}});lt.mergeOptions({attributionControl:!0}),lt.addInitHook(function(){this.options.attributionControl&&new c0().addTo(this)});var k8=function(u){return new c0(u)};wi.Layers=kC,wi.Zoom=l0,wi.Scale=PC,wi.Attribution=c0,Lu.layers=S8,Lu.zoom=O8,Lu.scale=C8,Lu.attribution=k8;var zi=q.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});zi.addTo=function(u,h){return u.addHandler(h,this),this};var P8={Events:oe},TC=Ve.touch?"touchstart mousedown":"mousedown",ta=le.extend({options:{clickTolerance:3},initialize:function(u,h,_,O){y(this,O),this._element=u,this._dragStartTarget=h||u,this._preventOutline=_},enable:function(){this._enabled||(Ge(this._dragStartTarget,TC,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ta._dragging===this&&this.finishDrag(!0),kt(this._dragStartTarget,TC,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Ky(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){ta._dragging===this&&this.finishDrag();return}if(!(ta._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(ta._dragging=this,this._preventOutline&&t0(this._element),Xy(),Tu(),!this._moving)){this.fire("down");var h=u.touches?u.touches[0]:u,_=wC(this._element);this._startPoint=new G(h.clientX,h.clientY),this._startPos=cs(this._element),this._parentScale=n0(_);var O=u.type==="mousedown";Ge(document,O?"mousemove":"touchmove",this._onMove,this),Ge(document,O?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var h=u.touches&&u.touches.length===1?u.touches[0]:u,_=new G(h.clientX,h.clientY)._subtract(this._startPoint);!_.x&&!_.y||Math.abs(_.x)+Math.abs(_.y)$&&(ne=fe,$=pe);$>_&&(h[ne]=1,f0(u,h,_,O,ne),f0(u,h,_,ne,T))}function D8(u,h){for(var _=[u[0]],O=1,T=0,$=u.length;O<$;O++)L8(u[O],u[T])>h&&(_.push(u[O]),T=O);return T<$-1&&_.push(u[$-1]),_}var RC;function NC(u,h,_,O,T){var $=O?RC:ds(u,_),ne=ds(h,_),fe,pe,xe;for(RC=ne;;){if(!($|ne))return[u,h];if($&ne)return!1;fe=$||ne,pe=Yh(u,h,fe,_,T),xe=ds(pe,_),fe===$?(u=pe,$=xe):(h=pe,ne=xe)}}function Yh(u,h,_,O,T){var $=h.x-u.x,ne=h.y-u.y,fe=O.min,pe=O.max,xe,Ae;return _&8?(xe=u.x+$*(pe.y-u.y)/ne,Ae=pe.y):_&4?(xe=u.x+$*(fe.y-u.y)/ne,Ae=fe.y):_&2?(xe=pe.x,Ae=u.y+ne*(pe.x-u.x)/$):_&1&&(xe=fe.x,Ae=u.y+ne*(fe.x-u.x)/$),new G(xe,Ae,T)}function ds(u,h){var _=0;return u.xh.max.x&&(_|=2),u.yh.max.y&&(_|=8),_}function L8(u,h){var _=h.x-u.x,O=h.y-u.y;return _*_+O*O}function Ru(u,h,_,O){var T=h.x,$=h.y,ne=_.x-T,fe=_.y-$,pe=ne*ne+fe*fe,xe;return pe>0&&(xe=((u.x-T)*ne+(u.y-$)*fe)/pe,xe>1?(T=_.x,$=_.y):xe>0&&(T+=ne*xe,$+=fe*xe)),ne=u.x-T,fe=u.y-$,O?ne*ne+fe*fe:new G(T,$)}function ei(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function AC(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ei(u)}function IC(u,h){var _,O,T,$,ne,fe,pe,xe;if(!u||u.length===0)throw new Error("latlngs not passed");ei(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ae=ae([0,0]),We=K(u),Xe=We.getNorthWest().distanceTo(We.getSouthWest())*We.getNorthEast().distanceTo(We.getNorthWest());Xe<1700&&(Ae=u0(u));var ur=u.length,On=[];for(_=0;_O){pe=($-O)/T,xe=[fe.x-pe*(fe.x-ne.x),fe.y-pe*(fe.y-ne.y)];break}var br=h.unproject(A(xe));return ae([br.lat+Ae.lat,br.lng+Ae.lng])}var R8={__proto__:null,simplify:DC,pointToSegmentDistance:LC,closestPointOnSegment:M8,clipSegment:NC,_getEdgeIntersection:Yh,_getBitCode:ds,_sqClosestPointOnSegment:Ru,isFlat:ei,_flat:AC,polylineCenter:IC},d0={project:function(u){return new G(u.lng,u.lat)},unproject:function(u){return new ie(u.y,u.x)},bounds:new z([-180,-90],[180,90])},h0={R:6378137,R_MINOR:6356752314245179e-9,bounds:new z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var h=Math.PI/180,_=this.R,O=u.lat*h,T=this.R_MINOR/_,$=Math.sqrt(1-T*T),ne=$*Math.sin(O),fe=Math.tan(Math.PI/4-O/2)/Math.pow((1-ne)/(1+ne),$/2);return O=-_*Math.log(Math.max(fe,1e-10)),new G(u.lng*h*_,O)},unproject:function(u){for(var h=180/Math.PI,_=this.R,O=this.R_MINOR/_,T=Math.sqrt(1-O*O),$=Math.exp(-u.y/_),ne=Math.PI/2-2*Math.atan($),fe=0,pe=.1,xe;fe<15&&Math.abs(pe)>1e-7;fe++)xe=T*Math.sin(ne),xe=Math.pow((1-xe)/(1+xe),T/2),pe=Math.PI/2-2*Math.atan($*xe)-ne,ne+=pe;return new ie(ne*h,u.x*h/_)}},N8={__proto__:null,LonLat:d0,Mercator:h0,SphericalMercator:I},A8=i({},E,{code:"EPSG:3395",projection:h0,transformation:function(){var u=.5/(Math.PI*h0.R);return X(u,.5,-u,.5)}()}),FC=i({},E,{code:"EPSG:4326",projection:d0,transformation:X(1/180,1,-1/180,.5)}),I8=i({},he,{projection:d0,transformation:X(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,h){var _=h.lng-u.lng,O=h.lat-u.lat;return Math.sqrt(_*_+O*O)},infinite:!0});he.Earth=E,he.EPSG3395=A8,he.EPSG3857=se,he.EPSG900913=ge,he.EPSG4326=FC,he.Simple=I8;var xi=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var h=u.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var _=this.getEvents();h.on(_,this),this.once("remove",function(){h.off(_,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});lt.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(u);return this._layers[h]?this:(this._layers[h]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var h=l(u);return this._layers[h]?(this._loaded&&u.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,h){for(var _ in this._layers)u.call(h,this._layers[_]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var h=0,_=u.length;h<_;h++)this.addLayer(u[h])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[l(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var h=l(u);this._zoomBoundLayers[h]&&(delete this._zoomBoundLayers[h],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,h=-1/0,_=this._getZoomSpan();for(var O in this._zoomBoundLayers){var T=this._zoomBoundLayers[O].options;u=T.minZoom===void 0?u:Math.min(u,T.minZoom),h=T.maxZoom===void 0?h:Math.max(h,T.maxZoom)}this._layersMaxZoom=h===-1/0?void 0:h,this._layersMinZoom=u===1/0?void 0:u,_!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof ie&&h[0].equals(h[_-1])&&h.pop(),h},_setLatLngs:function(u){mo.prototype._setLatLngs.call(this,u),ei(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ei(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,h=this.options.weight,_=new G(h,h);if(u=new z(u.min.subtract(_),u.max.add(_)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var O=0,T=this._rings.length,$;Ou.y!=T.y>u.y&&u.x<(T.x-O.x)*(u.y-O.y)/(T.y-O.y)+O.x&&(h=!h);return h||mo.prototype._containsPoint.call(this,u,!0)}});function W8(u,h){return new Pl(u,h)}var go=po.extend({initialize:function(u,h){y(this,h),this._layers={},u&&this.addData(u)},addData:function(u){var h=S(u)?u:u.features,_,O,T;if(h){for(_=0,O=h.length;_0&&T.push(T[0].slice()),T}function Tl(u,h){return u.feature?i({},u.feature,{geometry:h}):Xh(h)}function Xh(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var v0={toGeoJSON:function(u){return Tl(this,{type:"Point",coordinates:g0(this.getLatLng(),u)})}};qh.include(v0),p0.include(v0),Gh.include(v0),mo.include({toGeoJSON:function(u){var h=!ei(this._latlngs),_=Qh(this._latlngs,h?1:0,!1,u);return Tl(this,{type:(h?"Multi":"")+"LineString",coordinates:_})}}),Pl.include({toGeoJSON:function(u){var h=!ei(this._latlngs),_=h&&!ei(this._latlngs[0]),O=Qh(this._latlngs,_?2:h?1:0,!0,u);return h||(O=[O]),Tl(this,{type:(_?"Multi":"")+"Polygon",coordinates:O})}}),El.include({toMultiPoint:function(u){var h=[];return this.eachLayer(function(_){h.push(_.toGeoJSON(u).geometry.coordinates)}),Tl(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(u){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(u);var _=h==="GeometryCollection",O=[];return this.eachLayer(function(T){if(T.toGeoJSON){var $=T.toGeoJSON(u);if(_)O.push($.geometry);else{var ne=Xh($);ne.type==="FeatureCollection"?O.push.apply(O,ne.features):O.push(ne)}}}),_?Tl(this,{geometries:O,type:"GeometryCollection"}):{type:"FeatureCollection",features:O}}});function UC(u,h){return new go(u,h)}var Y8=UC,Jh=xi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,h,_){this._url=u,this._bounds=K(h),y(this,_)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ze(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Vt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&Ol(this._image),this},bringToBack:function(){return this._map&&Cl(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=K(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",h=this._image=u?this._url:mt("img");if(Ze(h,"leaflet-image-layer"),this._zoomAnimated&&Ze(h,"leaflet-zoom-animated"),this.options.className&&Ze(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onload=a(this.fire,this,"load"),h.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(u){var h=this._map.getZoomScale(u.zoom),_=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;ls(this._image,_,h)},_reset:function(){var u=this._image,h=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),_=h.getSize();fn(u,h.min),u.style.width=_.x+"px",u.style.height=_.y+"px"},_updateOpacity:function(){Jr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),q8=function(u,h,_){return new Jh(u,h,_)},zC=Jh.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",h=this._image=u?this._url:mt("video");if(Ze(h,"leaflet-image-layer"),this._zoomAnimated&&Ze(h,"leaflet-zoom-animated"),this.options.className&&Ze(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onloadeddata=a(this.fire,this,"load"),u){for(var _=h.getElementsByTagName("source"),O=[],T=0;T<_.length;T++)O.push(_[T].src);this._url=_.length>0?O:[h.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var $=0;$T?(h.height=T+"px",Ze(u,$)):nn(u,$),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),_=this._getAnchor();fn(this._container,h.add(_))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,h=parseInt(Pu(this._container,"marginBottom"),10)||0,_=this._container.offsetHeight+h,O=this._containerWidth,T=new G(this._containerLeft,-_-this._containerBottom);T._add(cs(this._container));var $=u.layerPointToContainerPoint(T),ne=A(this.options.autoPanPadding),fe=A(this.options.autoPanPaddingTopLeft||ne),pe=A(this.options.autoPanPaddingBottomRight||ne),xe=u.getSize(),Ae=0,We=0;$.x+O+pe.x>xe.x&&(Ae=$.x+O-xe.x+pe.x),$.x-Ae-fe.x<0&&(Ae=$.x-fe.x),$.y+_+pe.y>xe.y&&(We=$.y+_-xe.y+pe.y),$.y-We-fe.y<0&&(We=$.y-fe.y),(Ae||We)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ae,We]))}},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Z8=function(u,h){return new ep(u,h)};lt.mergeOptions({closePopupOnClick:!0}),lt.include({openPopup:function(u,h,_){return this._initOverlay(ep,u,h,_).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),xi.include({bindPopup:function(u,h){return this._popup=this._initOverlay(ep,this._popup,u,h),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof po||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){fs(u);var h=u.layer||u.target;if(this._popup._source===h&&!(h instanceof na)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=h,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var tp=Vi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Vi.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Vi.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Vi.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",h=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var h,_,O=this._map,T=this._container,$=O.latLngToContainerPoint(O.getCenter()),ne=O.layerPointToContainerPoint(u),fe=this.options.direction,pe=T.offsetWidth,xe=T.offsetHeight,Ae=A(this.options.offset),We=this._getAnchor();fe==="top"?(h=pe/2,_=xe):fe==="bottom"?(h=pe/2,_=0):fe==="center"?(h=pe/2,_=xe/2):fe==="right"?(h=0,_=xe/2):fe==="left"?(h=pe,_=xe/2):ne.x<$.x?(fe="right",h=0,_=xe/2):(fe="left",h=pe+(Ae.x+We.x)*2,_=xe/2),u=u.subtract(A(h,_,!0)).add(Ae).add(We),nn(T,"leaflet-tooltip-right"),nn(T,"leaflet-tooltip-left"),nn(T,"leaflet-tooltip-top"),nn(T,"leaflet-tooltip-bottom"),Ze(T,"leaflet-tooltip-"+fe),fn(T,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&Jr(this._container,u)},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(h)},_getAnchor:function(){return A(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Q8=function(u,h){return new tp(u,h)};lt.include({openTooltip:function(u,h,_){return this._initOverlay(tp,u,h,_).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),xi.include({bindTooltip:function(u,h){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(tp,this._tooltip,u,h),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var h=u?"off":"on",_={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?_.add=this._openTooltip:(_.mouseover=this._openTooltip,_.mouseout=this.closeTooltip,_.click=this._openTooltip,this._map?this._addFocusListeners():_.add=this._addFocusListeners),this._tooltip.options.sticky&&(_.mousemove=this._moveTooltip),this[h](_),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof po||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var h=typeof u.getElement=="function"&&u.getElement();h&&(Ge(h,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Ge(h,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var h=typeof u.getElement=="function"&&u.getElement();h&&h.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var h=this;this._map.once("moveend",function(){h._openOnceFlag=!1,h._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var h=u.latlng,_,O;this._tooltip.options.sticky&&u.originalEvent&&(_=this._map.mouseEventToContainerPoint(u.originalEvent),O=this._map.containerPointToLayerPoint(_),h=this._map.layerPointToLatLng(O)),this._tooltip.setLatLng(h)}});var HC=kl.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var h=u&&u.tagName==="DIV"?u:document.createElement("div"),_=this.options;if(_.html instanceof Element?(Uh(h),h.appendChild(_.html)):h.innerHTML=_.html!==!1?_.html:"",_.bgPos){var O=A(_.bgPos);h.style.backgroundPosition=-O.x+"px "+-O.y+"px"}return this._setIconStyles(h,"icon"),h},createShadow:function(){return null}});function X8(u){return new HC(u)}kl.Default=Nu;var Au=xi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ve.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){y(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),Vt(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ol(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Cl(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof G?u:new G(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var h=this.getPane().children,_=-u(-1/0,1/0),O=0,T=h.length,$;Othis.options.maxZoom||_O?this._retainParent(T,$,ne,O):!1)},_retainChildren:function(u,h,_,O){for(var T=2*u;T<2*u+2;T++)for(var $=2*h;$<2*h+2;$++){var ne=new G(T,$);ne.z=_+1;var fe=this._tileCoordsToKey(ne),pe=this._tiles[fe];if(pe&&pe.active){pe.retain=!0;continue}else pe&&pe.loaded&&(pe.retain=!0);_+1this.options.maxZoom||this.options.minZoom!==void 0&&T1){this._setView(u,_);return}for(var We=T.min.y;We<=T.max.y;We++)for(var Xe=T.min.x;Xe<=T.max.x;Xe++){var ur=new G(Xe,We);if(ur.z=this._tileZoom,!!this._isValidTile(ur)){var On=this._tiles[this._tileCoordsToKey(ur)];On?On.current=!0:ne.push(ur)}}if(ne.sort(function(br,jl){return br.distanceTo($)-jl.distanceTo($)}),ne.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ti=document.createDocumentFragment();for(Xe=0;Xe_.max.x)||!h.wrapLat&&(u.y<_.min.y||u.y>_.max.y))return!1}if(!this.options.bounds)return!0;var O=this._tileCoordsToBounds(u);return K(this.options.bounds).overlaps(O)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var h=this._map,_=this.getTileSize(),O=u.scaleBy(_),T=O.add(_),$=h.unproject(O,u.z),ne=h.unproject(T,u.z);return[$,ne]},_tileCoordsToBounds:function(u){var h=this._tileCoordsToNwSe(u),_=new U(h[0],h[1]);return this.options.noWrap||(_=this._map.wrapLatLngBounds(_)),_},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var h=u.split(":"),_=new G(+h[0],+h[1]);return _.z=+h[2],_},_removeTile:function(u){var h=this._tiles[u];h&&(Vt(h.el),delete this._tiles[u],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Ze(u,"leaflet-tile");var h=this.getTileSize();u.style.width=h.x+"px",u.style.height=h.y+"px",u.onselectstart=d,u.onmousemove=d,Ve.ielt9&&this.options.opacity<1&&Jr(u,this.options.opacity)},_addTile:function(u,h){var _=this._getTilePos(u),O=this._tileCoordsToKey(u),T=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(T),this.createTile.length<2&&V(a(this._tileReady,this,u,null,T)),fn(T,_),this._tiles[O]={el:T,coords:u,current:!0},h.appendChild(T),this.fire("tileloadstart",{tile:T,coords:u})},_tileReady:function(u,h,_){h&&this.fire("tileerror",{error:h,tile:_,coords:u});var O=this._tileCoordsToKey(u);_=this._tiles[O],_&&(_.loaded=+new Date,this._map._fadeAnimated?(Jr(_.el,0),W(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(_.active=!0,this._pruneTiles()),h||(Ze(_.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:_.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ve.ielt9||!this._map._fadeAnimated?V(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var h=new G(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return h.z=u.z,h},_pxBoundsToTileRange:function(u){var h=this.getTileSize();return new z(u.min.unscaleBy(h).floor(),u.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function J8(u){return new Au(u)}var Ml=Au.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,h){this._url=u,h=y(this,h),h.detectRetina&&Ve.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,h){return this._url===u&&h===void 0&&(h=!0),this._url=u,h||this.redraw(),this},createTile:function(u,h){var _=document.createElement("img");return Ge(_,"load",a(this._tileOnLoad,this,h,_)),Ge(_,"error",a(this._tileOnError,this,h,_)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(_.referrerPolicy=this.options.referrerPolicy),_.alt="",_.src=this.getTileUrl(u),_},getTileUrl:function(u){var h={r:Ve.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var _=this._globalTileRange.max.y-u.y;this.options.tms&&(h.y=_),h["-y"]=_}return w(this._url,i(h,this.options))},_tileOnLoad:function(u,h){Ve.ielt9?setTimeout(a(u,this,null,h),0):u(null,h)},_tileOnError:function(u,h,_){var O=this.options.errorTileUrl;O&&h.getAttribute("src")!==O&&(h.src=O),u(_,h)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,h=this.options.maxZoom,_=this.options.zoomReverse,O=this.options.zoomOffset;return _&&(u=h-u),u+O},_getSubdomain:function(u){var h=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var u,h;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(h=this._tiles[u].el,h.onload=d,h.onerror=d,!h.complete)){h.src=k;var _=this._tiles[u].coords;Vt(h),delete this._tiles[u],this.fire("tileabort",{tile:h,coords:_})}},_removeTile:function(u){var h=this._tiles[u];if(h)return h.el.setAttribute("src",k),Au.prototype._removeTile.call(this,u)},_tileReady:function(u,h,_){if(!(!this._map||_&&_.getAttribute("src")===k))return Au.prototype._tileReady.call(this,u,h,_)}});function WC(u,h){return new Ml(u,h)}var YC=Ml.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,h){this._url=u;var _=i({},this.defaultWmsParams);for(var O in h)O in this.options||(_[O]=h[O]);h=y(this,h);var T=h.detectRetina&&Ve.retina?2:1,$=this.getTileSize();_.width=$.x*T,_.height=$.y*T,this.wmsParams=_},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,Ml.prototype.onAdd.call(this,u)},getTileUrl:function(u){var h=this._tileCoordsToNwSe(u),_=this._crs,O=re(_.project(h[0]),_.project(h[1])),T=O.min,$=O.max,ne=(this._wmsVersion>=1.3&&this._crs===FC?[T.y,T.x,$.y,$.x]:[T.x,T.y,$.x,$.y]).join(","),fe=Ml.prototype.getTileUrl.call(this,u);return fe+x(this.wmsParams,fe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+ne},setParams:function(u,h){return i(this.wmsParams,u),h||this.redraw(),this}});function eF(u,h){return new YC(u,h)}Ml.WMS=YC,WC.wms=eF;var vo=xi.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ze(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,h){var _=this._map.getZoomScale(h,this._zoom),O=this._map.getSize().multiplyBy(.5+this.options.padding),T=this._map.project(this._center,h),$=O.multiplyBy(-_).add(T).subtract(this._map._getNewPixelOrigin(u,h));Ve.any3d?ls(this._container,$,_):fn(this._container,$)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,h=this._map.getSize(),_=this._map.containerPointToLayerPoint(h.multiplyBy(-u)).round();this._bounds=new z(_,_.add(h.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qC=vo.extend({options:{tolerance:0},getEvents:function(){var u=vo.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){vo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Ge(u,"mousemove",this._onMouseMove,this),Ge(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ge(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){W(this._redrawRequest),delete this._ctx,Vt(this._container),kt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var h in this._layers)u=this._layers[h],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vo.prototype._update.call(this);var u=this._bounds,h=this._container,_=u.getSize(),O=Ve.retina?2:1;fn(h,u.min),h.width=O*_.x,h.height=O*_.y,h.style.width=_.x+"px",h.style.height=_.y+"px",Ve.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){vo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var h=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var h=u._order,_=h.next,O=h.prev;_?_.prev=O:this._drawLast=O,O?O.next=_:this._drawFirst=_,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var h=u.options.dashArray.split(/[, ]+/),_=[],O,T;for(T=0;T')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),tF={_initContainer:function(){this._container=mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(vo.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var h=u._container=Iu("shape");Ze(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",u._path=Iu("path"),h.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var h=u._container;this._container.appendChild(h),u.options.interactive&&u.addInteractiveTarget(h)},_removePath:function(u){var h=u._container;Vt(h),u.removeInteractiveTarget(h),delete this._layers[l(u)]},_updateStyle:function(u){var h=u._stroke,_=u._fill,O=u.options,T=u._container;T.stroked=!!O.stroke,T.filled=!!O.fill,O.stroke?(h||(h=u._stroke=Iu("stroke")),T.appendChild(h),h.weight=O.weight+"px",h.color=O.color,h.opacity=O.opacity,O.dashArray?h.dashStyle=S(O.dashArray)?O.dashArray.join(" "):O.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=O.lineCap.replace("butt","flat"),h.joinstyle=O.lineJoin):h&&(T.removeChild(h),u._stroke=null),O.fill?(_||(_=u._fill=Iu("fill")),T.appendChild(_),_.color=O.fillColor||O.color,_.opacity=O.fillOpacity):_&&(T.removeChild(_),u._fill=null)},_updateCircle:function(u){var h=u._point.round(),_=Math.round(u._radius),O=Math.round(u._radiusY||_);this._setPath(u,u._empty()?"M0 0":"AL "+h.x+","+h.y+" "+_+","+O+" 0,"+65535*360)},_setPath:function(u,h){u._path.v=h},_bringToFront:function(u){Ol(u._container)},_bringToBack:function(u){Cl(u._container)}},np=Ve.vml?Iu:De,Fu=vo.extend({_initContainer:function(){this._container=np("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=np("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Vt(this._container),kt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vo.prototype._update.call(this);var u=this._bounds,h=u.getSize(),_=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,_.setAttribute("width",h.x),_.setAttribute("height",h.y)),fn(_,u.min),_.setAttribute("viewBox",[u.min.x,u.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(u){var h=u._path=np("path");u.options.className&&Ze(h,u.options.className),u.options.interactive&&Ze(h,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Vt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var h=u._path,_=u.options;h&&(_.stroke?(h.setAttribute("stroke",_.color),h.setAttribute("stroke-opacity",_.opacity),h.setAttribute("stroke-width",_.weight),h.setAttribute("stroke-linecap",_.lineCap),h.setAttribute("stroke-linejoin",_.lineJoin),_.dashArray?h.setAttribute("stroke-dasharray",_.dashArray):h.removeAttribute("stroke-dasharray"),_.dashOffset?h.setAttribute("stroke-dashoffset",_.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),_.fill?(h.setAttribute("fill",_.fillColor||_.color),h.setAttribute("fill-opacity",_.fillOpacity),h.setAttribute("fill-rule",_.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(u,h){this._setPath(u,ue(u._parts,h))},_updateCircle:function(u){var h=u._point,_=Math.max(Math.round(u._radius),1),O=Math.max(Math.round(u._radiusY),1)||_,T="a"+_+","+O+" 0 1,0 ",$=u._empty()?"M0 0":"M"+(h.x-_)+","+h.y+T+_*2+",0 "+T+-_*2+",0 ";this._setPath(u,$)},_setPath:function(u,h){u._path.setAttribute("d",h)},_bringToFront:function(u){Ol(u._path)},_bringToBack:function(u){Cl(u._path)}});Ve.vml&&Fu.include(tF);function KC(u){return Ve.svg||Ve.vml?new Fu(u):null}lt.include({getRenderer:function(u){var h=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var h=this._paneRenderers[u];return h===void 0&&(h=this._createRenderer({pane:u}),this._paneRenderers[u]=h),h},_createRenderer:function(u){return this.options.preferCanvas&&GC(u)||KC(u)}});var ZC=Pl.extend({initialize:function(u,h){Pl.prototype.initialize.call(this,this._boundsToLatLngs(u),h)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=K(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function nF(u,h){return new ZC(u,h)}Fu.create=np,Fu.pointsToPath=ue,go.geometryToLayer=Kh,go.coordsToLatLng=m0,go.coordsToLatLngs=Zh,go.latLngToCoords=g0,go.latLngsToCoords=Qh,go.getFeature=Tl,go.asFeature=Xh,lt.mergeOptions({boxZoom:!0});var QC=zi.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Ge(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){kt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Vt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Tu(),Xy(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ge(document,{contextmenu:fs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=mt("div","leaflet-zoom-box",this._container),Ze(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var h=new z(this._point,this._startPoint),_=h.getSize();fn(this._box,h.min),this._box.style.width=_.x+"px",this._box.style.height=_.y+"px"},_finish:function(){this._moved&&(Vt(this._box),nn(this._container,"leaflet-crosshair")),Mu(),Jy(),kt(document,{contextmenu:fs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var h=new U(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});lt.addInitHook("addHandler","boxZoom",QC),lt.mergeOptions({doubleClickZoom:!0});var XC=zi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var h=this._map,_=h.getZoom(),O=h.options.zoomDelta,T=u.originalEvent.shiftKey?_-O:_+O;h.options.doubleClickZoom==="center"?h.setZoom(T):h.setZoomAround(u.containerPoint,T)}});lt.addInitHook("addHandler","doubleClickZoom",XC),lt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var JC=zi.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new ta(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}Ze(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){nn(this._map._container,"leaflet-grab"),nn(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=K(this._map.options.maxBounds);this._offsetLimit=re(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var h=this._lastTime=+new Date,_=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(_),this._times.push(h),this._prunePositions(h)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,h){return u-(u-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;u.xh.max.x&&(u.x=this._viscousLimit(u.x,h.max.x)),u.y>h.max.y&&(u.y=this._viscousLimit(u.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,h=Math.round(u/2),_=this._initialWorldOffset,O=this._draggable._newPos.x,T=(O-h+_)%u+h-_,$=(O+h+_)%u-h-_,ne=Math.abs(T+_)0?$:-$))-h;this._delta=0,this._startTime=null,ne&&(u.options.scrollWheelZoom==="center"?u.setZoom(h+ne):u.setZoomAround(this._lastMousePos,h+ne))}});lt.addInitHook("addHandler","scrollWheelZoom",tE);var rF=600;lt.mergeOptions({tapHold:Ve.touchNative&&Ve.safari&&Ve.mobile,tapTolerance:15});var nE=zi.extend({addHooks:function(){Ge(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){kt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var h=u.touches[0];this._startPos=this._newPos=new G(h.clientX,h.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ge(document,"touchend",zn),Ge(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),rF),Ge(document,"touchend touchcancel contextmenu",this._cancel,this),Ge(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){kt(document,"touchend",zn),kt(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),kt(document,"touchend touchcancel contextmenu",this._cancel,this),kt(document,"touchmove",this._onMove,this)},_onMove:function(u){var h=u.touches[0];this._newPos=new G(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,h){var _=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});_._simulated=!0,h.target.dispatchEvent(_)}});lt.addInitHook("addHandler","tapHold",nE),lt.mergeOptions({touchZoom:Ve.touch,bounceAtZoomLimits:!0});var rE=zi.extend({addHooks:function(){Ze(this._map._container,"leaflet-touch-zoom"),Ge(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){nn(this._map._container,"leaflet-touch-zoom"),kt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var h=this._map;if(!(!u.touches||u.touches.length!==2||h._animatingZoom||this._zooming)){var _=h.mouseEventToContainerPoint(u.touches[0]),O=h.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(_.add(O)._divideBy(2))),this._startDist=_.distanceTo(O),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),Ge(document,"touchmove",this._onTouchMove,this),Ge(document,"touchend touchcancel",this._onTouchEnd,this),zn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var h=this._map,_=h.mouseEventToContainerPoint(u.touches[0]),O=h.mouseEventToContainerPoint(u.touches[1]),T=_.distanceTo(O)/this._startDist;if(this._zoom=h.getScaleZoom(T,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&T>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,T===1)return}else{var $=_._add(O)._divideBy(2)._subtract(this._centerPoint);if(T===1&&$.x===0&&$.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract($),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),W(this._animRequest);var ne=a(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(ne,this,!0),zn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,W(this._animRequest),kt(document,"touchmove",this._onTouchMove,this),kt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});lt.addInitHook("addHandler","touchZoom",rE),lt.BoxZoom=QC,lt.DoubleClickZoom=XC,lt.Drag=JC,lt.Keyboard=eE,lt.ScrollWheelZoom=tE,lt.TapHold=nE,lt.TouchZoom=rE,n.Bounds=z,n.Browser=Ve,n.CRS=he,n.Canvas=qC,n.Circle=p0,n.CircleMarker=Gh,n.Class=q,n.Control=wi,n.DivIcon=HC,n.DivOverlay=Vi,n.DomEvent=w8,n.DomUtil=_8,n.Draggable=ta,n.Evented=le,n.FeatureGroup=po,n.GeoJSON=go,n.GridLayer=Au,n.Handler=zi,n.Icon=kl,n.ImageOverlay=Jh,n.LatLng=ie,n.LatLngBounds=U,n.Layer=xi,n.LayerGroup=El,n.LineUtil=R8,n.Map=lt,n.Marker=qh,n.Mixin=P8,n.Path=na,n.Point=G,n.PolyUtil=T8,n.Polygon=Pl,n.Polyline=mo,n.Popup=ep,n.PosAnimation=EC,n.Projection=N8,n.Rectangle=ZC,n.Renderer=vo,n.SVG=Fu,n.SVGOverlay=VC,n.TileLayer=Ml,n.Tooltip=tp,n.Transformation=J,n.Util=ee,n.VideoOverlay=zC,n.bind=a,n.bounds=re,n.canvas=GC,n.circle=V8,n.circleMarker=z8,n.control=Lu,n.divIcon=X8,n.extend=i,n.featureGroup=$8,n.geoJSON=UC,n.geoJson=Y8,n.gridLayer=J8,n.icon=B8,n.imageOverlay=q8,n.latLng=ae,n.latLngBounds=K,n.layerGroup=F8,n.map=x8,n.marker=U8,n.point=A,n.polygon=W8,n.polyline=H8,n.popup=Z8,n.rectangle=nF,n.setOptions=y,n.stamp=l,n.svg=KC,n.svgOverlay=K8,n.tileLayer=WC,n.tooltip=Q8,n.transformation=X,n.version=r,n.videoOverlay=G8;var iF=window.L;n.noConflict=function(){return window.L=iF,this},window.L=n})})(Nx,Nx.exports);var Rh=Nx.exports;const Kj=Fi(Rh);function aC(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function sC(e,t){return t==null?function(r,i){const o=B.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=B.useRef();o.current||(o.current=e(r,i));const a=B.useRef(r),{instance:s}=o.current;return B.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,i]),o}}function Qge(e,t){B.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function R5(e){return function(n){const r=D5(),i=e(oC(n,r),r);return T5(r.map,n.attribution),L5(i.current,n.eventHandlers),Qge(i.current,r),i}}function Xge(e,t){const n=sC(e,t),r=R5(n);return qge(r)}function Jge(e,t){const n=sC(e),r=Zge(n,t);return Gge(r)}function eve(e,t){const n=sC(e,t),r=R5(n);return Kge(r)}function tve(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function Ax(){return Ax=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const y=B.useCallback(b=>{if(b!==null&&m===null){const w=new Rh.Map(b,f);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(Wge(w))}},[]);B.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const x=m?Y.createElement(j5,{value:m},r):a??null;return Y.createElement("div",Ax({},p,{ref:y}),x)}const rve=B.forwardRef(nve),ive=Xge(function({position:t,...n},r){const i=new Rh.Marker(t,n);return aC(i,Yge(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),ove=Jge(function(t,n){const r=new Rh.Popup(t,n.overlayContainer);return aC(r,n)},function(t,n,{position:r},i){B.useEffect(function(){const{instance:a}=t;function s(c){c.popup===a&&(a.update(),i(!0))}function l(c){c.popup===a&&i(!1)}return n.map.on({popupopen:s,popupclose:l}),n.overlayContainer==null?(r!=null&&a.setLatLng(r),a.openOn(n.map)):n.overlayContainer.bindPopup(a),function(){var f;n.map.off({popupopen:s,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(a)}},[t,n,i,r])}),ave=eve(function({url:t,...n},r){const i=new Rh.TileLayer(t,oC(n,r));return aC(i,r)},function(t,n,r){tve(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const sve=()=>g.jsx(ave,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),lve=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(ct("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},N5=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(Zo,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:g.jsxs(fo,{className:"map-modal__modal-body",children:[g.jsxs("h3",{className:"map-modal__modal-title",children:[n,g.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),g.jsxs(rve,{...lve(r),children:[g.jsx(sve,{}),r.map(({cityName:i,latLong:o,count:a},s)=>g.jsx(ive,{position:o,children:g.jsxs(ove,{children:[g.jsx("b",{children:a})," visit",a>1?"s":""," from ",g.jsx("b",{children:i})]})},s))]})]})});const cve=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=mn(),[a,s,l]=mn(),[c,f]=B.useState([]),d=My(),p=y=>t?y.filter(({cityName:x})=>t==null?void 0:t.includes(x)):y,m=()=>{if(!t){f(n),i();return}l()},v=y=>()=>{f(y?p(n):n),i()};return g.jsxs(g.Fragment,{children:[g.jsx(yt,{color:"link",className:"open-map-modal-btn__btn",id:d,onClick:m,children:g.jsx(Ie,{icon:wA})}),g.jsx(jr,{placement:"left",target:d,children:"Show in map"}),g.jsx(gh,{isOpen:a,toggle:s,inNavbar:!0,children:g.jsxs(vu,{end:!0,children:[g.jsx(Ue,{onClick:v(!1),children:"Show all locations"}),g.jsx(Ue,{onClick:v(!0),children:"Show locations in current page"})]})}),g.jsx(N5,{toggle:o,isOpen:r,title:e,locations:c})]})},uve=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,a=l=>({active:i===l,onClick:()=>e({...t,orphanVisitsType:l===(t==null?void 0:t.orphanVisitsType)?void 0:l})}),s=()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)});return g.jsxs(Xo,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Bots:"}),g.jsx(Ue,{active:o,onClick:s,children:"Exclude potential bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Orphan visits type:"}),g.jsx(Ue,{...a("base_url"),children:"Base URL"}),g.jsx(Ue,{...a("invalid_short_url"),children:"Invalid short URL"}),g.jsx(Ue,{...a("regular_404"),children:"Regular 404"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!eo(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:g.jsx("i",{children:"Clear filters"})})]})},A5=(e,t)=>!qo(e)&&eo(e[t]),Zj=e=>typeof e=="number"?e:e?parseFloat(e):0,fve=(e,{os:t})=>{e[t]=(e[t]||0)+1},dve=(e,{browser:t})=>{e[t]=(e[t]||0)+1},hve=(e,{referer:t})=>{e[t]=(e[t]||0)+1},I5=e=>(t,n)=>{const i=A5(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},pve=I5("country"),mve=I5("city"),gve=(e,t)=>{if(!A5(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[Zj(r),Zj(i)]};o.count+=1,e[n]=o},vve=(e,t)=>{if(!rge(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},F5=e=>e.reduce((t,n)=>(fve(t.os,n),dve(t.browsers,n),hve(t.referrers,n),pve(t.countries,n),mve(t.cities,n),gve(t.citiesForMap,n),vve(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),$5=ch(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,a={date:n,potentialBot:o,...Oge(t),referer:Cge(r),country:(i==null?void 0:i.countryName)||"Unknown",city:(i==null?void 0:i.cityName)||"Unknown",latitude:i==null?void 0:i.latitude,longitude:i==null?void 0:i.longitude};return tC(e)?{...a,type:e.type,visitedUrl:e.visitedUrl}:a}),yve=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:$5,processStatsFromVisits:F5},Symbol.toStringTag,{value:"Module"}));const Sf=20,_ve=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),bve=(e,t)=>t.filter(n=>_ve(n,e)),wve=(e,t)=>n6(t,e),xve=(e,t,n)=>{const r=t?bve(t,e):[...e],i=wve(n,r),o=i.length;return{visitsGroups:jd(Sf,i),total:o}},Sve=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var P,j;const o="visits-table__header-cell visits-table__sticky",a=()=>r("(max-width: 767px)").matches,[s,l]=B.useState(a()),[c,f]=B.useState(void 0),[d,p]=B.useState({}),m=B.useMemo(()=>xve(e,c,d),[c,d]),v=B.useRef(!0),[y,x]=B.useState(1),b=y*Sf,w=b-Sf,S=8+Number(i),C=N=>()=>p({field:N,dir:Dy(N,d.field,d.dir)}),k=N=>g.jsx(ed,{currentOrder:d,field:N,className:"visits-table__header-icon"});return B.useEffect(()=>{const N=()=>l(a());return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]),B.useEffect(()=>{x(1),!v.current&&n([]),v.current=!1},[c]),g.jsx("div",{className:"table-responsive-md",children:g.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[g.jsxs("thead",{className:"visits-table__header",children:[g.jsxs("tr",{children:[g.jsx("th",{className:`${o} text-center`,onClick:()=>n(t.length0})})}),g.jsxs("th",{className:`${o} text-center`,onClick:C("potentialBot"),children:[g.jsx(Ie,{icon:vT}),k("potentialBot")]}),g.jsxs("th",{className:o,onClick:C("date"),children:["Date",k("date")]}),g.jsxs("th",{className:o,onClick:C("country"),children:["Country",k("country")]}),g.jsxs("th",{className:o,onClick:C("city"),children:["City",k("city")]}),g.jsxs("th",{className:o,onClick:C("browser"),children:["Browser",k("browser")]}),g.jsxs("th",{className:o,onClick:C("os"),children:["OS",k("os")]}),g.jsxs("th",{className:o,onClick:C("referer"),children:["Referrer",k("referer")]}),i&&g.jsxs("th",{className:o,onClick:C("visitedUrl"),children:["Visited URL",k("visitedUrl")]})]}),g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"p-0",children:g.jsx(wh,{noBorder:!0,large:!1,onChange:f})})})]}),g.jsxs("tbody",{children:[!((P=m.visitsGroups[y-1])!=null&&P.length)&&g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"text-center",children:"No visits found with current filtering"})}),(j=m.visitsGroups[y-1])==null?void 0:j.map((N,H)=>{const R=t.includes(N);return g.jsxs("tr",{style:{cursor:"pointer"},className:Ee({"table-active":R}),onClick:()=>n(R?t.filter(V=>V!==N):[...t,N]),children:[g.jsx("td",{className:"text-center",children:R&&g.jsx(Ie,{icon:Dd,className:"text-primary"})}),g.jsx("td",{className:"text-center",children:N.potentialBot&&g.jsxs(g.Fragment,{children:[g.jsx(Ie,{icon:vT,id:`botIcon${H}`}),g.jsx(jr,{placement:"right",target:`botIcon${H}`,children:"Potentially a visit from a bot or crawler"})]})}),g.jsx("td",{children:g.jsx(xv,{date:N.date})}),g.jsx("td",{children:N.country}),g.jsx("td",{children:N.city}),g.jsx("td",{children:N.browser}),g.jsx("td",{children:N.os}),g.jsx("td",{children:N.referer}),i&&g.jsx("td",{children:N.visitedUrl})]},H)})]}),m.total>Sf&&g.jsx("tfoot",{children:g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"visits-table__footer-cell visits-table__sticky",children:g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(KO,{pagesCount:Math.ceil(m.total/Sf),currentPage:y,setCurrentPage:x,centered:s})}),g.jsx("div",{className:Ee("col-md-6",{"d-flex align-items-center flex-row-reverse":!s,"text-center mt-3":s}),children:g.jsxs("div",{children:["Visits ",g.jsx("b",{children:wn(w+1)})," to"," ",g.jsx("b",{children:wn(mA(b,m.total))})," of"," ",g.jsx("b",{children:wn(m.total)})]})})]})})})})]})})},Wl={byTime:{title:"By time",subPath:"by-time",icon:SG},byContext:{title:"By context",subPath:"by-context",icon:CS},byLocation:{title:"By location",subPath:"by-location",icon:wA},list:{title:"List",subPath:"list",icon:bA}};let am;const Nh=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,exportCsv:i,isOrphanVisits:o=!1})=>{const{visits:a,loading:s,loadingLarge:l,error:c,errorData:f,progress:d,fallbackInterval:p}=t,[{dateRange:m,visitsFilter:v},y]=Vge(),x=bl("visits"),b=Ft(({startDate:U,endDate:K})=>({dateRange:{startDate:U??void 0,endDate:K??void 0}}),y),w=B.useRef(m??p??(x==null?void 0:x.defaultInterval)??"last30Days"),[S,C]=B.useState([]),[k,P]=B.useState(),j=B.useRef(!0),{search:N}=gn(),H=U=>U?`${U}${N}`:N,R=B.useMemo(()=>$5(a),[a]),{os:V,browsers:W,referrers:ee,countries:q,cities:Q,citiesForMap:oe,visitedUrls:le}=B.useMemo(()=>F5(R),[R]),G=B.useMemo(()=>({...v,excludeBots:v.excludeBots??(x==null?void 0:x.excludeBots)}),[v]),F=mu(oe),A=U=>{am=void 0,C(U)},z=U=>K=>{const ie=`${U}_${K}`;am===ie?(C([]),P(void 0),am=void 0):(C(R.filter(uG(U,K))),P(K),am=ie)};B.useEffect(()=>r,[]),B.useEffect(()=>{const U=j.current?m??wue(w.current):m;n({dateRange:U,filter:G},j.current),j.current=!1},[m,v]),B.useEffect(()=>{p&&w.current===((x==null?void 0:x.defaultInterval)??"last30Days")&&(w.current=p)},[p]);const re=()=>l?g.jsxs(Do,{loading:!0,children:["This is going to take a while... :S",g.jsx(z4,{value:d,striped:d===100,className:"mt-3"})]}):s?g.jsx(Do,{loading:!0}):c?g.jsx(zr,{type:"error",children:g.jsx(zo,{errorData:f,fallbackMessage:"An error occurred while loading visits :("})}):Kn(a)?g.jsx(Do,{children:"There are no visits matching current filter"}):g.jsxs(g.Fragment,{children:[g.jsx(t6,{fill:!0,children:Object.values(Wl).map(({title:U,icon:K,subPath:ie},ae)=>g.jsxs(Yf,{to:H(ie),replace:!0,children:[g.jsx(Ie,{icon:K}),g.jsx("span",{className:"ms-2 d-none d-sm-inline",children:U})]},ae))}),g.jsx(mr,{children:g.jsxs(vy,{children:[g.jsx(vt,{path:Wl.byTime.subPath,element:g.jsx("div",{className:"col-12 mt-3",children:g.jsx(Lge,{title:"Visits during time",visits:R,highlightedVisits:S,highlightedLabel:k,setSelectedVisits:A})})}),g.jsx(vt,{path:Wl.byContext.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:Ee("mt-3 col-lg-6",{"col-xl-4":!o}),children:g.jsx(zj,{title:"Operating systems",stats:V})}),g.jsx("div",{className:Ee("mt-3 col-lg-6",{"col-xl-4":!o}),children:g.jsx(zj,{title:"Browsers",stats:W})}),g.jsx("div",{className:Ee("mt-3",{"col-xl-4":!o,"col-lg-6":o}),children:g.jsx(om,{title:"Referrers",stats:ee,withPagination:!1,highlightedStats:rm(S,"referer"),highlightedLabel:k,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:z("referer")})}),o&&g.jsx("div",{className:"mt-3 col-lg-6",children:g.jsx(om,{title:"Visited URLs",stats:le,highlightedLabel:k,highlightedStats:rm(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:z("visitedUrl")})})]})}),g.jsx(vt,{path:Wl.byLocation.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(om,{title:"Countries",stats:q,highlightedStats:rm(S,"country"),highlightedLabel:k,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:z("country")})}),g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(om,{title:"Cities",stats:Q,highlightedStats:rm(S,"city"),highlightedLabel:k,extraHeaderContent:U=>F.length>0&&g.jsx(cve,{modalTitle:"Cities",locations:F,activeCities:U}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:z("city")})})]})}),g.jsx(vt,{path:Wl.list.subPath,element:g.jsx("div",{className:"col-12",children:g.jsx(Sve,{visits:R,selectedVisits:S,setSelectedVisits:A,isOrphanVisits:o})})}),g.jsx(vt,{path:"*",element:g.jsx(cS,{replace:!0,to:H(Wl.byTime.subPath)})})]})})]});return g.jsxs(g.Fragment,{children:[e,g.jsx("section",{className:"mt-3",children:g.jsxs("div",{className:"row flex-md-row-reverse",children:[g.jsx("div",{className:"col-lg-7 col-xl-6",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(WI,{updatable:!0,disabled:s,initialDateRange:w.current,defaultText:"All visits",onDatesChange:b})}),g.jsx(uve,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:o,selected:G,onChange:U=>y({visitsFilter:U})})]})}),a.length>0&&g.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:g.jsxs("div",{className:"d-flex",children:[g.jsx(kI,{className:"btn-md-block",amount:R.length,onClick:()=>i(R)}),g.jsxs(yt,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>A([]),children:["Clear selection ",S.length>0&&g.jsxs(g.Fragment,{children:["(",wn(S.length),")"]})]})]})})]})}),g.jsx("section",{className:"mt-3",children:re()})]})},Ove=({exportVisits:e})=>as(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r})=>{const i=xu(),{domain:o=""}=hl(),[a,s=a]=o.split("_"),l=(f,d)=>t({domain:s,query:Dh(f),doIntervalFallback:d}),c=f=>e(`domain_${a}_visits.csv`,f);return g.jsx(Nh,{getVisits:l,cancelGetVisits:r,visitsInfo:n,exportCsv:c,children:g.jsx(Lh,{goBack:i,visits:n.visits,title:`"${a}" visits`})})},()=>[di.visits]),Cve=({exportVisits:e})=>as(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r})=>{const i=xu(),o=s=>e("non_orphan_visits.csv",s),a=(s,l)=>t({query:Dh(s),doIntervalFallback:l});return g.jsx(Nh,{getVisits:a,cancelGetVisits:r,visitsInfo:n,exportCsv:o,children:g.jsx(Lh,{title:"Non-orphan visits",goBack:i,visits:n.visits})})},()=>[di.visits]),Eve=({exportVisits:e})=>as(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r})=>{const i=xu(),o=s=>e("orphan_visits.csv",s),a=(s,l)=>{var c;return t({query:Dh(s),orphanVisitsType:(c=s.filter)==null?void 0:c.orphanVisitsType,doIntervalFallback:l})};return g.jsx(Nh,{getVisits:a,cancelGetVisits:r,visitsInfo:n,exportCsv:o,isOrphanVisits:!0,children:g.jsx(Lh,{title:"Orphan visits",goBack:i,visits:n.visits})})},()=>[di.orphanVisits]),B5="shlink/orphanVisits",kve={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Pve=e=>Th({typePrefix:`${B5}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1})=>{const{getNonOrphanVisits:r}=e(),i=async(a,s)=>r({...t,page:a,itemsPerPage:s}),o=Mh(n,r);return[i,o]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Tve=e=>jh({name:B5,initialState:kve,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>Eh(o.date,r,i))}}),U5="shlink/orphanVisits",Mve={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},jve=(e,t)=>!t||t===e.type,Dve=e=>Th({typePrefix:`${U5}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1})=>{const{getOrphanVisits:i}=e(),o=async(s,l)=>i({...n,page:s,itemsPerPage:l}).then(c=>{const f=c.data.filter(d=>tC(d)&&jve(d,t));return{...c,data:f}}),a=Mh(r,i);return[o,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Lve=e=>jh({name:U5,initialState:Mve,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:a})=>!a&&Eh(o.date,r,i))}}),z5="shlink/shortUrlVisits",Rve={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Nve=e=>Th({typePrefix:`${z5}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1})=>{const{getShortUrlVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=Mh(r,async s=>i(t,{...s,domain:n.domain}));return[o,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),Ave=e=>jh({name:z5,initialState:Rve,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:a}=r;return i.filter(({shortUrl:s,visit:l})=>s&&Zf(s,t,n)&&Eh(l.date,o,a))}}),V5="shlink/tagVisits",Ive={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Fve=e=>Th({typePrefix:`${V5}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1})=>{const{getTagVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=Mh(r,async s=>i(t,s));return[o,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),$ve=e=>jh({name:V5,initialState:Ive,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>(a==null?void 0:a.tags.includes(t))&&Eh(s.date,i,o))}}),H5="shlink/visitsOverview",sm={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},Qj=e=>e.filter(({visit:t})=>t.potentialBot).length,Bve=e=>Mr(`${H5}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n,orphanVisits:r,orphanVisitsCount:i})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),Uve=e=>sr({name:H5,initialState:sm,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...sm,loading:!0})),t.addCase(e.rejected,()=>({...sm,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...sm,...r})),t.addCase(Ph,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=ige(o.createdVisits),l=a.length,c=Qj(a),f=l-c,d=s.length,p=Qj(s),m=d-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+d,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}});const zve=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,a=(r==null?void 0:r.shortUrl)??"",s=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title,c=()=>r?g.jsxs("span",{children:[g.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:g.jsx(xv,{date:r.dateCreated,relative:!0})}),g.jsx(jr,{placement:"bottom",target:"created",children:g.jsx(xv,{date:r.dateCreated})})]}):g.jsx("small",{children:"Loading..."}),f=g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(Ni,{href:a})]});return g.jsxs(Lh,{title:f,goBack:n,visits:o,shortUrl:r,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",c()]}),g.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&g.jsx("small",{children:"Loading..."}),!i&&g.jsx(Ni,{href:s,children:l??s})]})]})},Vve=({exportVisits:e})=>as(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o})=>{const{shortCode:a=""}=hl(),{search:s}=gn(),l=xu(),{domain:c}=vl(s),f=(p,m)=>r({shortCode:Fm(a),query:{...Dh(p),domain:c},doIntervalFallback:m}),d=p=>{var m;return e(`short-url_${(m=n.shortUrl)==null?void 0:m.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,p)};return B.useEffect(()=>{i({shortCode:Fm(a),domain:c})},[]),g.jsx(Nh,{getVisits:f,cancelGetVisits:o,visitsInfo:t,exportCsv:d,children:g.jsx(zve,{shortUrlDetail:n,shortUrlVisits:t,goBack:l})})},(t,n)=>n.shortCode?[di.shortUrlVisits(Fm(n.shortCode))]:[]),Hve=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e,o=g.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[g.jsx("span",{className:"me-2",children:"Visits for"}),g.jsx(UO,{text:i,colorGenerator:n})]});return g.jsx(Lh,{title:o,goBack:t,visits:r})},Wve=(e,{exportVisits:t})=>as(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i})=>{const o=xu(),{tag:a=""}=hl(),s=(c,f)=>n({tag:a,query:Dh(c),doIntervalFallback:f}),l=c=>t(`tag_${a}_visits.csv`,c);return g.jsx(Nh,{getVisits:s,cancelGetVisits:i,visitsInfo:r,exportCsv:l,children:g.jsx(Hve,{tagVisits:r,goBack:o,colorGenerator:e})})},()=>[di.visits]),Yve=(e,t)=>{e.serviceFactory("MapModal",()=>N5),e.serviceFactory("ShortUrlVisits",Vve,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",Wve,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",Ove,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Eve,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",Cve,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>yve),e.serviceFactory("getShortUrlVisits",Nve,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",ct("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",Fve,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",ct("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",Cue,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",ct("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",Dve,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",ct("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",Pve,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",ct("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Ph),e.serviceFactory("loadVisitsOverview",Bve,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",Uve,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",ct("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",Eue,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",ct("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",Tve,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",ct("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",Lve,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",ct("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",Ave,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",ct("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",$ve,"getTagVisits"),e.serviceFactory("tagVisitsReducer",ct("reducer"),"tagVisitsReducerCreator")};const af=({children:e,to:t,className:n,...r})=>g.jsx(HN,{className:({isActive:i})=>Ee("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),qve=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=gn(),r=Ee("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return g.jsx("aside",{className:r,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(af,{to:i("/overview"),children:[g.jsx(Ie,{fixedWidth:!0,icon:JG}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(af,{to:i("/list-short-urls/1"),className:Ee({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[g.jsx(Ie,{fixedWidth:!0,icon:bA}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(af,{to:i("/create-short-url"),children:[g.jsx(Ie,{fixedWidth:!0,icon:iK,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(af,{to:i("/manage-tags"),children:[g.jsx(Ie,{fixedWidth:!0,icon:xA}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(af,{to:i("/manage-domains"),children:[g.jsx(Ie,{fixedWidth:!0,icon:LG}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})};const Gve=(e,t,n,r,i,o,a,s,l,c,f)=>({createNotFound:d})=>{const p=gn(),m=yl(),v=dl(),[y,x]=B.useMemo(()=>v?[B.Fragment,{}]:[VN,{basename:m}],[v]),[b,w,S,C]=mn();B.useEffect(()=>C(),[p]);const k=Ch("domainVisits"),P=Ee("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":b}),j=wfe(S,C);return g.jsxs(y,{...x,children:[g.jsx(Ie,{icon:PG,className:P,onClick:w}),g.jsx("div",{...j,className:"shlink-layout__swipeable",children:g.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[g.jsx(qve,{routePrefix:m,showOnMobile:b}),g.jsx("div",{className:"shlink-layout__container",onClick:()=>C(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(vy,{children:[g.jsx(vt,{index:!0,element:g.jsx(cS,{replace:!0,to:"overview"})}),g.jsx(vt,{path:"/overview",element:g.jsx(l,{})}),g.jsx(vt,{path:"/list-short-urls/:page",element:g.jsx(t,{})}),g.jsx(vt,{path:"/create-short-url",element:g.jsx(n,{})}),g.jsx(vt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(r,{})}),g.jsx(vt,{path:"/short-code/:shortCode/edit",element:g.jsx(c,{})}),g.jsx(vt,{path:"/tag/:tag/visits/*",element:g.jsx(i,{})}),k&&g.jsx(vt,{path:"/domain/:domain/visits/*",element:g.jsx(o,{})}),g.jsx(vt,{path:"/orphan-visits/*",element:g.jsx(a,{})}),g.jsx(vt,{path:"/non-orphan-visits/*",element:g.jsx(s,{})}),g.jsx(vt,{path:"/manage-tags",element:g.jsx(e,{})}),g.jsx(vt,{path:"/manage-domains",element:g.jsx(f,{})}),d&&g.jsx(vt,{path:"*",element:d("/list-short-urls/1")})]})})})]})})]})},Kve=!0,Zve=e=>L6({devTools:!Kve,reducer:bO({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),Qve=e=>{e.serviceFactory("Main",Gve,"TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains"),e.factory("store",Zve)},ho=new tA,{container:Xve}=ho,Jve=(e,t)=>(...n)=>e[t](...n),eye=(e,t)=>({...e,[t]:Jve(Xve,t)}),Ah=(e,t=[])=>LN(e?wS(e):null,t.reduce(eye,{}));Qve(ho);lhe(ho,Ah);$pe(ho,Ah);Yve(ho,Ah);$ue(ho);Aue(ho,Ah);ofe(ho,Ah);nge(ho);let Xj;const tye=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=vse(t),l=B.useRef(),[c,f]=B.useState();return B.useEffect(()=>{Xj=n,e.value("apiClientFactory",()=>Xj),a&&e.value("TagColorsStorage",a);const{container:d}=e,{Main:p,store:m,loadMercureInfo:v}=d;l.current=g.jsx(p,{createNotFound:o}),f(m),m.dispatch(v(r))},[n,a]),c?g.jsx(RN,{store:c,children:g.jsx(Que,{value:r,children:g.jsx(yse,{value:s,children:g.jsx(_se,{value:i,children:l.current})})})}):g.jsx(g.Fragment,{})},nye=tye(ho);function Ev(e){return t=>{const{resetSelectedServer:n}=t;return B.useEffect(()=>{n()},[]),g.jsx(e,{...t})}}const rye=({location:e},{error:t})=>class extends B.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){t(n)}render(){const{hasError:n}=this.state;if(n)return g.jsx("div",{className:"home",children:g.jsxs(hn,{className:"p-4",children:[g.jsx("h1",{children:"Oops! This is awkward :S"}),g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(yt,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const iye=({id:e,name:t})=>g.jsxs(G4,{tag:It,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(Ie,{icon:cK,className:"servers-list__server-item-icon"})]}),W5=({servers:e,children:t,embedded:n=!1})=>g.jsxs(g.Fragment,{children:[t&&g.jsx("h5",{className:"mb-md-3",children:t}),e.length>0&&g.jsx(W4,{className:Ee("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx(iye,{id:r,name:i},r))})]}),Y5=({color:e=oO,className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})});const oye=({servers:e})=>{const t=uo(),n=mu(e),r=!Kn(n);return B.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),g.jsx("div",{className:"home",children:g.jsx(Yr,{className:"home__main-card",children:g.jsxs(mr,{className:"g-0",children:[g.jsx("div",{className:"col-md-5 d-none d-md-block",children:g.jsx("div",{className:"home__logo-wrapper",children:g.jsx("div",{className:"home__logo",children:g.jsx(Y5,{})})})}),g.jsxs("div",{className:"col-md-7 home__servers-container",children:[g.jsx("div",{className:"home__title-wrapper",children:g.jsx("h1",{className:"home__title",children:"Welcome!"})}),g.jsx(W5,{embedded:!0,servers:n,children:!r&&g.jsxs("div",{className:"p-4 text-center",children:[g.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(It,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(Ie,{icon:kS})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(Ni,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(Ie,{icon:HG})]})})})]})})]})]})})})};const aye=e=>()=>{const[t,n,,r]=mn(),i=gn(),{pathname:o}=i;B.useEffect(r,[i]);const a="/settings",s=Ee("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(c4,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(u4,{tag:It,to:"/",children:[g.jsx(Y5,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx(f4,{onClick:n,children:g.jsx(Ie,{icon:sK,className:s})}),g.jsx(ote,{navbar:!0,isOpen:t,children:g.jsxs(VS,{navbar:!0,className:"ms-auto",children:[g.jsx(d4,{children:g.jsxs(m4,{tag:It,to:a,active:o.startsWith(a),children:[g.jsx(Ie,{icon:hK}),"  Settings"]})}),g.jsx(e,{})]})})]})},sye=({children:e})=>{const t=gn();return B.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},q5=hA(vS,e=>{try{return cx(e,e,"=")}catch{return!1}}),G5=e=>q5(e)?`v${e}`:e,K5=(e="latest")=>t=>q5(t)?t:e,lye="%_VERSION_%",cye=Ft(K5(),G5),Jj=({project:e,version:t})=>g.jsx(Ni,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),uye=({selectedServer:e,clientVersion:t=lye})=>{const n=cye(t);return g.jsxs("small",{className:"text-muted",children:[yA(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(Jj,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(Jj,{project:"shlink-web-client",version:n})]})};const fye=/^\/server\/[a-zA-Z0-9-]*\/(?!edit)/,dye=({selectedServer:e})=>{const{pathname:t}=gn(),n=B.useMemo(()=>fye.test(t),[t]),r=Ee("text-center",{"shlink-versions-container--with-sidebar":n});return g.jsx("div",{className:r,children:g.jsx(uye,{selectedServer:e})})};const Ou=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function Z5(e,t){return n=>{const r=hl(),{selectServer:i,selectedServer:o}=n;return B.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?_G(o)?g.jsx(t,{}):g.jsx(e,{...n}):g.jsx(Ou,{children:g.jsx(Do,{loading:!0})})}}const hye=(e,t,n,r)=>Z5(({selectedServer:i,settings:o})=>{const a=yA(i),s=a?`/server/${i.id}`:"";return a?g.jsx(n,{serverVersion:i.version,apiClient:e(i),settings:o,routesPrefix:s,tagColorsStorage:t,createNotFound:l=>g.jsx(x6,{to:`${s}${l}`,children:"List short URLs"})}):g.jsx(r,{})},r),eD={"Content-Type":"application/json"},tD=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...eD}}:{headers:eD}:e;class pye{constructor(t){me(this,"fetchJson",(t,n)=>this.fetch(t,tD(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));me(this,"fetchEmpty",(t,n)=>this.fetch(t,tD(n)).then(async r=>{if(!r.ok)throw await r.json()}));this.fetch=t}}const mye=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",pye,"fetch"),e.serviceFactory("ScrollToTop",()=>sye),e.serviceFactory("MainHeader",aye,"ServersDropdown"),e.serviceFactory("Home",()=>oye),e.decorator("Home",Ev),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>nye),e.serviceFactory("ShlinkWebComponentContainer",hye,"buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>dye),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",rye,"window","console")};let lm;const gye=new Uint8Array(16);function vye(){if(!lm&&(lm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lm(gye)}const Hn=[];for(let e=0;e<256;++e)Hn.push((e+256).toString(16).slice(1));function yye(e,t=0){return(Hn[e[t+0]]+Hn[e[t+1]]+Hn[e[t+2]]+Hn[e[t+3]]+"-"+Hn[e[t+4]]+Hn[e[t+5]]+"-"+Hn[e[t+6]]+Hn[e[t+7]]+"-"+Hn[e[t+8]]+Hn[e[t+9]]+"-"+Hn[e[t+10]]+Hn[e[t+11]]+Hn[e[t+12]]+Hn[e[t+13]]+Hn[e[t+14]]+Hn[e[t+15]]).toLowerCase()}const _ye=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nD={randomUUID:_ye};function Q5(e,t,n){if(nD.randomUUID&&!t&&!e)return nD.randomUUID();e=e||{};const r=e.random||(e.rng||vye)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return yye(r)}const bye=2e3,wye=(e,t)=>(n=!1,r=bye)=>{const[i,o]=B.useState(n),a=B.useRef(void 0);return[i,()=>{o(!n),a.current&&t(a.current),a.current=e(()=>o(n),r)}]},X5=()=>{const e=uo();return()=>e(-1)},xye=()=>{const{search:e}=gn();return vl(e)},J5=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return g.jsxs(Zo,{centered:!0,isOpen:e,children:[g.jsxs(Qo,{children:["Duplicated server",i&&"s"]}),g.jsxs(fo,{children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{children:t.map(({url:o,apiKey:a},s)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:a})]},s):g.jsxs(B.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:a})]})]},s))}),g.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),g.jsxs(ml,{children:[g.jsx(yt,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),g.jsx(yt,{color:"primary",onClick:r,children:"Save anyway"})]})]})},Sye=e=>Ft(t=>t.preventDefault(),e),e8=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=B.useState(""),[a,s]=B.useState(""),[l,c]=B.useState(""),f=Sye(()=>e({name:i,url:a,apiKey:l}));return B.useEffect(()=>{t&&o(t.name),t&&s(t.url),t&&c(t.apiKey)},[t]),g.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[g.jsxs(hn,{className:"mb-3",title:r,children:[g.jsx(Nm,{value:i,onChange:o,children:"Name"}),g.jsx(Nm,{type:"url",value:a,onChange:s,children:"URL"}),g.jsx(Nm,{value:l,onChange:c,children:"API key"})]}),g.jsx("div",{className:"text-end",children:n})]})},rD=4e3,iD=({type:e})=>g.jsx("div",{className:"mt-3",children:g.jsxs(zr,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),Oye=(e,t)=>({servers:n,createServers:r})=>{const i=uo(),o=X5(),a=!!Object.keys(n).length,[s,l]=t(!1,rD),[c,f]=t(!1,rD),[d,p]=mn(),[m,v]=B.useState(),y=()=>{if(!m)return;const x=Q5();r([{...m,id:x}]),i(`/server/${x}`)};return B.useEffect(()=>{Object.values(n).some(({url:b,apiKey:w})=>(m==null?void 0:m.url)===b&&(m==null?void 0:m.apiKey)===w)?p():y()},[m]),g.jsxs(Ou,{children:[g.jsxs(e8,{title:g.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!a&&g.jsx(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),a&&g.jsx(yt,{outline:!0,onClick:o,children:"Cancel"}),g.jsx(yt,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&g.jsx(iD,{type:"success"}),c&&g.jsx(iD,{type:"error"}),g.jsx(J5,{isOpen:d,duplicatedServers:m?[m]:[],onDiscard:o,onSave:y})]})},Cye=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,a,s]=mn();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:n,onClick:a,children:[!r&&g.jsx(Ie,{fixedWidth:!0,icon:SS}),g.jsx("span",{className:i,children:r??"Remove this server"})]}),g.jsx(e,{server:t,isOpen:o,toggle:s})]})},Eye=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=uo(),a=B.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return g.jsxs(Zo,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[g.jsx(Qo,{toggle:t,className:"text-danger",children:"Remove server"}),g.jsxs(fo,{children:[g.jsxs("p",{children:["Are you sure you want to remove ",g.jsx("b",{children:e?e.name:""}),"?"]}),g.jsx("p",{children:g.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),g.jsxs(ml,{children:[g.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),g.jsx(yt,{color:"danger",onClick:s,children:"Delete"})]})]})},kye=e=>Z5(({editServer:t,selectedServer:n,selectServer:r})=>{const i=X5(),{reconnect:o}=xye();if(!Bf(n))return null;const a=s=>{t(n.id,s),o==="true"&&r(n.id),i()};return g.jsx(Ou,{children:g.jsxs(e8,{title:g.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:a,children:[g.jsx(yt,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),g.jsx(yt,{outline:!0,color:"primary",children:"Save"})]})})},e);const oD=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),Pye=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:a="bottom",className:s=""})=>{const l=gl(),[c,f]=B.useState(),[d,p]=B.useState([]),[m,,v,y]=mn(),x=Ft(t,i),b=Ft(()=>x(c??[]),y),w=Ft(()=>x((c??[]).filter(cq(oD(d)))),y),S=async({target:C})=>{var k;return e((k=C.files)==null?void 0:k[0]).then(f).then(()=>{C.value=null}).catch(o)};return B.useEffect(()=>{if(!c)return;const C=Object.values(n),k=c.filter(oD(C)),P=!!k.length;P?p(k):x(c),P&&v()},[c]),g.jsxs(g.Fragment,{children:[g.jsxs(yt,{outline:!0,id:"importBtn",className:s,onClick:()=>{var C;return(C=l.current)==null?void 0:C.click()},children:[g.jsx(Ie,{icon:AG,fixedWidth:!0})," ",r??"Import from file"]}),g.jsxs(jr,{placement:a,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",g.jsx("b",{children:"name"}),", ",g.jsx("b",{children:"apiKey"})," and ",g.jsx("b",{children:"url"}),"."]}),g.jsx("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:S}),g.jsx(J5,{isOpen:m,duplicatedServers:d,onDiscard:w,onSave:b})]})};const Tye=e=>({servers:t,selectedServer:n})=>g.jsx(Ou,{children:g.jsxs("div",{className:"server-error__container flex-column",children:[g.jsxs(Do,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Bf(n)&&"Could not find this Shlink server.",Bf(n)&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),g.jsxs(W5,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(It,{to:"/server/create",children:"add a new one"}),"."]}),Bf(n)&&g.jsx("div",{className:"container mt-3 mt-md-5",children:g.jsxs("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",g.jsx(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",g.jsx(It,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),Mye=4e3,jye=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[a,s]=B.useState(o),l=p=>s(o.filter(({name:m,url:v})=>`${m} ${v}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[f,d]=n(!1,Mye);return B.useEffect(()=>{s(Object.values(i))},[i]),g.jsxs(Ou,{children:[g.jsx(wh,{className:"mb-3",onChange:l}),g.jsxs(mr,{className:"mb-3",children:[g.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[g.jsx(t,{className:"flex-fill",onImportError:d,children:"Import servers"}),o.length>0&&g.jsxs(yt,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[g.jsx(Ie,{icon:OA,fixedWidth:!0})," Export servers"]})]}),g.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:g.jsxs(yt,{outline:!0,color:"primary",className:"flex-fill",tag:It,to:"/server/create",children:[g.jsx(Ie,{icon:kS,fixedWidth:!0})," Add a server"]})})]}),g.jsx(hn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsxs("tr",{children:[c&&g.jsx("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),g.jsx("th",{children:"Name"}),g.jsx("th",{children:"Base URL"}),g.jsx("th",{"aria-label":"Options"})]})}),g.jsxs("tbody",{children:[!a.length&&g.jsx("tr",{className:"text-center",children:g.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>g.jsx(r,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&g.jsx("div",{className:"mt-3",children:g.jsx(zr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Dye=e=>({server:t,hasAutoConnect:n})=>g.jsxs("tr",{className:"responsive-table__row",children:[n&&g.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(Ie,{icon:Dd,className:"text-primary",id:"autoConnectIcon"}),g.jsx(jr,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:g.jsx(It,{to:`/server/${t.id}`,children:t.name})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(e,{server:t})})]}),Lye=e=>({server:t,setAutoConnect:n})=>{const[r,,i,o]=mn(),a=`/server/${t.id}`,{autoConnect:s}=t,l=s?RG:nfe;return g.jsxs(jy,{minWidth:170,children:[g.jsxs(Ue,{tag:It,to:a,children:[g.jsx(Ie,{icon:DG,fixedWidth:!0})," Connect"]}),g.jsxs(Ue,{tag:It,to:`${a}/edit`,children:[g.jsx(Ie,{icon:OS,fixedWidth:!0})," Edit server"]}),g.jsxs(Ue,{onClick:()=>n(t,!s),children:[g.jsx(Ie,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:i,children:[g.jsx(Ie,{icon:SS,fixedWidth:!0})," Remove server"]}),g.jsx(e,{redirectHome:!1,server:t,isOpen:r,toggle:o})]})},t8=(e,t)=>N6(e,t,{serializeError:vS}),Rye={},Nye=e=>e.id?e:Md("id",Q5(),e),Aye=mS((e,t)=>Md(t.id,t,e),{}),{actions:Iye,reducer:Fye}=sr({name:"shlink/servers",initialState:Rye,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?Md(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>Bq(t.id,e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?vf(b1(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):Md(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:Ft(ch(Nye),Aye,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:$ye,deleteServer:Bye,setAutoConnect:Uye,createServers:n8}=Iye,zye=Fye,Vye=e=>Array.isArray(e)?e.filter(vA):[],Hye=e=>t8("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${Og.homepage}/servers.json`),i=Vye(r);n(n8(i))}),lC="shlink/selectedServer",Wye="1.0.0",Yye="999.999.999",qye="latest",Gye=Ft(e=>e===qye?Yye:e,K5(Wye)),Kye=hA(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Gye(n),printableVersion:G5(n)}))),aD=null,cC=jn(`${lC}/resetSelectedServer`),Zye=e=>t8(`${lC}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(cC());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:a}=e(o),{version:s,printableVersion:l}=await Kye(o,a);return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),Qye=e=>sr({name:lC,initialState:aD,reducers:{},extraReducers:t=>{t.addCase(cC,()=>aD),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Xye=({servers:e,selectedServer:t})=>{const n=mu(e),r=()=>Kn(n)?g.jsxs(Ue,{tag:It,to:"/server/create",children:[g.jsx(Ie,{icon:kS})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]}):g.jsxs(g.Fragment,{children:[n.map(({name:i,id:o})=>g.jsx(Ue,{tag:It,to:`/server/${o}`,active:bG(t)===o,children:i},o)),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{tag:It,to:"/manage-servers",children:[g.jsx(Ie,{icon:mT})," ",g.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return g.jsxs(bh,{nav:!0,inNavbar:!0,children:[g.jsxs(vh,{nav:!0,caret:!0,children:[g.jsx(Ie,{icon:mT})," ",g.jsx("span",{className:"ms-1",children:"Servers"})]}),g.jsx(vu,{end:!0,style:{right:0},children:r()})]})},Jye=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},e0e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Jye(e,i,n)},t0e="shlink-servers.csv";class n0e{constructor(t,n,r){me(this,"exportServers",async()=>{const t=mu(this.storage.get("servers")??{}).map(wG);try{const n=this.jsonToCsv(t);e0e(this.window,n,t0e)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const r0e=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",i0e=e=>Array.isArray(e)&&e.every(r0e);class o0e{constructor(t,n){me(this,"importServersFromFile",async t=>{if(!t)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var a,s;try{const l=((s=(a=o.target)==null?void 0:a.result)==null?void 0:s.toString())??"",c=await this.csvToJson(l);if(!i0e(c))throw new Error("Provided file does not have the right format.");r(c)}catch(l){i(l)}}),n.readAsText(t)})});this.csvToJson=t,this.fileReaderFactory=n}}const a0e=(e,t)=>{e.serviceFactory("ManageServers",jye,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",Ev),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Dye,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",Lye,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Oye,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",Ev),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",kye,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>Xye),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>Eye),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",Cye,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Pye,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",Tye,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",o0e,"csvToJson","fileReaderFactory"),e.service("ServersExporter",n0e,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Zye,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>n8),e.serviceFactory("deleteServer",()=>Bye),e.serviceFactory("editServer",()=>$ye),e.serviceFactory("setAutoConnect",()=>Uye),e.serviceFactory("fetchServers",Hye,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>cC),e.serviceFactory("selectedServerReducerCreator",Qye,"selectServer"),e.serviceFactory("selectedServerReducer",ct("reducer"),"selectedServerReducerCreator")},Pc=({children:e})=>g.jsx("small",{className:"form-text text-muted d-block",children:e}),s0e=e=>e?`${e}`:"",l0e=({settings:e,toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=e,i=My();return g.jsxs(hn,{title:"Real-time updates",className:"h-100",children:[g.jsx(Fr,{children:g.jsxs(Qc,{checked:r.enabled,onChange:t,children:["Enable or disable real-time updates.",g.jsxs(Pc,{children:["Real-time updates are currently being ",g.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),g.jsxs(_u,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Ee("form-label",{"text-muted":!r.enabled}),id:i,children:[g.jsx(Zc,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:s0e(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&g.jsxs(Pc,{children:[r.interval!==void 0&&r.interval>0&&g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},r8={field:"dateCreated",dir:"DESC"},c0e={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:r8}},u0e=(e,{payload:t})=>pA(e,t),_s=e=>({reducer:u0e,prepare:e}),bs=e=>({payload:e}),{reducer:f0e,actions:d0e}=sr({name:"shlink/settings",initialState:c0e,reducers:{toggleRealTimeUpdates:_s(e=>bs({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:_s(e=>bs({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:_s(e=>bs({shortUrlCreation:e})),setShortUrlsListSettings:_s(e=>bs({shortUrlsList:e})),setUiSettings:_s(e=>bs({ui:e})),setVisitsSettings:_s(e=>bs({visits:e})),setTagsSettings:_s(e=>bs({tags:e}))}}),{toggleRealTimeUpdates:h0e,setRealTimeUpdatesInterval:p0e,setShortUrlCreationSettings:m0e,setShortUrlsListSettings:g0e,setUiSettings:v0e,setVisitsSettings:y0e,setTagsSettings:_0e}=d0e,b0e=f0e,ib=({items:e})=>g.jsx(g.Fragment,{children:e.map((t,n)=>g.jsx("div",{className:"mb-3",children:t},n))}),w0e=(e,t,n,r,i,o)=>()=>g.jsxs(Ou,{children:[g.jsxs(t6,{className:"mb-3",children:[g.jsx(Yf,{to:"general",children:"General"}),g.jsx(Yf,{to:"short-urls",children:"Short URLs"}),g.jsx(Yf,{to:"other-items",children:"Other items"})]}),g.jsxs(vy,{children:[g.jsx(vt,{path:"general",element:g.jsx(ib,{items:[g.jsx(r,{}),g.jsx(e,{})]})}),g.jsx(vt,{path:"short-urls",element:g.jsx(ib,{items:[g.jsx(t,{}),g.jsx(n,{})]})}),g.jsx(vt,{path:"other-items",element:g.jsx(ib,{items:[g.jsx(o,{}),g.jsx(i,{})]})}),g.jsx(vt,{path:"*",element:g.jsx(cS,{replace:!0,to:"general"})})]})]}),ob=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",x0e=e=>e==="includes"?g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"including"})," provided input."]}):g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"starting with"})," provided input."]}),S0e=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return g.jsxs(hn,{title:"Short URLs form",className:"h-100",children:[g.jsx(Fr,{children:g.jsxs(Qc,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",g.jsxs(Pc,{children:["The initial state of the ",g.jsx("b",{children:"Validate URL"})," checkbox will be ",g.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),g.jsx(Fr,{children:g.jsxs(Qc,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",g.jsxs(Pc,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),g.jsxs(_u,{noMargin:!0,label:"Tag suggestions search mode:",children:[g.jsxs(Xo,{text:ob(n.tagFilteringMode),children:[g.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:ob("startsWith")}),g.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:ob("includes")})]}),g.jsx(Pc,{children:x0e(n.tagFilteringMode)})]})]})},O0e={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},C0e=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>g.jsx(hn,{title:"Short URLs list",className:"h-100",children:g.jsx(_u,{noMargin:!0,label:"Default ordering for short URLs list:",children:g.jsx(xh,{items:O0e,order:(e==null?void 0:e.defaultOrdering)??r8,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),E0e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},k0e=({settings:{tags:e},setTagsSettings:t})=>g.jsx(hn,{title:"Tags",className:"h-100",children:g.jsx(_u,{noMargin:!0,label:"Default ordering for tags list:",children:g.jsx(xh,{items:E0e,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const P0e=({settings:{ui:e},setUiSettings:t})=>g.jsxs(hn,{title:"User interface",className:"h-100",children:[g.jsx(Ie,{icon:(e==null?void 0:e.theme)==="dark"?mK:rK,className:"user-interface__theme-icon"}),g.jsx(Qc,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),o6(r)},children:"Use dark theme."})]}),i8={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},T0e=(e,t)=>!e||e==="all"?t:i8[e],M0e=({onChange:e,active:t,allText:n})=>g.jsxs(Xo,{text:T0e(t,n),children:[g.jsx(Ue,{active:t==="all",onClick:()=>e("all"),children:n}),g.jsx(Ue,{divider:!0}),Object.entries(i8).map(([r,i])=>g.jsx(Ue,{active:t===r,onClick:()=>e(r),children:i},r))]}),sD=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},j0e=({settings:e,setVisitsSettings:t})=>{var n,r;return g.jsxs(hn,{title:"Visits",className:"h-100",children:[g.jsx(Fr,{children:g.jsxs(Qc,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:sD(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",g.jsxs(Pc,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),g.jsx(_u,{noMargin:!0,label:"Default interval to load on visits sections:",children:g.jsx(M0e,{allText:"All visits",active:sD(e),onChange:i=>t({defaultInterval:i})})})]})},D0e=(e,t)=>{e.serviceFactory("Settings",w0e,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",Ev),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>l0e),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>S0e),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>P0e),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>j0e),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>k0e),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>C0e),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>h0e),e.serviceFactory("setRealTimeUpdatesInterval",()=>p0e),e.serviceFactory("setShortUrlCreationSettings",()=>m0e),e.serviceFactory("setShortUrlsListSettings",()=>g0e),e.serviceFactory("setUiSettings",()=>v0e),e.serviceFactory("setVisitsSettings",()=>y0e),e.serviceFactory("setTagsSettings",()=>_0e)};var L0e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(v){var y=[];for(var x in v)y.push(x);return y};e.exports=d;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(d,a);for(var l=i(s.prototype),c=0;c"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var h=0;h0?Math.floor(u):Math.ceil(u)};G.prototype={clone:function(){return new G(this.x,this.y)},add:function(u){return this.clone()._add(A(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(A(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new G(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new G(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=F(this.x),this.y=F(this.y),this},distanceTo:function(u){u=A(u);var h=u.x-this.x,_=u.y-this.y;return Math.sqrt(h*h+_*_)},equals:function(u){return u=A(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=A(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function A(u,h,_){return u instanceof G?u:S(u)?new G(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new G(u.x,u.y):new G(u,h,_)}function z(u,h){if(u)for(var _=h?[u,h]:u,O=0,T=_.length;O=this.min.x&&_.x<=this.max.x&&h.y>=this.min.y&&_.y<=this.max.y},intersects:function(u){u=re(u);var h=this.min,_=this.max,O=u.min,T=u.max,$=T.x>=h.x&&O.x<=_.x,ne=T.y>=h.y&&O.y<=_.y;return $&&ne},overlaps:function(u){u=re(u);var h=this.min,_=this.max,O=u.min,T=u.max,$=T.x>h.x&&O.x<_.x,ne=T.y>h.y&&O.y<_.y;return $&&ne},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var h=this.min,_=this.max,O=Math.abs(h.x-_.x)*u,T=Math.abs(h.y-_.y)*u;return re(A(h.x-O,h.y-T),A(_.x+O,_.y+T))},equals:function(u){return u?(u=re(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function re(u,h){return!u||u instanceof z?u:new z(u,h)}function U(u,h){if(u)for(var _=h?[u,h]:u,O=0,T=_.length;O=h.lat&&T.lat<=_.lat&&O.lng>=h.lng&&T.lng<=_.lng},intersects:function(u){u=K(u);var h=this._southWest,_=this._northEast,O=u.getSouthWest(),T=u.getNorthEast(),$=T.lat>=h.lat&&O.lat<=_.lat,ne=T.lng>=h.lng&&O.lng<=_.lng;return $&&ne},overlaps:function(u){u=K(u);var h=this._southWest,_=this._northEast,O=u.getSouthWest(),T=u.getNorthEast(),$=T.lat>h.lat&&O.lat<_.lat,ne=T.lng>h.lng&&O.lng<_.lng;return $&&ne},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,h){return u?(u=K(u),this._southWest.equals(u.getSouthWest(),h)&&this._northEast.equals(u.getNorthEast(),h)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function K(u,h){return u instanceof U?u:new U(u,h)}function ie(u,h,_){if(isNaN(u)||isNaN(h))throw new Error("Invalid LatLng object: ("+u+", "+h+")");this.lat=+u,this.lng=+h,_!==void 0&&(this.alt=+_)}ie.prototype={equals:function(u,h){if(!u)return!1;u=ae(u);var _=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return _<=(h===void 0?1e-9:h)},toString:function(u){return"LatLng("+p(this.lat,u)+", "+p(this.lng,u)+")"},distanceTo:function(u){return E.distance(this,ae(u))},wrap:function(){return E.wrapLatLng(this)},toBounds:function(u){var h=180*u/40075017,_=h/Math.cos(Math.PI/180*this.lat);return K([this.lat-h,this.lng-_],[this.lat+h,this.lng+_])},clone:function(){return new ie(this.lat,this.lng,this.alt)}};function ae(u,h,_){return u instanceof ie?u:S(u)&&typeof u[0]!="object"?u.length===3?new ie(u[0],u[1],u[2]):u.length===2?new ie(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new ie(u.lat,"lng"in u?u.lng:u.lon,u.alt):h===void 0?null:new ie(u,h,_)}var he={latLngToPoint:function(u,h){var _=this.projection.project(u),O=this.scale(h);return this.transformation._transform(_,O)},pointToLatLng:function(u,h){var _=this.scale(h),O=this.transformation.untransform(u,_);return this.projection.unproject(O)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var h=this.projection.bounds,_=this.scale(u),O=this.transformation.transform(h.min,_),T=this.transformation.transform(h.max,_);return new z(O,T)},infinite:!1,wrapLatLng:function(u){var h=this.wrapLng?f(u.lng,this.wrapLng,!0):u.lng,_=this.wrapLat?f(u.lat,this.wrapLat,!0):u.lat,O=u.alt;return new ie(_,h,O)},wrapLatLngBounds:function(u){var h=u.getCenter(),_=this.wrapLatLng(h),O=h.lat-_.lat,T=h.lng-_.lng;if(O===0&&T===0)return u;var $=u.getSouthWest(),ne=u.getNorthEast(),fe=new ie($.lat-O,$.lng-T),pe=new ie(ne.lat-O,ne.lng-T);return new U(fe,pe)}},E=i({},he,{wrapLng:[-180,180],R:6371e3,distance:function(u,h){var _=Math.PI/180,O=u.lat*_,T=h.lat*_,$=Math.sin((h.lat-u.lat)*_/2),ne=Math.sin((h.lng-u.lng)*_/2),fe=$*$+Math.cos(O)*Math.cos(T)*ne*ne,pe=2*Math.atan2(Math.sqrt(fe),Math.sqrt(1-fe));return this.R*pe}}),M=6378137,I={R:M,MAX_LATITUDE:85.0511287798,project:function(u){var h=Math.PI/180,_=this.MAX_LATITUDE,O=Math.max(Math.min(_,u.lat),-_),T=Math.sin(O*h);return new G(this.R*u.lng*h,this.R*Math.log((1+T)/(1-T))/2)},unproject:function(u){var h=180/Math.PI;return new ie((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*h,u.x*h/this.R)},bounds:function(){var u=M*Math.PI;return new z([-u,-u],[u,u])}()};function J(u,h,_,O){if(S(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=h,this._c=_,this._d=O}J.prototype={transform:function(u,h){return this._transform(u.clone(),h)},_transform:function(u,h){return h=h||1,u.x=h*(this._a*u.x+this._b),u.y=h*(this._c*u.y+this._d),u},untransform:function(u,h){return h=h||1,new G((u.x/h-this._b)/this._a,(u.y/h-this._d)/this._c)}};function X(u,h,_,O){return new J(u,h,_,O)}var se=i({},E,{code:"EPSG:3857",projection:I,transformation:function(){var u=.5/(Math.PI*I.R);return X(u,.5,-u,.5)}()}),ge=i({},se,{code:"EPSG:900913"});function De(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function ue(u,h){var _="",O,T,$,ne,fe,pe;for(O=0,$=u.length;O<$;O++){for(fe=u[O],T=0,ne=fe.length;T1,tn=function(){var u=!1;try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",d,h),window.removeEventListener("testPassiveEventSupport",d,h)}catch{}return u}(),cr=function(){return!!document.createElement("canvas").getContext}(),$n=!!(document.createElementNS&&De("svg").createSVGRect),Bn=!!$n&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),vn=!$n&&function(){try{var u=document.createElement("div");u.innerHTML='';var h=u.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),_i=navigator.platform.indexOf("Mac")===0,bi=navigator.platform.indexOf("Linux")===0;function Un(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var Ve={ie:_e,ielt9:Ce,edge:Le,webkit:Me,android:je,android23:ce,androidStock:be,opera:ye,chrome:Se,gecko:Te,safari:Ne,phantom:Qe,opera12:et,win:qe,ie3d:Gt,webkit3d:zt,gecko3d:Sn,any3d:lr,mobile:$i,mobileWebkit:Fn,mobileWebkit3d:Cu,msPointer:Bi,pointer:Ih,touch:$h,touchNative:Fh,mobileOpera:Eu,mobileGecko:ls,retina:un,passiveEvents:tn,canvas:cr,svg:$n,vml:vn,inlineSvg:Bn,mac:_i,linux:bi},dC=Ve.msPointer?"MSPointerDown":"pointerdown",hC=Ve.msPointer?"MSPointerMove":"pointermove",pC=Ve.msPointer?"MSPointerUp":"pointerup",mC=Ve.msPointer?"MSPointerCancel":"pointercancel",qy={touchstart:dC,touchmove:hC,touchend:pC,touchcancel:mC},gC={touchstart:h8,touchmove:Bh,touchend:Bh,touchcancel:Bh},Sl={},vC=!1;function l8(u,h,_){return h==="touchstart"&&d8(),gC[h]?(_=gC[h].bind(this,_),u.addEventListener(qy[h],_,!1),_):(console.warn("wrong event specified:",h),d)}function c8(u,h,_){if(!qy[h]){console.warn("wrong event specified:",h);return}u.removeEventListener(qy[h],_,!1)}function u8(u){Sl[u.pointerId]=u}function f8(u){Sl[u.pointerId]&&(Sl[u.pointerId]=u)}function yC(u){delete Sl[u.pointerId]}function d8(){vC||(document.addEventListener(dC,u8,!0),document.addEventListener(hC,f8,!0),document.addEventListener(pC,yC,!0),document.addEventListener(mC,yC,!0),vC=!0)}function Bh(u,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var _ in Sl)h.touches.push(Sl[_]);h.changedTouches=[h],u(h)}}function h8(u,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&zn(h),Bh(u,h)}function p8(u){var h={},_,O;for(O in u)_=u[O],h[O]=_&&_.bind?_.bind(u):_;return u=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var m8=200;function g8(u,h){u.addEventListener("dblclick",h);var _=0,O;function T($){if($.detail!==1){O=$.detail;return}if(!($.pointerType==="mouse"||$.sourceCapabilities&&!$.sourceCapabilities.firesTouchEvents)){var ne=SC($);if(!(ne.some(function(pe){return pe instanceof HTMLLabelElement&&pe.attributes.for})&&!ne.some(function(pe){return pe instanceof HTMLInputElement||pe instanceof HTMLSelectElement}))){var fe=Date.now();fe-_<=m8?(O++,O===2&&h(p8($))):O=1,_=fe}}}return u.addEventListener("click",T),{dblclick:h,simDblclick:T}}function v8(u,h){u.removeEventListener("dblclick",h.dblclick),u.removeEventListener("click",h.simDblclick)}var Gy=Vh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ku=Vh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_C=ku==="webkitTransition"||ku==="OTransition"?ku+"End":"transitionend";function bC(u){return typeof u=="string"?document.getElementById(u):u}function Pu(u,h){var _=u.style[h]||u.currentStyle&&u.currentStyle[h];if((!_||_==="auto")&&document.defaultView){var O=document.defaultView.getComputedStyle(u,null);_=O?O[h]:null}return _==="auto"?null:_}function mt(u,h,_){var O=document.createElement(u);return O.className=h||"",_&&_.appendChild(O),O}function Vt(u){var h=u.parentNode;h&&h.removeChild(u)}function Uh(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Ol(u){var h=u.parentNode;h&&h.lastChild!==u&&h.appendChild(u)}function Cl(u){var h=u.parentNode;h&&h.firstChild!==u&&h.insertBefore(u,h.firstChild)}function Ky(u,h){if(u.classList!==void 0)return u.classList.contains(h);var _=zh(u);return _.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(_)}function Ze(u,h){if(u.classList!==void 0)for(var _=v(h),O=0,T=_.length;O0?2*window.devicePixelRatio:1;function CC(u){return Ve.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/b8:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function s0(u,h){var _=h.relatedTarget;if(!_)return!0;try{for(;_&&_!==u;)_=_.parentNode}catch{return!1}return _!==u}var w8={__proto__:null,on:Ge,off:kt,stopPropagation:fs,disableScrollPropagation:a0,disableClickPropagation:Du,preventDefault:zn,stop:ds,getPropagationPath:SC,getMousePosition:OC,getWheelDelta:CC,isExternalTarget:s0,addListener:Ge,removeListener:kt},EC=le.extend({run:function(u,h,_,O){this.stop(),this._el=u,this._inProgress=!0,this._duration=_||.25,this._easeOutPower=1/Math.max(O||.5,.2),this._startPos=us(u),this._offset=h.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=V(this._animate,this),this._step()},_step:function(u){var h=+new Date-this._startTime,_=this._duration*1e3;h<_?this._runFrame(this._easeOut(h/_),u):(this._runFrame(1),this._complete())},_runFrame:function(u,h){var _=this._startPos.add(this._offset.multiplyBy(u));h&&_._round(),fn(this._el,_),this.fire("step")},_complete:function(){W(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),lt=le.extend({options:{crs:se,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,h){h=y(this,h),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),h.maxBounds&&this.setMaxBounds(h.maxBounds),h.zoom!==void 0&&(this._zoom=this._limitZoom(h.zoom)),h.center&&h.zoom!==void 0&&this.setView(ae(h.center),h.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ku&&Ve.any3d&&!Ve.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ge(this._proxy,_C,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,h,_){if(h=h===void 0?this._zoom:this._limitZoom(h),u=this._limitCenter(ae(u),h,this.options.maxBounds),_=_||{},this._stop(),this._loaded&&!_.reset&&_!==!0){_.animate!==void 0&&(_.zoom=i({animate:_.animate},_.zoom),_.pan=i({animate:_.animate,duration:_.duration},_.pan));var O=this._zoom!==h?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,h,_.zoom):this._tryAnimatedPan(u,_.pan);if(O)return clearTimeout(this._sizeTimer),this}return this._resetView(u,h,_.pan&&_.pan.noMoveStart),this},setZoom:function(u,h){return this._loaded?this.setView(this.getCenter(),u,{zoom:h}):(this._zoom=u,this)},zoomIn:function(u,h){return u=u||(Ve.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,h)},zoomOut:function(u,h){return u=u||(Ve.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,h)},setZoomAround:function(u,h,_){var O=this.getZoomScale(h),T=this.getSize().divideBy(2),$=u instanceof G?u:this.latLngToContainerPoint(u),ne=$.subtract(T).multiplyBy(1-1/O),fe=this.containerPointToLatLng(T.add(ne));return this.setView(fe,h,{zoom:_})},_getBoundsCenterZoom:function(u,h){h=h||{},u=u.getBounds?u.getBounds():K(u);var _=A(h.paddingTopLeft||h.padding||[0,0]),O=A(h.paddingBottomRight||h.padding||[0,0]),T=this.getBoundsZoom(u,!1,_.add(O));if(T=typeof h.maxZoom=="number"?Math.min(h.maxZoom,T):T,T===1/0)return{center:u.getCenter(),zoom:T};var $=O.subtract(_).divideBy(2),ne=this.project(u.getSouthWest(),T),fe=this.project(u.getNorthEast(),T),pe=this.unproject(ne.add(fe).divideBy(2).add($),T);return{center:pe,zoom:T}},fitBounds:function(u,h){if(u=K(u),!u.isValid())throw new Error("Bounds are not valid.");var _=this._getBoundsCenterZoom(u,h);return this.setView(_.center,_.zoom,h)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,h){return this.setView(u,this._zoom,{pan:h})},panBy:function(u,h){if(u=A(u).round(),h=h||{},!u.x&&!u.y)return this.fire("moveend");if(h.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new EC,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),h.noMoveStart||this.fire("movestart"),h.animate!==!1){Ze(this._mapPane,"leaflet-pan-anim");var _=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,_,h.duration||.25,h.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,h,_){if(_=_||{},_.animate===!1||!Ve.any3d)return this.setView(u,h,_);this._stop();var O=this.project(this.getCenter()),T=this.project(u),$=this.getSize(),ne=this._zoom;u=ae(u),h=h===void 0?ne:h;var fe=Math.max($.x,$.y),pe=fe*this.getZoomScale(ne,h),xe=T.distanceTo(O)||1,Ae=1.42,We=Ae*Ae;function Xe(dn){var rp=dn?-1:1,cF=dn?pe:fe,uF=pe*pe-fe*fe+rp*We*We*xe*xe,fF=2*cF*We*xe,y0=uF/fF,aE=Math.sqrt(y0*y0+1)-y0,dF=aE<1e-9?-18:Math.log(aE);return dF}function ur(dn){return(Math.exp(dn)-Math.exp(-dn))/2}function On(dn){return(Math.exp(dn)+Math.exp(-dn))/2}function ti(dn){return ur(dn)/On(dn)}var br=Xe(0);function jl(dn){return fe*(On(br)/On(br+Ae*dn))}function oF(dn){return fe*(On(br)*ti(br+Ae*dn)-ur(br))/We}function aF(dn){return 1-Math.pow(1-dn,1.5)}var sF=Date.now(),iE=(Xe(1)-br)/Ae,lF=_.duration?1e3*_.duration:1e3*iE*.8;function oE(){var dn=(Date.now()-sF)/lF,rp=aF(dn)*iE;dn<=1?(this._flyToFrame=V(oE,this),this._move(this.unproject(O.add(T.subtract(O).multiplyBy(oF(rp)/xe)),ne),this.getScaleZoom(fe/jl(rp),ne),{flyTo:!0})):this._move(u,h)._moveEnd(!0)}return this._moveStart(!0,_.noMoveStart),oE.call(this),this},flyToBounds:function(u,h){var _=this._getBoundsCenterZoom(u,h);return this.flyTo(_.center,_.zoom,h)},setMaxBounds:function(u){return u=K(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var h=this.options.minZoom;return this.options.minZoom=u,this._loaded&&h!==u&&(this.fire("zoomlevelschange"),this.getZoom()this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,h){this._enforcingBounds=!0;var _=this.getCenter(),O=this._limitCenter(_,this._zoom,K(u));return _.equals(O)||this.panTo(O,h),this._enforcingBounds=!1,this},panInside:function(u,h){h=h||{};var _=A(h.paddingTopLeft||h.padding||[0,0]),O=A(h.paddingBottomRight||h.padding||[0,0]),T=this.project(this.getCenter()),$=this.project(u),ne=this.getPixelBounds(),fe=re([ne.min.add(_),ne.max.subtract(O)]),pe=fe.getSize();if(!fe.contains($)){this._enforcingBounds=!0;var xe=$.subtract(fe.getCenter()),Ae=fe.extend($).getSize().subtract(pe);T.x+=xe.x<0?-Ae.x:Ae.x,T.y+=xe.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(T),h),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var _=this.getSize(),O=h.divideBy(2).round(),T=_.divideBy(2).round(),$=O.subtract(T);return!$.x&&!$.y?this:(u.animate&&u.pan?this.panBy($):(u.pan&&this._rawPanBy($),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:_}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=a(this._handleGeolocationResponse,this),_=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,_,u):navigator.geolocation.getCurrentPosition(h,_,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var h=u.code,_=u.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+_+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var h=u.coords.latitude,_=u.coords.longitude,O=new ie(h,_),T=O.toBounds(u.coords.accuracy*2),$=this._locateOptions;if($.setView){var ne=this.getBoundsZoom(T);this.setView(O,$.maxZoom?Math.min(ne,$.maxZoom):ne)}var fe={latlng:O,bounds:T,timestamp:u.timestamp};for(var pe in u.coords)typeof u.coords[pe]=="number"&&(fe[pe]=u.coords[pe]);this.fire("locationfound",fe)}},addHandler:function(u,h){if(!h)return this;var _=this[u]=new h(this);return this._handlers.push(_),this.options[u]&&_.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Vt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(W(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)Vt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,h){var _="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),O=mt("div",_,h||this._mapPane);return u&&(this._panes[u]=O),O},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),h=this.unproject(u.getBottomLeft()),_=this.unproject(u.getTopRight());return new U(h,_)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,h,_){u=K(u),_=A(_||[0,0]);var O=this.getZoom()||0,T=this.getMinZoom(),$=this.getMaxZoom(),ne=u.getNorthWest(),fe=u.getSouthEast(),pe=this.getSize().subtract(_),xe=re(this.project(fe,O),this.project(ne,O)).getSize(),Ae=Ve.any3d?this.options.zoomSnap:1,We=pe.x/xe.x,Xe=pe.y/xe.y,ur=h?Math.max(We,Xe):Math.min(We,Xe);return O=this.getScaleZoom(ur,O),Ae&&(O=Math.round(O/(Ae/100))*(Ae/100),O=h?Math.ceil(O/Ae)*Ae:Math.floor(O/Ae)*Ae),Math.max(T,Math.min($,O))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new G(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,h){var _=this._getTopLeftPoint(u,h);return new z(_,_.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,h){var _=this.options.crs;return h=h===void 0?this._zoom:h,_.scale(u)/_.scale(h)},getScaleZoom:function(u,h){var _=this.options.crs;h=h===void 0?this._zoom:h;var O=_.zoom(u*_.scale(h));return isNaN(O)?1/0:O},project:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(ae(u),h)},unproject:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(A(u),h)},layerPointToLatLng:function(u){var h=A(u).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(u){var h=this.project(ae(u))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(K(u))},distance:function(u,h){return this.options.crs.distance(ae(u),ae(h))},containerPointToLayerPoint:function(u){return A(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return A(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var h=this.containerPointToLayerPoint(A(u));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return OC(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var h=this._container=bC(u);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ge(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ve.any3d,Ze(u,"leaflet-container"+(Ve.touch?" leaflet-touch":"")+(Ve.retina?" leaflet-retina":"")+(Ve.ielt9?" leaflet-oldie":"")+(Ve.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=Pu(u,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),fn(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ze(u.markerPane,"leaflet-zoom-hide"),Ze(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,h,_){fn(this._mapPane,new G(0,0));var O=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var T=this._zoom!==h;this._moveStart(T,_)._move(u,h)._moveEnd(T),this.fire("viewreset"),O&&this.fire("load")},_moveStart:function(u,h){return u&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(u,h,_,O){h===void 0&&(h=this._zoom);var T=this._zoom!==h;return this._zoom=h,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),O?_&&_.pinch&&this.fire("zoom",_):((T||_&&_.pinch)&&this.fire("zoom",_),this.fire("move",_)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return W(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){fn(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var h=u?kt:Ge;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),Ve.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){W(this._resizeRequest),this._resizeRequest=V(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,h){for(var _=[],O,T=h==="mouseout"||h==="mouseover",$=u.target||u.srcElement,ne=!1;$;){if(O=this._targets[l($)],O&&(h==="click"||h==="preclick")&&this._draggableMoved(O)){ne=!0;break}if(O&&O.listens(h,!0)&&(T&&!s0($,u)||(_.push(O),T))||$===this._container)break;$=$.parentNode}return!_.length&&!ne&&!T&&this.listens(h,!0)&&(_=[this]),_},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var h=u.target||u.srcElement;if(!(!this._loaded||h._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(h))){var _=u.type;_==="mousedown"&&t0(h),this._fireDOMEvent(u,_)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,h,_){if(u.type==="click"){var O=i({},u);O.type="preclick",this._fireDOMEvent(O,O.type,_)}var T=this._findEventTargets(u,h);if(_){for(var $=[],ne=0;ne<_.length;ne++)_[ne].listens(h,!0)&&$.push(_[ne]);T=$.concat(T)}if(T.length){h==="contextmenu"&&zn(u);var fe=T[0],pe={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var xe=fe.getLatLng&&(!fe._radius||fe._radius<=10);pe.containerPoint=xe?this.latLngToContainerPoint(fe.getLatLng()):this.mouseEventToContainerPoint(u),pe.layerPoint=this.containerPointToLayerPoint(pe.containerPoint),pe.latlng=xe?fe.getLatLng():this.layerPointToLatLng(pe.layerPoint)}for(ne=0;ne0?Math.round(u-h)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(h))},_limitZoom:function(u){var h=this.getMinZoom(),_=this.getMaxZoom(),O=Ve.any3d?this.options.zoomSnap:1;return O&&(u=Math.round(u/O)*O),Math.max(h,Math.min(_,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){nn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,h){var _=this._getCenterOffset(u)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(_)?!1:(this.panBy(_,h),!0)},_createAnimProxy:function(){var u=this._proxy=mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(h){var _=Gy,O=this._proxy.style[_];cs(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),O===this._proxy.style[_]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Vt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),h=this.getZoom();cs(this._proxy,this.project(u,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,h,_){if(this._animatingZoom)return!0;if(_=_||{},!this._zoomAnimated||_.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var O=this.getZoomScale(h),T=this._getCenterOffset(u)._divideBy(1-1/O);return _.animate!==!0&&!this.getSize().contains(T)?!1:(V(function(){this._moveStart(!0,_.noMoveStart||!1)._animateZoom(u,h,!0)},this),!0)},_animateZoom:function(u,h,_,O){this._mapPane&&(_&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=h,Ze(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:h,noUpdate:O}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&nn(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function x8(u,h){return new lt(u,h)}var wi=q.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var h=this._map;return h&&h.removeControl(this),this.options.position=u,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var h=this._container=this.onAdd(u),_=this.getPosition(),O=u._controlCorners[_];return Ze(h,"leaflet-control"),_.indexOf("bottom")!==-1?O.insertBefore(h,O.firstChild):O.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Vt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),Lu=function(u){return new wi(u)};lt.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},h="leaflet-",_=this._controlContainer=mt("div",h+"control-container",this._container);function O(T,$){var ne=h+T+" "+h+$;u[T+$]=mt("div",ne,_)}O("top","left"),O("top","right"),O("bottom","left"),O("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Vt(this._controlCorners[u]);Vt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var kC=wi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,h,_,O){return _1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=h&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var h=this._getLayer(l(u.target)),_=h.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;_&&this._map.fire(_,h)},_createRadioElement:function(u,h){var _='",O=document.createElement("div");return O.innerHTML=_,O.firstChild},_addItem:function(u){var h=document.createElement("label"),_=this._map.hasLayer(u.layer),O;u.overlay?(O=document.createElement("input"),O.type="checkbox",O.className="leaflet-control-layers-selector",O.defaultChecked=_):O=this._createRadioElement("leaflet-base-layers_"+l(this),_),this._layerControlInputs.push(O),O.layerId=l(u.layer),Ge(O,"click",this._onInputClick,this);var T=document.createElement("span");T.innerHTML=" "+u.name;var $=document.createElement("span");h.appendChild($),$.appendChild(O),$.appendChild(T);var ne=u.overlay?this._overlaysList:this._baseLayersList;return ne.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,h,_,O=[],T=[];this._handlingClick=!0;for(var $=u.length-1;$>=0;$--)h=u[$],_=this._getLayer(h.layerId).layer,h.checked?O.push(_):h.checked||T.push(_);for($=0;$=0;T--)h=u[T],_=this._getLayer(h.layerId).layer,h.disabled=_.options.minZoom!==void 0&&O<_.options.minZoom||_.options.maxZoom!==void 0&&O>_.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,Ge(u,"click",zn),this.expand();var h=this;setTimeout(function(){kt(u,"click",zn),h._preventClick=!1})}}),S8=function(u,h,_){return new kC(u,h,_)},l0=wi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var h="leaflet-control-zoom",_=mt("div",h+" leaflet-bar"),O=this.options;return this._zoomInButton=this._createButton(O.zoomInText,O.zoomInTitle,h+"-in",_,this._zoomIn),this._zoomOutButton=this._createButton(O.zoomOutText,O.zoomOutTitle,h+"-out",_,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),_},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,h,_,O,T){var $=mt("a",_,O);return $.innerHTML=u,$.href="#",$.title=h,$.setAttribute("role","button"),$.setAttribute("aria-label",h),Du($),Ge($,"click",ds),Ge($,"click",T,this),Ge($,"click",this._refocusOnMap,this),$},_updateDisabled:function(){var u=this._map,h="leaflet-disabled";nn(this._zoomInButton,h),nn(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Ze(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Ze(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});lt.mergeOptions({zoomControl:!0}),lt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new l0,this.addControl(this.zoomControl))});var O8=function(u){return new l0(u)},PC=wi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var h="leaflet-control-scale",_=mt("div",h),O=this.options;return this._addScales(O,h+"-line",_),u.on(O.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),_},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,h,_){u.metric&&(this._mScale=mt("div",h,_)),u.imperial&&(this._iScale=mt("div",h,_))},_update:function(){var u=this._map,h=u.getSize().y/2,_=u.distance(u.containerPointToLatLng([0,h]),u.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(_)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var h=this._getRoundNum(u),_=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,_,h/u)},_updateImperial:function(u){var h=u*3.2808399,_,O,T;h>5280?(_=h/5280,O=this._getRoundNum(_),this._updateScale(this._iScale,O+" mi",O/_)):(T=this._getRoundNum(h),this._updateScale(this._iScale,T+" ft",T/h))},_updateScale:function(u,h,_){u.style.width=Math.round(this.options.maxWidth*_)+"px",u.innerHTML=h},_getRoundNum:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),_=u/h;return _=_>=10?10:_>=5?5:_>=3?3:_>=2?2:1,h*_}}),C8=function(u){return new PC(u)},E8='',c0=wi.extend({options:{position:"bottomright",prefix:''+(Ve.inlineSvg?E8+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=mt("div","leaflet-control-attribution"),Du(this._container);for(var h in u._layers)u._layers[h].getAttribution&&this.addAttribution(u._layers[h].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var h in this._attributions)this._attributions[h]&&u.push(h);var _=[];this.options.prefix&&_.push(this.options.prefix),u.length&&_.push(u.join(", ")),this._container.innerHTML=_.join(' ')}}});lt.mergeOptions({attributionControl:!0}),lt.addInitHook(function(){this.options.attributionControl&&new c0().addTo(this)});var k8=function(u){return new c0(u)};wi.Layers=kC,wi.Zoom=l0,wi.Scale=PC,wi.Attribution=c0,Lu.layers=S8,Lu.zoom=O8,Lu.scale=C8,Lu.attribution=k8;var zi=q.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});zi.addTo=function(u,h){return u.addHandler(h,this),this};var P8={Events:oe},TC=Ve.touch?"touchstart mousedown":"mousedown",ta=le.extend({options:{clickTolerance:3},initialize:function(u,h,_,O){y(this,O),this._element=u,this._dragStartTarget=h||u,this._preventOutline=_},enable:function(){this._enabled||(Ge(this._dragStartTarget,TC,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ta._dragging===this&&this.finishDrag(!0),kt(this._dragStartTarget,TC,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Ky(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){ta._dragging===this&&this.finishDrag();return}if(!(ta._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(ta._dragging=this,this._preventOutline&&t0(this._element),Xy(),Tu(),!this._moving)){this.fire("down");var h=u.touches?u.touches[0]:u,_=wC(this._element);this._startPoint=new G(h.clientX,h.clientY),this._startPos=us(this._element),this._parentScale=n0(_);var O=u.type==="mousedown";Ge(document,O?"mousemove":"touchmove",this._onMove,this),Ge(document,O?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var h=u.touches&&u.touches.length===1?u.touches[0]:u,_=new G(h.clientX,h.clientY)._subtract(this._startPoint);!_.x&&!_.y||Math.abs(_.x)+Math.abs(_.y)$&&(ne=fe,$=pe);$>_&&(h[ne]=1,f0(u,h,_,O,ne),f0(u,h,_,ne,T))}function D8(u,h){for(var _=[u[0]],O=1,T=0,$=u.length;O<$;O++)L8(u[O],u[T])>h&&(_.push(u[O]),T=O);return T<$-1&&_.push(u[$-1]),_}var RC;function NC(u,h,_,O,T){var $=O?RC:hs(u,_),ne=hs(h,_),fe,pe,xe;for(RC=ne;;){if(!($|ne))return[u,h];if($&ne)return!1;fe=$||ne,pe=Yh(u,h,fe,_,T),xe=hs(pe,_),fe===$?(u=pe,$=xe):(h=pe,ne=xe)}}function Yh(u,h,_,O,T){var $=h.x-u.x,ne=h.y-u.y,fe=O.min,pe=O.max,xe,Ae;return _&8?(xe=u.x+$*(pe.y-u.y)/ne,Ae=pe.y):_&4?(xe=u.x+$*(fe.y-u.y)/ne,Ae=fe.y):_&2?(xe=pe.x,Ae=u.y+ne*(pe.x-u.x)/$):_&1&&(xe=fe.x,Ae=u.y+ne*(fe.x-u.x)/$),new G(xe,Ae,T)}function hs(u,h){var _=0;return u.xh.max.x&&(_|=2),u.yh.max.y&&(_|=8),_}function L8(u,h){var _=h.x-u.x,O=h.y-u.y;return _*_+O*O}function Ru(u,h,_,O){var T=h.x,$=h.y,ne=_.x-T,fe=_.y-$,pe=ne*ne+fe*fe,xe;return pe>0&&(xe=((u.x-T)*ne+(u.y-$)*fe)/pe,xe>1?(T=_.x,$=_.y):xe>0&&(T+=ne*xe,$+=fe*xe)),ne=u.x-T,fe=u.y-$,O?ne*ne+fe*fe:new G(T,$)}function ei(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function AC(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ei(u)}function IC(u,h){var _,O,T,$,ne,fe,pe,xe;if(!u||u.length===0)throw new Error("latlngs not passed");ei(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ae=ae([0,0]),We=K(u),Xe=We.getNorthWest().distanceTo(We.getSouthWest())*We.getNorthEast().distanceTo(We.getNorthWest());Xe<1700&&(Ae=u0(u));var ur=u.length,On=[];for(_=0;_O){pe=($-O)/T,xe=[fe.x-pe*(fe.x-ne.x),fe.y-pe*(fe.y-ne.y)];break}var br=h.unproject(A(xe));return ae([br.lat+Ae.lat,br.lng+Ae.lng])}var R8={__proto__:null,simplify:DC,pointToSegmentDistance:LC,closestPointOnSegment:M8,clipSegment:NC,_getEdgeIntersection:Yh,_getBitCode:hs,_sqClosestPointOnSegment:Ru,isFlat:ei,_flat:AC,polylineCenter:IC},d0={project:function(u){return new G(u.lng,u.lat)},unproject:function(u){return new ie(u.y,u.x)},bounds:new z([-180,-90],[180,90])},h0={R:6378137,R_MINOR:6356752314245179e-9,bounds:new z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var h=Math.PI/180,_=this.R,O=u.lat*h,T=this.R_MINOR/_,$=Math.sqrt(1-T*T),ne=$*Math.sin(O),fe=Math.tan(Math.PI/4-O/2)/Math.pow((1-ne)/(1+ne),$/2);return O=-_*Math.log(Math.max(fe,1e-10)),new G(u.lng*h*_,O)},unproject:function(u){for(var h=180/Math.PI,_=this.R,O=this.R_MINOR/_,T=Math.sqrt(1-O*O),$=Math.exp(-u.y/_),ne=Math.PI/2-2*Math.atan($),fe=0,pe=.1,xe;fe<15&&Math.abs(pe)>1e-7;fe++)xe=T*Math.sin(ne),xe=Math.pow((1-xe)/(1+xe),T/2),pe=Math.PI/2-2*Math.atan($*xe)-ne,ne+=pe;return new ie(ne*h,u.x*h/_)}},N8={__proto__:null,LonLat:d0,Mercator:h0,SphericalMercator:I},A8=i({},E,{code:"EPSG:3395",projection:h0,transformation:function(){var u=.5/(Math.PI*h0.R);return X(u,.5,-u,.5)}()}),FC=i({},E,{code:"EPSG:4326",projection:d0,transformation:X(1/180,1,-1/180,.5)}),I8=i({},he,{projection:d0,transformation:X(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,h){var _=h.lng-u.lng,O=h.lat-u.lat;return Math.sqrt(_*_+O*O)},infinite:!0});he.Earth=E,he.EPSG3395=A8,he.EPSG3857=se,he.EPSG900913=ge,he.EPSG4326=FC,he.Simple=I8;var xi=le.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var h=u.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var _=this.getEvents();h.on(_,this),this.once("remove",function(){h.off(_,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});lt.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(u);return this._layers[h]?this:(this._layers[h]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var h=l(u);return this._layers[h]?(this._loaded&&u.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,h){for(var _ in this._layers)u.call(h,this._layers[_]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var h=0,_=u.length;h<_;h++)this.addLayer(u[h])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[l(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var h=l(u);this._zoomBoundLayers[h]&&(delete this._zoomBoundLayers[h],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,h=-1/0,_=this._getZoomSpan();for(var O in this._zoomBoundLayers){var T=this._zoomBoundLayers[O].options;u=T.minZoom===void 0?u:Math.min(u,T.minZoom),h=T.maxZoom===void 0?h:Math.max(h,T.maxZoom)}this._layersMaxZoom=h===-1/0?void 0:h,this._layersMinZoom=u===1/0?void 0:u,_!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof ie&&h[0].equals(h[_-1])&&h.pop(),h},_setLatLngs:function(u){mo.prototype._setLatLngs.call(this,u),ei(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ei(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,h=this.options.weight,_=new G(h,h);if(u=new z(u.min.subtract(_),u.max.add(_)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var O=0,T=this._rings.length,$;Ou.y!=T.y>u.y&&u.x<(T.x-O.x)*(u.y-O.y)/(T.y-O.y)+O.x&&(h=!h);return h||mo.prototype._containsPoint.call(this,u,!0)}});function W8(u,h){return new Pl(u,h)}var go=po.extend({initialize:function(u,h){y(this,h),this._layers={},u&&this.addData(u)},addData:function(u){var h=S(u)?u:u.features,_,O,T;if(h){for(_=0,O=h.length;_0&&T.push(T[0].slice()),T}function Tl(u,h){return u.feature?i({},u.feature,{geometry:h}):Xh(h)}function Xh(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var v0={toGeoJSON:function(u){return Tl(this,{type:"Point",coordinates:g0(this.getLatLng(),u)})}};qh.include(v0),p0.include(v0),Gh.include(v0),mo.include({toGeoJSON:function(u){var h=!ei(this._latlngs),_=Qh(this._latlngs,h?1:0,!1,u);return Tl(this,{type:(h?"Multi":"")+"LineString",coordinates:_})}}),Pl.include({toGeoJSON:function(u){var h=!ei(this._latlngs),_=h&&!ei(this._latlngs[0]),O=Qh(this._latlngs,_?2:h?1:0,!0,u);return h||(O=[O]),Tl(this,{type:(_?"Multi":"")+"Polygon",coordinates:O})}}),El.include({toMultiPoint:function(u){var h=[];return this.eachLayer(function(_){h.push(_.toGeoJSON(u).geometry.coordinates)}),Tl(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(u){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(u);var _=h==="GeometryCollection",O=[];return this.eachLayer(function(T){if(T.toGeoJSON){var $=T.toGeoJSON(u);if(_)O.push($.geometry);else{var ne=Xh($);ne.type==="FeatureCollection"?O.push.apply(O,ne.features):O.push(ne)}}}),_?Tl(this,{geometries:O,type:"GeometryCollection"}):{type:"FeatureCollection",features:O}}});function UC(u,h){return new go(u,h)}var Y8=UC,Jh=xi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,h,_){this._url=u,this._bounds=K(h),y(this,_)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ze(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Vt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&Ol(this._image),this},bringToBack:function(){return this._map&&Cl(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=K(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",h=this._image=u?this._url:mt("img");if(Ze(h,"leaflet-image-layer"),this._zoomAnimated&&Ze(h,"leaflet-zoom-animated"),this.options.className&&Ze(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onload=a(this.fire,this,"load"),h.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(u){var h=this._map.getZoomScale(u.zoom),_=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;cs(this._image,_,h)},_reset:function(){var u=this._image,h=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),_=h.getSize();fn(u,h.min),u.style.width=_.x+"px",u.style.height=_.y+"px"},_updateOpacity:function(){Jr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),q8=function(u,h,_){return new Jh(u,h,_)},zC=Jh.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",h=this._image=u?this._url:mt("video");if(Ze(h,"leaflet-image-layer"),this._zoomAnimated&&Ze(h,"leaflet-zoom-animated"),this.options.className&&Ze(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onloadeddata=a(this.fire,this,"load"),u){for(var _=h.getElementsByTagName("source"),O=[],T=0;T<_.length;T++)O.push(_[T].src);this._url=_.length>0?O:[h.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var $=0;$T?(h.height=T+"px",Ze(u,$)):nn(u,$),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),_=this._getAnchor();fn(this._container,h.add(_))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,h=parseInt(Pu(this._container,"marginBottom"),10)||0,_=this._container.offsetHeight+h,O=this._containerWidth,T=new G(this._containerLeft,-_-this._containerBottom);T._add(us(this._container));var $=u.layerPointToContainerPoint(T),ne=A(this.options.autoPanPadding),fe=A(this.options.autoPanPaddingTopLeft||ne),pe=A(this.options.autoPanPaddingBottomRight||ne),xe=u.getSize(),Ae=0,We=0;$.x+O+pe.x>xe.x&&(Ae=$.x+O-xe.x+pe.x),$.x-Ae-fe.x<0&&(Ae=$.x-fe.x),$.y+_+pe.y>xe.y&&(We=$.y+_-xe.y+pe.y),$.y-We-fe.y<0&&(We=$.y-fe.y),(Ae||We)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ae,We]))}},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Z8=function(u,h){return new ep(u,h)};lt.mergeOptions({closePopupOnClick:!0}),lt.include({openPopup:function(u,h,_){return this._initOverlay(ep,u,h,_).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),xi.include({bindPopup:function(u,h){return this._popup=this._initOverlay(ep,this._popup,u,h),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof po||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){ds(u);var h=u.layer||u.target;if(this._popup._source===h&&!(h instanceof na)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=h,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var tp=Vi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Vi.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Vi.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Vi.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",h=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var h,_,O=this._map,T=this._container,$=O.latLngToContainerPoint(O.getCenter()),ne=O.layerPointToContainerPoint(u),fe=this.options.direction,pe=T.offsetWidth,xe=T.offsetHeight,Ae=A(this.options.offset),We=this._getAnchor();fe==="top"?(h=pe/2,_=xe):fe==="bottom"?(h=pe/2,_=0):fe==="center"?(h=pe/2,_=xe/2):fe==="right"?(h=0,_=xe/2):fe==="left"?(h=pe,_=xe/2):ne.x<$.x?(fe="right",h=0,_=xe/2):(fe="left",h=pe+(Ae.x+We.x)*2,_=xe/2),u=u.subtract(A(h,_,!0)).add(Ae).add(We),nn(T,"leaflet-tooltip-right"),nn(T,"leaflet-tooltip-left"),nn(T,"leaflet-tooltip-top"),nn(T,"leaflet-tooltip-bottom"),Ze(T,"leaflet-tooltip-"+fe),fn(T,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&Jr(this._container,u)},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(h)},_getAnchor:function(){return A(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Q8=function(u,h){return new tp(u,h)};lt.include({openTooltip:function(u,h,_){return this._initOverlay(tp,u,h,_).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),xi.include({bindTooltip:function(u,h){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(tp,this._tooltip,u,h),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var h=u?"off":"on",_={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?_.add=this._openTooltip:(_.mouseover=this._openTooltip,_.mouseout=this.closeTooltip,_.click=this._openTooltip,this._map?this._addFocusListeners():_.add=this._addFocusListeners),this._tooltip.options.sticky&&(_.mousemove=this._moveTooltip),this[h](_),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof po||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var h=typeof u.getElement=="function"&&u.getElement();h&&(Ge(h,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Ge(h,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var h=typeof u.getElement=="function"&&u.getElement();h&&h.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var h=this;this._map.once("moveend",function(){h._openOnceFlag=!1,h._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var h=u.latlng,_,O;this._tooltip.options.sticky&&u.originalEvent&&(_=this._map.mouseEventToContainerPoint(u.originalEvent),O=this._map.containerPointToLayerPoint(_),h=this._map.layerPointToLatLng(O)),this._tooltip.setLatLng(h)}});var HC=kl.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var h=u&&u.tagName==="DIV"?u:document.createElement("div"),_=this.options;if(_.html instanceof Element?(Uh(h),h.appendChild(_.html)):h.innerHTML=_.html!==!1?_.html:"",_.bgPos){var O=A(_.bgPos);h.style.backgroundPosition=-O.x+"px "+-O.y+"px"}return this._setIconStyles(h,"icon"),h},createShadow:function(){return null}});function X8(u){return new HC(u)}kl.Default=Nu;var Au=xi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ve.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){y(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),Vt(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ol(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Cl(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof G?u:new G(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var h=this.getPane().children,_=-u(-1/0,1/0),O=0,T=h.length,$;Othis.options.maxZoom||_O?this._retainParent(T,$,ne,O):!1)},_retainChildren:function(u,h,_,O){for(var T=2*u;T<2*u+2;T++)for(var $=2*h;$<2*h+2;$++){var ne=new G(T,$);ne.z=_+1;var fe=this._tileCoordsToKey(ne),pe=this._tiles[fe];if(pe&&pe.active){pe.retain=!0;continue}else pe&&pe.loaded&&(pe.retain=!0);_+1this.options.maxZoom||this.options.minZoom!==void 0&&T1){this._setView(u,_);return}for(var We=T.min.y;We<=T.max.y;We++)for(var Xe=T.min.x;Xe<=T.max.x;Xe++){var ur=new G(Xe,We);if(ur.z=this._tileZoom,!!this._isValidTile(ur)){var On=this._tiles[this._tileCoordsToKey(ur)];On?On.current=!0:ne.push(ur)}}if(ne.sort(function(br,jl){return br.distanceTo($)-jl.distanceTo($)}),ne.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ti=document.createDocumentFragment();for(Xe=0;Xe_.max.x)||!h.wrapLat&&(u.y<_.min.y||u.y>_.max.y))return!1}if(!this.options.bounds)return!0;var O=this._tileCoordsToBounds(u);return K(this.options.bounds).overlaps(O)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var h=this._map,_=this.getTileSize(),O=u.scaleBy(_),T=O.add(_),$=h.unproject(O,u.z),ne=h.unproject(T,u.z);return[$,ne]},_tileCoordsToBounds:function(u){var h=this._tileCoordsToNwSe(u),_=new U(h[0],h[1]);return this.options.noWrap||(_=this._map.wrapLatLngBounds(_)),_},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var h=u.split(":"),_=new G(+h[0],+h[1]);return _.z=+h[2],_},_removeTile:function(u){var h=this._tiles[u];h&&(Vt(h.el),delete this._tiles[u],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Ze(u,"leaflet-tile");var h=this.getTileSize();u.style.width=h.x+"px",u.style.height=h.y+"px",u.onselectstart=d,u.onmousemove=d,Ve.ielt9&&this.options.opacity<1&&Jr(u,this.options.opacity)},_addTile:function(u,h){var _=this._getTilePos(u),O=this._tileCoordsToKey(u),T=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(T),this.createTile.length<2&&V(a(this._tileReady,this,u,null,T)),fn(T,_),this._tiles[O]={el:T,coords:u,current:!0},h.appendChild(T),this.fire("tileloadstart",{tile:T,coords:u})},_tileReady:function(u,h,_){h&&this.fire("tileerror",{error:h,tile:_,coords:u});var O=this._tileCoordsToKey(u);_=this._tiles[O],_&&(_.loaded=+new Date,this._map._fadeAnimated?(Jr(_.el,0),W(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(_.active=!0,this._pruneTiles()),h||(Ze(_.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:_.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ve.ielt9||!this._map._fadeAnimated?V(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var h=new G(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return h.z=u.z,h},_pxBoundsToTileRange:function(u){var h=this.getTileSize();return new z(u.min.unscaleBy(h).floor(),u.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function J8(u){return new Au(u)}var Ml=Au.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,h){this._url=u,h=y(this,h),h.detectRetina&&Ve.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,h){return this._url===u&&h===void 0&&(h=!0),this._url=u,h||this.redraw(),this},createTile:function(u,h){var _=document.createElement("img");return Ge(_,"load",a(this._tileOnLoad,this,h,_)),Ge(_,"error",a(this._tileOnError,this,h,_)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(_.referrerPolicy=this.options.referrerPolicy),_.alt="",_.src=this.getTileUrl(u),_},getTileUrl:function(u){var h={r:Ve.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var _=this._globalTileRange.max.y-u.y;this.options.tms&&(h.y=_),h["-y"]=_}return w(this._url,i(h,this.options))},_tileOnLoad:function(u,h){Ve.ielt9?setTimeout(a(u,this,null,h),0):u(null,h)},_tileOnError:function(u,h,_){var O=this.options.errorTileUrl;O&&h.getAttribute("src")!==O&&(h.src=O),u(_,h)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,h=this.options.maxZoom,_=this.options.zoomReverse,O=this.options.zoomOffset;return _&&(u=h-u),u+O},_getSubdomain:function(u){var h=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var u,h;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(h=this._tiles[u].el,h.onload=d,h.onerror=d,!h.complete)){h.src=k;var _=this._tiles[u].coords;Vt(h),delete this._tiles[u],this.fire("tileabort",{tile:h,coords:_})}},_removeTile:function(u){var h=this._tiles[u];if(h)return h.el.setAttribute("src",k),Au.prototype._removeTile.call(this,u)},_tileReady:function(u,h,_){if(!(!this._map||_&&_.getAttribute("src")===k))return Au.prototype._tileReady.call(this,u,h,_)}});function WC(u,h){return new Ml(u,h)}var YC=Ml.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,h){this._url=u;var _=i({},this.defaultWmsParams);for(var O in h)O in this.options||(_[O]=h[O]);h=y(this,h);var T=h.detectRetina&&Ve.retina?2:1,$=this.getTileSize();_.width=$.x*T,_.height=$.y*T,this.wmsParams=_},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,Ml.prototype.onAdd.call(this,u)},getTileUrl:function(u){var h=this._tileCoordsToNwSe(u),_=this._crs,O=re(_.project(h[0]),_.project(h[1])),T=O.min,$=O.max,ne=(this._wmsVersion>=1.3&&this._crs===FC?[T.y,T.x,$.y,$.x]:[T.x,T.y,$.x,$.y]).join(","),fe=Ml.prototype.getTileUrl.call(this,u);return fe+x(this.wmsParams,fe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+ne},setParams:function(u,h){return i(this.wmsParams,u),h||this.redraw(),this}});function eF(u,h){return new YC(u,h)}Ml.WMS=YC,WC.wms=eF;var vo=xi.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ze(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,h){var _=this._map.getZoomScale(h,this._zoom),O=this._map.getSize().multiplyBy(.5+this.options.padding),T=this._map.project(this._center,h),$=O.multiplyBy(-_).add(T).subtract(this._map._getNewPixelOrigin(u,h));Ve.any3d?cs(this._container,$,_):fn(this._container,$)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,h=this._map.getSize(),_=this._map.containerPointToLayerPoint(h.multiplyBy(-u)).round();this._bounds=new z(_,_.add(h.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qC=vo.extend({options:{tolerance:0},getEvents:function(){var u=vo.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){vo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Ge(u,"mousemove",this._onMouseMove,this),Ge(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ge(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){W(this._redrawRequest),delete this._ctx,Vt(this._container),kt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var h in this._layers)u=this._layers[h],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vo.prototype._update.call(this);var u=this._bounds,h=this._container,_=u.getSize(),O=Ve.retina?2:1;fn(h,u.min),h.width=O*_.x,h.height=O*_.y,h.style.width=_.x+"px",h.style.height=_.y+"px",Ve.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){vo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var h=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var h=u._order,_=h.next,O=h.prev;_?_.prev=O:this._drawLast=O,O?O.next=_:this._drawFirst=_,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var h=u.options.dashArray.split(/[, ]+/),_=[],O,T;for(T=0;T')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),tF={_initContainer:function(){this._container=mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(vo.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var h=u._container=Iu("shape");Ze(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",u._path=Iu("path"),h.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var h=u._container;this._container.appendChild(h),u.options.interactive&&u.addInteractiveTarget(h)},_removePath:function(u){var h=u._container;Vt(h),u.removeInteractiveTarget(h),delete this._layers[l(u)]},_updateStyle:function(u){var h=u._stroke,_=u._fill,O=u.options,T=u._container;T.stroked=!!O.stroke,T.filled=!!O.fill,O.stroke?(h||(h=u._stroke=Iu("stroke")),T.appendChild(h),h.weight=O.weight+"px",h.color=O.color,h.opacity=O.opacity,O.dashArray?h.dashStyle=S(O.dashArray)?O.dashArray.join(" "):O.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=O.lineCap.replace("butt","flat"),h.joinstyle=O.lineJoin):h&&(T.removeChild(h),u._stroke=null),O.fill?(_||(_=u._fill=Iu("fill")),T.appendChild(_),_.color=O.fillColor||O.color,_.opacity=O.fillOpacity):_&&(T.removeChild(_),u._fill=null)},_updateCircle:function(u){var h=u._point.round(),_=Math.round(u._radius),O=Math.round(u._radiusY||_);this._setPath(u,u._empty()?"M0 0":"AL "+h.x+","+h.y+" "+_+","+O+" 0,"+65535*360)},_setPath:function(u,h){u._path.v=h},_bringToFront:function(u){Ol(u._container)},_bringToBack:function(u){Cl(u._container)}},np=Ve.vml?Iu:De,Fu=vo.extend({_initContainer:function(){this._container=np("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=np("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Vt(this._container),kt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vo.prototype._update.call(this);var u=this._bounds,h=u.getSize(),_=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,_.setAttribute("width",h.x),_.setAttribute("height",h.y)),fn(_,u.min),_.setAttribute("viewBox",[u.min.x,u.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(u){var h=u._path=np("path");u.options.className&&Ze(h,u.options.className),u.options.interactive&&Ze(h,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Vt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var h=u._path,_=u.options;h&&(_.stroke?(h.setAttribute("stroke",_.color),h.setAttribute("stroke-opacity",_.opacity),h.setAttribute("stroke-width",_.weight),h.setAttribute("stroke-linecap",_.lineCap),h.setAttribute("stroke-linejoin",_.lineJoin),_.dashArray?h.setAttribute("stroke-dasharray",_.dashArray):h.removeAttribute("stroke-dasharray"),_.dashOffset?h.setAttribute("stroke-dashoffset",_.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),_.fill?(h.setAttribute("fill",_.fillColor||_.color),h.setAttribute("fill-opacity",_.fillOpacity),h.setAttribute("fill-rule",_.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(u,h){this._setPath(u,ue(u._parts,h))},_updateCircle:function(u){var h=u._point,_=Math.max(Math.round(u._radius),1),O=Math.max(Math.round(u._radiusY),1)||_,T="a"+_+","+O+" 0 1,0 ",$=u._empty()?"M0 0":"M"+(h.x-_)+","+h.y+T+_*2+",0 "+T+-_*2+",0 ";this._setPath(u,$)},_setPath:function(u,h){u._path.setAttribute("d",h)},_bringToFront:function(u){Ol(u._path)},_bringToBack:function(u){Cl(u._path)}});Ve.vml&&Fu.include(tF);function KC(u){return Ve.svg||Ve.vml?new Fu(u):null}lt.include({getRenderer:function(u){var h=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var h=this._paneRenderers[u];return h===void 0&&(h=this._createRenderer({pane:u}),this._paneRenderers[u]=h),h},_createRenderer:function(u){return this.options.preferCanvas&&GC(u)||KC(u)}});var ZC=Pl.extend({initialize:function(u,h){Pl.prototype.initialize.call(this,this._boundsToLatLngs(u),h)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=K(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function nF(u,h){return new ZC(u,h)}Fu.create=np,Fu.pointsToPath=ue,go.geometryToLayer=Kh,go.coordsToLatLng=m0,go.coordsToLatLngs=Zh,go.latLngToCoords=g0,go.latLngsToCoords=Qh,go.getFeature=Tl,go.asFeature=Xh,lt.mergeOptions({boxZoom:!0});var QC=zi.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Ge(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){kt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Vt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Tu(),Xy(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ge(document,{contextmenu:ds,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=mt("div","leaflet-zoom-box",this._container),Ze(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var h=new z(this._point,this._startPoint),_=h.getSize();fn(this._box,h.min),this._box.style.width=_.x+"px",this._box.style.height=_.y+"px"},_finish:function(){this._moved&&(Vt(this._box),nn(this._container,"leaflet-crosshair")),Mu(),Jy(),kt(document,{contextmenu:ds,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var h=new U(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});lt.addInitHook("addHandler","boxZoom",QC),lt.mergeOptions({doubleClickZoom:!0});var XC=zi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var h=this._map,_=h.getZoom(),O=h.options.zoomDelta,T=u.originalEvent.shiftKey?_-O:_+O;h.options.doubleClickZoom==="center"?h.setZoom(T):h.setZoomAround(u.containerPoint,T)}});lt.addInitHook("addHandler","doubleClickZoom",XC),lt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var JC=zi.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new ta(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}Ze(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){nn(this._map._container,"leaflet-grab"),nn(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=K(this._map.options.maxBounds);this._offsetLimit=re(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var h=this._lastTime=+new Date,_=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(_),this._times.push(h),this._prunePositions(h)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,h){return u-(u-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;u.xh.max.x&&(u.x=this._viscousLimit(u.x,h.max.x)),u.y>h.max.y&&(u.y=this._viscousLimit(u.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,h=Math.round(u/2),_=this._initialWorldOffset,O=this._draggable._newPos.x,T=(O-h+_)%u+h-_,$=(O+h+_)%u-h-_,ne=Math.abs(T+_)0?$:-$))-h;this._delta=0,this._startTime=null,ne&&(u.options.scrollWheelZoom==="center"?u.setZoom(h+ne):u.setZoomAround(this._lastMousePos,h+ne))}});lt.addInitHook("addHandler","scrollWheelZoom",tE);var rF=600;lt.mergeOptions({tapHold:Ve.touchNative&&Ve.safari&&Ve.mobile,tapTolerance:15});var nE=zi.extend({addHooks:function(){Ge(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){kt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var h=u.touches[0];this._startPos=this._newPos=new G(h.clientX,h.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ge(document,"touchend",zn),Ge(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),rF),Ge(document,"touchend touchcancel contextmenu",this._cancel,this),Ge(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){kt(document,"touchend",zn),kt(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),kt(document,"touchend touchcancel contextmenu",this._cancel,this),kt(document,"touchmove",this._onMove,this)},_onMove:function(u){var h=u.touches[0];this._newPos=new G(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,h){var _=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});_._simulated=!0,h.target.dispatchEvent(_)}});lt.addInitHook("addHandler","tapHold",nE),lt.mergeOptions({touchZoom:Ve.touch,bounceAtZoomLimits:!0});var rE=zi.extend({addHooks:function(){Ze(this._map._container,"leaflet-touch-zoom"),Ge(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){nn(this._map._container,"leaflet-touch-zoom"),kt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var h=this._map;if(!(!u.touches||u.touches.length!==2||h._animatingZoom||this._zooming)){var _=h.mouseEventToContainerPoint(u.touches[0]),O=h.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(_.add(O)._divideBy(2))),this._startDist=_.distanceTo(O),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),Ge(document,"touchmove",this._onTouchMove,this),Ge(document,"touchend touchcancel",this._onTouchEnd,this),zn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var h=this._map,_=h.mouseEventToContainerPoint(u.touches[0]),O=h.mouseEventToContainerPoint(u.touches[1]),T=_.distanceTo(O)/this._startDist;if(this._zoom=h.getScaleZoom(T,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&T>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,T===1)return}else{var $=_._add(O)._divideBy(2)._subtract(this._centerPoint);if(T===1&&$.x===0&&$.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract($),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),W(this._animRequest);var ne=a(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(ne,this,!0),zn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,W(this._animRequest),kt(document,"touchmove",this._onTouchMove,this),kt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});lt.addInitHook("addHandler","touchZoom",rE),lt.BoxZoom=QC,lt.DoubleClickZoom=XC,lt.Drag=JC,lt.Keyboard=eE,lt.ScrollWheelZoom=tE,lt.TapHold=nE,lt.TouchZoom=rE,n.Bounds=z,n.Browser=Ve,n.CRS=he,n.Canvas=qC,n.Circle=p0,n.CircleMarker=Gh,n.Class=q,n.Control=wi,n.DivIcon=HC,n.DivOverlay=Vi,n.DomEvent=w8,n.DomUtil=_8,n.Draggable=ta,n.Evented=le,n.FeatureGroup=po,n.GeoJSON=go,n.GridLayer=Au,n.Handler=zi,n.Icon=kl,n.ImageOverlay=Jh,n.LatLng=ie,n.LatLngBounds=U,n.Layer=xi,n.LayerGroup=El,n.LineUtil=R8,n.Map=lt,n.Marker=qh,n.Mixin=P8,n.Path=na,n.Point=G,n.PolyUtil=T8,n.Polygon=Pl,n.Polyline=mo,n.Popup=ep,n.PosAnimation=EC,n.Projection=N8,n.Rectangle=ZC,n.Renderer=vo,n.SVG=Fu,n.SVGOverlay=VC,n.TileLayer=Ml,n.Tooltip=tp,n.Transformation=J,n.Util=ee,n.VideoOverlay=zC,n.bind=a,n.bounds=re,n.canvas=GC,n.circle=V8,n.circleMarker=z8,n.control=Lu,n.divIcon=X8,n.extend=i,n.featureGroup=$8,n.geoJSON=UC,n.geoJson=Y8,n.gridLayer=J8,n.icon=B8,n.imageOverlay=q8,n.latLng=ae,n.latLngBounds=K,n.layerGroup=F8,n.map=x8,n.marker=U8,n.point=A,n.polygon=W8,n.polyline=H8,n.popup=Z8,n.rectangle=nF,n.setOptions=y,n.stamp=l,n.svg=KC,n.svgOverlay=K8,n.tileLayer=WC,n.tooltip=Q8,n.transformation=X,n.version=r,n.videoOverlay=G8;var iF=window.L;n.noConflict=function(){return window.L=iF,this},window.L=n})})(Nx,Nx.exports);var Rh=Nx.exports;const Kj=Fi(Rh);function aC(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function sC(e,t){return t==null?function(r,i){const o=B.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=B.useRef();o.current||(o.current=e(r,i));const a=B.useRef(r),{instance:s}=o.current;return B.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,i]),o}}function Jge(e,t){B.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function R5(e){return function(n){const r=D5(),i=e(oC(n,r),r);return T5(r.map,n.attribution),L5(i.current,n.eventHandlers),Jge(i.current,r),i}}function eve(e,t){const n=sC(e,t),r=R5(n);return Kge(r)}function tve(e,t){const n=sC(e),r=Xge(n,t);return Zge(r)}function nve(e,t){const n=sC(e,t),r=R5(n);return Qge(r)}function rve(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function Ax(){return Ax=Object.assign||function(e){for(var t=1;t(g==null?void 0:g.map)??null,[g]);const y=B.useCallback(b=>{if(b!==null&&g===null){const w=new Rh.Map(b,f);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(qge(w))}},[]);B.useEffect(()=>()=>{g==null||g.map.remove()},[g]);const x=g?Y.createElement(j5,{value:g},r):a??null;return Y.createElement("div",Ax({},p,{ref:y}),x)}const ove=B.forwardRef(ive),ave=eve(function({position:t,...n},r){const i=new Rh.Marker(t,n);return aC(i,Gge(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),sve=tve(function(t,n){const r=new Rh.Popup(t,n.overlayContainer);return aC(r,n)},function(t,n,{position:r},i){B.useEffect(function(){const{instance:a}=t;function s(c){c.popup===a&&(a.update(),i(!0))}function l(c){c.popup===a&&i(!1)}return n.map.on({popupopen:s,popupclose:l}),n.overlayContainer==null?(r!=null&&a.setLatLng(r),a.openOn(n.map)):n.overlayContainer.bindPopup(a),function(){var f;n.map.off({popupopen:s,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(a)}},[t,n,i,r])}),lve=nve(function({url:t,...n},r){const i=new Rh.TileLayer(t,oC(n,r));return aC(i,r)},function(t,n,r){rve(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const cve=()=>m.jsx(lve,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),uve=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(ct("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},N5=({toggle:e,isOpen:t,title:n,locations:r=[]})=>m.jsx(Zo,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:m.jsxs(fo,{className:"map-modal__modal-body",children:[m.jsxs("h3",{className:"map-modal__modal-title",children:[n,m.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),m.jsxs(ove,{...uve(r),children:[m.jsx(cve,{}),r.map(({cityName:i,latLong:o,count:a},s)=>m.jsx(ave,{position:o,children:m.jsxs(sve,{children:[m.jsx("b",{children:a})," visit",a>1?"s":""," from ",m.jsx("b",{children:i})]})},s))]})]})});const fve=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=mn(),[a,s,l]=mn(),[c,f]=B.useState([]),d=My(),p=y=>t?y.filter(({cityName:x})=>t==null?void 0:t.includes(x)):y,g=()=>{if(!t){f(n),i();return}l()},v=y=>()=>{f(y?p(n):n),i()};return m.jsxs(m.Fragment,{children:[m.jsx(yt,{color:"link",className:"open-map-modal-btn__btn",id:d,onClick:g,children:m.jsx(Ie,{icon:wA})}),m.jsx(jr,{placement:"left",target:d,children:"Show in map"}),m.jsx(gh,{isOpen:a,toggle:s,inNavbar:!0,children:m.jsxs(vu,{end:!0,children:[m.jsx(Ue,{onClick:v(!1),children:"Show all locations"}),m.jsx(Ue,{onClick:v(!0),children:"Show locations in current page"})]})}),m.jsx(N5,{toggle:o,isOpen:r,title:e,locations:c})]})},dve=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,a=l=>({active:i===l,onClick:()=>e({...t,orphanVisitsType:l===(t==null?void 0:t.orphanVisitsType)?void 0:l})}),s=()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)});return m.jsxs(Xo,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[m.jsx(Ue,{header:!0,children:"Bots:"}),m.jsx(Ue,{active:o,onClick:s,children:"Exclude potential bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ue,{divider:!0}),m.jsx(Ue,{header:!0,children:"Orphan visits type:"}),m.jsx(Ue,{...a("base_url"),children:"Base URL"}),m.jsx(Ue,{...a("invalid_short_url"),children:"Invalid short URL"}),m.jsx(Ue,{...a("regular_404"),children:"Regular 404"})]}),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{disabled:!eo(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:m.jsx("i",{children:"Clear filters"})})]})},A5=(e,t)=>!qo(e)&&eo(e[t]),Zj=e=>typeof e=="number"?e:e?parseFloat(e):0,hve=(e,{os:t})=>{e[t]=(e[t]||0)+1},pve=(e,{browser:t})=>{e[t]=(e[t]||0)+1},mve=(e,{referer:t})=>{e[t]=(e[t]||0)+1},I5=e=>(t,n)=>{const i=A5(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},gve=I5("country"),vve=I5("city"),yve=(e,t)=>{if(!A5(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[Zj(r),Zj(i)]};o.count+=1,e[n]=o},_ve=(e,t)=>{if(!oge(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},F5=e=>e.reduce((t,n)=>(hve(t.os,n),pve(t.browsers,n),mve(t.referrers,n),gve(t.countries,n),vve(t.cities,n),yve(t.citiesForMap,n),_ve(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),$5=ch(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,a={date:n,potentialBot:o,...Ege(t),referer:kge(r),country:(i==null?void 0:i.countryName)||"Unknown",city:(i==null?void 0:i.cityName)||"Unknown",latitude:i==null?void 0:i.latitude,longitude:i==null?void 0:i.longitude};return tC(e)?{...a,type:e.type,visitedUrl:e.visitedUrl}:a}),bve=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:$5,processStatsFromVisits:F5},Symbol.toStringTag,{value:"Module"}));const Sf=20,wve=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),xve=(e,t)=>t.filter(n=>wve(n,e)),Sve=(e,t)=>n6(t,e),Ove=(e,t,n)=>{const r=t?xve(t,e):[...e],i=Sve(n,r),o=i.length;return{visitsGroups:jd(Sf,i),total:o}},Cve=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var P,j;const o="visits-table__header-cell visits-table__sticky",a=()=>r("(max-width: 767px)").matches,[s,l]=B.useState(a()),[c,f]=B.useState(void 0),[d,p]=B.useState({}),g=B.useMemo(()=>Ove(e,c,d),[c,d]),v=B.useRef(!0),[y,x]=B.useState(1),b=y*Sf,w=b-Sf,S=8+Number(i),C=N=>()=>p({field:N,dir:Dy(N,d.field,d.dir)}),k=N=>m.jsx(ed,{currentOrder:d,field:N,className:"visits-table__header-icon"});return B.useEffect(()=>{const N=()=>l(a());return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]),B.useEffect(()=>{x(1),!v.current&&n([]),v.current=!1},[c]),m.jsx("div",{className:"table-responsive-md",children:m.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[m.jsxs("thead",{className:"visits-table__header",children:[m.jsxs("tr",{children:[m.jsx("th",{className:`${o} text-center`,onClick:()=>n(t.length0})})}),m.jsxs("th",{className:`${o} text-center`,onClick:C("potentialBot"),children:[m.jsx(Ie,{icon:vT}),k("potentialBot")]}),m.jsxs("th",{className:o,onClick:C("date"),children:["Date",k("date")]}),m.jsxs("th",{className:o,onClick:C("country"),children:["Country",k("country")]}),m.jsxs("th",{className:o,onClick:C("city"),children:["City",k("city")]}),m.jsxs("th",{className:o,onClick:C("browser"),children:["Browser",k("browser")]}),m.jsxs("th",{className:o,onClick:C("os"),children:["OS",k("os")]}),m.jsxs("th",{className:o,onClick:C("referer"),children:["Referrer",k("referer")]}),i&&m.jsxs("th",{className:o,onClick:C("visitedUrl"),children:["Visited URL",k("visitedUrl")]})]}),m.jsx("tr",{children:m.jsx("td",{colSpan:S,className:"p-0",children:m.jsx(wh,{noBorder:!0,large:!1,onChange:f})})})]}),m.jsxs("tbody",{children:[!((P=g.visitsGroups[y-1])!=null&&P.length)&&m.jsx("tr",{children:m.jsx("td",{colSpan:S,className:"text-center",children:"No visits found with current filtering"})}),(j=g.visitsGroups[y-1])==null?void 0:j.map((N,H)=>{const R=t.includes(N);return m.jsxs("tr",{style:{cursor:"pointer"},className:Ee({"table-active":R}),onClick:()=>n(R?t.filter(V=>V!==N):[...t,N]),children:[m.jsx("td",{className:"text-center",children:R&&m.jsx(Ie,{icon:Dd,className:"text-primary"})}),m.jsx("td",{className:"text-center",children:N.potentialBot&&m.jsxs(m.Fragment,{children:[m.jsx(Ie,{icon:vT,id:`botIcon${H}`}),m.jsx(jr,{placement:"right",target:`botIcon${H}`,children:"Potentially a visit from a bot or crawler"})]})}),m.jsx("td",{children:m.jsx(xv,{date:N.date})}),m.jsx("td",{children:N.country}),m.jsx("td",{children:N.city}),m.jsx("td",{children:N.browser}),m.jsx("td",{children:N.os}),m.jsx("td",{children:N.referer}),i&&m.jsx("td",{children:N.visitedUrl})]},H)})]}),g.total>Sf&&m.jsx("tfoot",{children:m.jsx("tr",{children:m.jsx("td",{colSpan:S,className:"visits-table__footer-cell visits-table__sticky",children:m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(KO,{pagesCount:Math.ceil(g.total/Sf),currentPage:y,setCurrentPage:x,centered:s})}),m.jsx("div",{className:Ee("col-md-6",{"d-flex align-items-center flex-row-reverse":!s,"text-center mt-3":s}),children:m.jsxs("div",{children:["Visits ",m.jsx("b",{children:wn(w+1)})," to"," ",m.jsx("b",{children:wn(mA(b,g.total))})," of"," ",m.jsx("b",{children:wn(g.total)})]})})]})})})})]})})},Wl={byTime:{title:"By time",subPath:"by-time",icon:SG},byContext:{title:"By context",subPath:"by-context",icon:CS},byLocation:{title:"By location",subPath:"by-location",icon:wA},list:{title:"List",subPath:"list",icon:bA}};let am;const Nh=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,exportCsv:i,isOrphanVisits:o=!1})=>{const{visits:a,loading:s,loadingLarge:l,error:c,errorData:f,progress:d,fallbackInterval:p}=t,[{dateRange:g,visitsFilter:v},y]=Wge(),x=bl("visits"),b=Ft(({startDate:U,endDate:K})=>({dateRange:{startDate:U??void 0,endDate:K??void 0}}),y),w=B.useRef(g??p??(x==null?void 0:x.defaultInterval)??"last30Days"),[S,C]=B.useState([]),[k,P]=B.useState(),j=B.useRef(!0),{search:N}=gn(),H=U=>U?`${U}${N}`:N,R=B.useMemo(()=>$5(a),[a]),{os:V,browsers:W,referrers:ee,countries:q,cities:Q,citiesForMap:oe,visitedUrls:le}=B.useMemo(()=>F5(R),[R]),G=B.useMemo(()=>({...v,excludeBots:v.excludeBots??(x==null?void 0:x.excludeBots)}),[v]),F=mu(oe),A=U=>{am=void 0,C(U)},z=U=>K=>{const ie=`${U}_${K}`;am===ie?(C([]),P(void 0),am=void 0):(C(R.filter(uG(U,K))),P(K),am=ie)};B.useEffect(()=>r,[]),B.useEffect(()=>{const U=j.current?g??wue(w.current):g;n({dateRange:U,filter:G},j.current),j.current=!1},[g,v]),B.useEffect(()=>{p&&w.current===((x==null?void 0:x.defaultInterval)??"last30Days")&&(w.current=p)},[p]);const re=()=>l?m.jsxs(Do,{loading:!0,children:["This is going to take a while... :S",m.jsx(z4,{value:d,striped:d===100,className:"mt-3"})]}):s?m.jsx(Do,{loading:!0}):c?m.jsx(zr,{type:"error",children:m.jsx(zo,{errorData:f,fallbackMessage:"An error occurred while loading visits :("})}):Kn(a)?m.jsx(Do,{children:"There are no visits matching current filter"}):m.jsxs(m.Fragment,{children:[m.jsx(t6,{fill:!0,children:Object.values(Wl).map(({title:U,icon:K,subPath:ie},ae)=>m.jsxs(Yf,{to:H(ie),replace:!0,children:[m.jsx(Ie,{icon:K}),m.jsx("span",{className:"ms-2 d-none d-sm-inline",children:U})]},ae))}),m.jsx(mr,{children:m.jsxs(vy,{children:[m.jsx(vt,{path:Wl.byTime.subPath,element:m.jsx("div",{className:"col-12 mt-3",children:m.jsx(Nge,{title:"Visits during time",visits:R,highlightedVisits:S,highlightedLabel:k,setSelectedVisits:A})})}),m.jsx(vt,{path:Wl.byContext.subPath,element:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Ee("mt-3 col-lg-6",{"col-xl-4":!o}),children:m.jsx(zj,{title:"Operating systems",stats:V})}),m.jsx("div",{className:Ee("mt-3 col-lg-6",{"col-xl-4":!o}),children:m.jsx(zj,{title:"Browsers",stats:W})}),m.jsx("div",{className:Ee("mt-3",{"col-xl-4":!o,"col-lg-6":o}),children:m.jsx(om,{title:"Referrers",stats:ee,withPagination:!1,highlightedStats:rm(S,"referer"),highlightedLabel:k,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:z("referer")})}),o&&m.jsx("div",{className:"mt-3 col-lg-6",children:m.jsx(om,{title:"Visited URLs",stats:le,highlightedLabel:k,highlightedStats:rm(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:z("visitedUrl")})})]})}),m.jsx(vt,{path:Wl.byLocation.subPath,element:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(om,{title:"Countries",stats:q,highlightedStats:rm(S,"country"),highlightedLabel:k,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:z("country")})}),m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(om,{title:"Cities",stats:Q,highlightedStats:rm(S,"city"),highlightedLabel:k,extraHeaderContent:U=>F.length>0&&m.jsx(fve,{modalTitle:"Cities",locations:F,activeCities:U}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:z("city")})})]})}),m.jsx(vt,{path:Wl.list.subPath,element:m.jsx("div",{className:"col-12",children:m.jsx(Cve,{visits:R,selectedVisits:S,setSelectedVisits:A,isOrphanVisits:o})})}),m.jsx(vt,{path:"*",element:m.jsx(cS,{replace:!0,to:H(Wl.byTime.subPath)})})]})})]});return m.jsxs(m.Fragment,{children:[e,m.jsx("section",{className:"mt-3",children:m.jsxs("div",{className:"row flex-md-row-reverse",children:[m.jsx("div",{className:"col-lg-7 col-xl-6",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-fill",children:m.jsx(HI,{updatable:!0,disabled:s,initialDateRange:w.current,defaultText:"All visits",onDatesChange:b})}),m.jsx(dve,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:o,selected:G,onChange:U=>y({visitsFilter:U})})]})}),a.length>0&&m.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:m.jsxs("div",{className:"d-flex",children:[m.jsx(kI,{className:"btn-md-block",amount:R.length,onClick:()=>i(R)}),m.jsxs(yt,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>A([]),children:["Clear selection ",S.length>0&&m.jsxs(m.Fragment,{children:["(",wn(S.length),")"]})]})]})})]})}),m.jsx("section",{className:"mt-3",children:re()})]})},Eve=({exportVisits:e})=>ss(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r})=>{const i=xu(),{domain:o=""}=pl(),[a,s=a]=o.split("_"),l=(f,d)=>t({domain:s,query:Dh(f),doIntervalFallback:d}),c=f=>e(`domain_${a}_visits.csv`,f);return m.jsx(Nh,{getVisits:l,cancelGetVisits:r,visitsInfo:n,exportCsv:c,children:m.jsx(Lh,{goBack:i,visits:n.visits,title:`"${a}" visits`})})},()=>[di.visits]),kve=({exportVisits:e})=>ss(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r})=>{const i=xu(),o=s=>e("non_orphan_visits.csv",s),a=(s,l)=>t({query:Dh(s),doIntervalFallback:l});return m.jsx(Nh,{getVisits:a,cancelGetVisits:r,visitsInfo:n,exportCsv:o,children:m.jsx(Lh,{title:"Non-orphan visits",goBack:i,visits:n.visits})})},()=>[di.visits]),Pve=({exportVisits:e})=>ss(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r})=>{const i=xu(),o=s=>e("orphan_visits.csv",s),a=(s,l)=>{var c;return t({query:Dh(s),orphanVisitsType:(c=s.filter)==null?void 0:c.orphanVisitsType,doIntervalFallback:l})};return m.jsx(Nh,{getVisits:a,cancelGetVisits:r,visitsInfo:n,exportCsv:o,isOrphanVisits:!0,children:m.jsx(Lh,{title:"Orphan visits",goBack:i,visits:n.visits})})},()=>[di.orphanVisits]),B5="shlink/orphanVisits",Tve={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Mve=e=>Th({typePrefix:`${B5}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1})=>{const{getNonOrphanVisits:r}=e(),i=async(a,s)=>r({...t,page:a,itemsPerPage:s}),o=Mh(n,r);return[i,o]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),jve=e=>jh({name:B5,initialState:Tve,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>Eh(o.date,r,i))}}),U5="shlink/orphanVisits",Dve={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Lve=(e,t)=>!t||t===e.type,Rve=e=>Th({typePrefix:`${U5}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1})=>{const{getOrphanVisits:i}=e(),o=async(s,l)=>i({...n,page:s,itemsPerPage:l}).then(c=>{const f=c.data.filter(d=>tC(d)&&Lve(d,t));return{...c,data:f}}),a=Mh(r,i);return[o,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Nve=e=>jh({name:U5,initialState:Dve,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:a})=>!a&&Eh(o.date,r,i))}}),z5="shlink/shortUrlVisits",Ave={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ive=e=>Th({typePrefix:`${z5}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1})=>{const{getShortUrlVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=Mh(r,async s=>i(t,{...s,domain:n.domain}));return[o,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),Fve=e=>jh({name:z5,initialState:Ave,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:a}=r;return i.filter(({shortUrl:s,visit:l})=>s&&Zf(s,t,n)&&Eh(l.date,o,a))}}),V5="shlink/tagVisits",$ve={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Bve=e=>Th({typePrefix:`${V5}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1})=>{const{getTagVisits:i}=e(),o=async(s,l)=>i(t,{...n,page:s,itemsPerPage:l}),a=Mh(r,async s=>i(t,s));return[o,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),Uve=e=>jh({name:V5,initialState:$ve,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>(a==null?void 0:a.tags.includes(t))&&Eh(s.date,i,o))}}),H5="shlink/visitsOverview",sm={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},Qj=e=>e.filter(({visit:t})=>t.potentialBot).length,zve=e=>Mr(`${H5}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n,orphanVisits:r,orphanVisitsCount:i})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),Vve=e=>sr({name:H5,initialState:sm,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...sm,loading:!0})),t.addCase(e.rejected,()=>({...sm,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...sm,...r})),t.addCase(Ph,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=age(o.createdVisits),l=a.length,c=Qj(a),f=l-c,d=s.length,p=Qj(s),g=d-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+d,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+g}}})}});const Hve=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,a=(r==null?void 0:r.shortUrl)??"",s=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title,c=()=>r?m.jsxs("span",{children:[m.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:m.jsx(xv,{date:r.dateCreated,relative:!0})}),m.jsx(jr,{placement:"bottom",target:"created",children:m.jsx(xv,{date:r.dateCreated})})]}):m.jsx("small",{children:"Loading..."}),f=m.jsxs(m.Fragment,{children:["Visits for ",m.jsx(Ni,{href:a})]});return m.jsxs(Lh,{title:f,goBack:n,visits:o,shortUrl:r,children:[m.jsx("hr",{}),m.jsxs("div",{children:["Created: ",c()]}),m.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&m.jsx("small",{children:"Loading..."}),!i&&m.jsx(Ni,{href:s,children:l??s})]})]})},Wve=({exportVisits:e})=>ss(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o})=>{const{shortCode:a=""}=pl(),{search:s}=gn(),l=xu(),{domain:c}=vl(s),f=(p,g)=>r({shortCode:Fm(a),query:{...Dh(p),domain:c},doIntervalFallback:g}),d=p=>{var g;return e(`short-url_${(g=n.shortUrl)==null?void 0:g.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,p)};return B.useEffect(()=>{i({shortCode:Fm(a),domain:c})},[]),m.jsx(Nh,{getVisits:f,cancelGetVisits:o,visitsInfo:t,exportCsv:d,children:m.jsx(Hve,{shortUrlDetail:n,shortUrlVisits:t,goBack:l})})},(t,n)=>n.shortCode?[di.shortUrlVisits(Fm(n.shortCode))]:[]),Yve=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e,o=m.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[m.jsx("span",{className:"me-2",children:"Visits for"}),m.jsx(UO,{text:i,colorGenerator:n})]});return m.jsx(Lh,{title:o,goBack:t,visits:r})},qve=(e,{exportVisits:t})=>ss(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i})=>{const o=xu(),{tag:a=""}=pl(),s=(c,f)=>n({tag:a,query:Dh(c),doIntervalFallback:f}),l=c=>t(`tag_${a}_visits.csv`,c);return m.jsx(Nh,{getVisits:s,cancelGetVisits:i,visitsInfo:r,exportCsv:l,children:m.jsx(Yve,{tagVisits:r,goBack:o,colorGenerator:e})})},()=>[di.visits]),Gve=(e,t)=>{e.serviceFactory("MapModal",()=>N5),e.serviceFactory("ShortUrlVisits",Wve,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",qve,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",Eve,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Pve,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",kve,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>bve),e.serviceFactory("getShortUrlVisits",Ive,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",ct("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",Bve,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",ct("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",Cue,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",ct("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",Rve,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",ct("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",Mve,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",ct("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Ph),e.serviceFactory("loadVisitsOverview",zve,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",Vve,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",ct("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",Eue,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",ct("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",jve,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",ct("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",Nve,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",ct("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",Fve,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",ct("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",Uve,"getTagVisits"),e.serviceFactory("tagVisitsReducer",ct("reducer"),"tagVisitsReducerCreator")};const af=({children:e,to:t,className:n,...r})=>m.jsx(HN,{className:({isActive:i})=>Ee("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Kve=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=gn(),r=Ee("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return m.jsx("aside",{className:r,children:m.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[m.jsxs(af,{to:i("/overview"),children:[m.jsx(Ie,{fixedWidth:!0,icon:JG}),m.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),m.jsxs(af,{to:i("/list-short-urls/1"),className:Ee({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[m.jsx(Ie,{fixedWidth:!0,icon:bA}),m.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),m.jsxs(af,{to:i("/create-short-url"),children:[m.jsx(Ie,{fixedWidth:!0,icon:iK,flip:"horizontal"}),m.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),m.jsxs(af,{to:i("/manage-tags"),children:[m.jsx(Ie,{fixedWidth:!0,icon:xA}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),m.jsxs(af,{to:i("/manage-domains"),children:[m.jsx(Ie,{fixedWidth:!0,icon:LG}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})};const Zve=(e,t,n,r,i,o,a,s,l,c,f)=>({createNotFound:d})=>{const p=gn(),g=yl(),v=hl(),[y,x]=B.useMemo(()=>v?[B.Fragment,{}]:[VN,{basename:g}],[v]),[b,w,S,C]=mn();B.useEffect(()=>C(),[p]);const k=Ch("domainVisits"),P=Ee("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":b}),j=wfe(S,C);return m.jsxs(y,{...x,children:[m.jsx(Ie,{icon:PG,className:P,onClick:w}),m.jsx("div",{...j,className:"shlink-layout__swipeable",children:m.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[m.jsx(Kve,{routePrefix:g,showOnMobile:b}),m.jsx("div",{className:"shlink-layout__container",onClick:()=>C(),children:m.jsx("div",{className:"container-xl",children:m.jsxs(vy,{children:[m.jsx(vt,{index:!0,element:m.jsx(cS,{replace:!0,to:"overview"})}),m.jsx(vt,{path:"/overview",element:m.jsx(l,{})}),m.jsx(vt,{path:"/list-short-urls/:page",element:m.jsx(t,{})}),m.jsx(vt,{path:"/create-short-url",element:m.jsx(n,{})}),m.jsx(vt,{path:"/short-code/:shortCode/visits/*",element:m.jsx(r,{})}),m.jsx(vt,{path:"/short-code/:shortCode/edit",element:m.jsx(c,{})}),m.jsx(vt,{path:"/tag/:tag/visits/*",element:m.jsx(i,{})}),k&&m.jsx(vt,{path:"/domain/:domain/visits/*",element:m.jsx(o,{})}),m.jsx(vt,{path:"/orphan-visits/*",element:m.jsx(a,{})}),m.jsx(vt,{path:"/non-orphan-visits/*",element:m.jsx(s,{})}),m.jsx(vt,{path:"/manage-tags",element:m.jsx(e,{})}),m.jsx(vt,{path:"/manage-domains",element:m.jsx(f,{})}),d&&m.jsx(vt,{path:"*",element:d("/list-short-urls/1")})]})})})]})})]})},Qve=!0,Xve=e=>L6({devTools:!Qve,reducer:bO({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),Jve=e=>{e.serviceFactory("Main",Zve,"TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains"),e.factory("store",Xve)},ho=new tA,{container:eye}=ho,tye=(e,t)=>(...n)=>e[t](...n),nye=(e,t)=>({...e,[t]:tye(eye,t)}),Ah=(e,t=[])=>LN(e?wS(e):null,t.reduce(nye,{}));Jve(ho);she(ho,Ah);Upe(ho,Ah);Gve(ho,Ah);$ue(ho);Aue(ho,Ah);ofe(ho,Ah);ige(ho);let Xj;const rye=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=vse(t),l=B.useRef(),[c,f]=B.useState();return B.useEffect(()=>{Xj=n,e.value("apiClientFactory",()=>Xj),a&&e.value("TagColorsStorage",a);const{container:d}=e,{Main:p,store:g,loadMercureInfo:v}=d;l.current=m.jsx(p,{createNotFound:o}),f(g),g.dispatch(v(r))},[n,a]),c?m.jsx(RN,{store:c,children:m.jsx(Que,{value:r,children:m.jsx(yse,{value:s,children:m.jsx(_se,{value:i,children:l.current})})})}):m.jsx(m.Fragment,{})},iye=rye(ho);function Ev(e){return t=>{const{resetSelectedServer:n}=t;return B.useEffect(()=>{n()},[]),m.jsx(e,{...t})}}const oye=({location:e},{error:t})=>class extends B.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){t(n)}render(){const{hasError:n}=this.state;if(n)return m.jsx("div",{className:"home",children:m.jsxs(hn,{className:"p-4",children:[m.jsx("h1",{children:"Oops! This is awkward :S"}),m.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),m.jsx("br",{}),m.jsx(yt,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const aye=({id:e,name:t})=>m.jsxs(G4,{tag:It,to:`/server/${e}`,className:"servers-list__server-item",children:[t,m.jsx(Ie,{icon:cK,className:"servers-list__server-item-icon"})]}),W5=({servers:e,children:t,embedded:n=!1})=>m.jsxs(m.Fragment,{children:[t&&m.jsx("h5",{className:"mb-md-3",children:t}),e.length>0&&m.jsx(W4,{className:Ee("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>m.jsx(aye,{id:r,name:i},r))})]}),Y5=({color:e=oO,className:t})=>m.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:m.jsxs("g",{fill:e,children:[m.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),m.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),m.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),m.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})});const sye=({servers:e})=>{const t=uo(),n=mu(e),r=!Kn(n);return B.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),m.jsx("div",{className:"home",children:m.jsx(Yr,{className:"home__main-card",children:m.jsxs(mr,{className:"g-0",children:[m.jsx("div",{className:"col-md-5 d-none d-md-block",children:m.jsx("div",{className:"home__logo-wrapper",children:m.jsx("div",{className:"home__logo",children:m.jsx(Y5,{})})})}),m.jsxs("div",{className:"col-md-7 home__servers-container",children:[m.jsx("div",{className:"home__title-wrapper",children:m.jsx("h1",{className:"home__title",children:"Welcome!"})}),m.jsx(W5,{embedded:!0,servers:n,children:!r&&m.jsxs("div",{className:"p-4 text-center",children:[m.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),m.jsx("p",{children:m.jsxs(It,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[m.jsx(Ie,{icon:kS})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]})}),m.jsx("p",{className:"mb-0 mt-5",children:m.jsx(Ni,{href:"https://shlink.io/documentation",children:m.jsxs("small",{children:[m.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",m.jsx(Ie,{icon:HG})]})})})]})})]})]})})})};const lye=e=>()=>{const[t,n,,r]=mn(),i=gn(),{pathname:o}=i;B.useEffect(r,[i]);const a="/settings",s=Ee("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return m.jsxs(c4,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[m.jsxs(u4,{tag:It,to:"/",children:[m.jsx(Y5,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),m.jsx(f4,{onClick:n,children:m.jsx(Ie,{icon:sK,className:s})}),m.jsx(ote,{navbar:!0,isOpen:t,children:m.jsxs(VS,{navbar:!0,className:"ms-auto",children:[m.jsx(d4,{children:m.jsxs(m4,{tag:It,to:a,active:o.startsWith(a),children:[m.jsx(Ie,{icon:hK}),"  Settings"]})}),m.jsx(e,{})]})})]})},cye=({children:e})=>{const t=gn();return B.useEffect(()=>{scrollTo(0,0)},[t]),m.jsx(m.Fragment,{children:e})},q5=hA(vS,e=>{try{return cx(e,e,"=")}catch{return!1}}),G5=e=>q5(e)?`v${e}`:e,K5=(e="latest")=>t=>q5(t)?t:e,uye="%_VERSION_%",fye=Ft(K5(),G5),Jj=({project:e,version:t})=>m.jsx(Ni,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:m.jsx("b",{children:t})}),dye=({selectedServer:e,clientVersion:t=uye})=>{const n=fye(t);return m.jsxs("small",{className:"text-muted",children:[yA(e)&&m.jsxs(m.Fragment,{children:["Server: ",m.jsx(Jj,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",m.jsx(Jj,{project:"shlink-web-client",version:n})]})};const hye=/^\/server\/[a-zA-Z0-9-]*\/(?!edit)/,pye=({selectedServer:e})=>{const{pathname:t}=gn(),n=B.useMemo(()=>hye.test(t),[t]),r=Ee("text-center",{"shlink-versions-container--with-sidebar":n});return m.jsx("div",{className:r,children:m.jsx(dye,{selectedServer:e})})};const Ou=({children:e})=>m.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function Z5(e,t){return n=>{const r=pl(),{selectServer:i,selectedServer:o}=n;return B.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?_G(o)?m.jsx(t,{}):m.jsx(e,{...n}):m.jsx(Ou,{children:m.jsx(Do,{loading:!0})})}}const mye=(e,t,n,r)=>Z5(({selectedServer:i,settings:o})=>{const a=yA(i),s=a?`/server/${i.id}`:"";return a?m.jsx(n,{serverVersion:i.version,apiClient:e(i),settings:o,routesPrefix:s,tagColorsStorage:t,createNotFound:l=>m.jsx(x6,{to:`${s}${l}`,children:"List short URLs"})}):m.jsx(r,{})},r),eD={"Content-Type":"application/json"},tD=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...eD}}:{headers:eD}:e;class gye{constructor(t){me(this,"fetchJson",(t,n)=>this.fetch(t,tD(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));me(this,"fetchEmpty",(t,n)=>this.fetch(t,tD(n)).then(async r=>{if(!r.ok)throw await r.json()}));this.fetch=t}}const vye=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",gye,"fetch"),e.serviceFactory("ScrollToTop",()=>cye),e.serviceFactory("MainHeader",lye,"ServersDropdown"),e.serviceFactory("Home",()=>sye),e.decorator("Home",Ev),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>iye),e.serviceFactory("ShlinkWebComponentContainer",mye,"buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>pye),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",oye,"window","console")};let lm;const yye=new Uint8Array(16);function _ye(){if(!lm&&(lm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lm(yye)}const Hn=[];for(let e=0;e<256;++e)Hn.push((e+256).toString(16).slice(1));function bye(e,t=0){return(Hn[e[t+0]]+Hn[e[t+1]]+Hn[e[t+2]]+Hn[e[t+3]]+"-"+Hn[e[t+4]]+Hn[e[t+5]]+"-"+Hn[e[t+6]]+Hn[e[t+7]]+"-"+Hn[e[t+8]]+Hn[e[t+9]]+"-"+Hn[e[t+10]]+Hn[e[t+11]]+Hn[e[t+12]]+Hn[e[t+13]]+Hn[e[t+14]]+Hn[e[t+15]]).toLowerCase()}const wye=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nD={randomUUID:wye};function Q5(e,t,n){if(nD.randomUUID&&!t&&!e)return nD.randomUUID();e=e||{};const r=e.random||(e.rng||_ye)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return bye(r)}const xye=2e3,Sye=(e,t)=>(n=!1,r=xye)=>{const[i,o]=B.useState(n),a=B.useRef(void 0);return[i,()=>{o(!n),a.current&&t(a.current),a.current=e(()=>o(n),r)}]},X5=()=>{const e=uo();return()=>e(-1)},Oye=()=>{const{search:e}=gn();return vl(e)},J5=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return m.jsxs(Zo,{centered:!0,isOpen:e,children:[m.jsxs(Qo,{children:["Duplicated server",i&&"s"]}),m.jsxs(fo,{children:[m.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),m.jsx("ul",{children:t.map(({url:o,apiKey:a},s)=>i?m.jsxs("li",{children:[m.jsx("b",{children:o})," - ",m.jsx("b",{children:a})]},s):m.jsxs(B.Fragment,{children:[m.jsxs("li",{children:["URL: ",m.jsx("b",{children:o})]}),m.jsxs("li",{children:["API key: ",m.jsx("b",{children:a})]})]},s))}),m.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),m.jsxs(gl,{children:[m.jsx(yt,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),m.jsx(yt,{color:"primary",onClick:r,children:"Save anyway"})]})]})},Cye=e=>Ft(t=>t.preventDefault(),e),e8=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=B.useState(""),[a,s]=B.useState(""),[l,c]=B.useState(""),f=Cye(()=>e({name:i,url:a,apiKey:l}));return B.useEffect(()=>{t&&o(t.name),t&&s(t.url),t&&c(t.apiKey)},[t]),m.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[m.jsxs(hn,{className:"mb-3",title:r,children:[m.jsx(Nm,{value:i,onChange:o,children:"Name"}),m.jsx(Nm,{type:"url",value:a,onChange:s,children:"URL"}),m.jsx(Nm,{value:l,onChange:c,children:"API key"})]}),m.jsx("div",{className:"text-end",children:n})]})},rD=4e3,iD=({type:e})=>m.jsx("div",{className:"mt-3",children:m.jsxs(zr,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),Eye=(e,t)=>({servers:n,createServers:r})=>{const i=uo(),o=X5(),a=!!Object.keys(n).length,[s,l]=t(!1,rD),[c,f]=t(!1,rD),[d,p]=mn(),[g,v]=B.useState(),y=()=>{if(!g)return;const x=Q5();r([{...g,id:x}]),i(`/server/${x}`)};return B.useEffect(()=>{Object.values(n).some(({url:b,apiKey:w})=>(g==null?void 0:g.url)===b&&(g==null?void 0:g.apiKey)===w)?p():y()},[g]),m.jsxs(Ou,{children:[m.jsxs(e8,{title:m.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!a&&m.jsx(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),a&&m.jsx(yt,{outline:!0,onClick:o,children:"Cancel"}),m.jsx(yt,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&m.jsx(iD,{type:"success"}),c&&m.jsx(iD,{type:"error"}),m.jsx(J5,{isOpen:d,duplicatedServers:g?[g]:[],onDiscard:o,onSave:y})]})},kye=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,a,s]=mn();return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:n,onClick:a,children:[!r&&m.jsx(Ie,{fixedWidth:!0,icon:SS}),m.jsx("span",{className:i,children:r??"Remove this server"})]}),m.jsx(e,{server:t,isOpen:o,toggle:s})]})},Pye=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=uo(),a=B.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return m.jsxs(Zo,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[m.jsx(Qo,{toggle:t,className:"text-danger",children:"Remove server"}),m.jsxs(fo,{children:[m.jsxs("p",{children:["Are you sure you want to remove ",m.jsx("b",{children:e?e.name:""}),"?"]}),m.jsx("p",{children:m.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),m.jsxs(gl,{children:[m.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),m.jsx(yt,{color:"danger",onClick:s,children:"Delete"})]})]})},Tye=e=>Z5(({editServer:t,selectedServer:n,selectServer:r})=>{const i=X5(),{reconnect:o}=Oye();if(!Bf(n))return null;const a=s=>{t(n.id,s),o==="true"&&r(n.id),i()};return m.jsx(Ou,{children:m.jsxs(e8,{title:m.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:a,children:[m.jsx(yt,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),m.jsx(yt,{outline:!0,color:"primary",children:"Save"})]})})},e);const oD=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),Mye=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:a="bottom",className:s=""})=>{const l=os(),[c,f]=B.useState(),[d,p]=B.useState([]),[g,,v,y]=mn(),x=Ft(t,i),b=Ft(()=>x(c??[]),y),w=Ft(()=>x((c??[]).filter(cq(oD(d)))),y),S=async({target:C})=>{var k;return e((k=C.files)==null?void 0:k[0]).then(f).then(()=>{C.value=null}).catch(o)};return B.useEffect(()=>{if(!c)return;const C=Object.values(n),k=c.filter(oD(C)),P=!!k.length;P?p(k):x(c),P&&v()},[c]),m.jsxs(m.Fragment,{children:[m.jsxs(yt,{outline:!0,id:"importBtn",className:s,onClick:()=>{var C;return(C=l.current)==null?void 0:C.click()},children:[m.jsx(Ie,{icon:AG,fixedWidth:!0})," ",r??"Import from file"]}),m.jsxs(jr,{placement:a,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",m.jsx("b",{children:"name"}),", ",m.jsx("b",{children:"apiKey"})," and ",m.jsx("b",{children:"url"}),"."]}),m.jsx("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:S}),m.jsx(J5,{isOpen:g,duplicatedServers:d,onDiscard:w,onSave:b})]})};const jye=e=>({servers:t,selectedServer:n})=>m.jsx(Ou,{children:m.jsxs("div",{className:"server-error__container flex-column",children:[m.jsxs(Do,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Bf(n)&&"Could not find this Shlink server.",Bf(n)&&m.jsxs(m.Fragment,{children:[m.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),m.jsxs(W5,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",m.jsx(It,{to:"/server/create",children:"add a new one"}),"."]}),Bf(n)&&m.jsx("div",{className:"container mt-3 mt-md-5",children:m.jsxs("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",m.jsx(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",m.jsx(It,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),Dye=4e3,Lye=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[a,s]=B.useState(o),l=p=>s(o.filter(({name:g,url:v})=>`${g} ${v}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[f,d]=n(!1,Dye);return B.useEffect(()=>{s(Object.values(i))},[i]),m.jsxs(Ou,{children:[m.jsx(wh,{className:"mb-3",onChange:l}),m.jsxs(mr,{className:"mb-3",children:[m.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[m.jsx(t,{className:"flex-fill",onImportError:d,children:"Import servers"}),o.length>0&&m.jsxs(yt,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[m.jsx(Ie,{icon:OA,fixedWidth:!0})," Export servers"]})]}),m.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:m.jsxs(yt,{outline:!0,color:"primary",className:"flex-fill",tag:It,to:"/server/create",children:[m.jsx(Ie,{icon:kS,fixedWidth:!0})," Add a server"]})})]}),m.jsx(hn,{children:m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsx("thead",{className:"responsive-table__header",children:m.jsxs("tr",{children:[c&&m.jsx("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),m.jsx("th",{children:"Name"}),m.jsx("th",{children:"Base URL"}),m.jsx("th",{"aria-label":"Options"})]})}),m.jsxs("tbody",{children:[!a.length&&m.jsx("tr",{className:"text-center",children:m.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>m.jsx(r,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&m.jsx("div",{className:"mt-3",children:m.jsx(zr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Rye=e=>({server:t,hasAutoConnect:n})=>m.jsxs("tr",{className:"responsive-table__row",children:[n&&m.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&m.jsxs(m.Fragment,{children:[m.jsx(Ie,{icon:Dd,className:"text-primary",id:"autoConnectIcon"}),m.jsx(jr,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:m.jsx(It,{to:`/server/${t.id}`,children:t.name})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(e,{server:t})})]}),Nye=e=>({server:t,setAutoConnect:n})=>{const[r,,i,o]=mn(),a=`/server/${t.id}`,{autoConnect:s}=t,l=s?RG:nfe;return m.jsxs(jy,{minWidth:170,children:[m.jsxs(Ue,{tag:It,to:a,children:[m.jsx(Ie,{icon:DG,fixedWidth:!0})," Connect"]}),m.jsxs(Ue,{tag:It,to:`${a}/edit`,children:[m.jsx(Ie,{icon:OS,fixedWidth:!0})," Edit server"]}),m.jsxs(Ue,{onClick:()=>n(t,!s),children:[m.jsx(Ie,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),m.jsx(Ue,{divider:!0}),m.jsxs(Ue,{className:"dropdown-item--danger",onClick:i,children:[m.jsx(Ie,{icon:SS,fixedWidth:!0})," Remove server"]}),m.jsx(e,{redirectHome:!1,server:t,isOpen:r,toggle:o})]})},t8=(e,t)=>N6(e,t,{serializeError:vS}),Aye={},Iye=e=>e.id?e:Md("id",Q5(),e),Fye=mS((e,t)=>Md(t.id,t,e),{}),{actions:$ye,reducer:Bye}=sr({name:"shlink/servers",initialState:Aye,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?Md(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>Bq(t.id,e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?vf(b1(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):Md(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:Ft(ch(Iye),Fye,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:Uye,deleteServer:zye,setAutoConnect:Vye,createServers:n8}=$ye,Hye=Bye,Wye=e=>Array.isArray(e)?e.filter(vA):[],Yye=e=>t8("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${Og.homepage}/servers.json`),i=Wye(r);n(n8(i))}),lC="shlink/selectedServer",qye="1.0.0",Gye="999.999.999",Kye="latest",Zye=Ft(e=>e===Kye?Gye:e,K5(qye)),Qye=hA(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Zye(n),printableVersion:G5(n)}))),aD=null,cC=jn(`${lC}/resetSelectedServer`),Xye=e=>t8(`${lC}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(cC());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:a}=e(o),{version:s,printableVersion:l}=await Qye(o,a);return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),Jye=e=>sr({name:lC,initialState:aD,reducers:{},extraReducers:t=>{t.addCase(cC,()=>aD),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),e0e=({servers:e,selectedServer:t})=>{const n=mu(e),r=()=>Kn(n)?m.jsxs(Ue,{tag:It,to:"/server/create",children:[m.jsx(Ie,{icon:kS})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]}):m.jsxs(m.Fragment,{children:[n.map(({name:i,id:o})=>m.jsx(Ue,{tag:It,to:`/server/${o}`,active:bG(t)===o,children:i},o)),m.jsx(Ue,{divider:!0}),m.jsxs(Ue,{tag:It,to:"/manage-servers",children:[m.jsx(Ie,{icon:mT})," ",m.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return m.jsxs(bh,{nav:!0,inNavbar:!0,children:[m.jsxs(vh,{nav:!0,caret:!0,children:[m.jsx(Ie,{icon:mT})," ",m.jsx("span",{className:"ms-1",children:"Servers"})]}),m.jsx(vu,{end:!0,style:{right:0},children:r()})]})},t0e=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},n0e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);t0e(e,i,n)},r0e="shlink-servers.csv";class i0e{constructor(t,n,r){me(this,"exportServers",async()=>{const t=mu(this.storage.get("servers")??{}).map(wG);try{const n=this.jsonToCsv(t);n0e(this.window,n,r0e)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const o0e=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",a0e=e=>Array.isArray(e)&&e.every(o0e);class s0e{constructor(t,n){me(this,"importServersFromFile",async t=>{if(!t)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var a,s;try{const l=((s=(a=o.target)==null?void 0:a.result)==null?void 0:s.toString())??"",c=await this.csvToJson(l);if(!a0e(c))throw new Error("Provided file does not have the right format.");r(c)}catch(l){i(l)}}),n.readAsText(t)})});this.csvToJson=t,this.fileReaderFactory=n}}const l0e=(e,t)=>{e.serviceFactory("ManageServers",Lye,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",Ev),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Rye,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",Nye,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Eye,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",Ev),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",Tye,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>e0e),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>Pye),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",kye,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Mye,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",jye,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",s0e,"csvToJson","fileReaderFactory"),e.service("ServersExporter",i0e,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Xye,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>n8),e.serviceFactory("deleteServer",()=>zye),e.serviceFactory("editServer",()=>Uye),e.serviceFactory("setAutoConnect",()=>Vye),e.serviceFactory("fetchServers",Yye,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>cC),e.serviceFactory("selectedServerReducerCreator",Jye,"selectServer"),e.serviceFactory("selectedServerReducer",ct("reducer"),"selectedServerReducerCreator")},Pc=({children:e})=>m.jsx("small",{className:"form-text text-muted d-block",children:e}),c0e=e=>e?`${e}`:"",u0e=({settings:e,toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=e,i=My();return m.jsxs(hn,{title:"Real-time updates",className:"h-100",children:[m.jsx(Fr,{children:m.jsxs(Qc,{checked:r.enabled,onChange:t,children:["Enable or disable real-time updates.",m.jsxs(Pc,{children:["Real-time updates are currently being ",m.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),m.jsxs(_u,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Ee("form-label",{"text-muted":!r.enabled}),id:i,children:[m.jsx(Zc,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:c0e(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&m.jsxs(Pc,{children:[r.interval!==void 0&&r.interval>0&&m.jsxs("span",{children:["Updates will be reflected in the UI every ",m.jsx("b",{children:r.interval})," minute",r.interval>1&&"s","."]}),!r.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},r8={field:"dateCreated",dir:"DESC"},f0e={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:r8}},d0e=(e,{payload:t})=>pA(e,t),bs=e=>({reducer:d0e,prepare:e}),ws=e=>({payload:e}),{reducer:h0e,actions:p0e}=sr({name:"shlink/settings",initialState:f0e,reducers:{toggleRealTimeUpdates:bs(e=>ws({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:bs(e=>ws({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:bs(e=>ws({shortUrlCreation:e})),setShortUrlsListSettings:bs(e=>ws({shortUrlsList:e})),setUiSettings:bs(e=>ws({ui:e})),setVisitsSettings:bs(e=>ws({visits:e})),setTagsSettings:bs(e=>ws({tags:e}))}}),{toggleRealTimeUpdates:m0e,setRealTimeUpdatesInterval:g0e,setShortUrlCreationSettings:v0e,setShortUrlsListSettings:y0e,setUiSettings:_0e,setVisitsSettings:b0e,setTagsSettings:w0e}=p0e,x0e=h0e,ib=({items:e})=>m.jsx(m.Fragment,{children:e.map((t,n)=>m.jsx("div",{className:"mb-3",children:t},n))}),S0e=(e,t,n,r,i,o)=>()=>m.jsxs(Ou,{children:[m.jsxs(t6,{className:"mb-3",children:[m.jsx(Yf,{to:"general",children:"General"}),m.jsx(Yf,{to:"short-urls",children:"Short URLs"}),m.jsx(Yf,{to:"other-items",children:"Other items"})]}),m.jsxs(vy,{children:[m.jsx(vt,{path:"general",element:m.jsx(ib,{items:[m.jsx(r,{}),m.jsx(e,{})]})}),m.jsx(vt,{path:"short-urls",element:m.jsx(ib,{items:[m.jsx(t,{}),m.jsx(n,{})]})}),m.jsx(vt,{path:"other-items",element:m.jsx(ib,{items:[m.jsx(o,{}),m.jsx(i,{})]})}),m.jsx(vt,{path:"*",element:m.jsx(cS,{replace:!0,to:"general"})})]})]}),ob=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",O0e=e=>e==="includes"?m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"including"})," provided input."]}):m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"starting with"})," provided input."]}),C0e=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return m.jsxs(hn,{title:"Short URLs form",className:"h-100",children:[m.jsx(Fr,{children:m.jsxs(Qc,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",m.jsxs(Pc,{children:["The initial state of the ",m.jsx("b",{children:"Validate URL"})," checkbox will be ",m.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),m.jsx(Fr,{children:m.jsxs(Qc,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",m.jsxs(Pc,{children:["The initial state of the ",m.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",m.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),m.jsxs(_u,{noMargin:!0,label:"Tag suggestions search mode:",children:[m.jsxs(Xo,{text:ob(n.tagFilteringMode),children:[m.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:ob("startsWith")}),m.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:ob("includes")})]}),m.jsx(Pc,{children:O0e(n.tagFilteringMode)})]})]})},E0e={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},k0e=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>m.jsx(hn,{title:"Short URLs list",className:"h-100",children:m.jsx(_u,{noMargin:!0,label:"Default ordering for short URLs list:",children:m.jsx(xh,{items:E0e,order:(e==null?void 0:e.defaultOrdering)??r8,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),P0e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},T0e=({settings:{tags:e},setTagsSettings:t})=>m.jsx(hn,{title:"Tags",className:"h-100",children:m.jsx(_u,{noMargin:!0,label:"Default ordering for tags list:",children:m.jsx(xh,{items:P0e,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const M0e=({settings:{ui:e},setUiSettings:t})=>m.jsxs(hn,{title:"User interface",className:"h-100",children:[m.jsx(Ie,{icon:(e==null?void 0:e.theme)==="dark"?mK:rK,className:"user-interface__theme-icon"}),m.jsx(Qc,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),o6(r)},children:"Use dark theme."})]}),i8={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},j0e=(e,t)=>!e||e==="all"?t:i8[e],D0e=({onChange:e,active:t,allText:n})=>m.jsxs(Xo,{text:j0e(t,n),children:[m.jsx(Ue,{active:t==="all",onClick:()=>e("all"),children:n}),m.jsx(Ue,{divider:!0}),Object.entries(i8).map(([r,i])=>m.jsx(Ue,{active:t===r,onClick:()=>e(r),children:i},r))]}),sD=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},L0e=({settings:e,setVisitsSettings:t})=>{var n,r;return m.jsxs(hn,{title:"Visits",className:"h-100",children:[m.jsx(Fr,{children:m.jsxs(Qc,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:sD(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",m.jsxs(Pc,{children:["The visits coming from potential bots will be ",m.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),m.jsx(_u,{noMargin:!0,label:"Default interval to load on visits sections:",children:m.jsx(D0e,{allText:"All visits",active:sD(e),onChange:i=>t({defaultInterval:i})})})]})},R0e=(e,t)=>{e.serviceFactory("Settings",S0e,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",Ev),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>u0e),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>C0e),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>M0e),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>L0e),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>T0e),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>k0e),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>m0e),e.serviceFactory("setRealTimeUpdatesInterval",()=>g0e),e.serviceFactory("setShortUrlCreationSettings",()=>v0e),e.serviceFactory("setShortUrlsListSettings",()=>y0e),e.serviceFactory("setUiSettings",()=>_0e),e.serviceFactory("setVisitsSettings",()=>b0e),e.serviceFactory("setTagsSettings",()=>w0e)};var N0e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(v){var y=[];for(var x in v)y.push(x);return y};e.exports=d;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(d,a);for(var l=i(s.prototype),c=0;c * @license MIT - */var i=n(38),o=n(39),a=n(40);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(E,M){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|E}function y(E,M){if(c.isBuffer(E))return E.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(E)||E instanceof ArrayBuffer))return E.byteLength;typeof E!="string"&&(E=""+E);var I=E.length;if(I===0)return 0;for(var J=!1;;)switch(M){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":case void 0:return ie(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*I;case"hex":return I>>>1;case"base64":return ae(E).length;default:if(J)return ie(E).length;M=(""+M).toLowerCase(),J=!0}}function x(E,M,I){var J=E[M];E[M]=E[I],E[I]=J}function b(E,M,I,J,X){if(E.length===0)return-1;if(typeof I=="string"?(J=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,isNaN(I)&&(I=X?0:E.length-1),I<0&&(I=E.length+I),I>=E.length){if(X)return-1;I=E.length-1}else if(I<0){if(!X)return-1;I=0}if(typeof M=="string"&&(M=c.from(M,J)),c.isBuffer(M))return M.length===0?-1:w(E,M,I,J,X);if(typeof M=="number")return M&=255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(E,M,I):Uint8Array.prototype.lastIndexOf.call(E,M,I):w(E,[M],I,J,X);throw new TypeError("val must be string, number or Buffer")}function w(E,M,I,J,X){var se,ge=1,De=E.length,ue=M.length;if(J!==void 0&&((J=String(J).toLowerCase())==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(E.length<2||M.length<2)return-1;ge=2,De/=2,ue/=2,I/=2}function ve(Me,je){return ge===1?Me[je]:Me.readUInt16BE(je*ge)}if(X){var _e=-1;for(se=I;seDe&&(I=De-ue),se=I;se>=0;se--){for(var Ce=!0,Le=0;LeX&&(J=X):J=X;var se=M.length;if(se%2!=0)throw new TypeError("Invalid hex string");J>se/2&&(J=se/2);for(var ge=0;ge>8,ue=ge%256,ve.push(ue),ve.push(De);return ve}(M,E.length-I),E,I,J)}function H(E,M,I){return M===0&&I===E.length?i.fromByteArray(E):i.fromByteArray(E.slice(M,I))}function R(E,M,I){I=Math.min(E.length,I);for(var J=[],X=M;X239?4:ve>223?3:ve>191?2:1;if(X+Ce<=I)switch(Ce){case 1:ve<128&&(_e=ve);break;case 2:(192&(se=E[X+1]))==128&&(ue=(31&ve)<<6|63&se)>127&&(_e=ue);break;case 3:se=E[X+1],ge=E[X+2],(192&se)==128&&(192&ge)==128&&(ue=(15&ve)<<12|(63&se)<<6|63&ge)>2047&&(ue<55296||ue>57343)&&(_e=ue);break;case 4:se=E[X+1],ge=E[X+2],De=E[X+3],(192&se)==128&&(192&ge)==128&&(192&De)==128&&(ue=(15&ve)<<18|(63&se)<<12|(63&ge)<<6|63&De)>65535&&ue<1114112&&(_e=ue)}_e===null?(_e=65533,Ce=1):_e>65535&&(_e-=65536,J.push(_e>>>10&1023|55296),_e=56320|1023&_e),J.push(_e),X+=Ce}return function(Le){var Me=Le.length;if(Me<=V)return String.fromCharCode.apply(String,Le);for(var je="",ce=0;cethis.length||((J===void 0||J>this.length)&&(J=this.length),J<=0)||(J>>>=0)<=(I>>>=0))return"";for(M||(M="utf8");;)switch(M){case"hex":return q(this,I,J);case"utf8":case"utf-8":return R(this,I,J);case"ascii":return W(this,I,J);case"latin1":case"binary":return ee(this,I,J);case"base64":return H(this,I,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,I,J);default:if(X)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),X=!0}}).apply(this,arguments)},c.prototype.equals=function(E){if(!c.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E||c.compare(this,E)===0},c.prototype.inspect=function(){var E="",M=t.INSPECT_MAX_BYTES;return this.length>0&&(E=this.toString("hex",0,M).match(/.{2}/g).join(" "),this.length>M&&(E+=" ... ")),""},c.prototype.compare=function(E,M,I,J,X){if(!c.isBuffer(E))throw new TypeError("Argument must be a Buffer");if(M===void 0&&(M=0),I===void 0&&(I=E?E.length:0),J===void 0&&(J=0),X===void 0&&(X=this.length),M<0||I>E.length||J<0||X>this.length)throw new RangeError("out of range index");if(J>=X&&M>=I)return 0;if(J>=X)return-1;if(M>=I)return 1;if(M>>>=0,I>>>=0,J>>>=0,X>>>=0,this===E)return 0;for(var se=X-J,ge=I-M,De=Math.min(se,ge),ue=this.slice(J,X),ve=E.slice(M,I),_e=0;_eX)&&(I=X),E.length>0&&(I<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");for(var se=!1;;)switch(J){case"hex":return S(this,E,M,I);case"utf8":case"utf-8":return C(this,E,M,I);case"ascii":return k(this,E,M,I);case"latin1":case"binary":return P(this,E,M,I);case"base64":return j(this,E,M,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,E,M,I);default:if(se)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),se=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var V=4096;function W(E,M,I){var J="";I=Math.min(E.length,I);for(var X=M;XJ)&&(I=J);for(var X="",se=M;seI)throw new RangeError("Trying to access beyond buffer length")}function le(E,M,I,J,X,se){if(!c.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>X||ME.length)throw new RangeError("Index out of range")}function G(E,M,I,J){M<0&&(M=65535+M+1);for(var X=0,se=Math.min(E.length-I,2);X>>8*(J?X:1-X)}function F(E,M,I,J){M<0&&(M=4294967295+M+1);for(var X=0,se=Math.min(E.length-I,4);X>>8*(J?X:3-X)&255}function A(E,M,I,J,X,se){if(I+J>E.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function z(E,M,I,J,X){return X||A(E,0,I,4),o.write(E,M,I,J,23,4),I+4}function re(E,M,I,J,X){return X||A(E,0,I,8),o.write(E,M,I,J,52,8),I+8}c.prototype.slice=function(E,M){var I,J=this.length;if(E=~~E,M=M===void 0?J:~~M,E<0?(E+=J)<0&&(E=0):E>J&&(E=J),M<0?(M+=J)<0&&(M=0):M>J&&(M=J),M0&&(X*=256);)J+=this[E+--M]*X;return J},c.prototype.readUInt8=function(E,M){return M||oe(E,1,this.length),this[E]},c.prototype.readUInt16LE=function(E,M){return M||oe(E,2,this.length),this[E]|this[E+1]<<8},c.prototype.readUInt16BE=function(E,M){return M||oe(E,2,this.length),this[E]<<8|this[E+1]},c.prototype.readUInt32LE=function(E,M){return M||oe(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+16777216*this[E+3]},c.prototype.readUInt32BE=function(E,M){return M||oe(E,4,this.length),16777216*this[E]+(this[E+1]<<16|this[E+2]<<8|this[E+3])},c.prototype.readIntLE=function(E,M,I){E|=0,M|=0,I||oe(E,M,this.length);for(var J=this[E],X=1,se=0;++se=(X*=128)&&(J-=Math.pow(2,8*M)),J},c.prototype.readIntBE=function(E,M,I){E|=0,M|=0,I||oe(E,M,this.length);for(var J=M,X=1,se=this[E+--J];J>0&&(X*=256);)se+=this[E+--J]*X;return se>=(X*=128)&&(se-=Math.pow(2,8*M)),se},c.prototype.readInt8=function(E,M){return M||oe(E,1,this.length),128&this[E]?-1*(255-this[E]+1):this[E]},c.prototype.readInt16LE=function(E,M){M||oe(E,2,this.length);var I=this[E]|this[E+1]<<8;return 32768&I?4294901760|I:I},c.prototype.readInt16BE=function(E,M){M||oe(E,2,this.length);var I=this[E+1]|this[E]<<8;return 32768&I?4294901760|I:I},c.prototype.readInt32LE=function(E,M){return M||oe(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},c.prototype.readInt32BE=function(E,M){return M||oe(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},c.prototype.readFloatLE=function(E,M){return M||oe(E,4,this.length),o.read(this,E,!0,23,4)},c.prototype.readFloatBE=function(E,M){return M||oe(E,4,this.length),o.read(this,E,!1,23,4)},c.prototype.readDoubleLE=function(E,M){return M||oe(E,8,this.length),o.read(this,E,!0,52,8)},c.prototype.readDoubleBE=function(E,M){return M||oe(E,8,this.length),o.read(this,E,!1,52,8)},c.prototype.writeUIntLE=function(E,M,I,J){E=+E,M|=0,I|=0,J||le(this,E,M,I,Math.pow(2,8*I)-1,0);var X=1,se=0;for(this[M]=255&E;++se=0&&(se*=256);)this[M+X]=E/se&255;return M+I},c.prototype.writeUInt8=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,1,255,0),c.TYPED_ARRAY_SUPPORT||(E=Math.floor(E)),this[M]=255&E,M+1},c.prototype.writeUInt16LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8):G(this,E,M,!0),M+2},c.prototype.writeUInt16BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>8,this[M+1]=255&E):G(this,E,M,!1),M+2},c.prototype.writeUInt32LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[M+3]=E>>>24,this[M+2]=E>>>16,this[M+1]=E>>>8,this[M]=255&E):F(this,E,M,!0),M+4},c.prototype.writeUInt32BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>24,this[M+1]=E>>>16,this[M+2]=E>>>8,this[M+3]=255&E):F(this,E,M,!1),M+4},c.prototype.writeIntLE=function(E,M,I,J){if(E=+E,M|=0,!J){var X=Math.pow(2,8*I-1);le(this,E,M,I,X-1,-X)}var se=0,ge=1,De=0;for(this[M]=255&E;++se>0)-De&255;return M+I},c.prototype.writeIntBE=function(E,M,I,J){if(E=+E,M|=0,!J){var X=Math.pow(2,8*I-1);le(this,E,M,I,X-1,-X)}var se=I-1,ge=1,De=0;for(this[M+se]=255&E;--se>=0&&(ge*=256);)E<0&&De===0&&this[M+se+1]!==0&&(De=1),this[M+se]=(E/ge>>0)-De&255;return M+I},c.prototype.writeInt8=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,1,127,-128),c.TYPED_ARRAY_SUPPORT||(E=Math.floor(E)),E<0&&(E=255+E+1),this[M]=255&E,M+1},c.prototype.writeInt16LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8):G(this,E,M,!0),M+2},c.prototype.writeInt16BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>8,this[M+1]=255&E):G(this,E,M,!1),M+2},c.prototype.writeInt32LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8,this[M+2]=E>>>16,this[M+3]=E>>>24):F(this,E,M,!0),M+4},c.prototype.writeInt32BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>24,this[M+1]=E>>>16,this[M+2]=E>>>8,this[M+3]=255&E):F(this,E,M,!1),M+4},c.prototype.writeFloatLE=function(E,M,I){return z(this,E,M,!0,I)},c.prototype.writeFloatBE=function(E,M,I){return z(this,E,M,!1,I)},c.prototype.writeDoubleLE=function(E,M,I){return re(this,E,M,!0,I)},c.prototype.writeDoubleBE=function(E,M,I){return re(this,E,M,!1,I)},c.prototype.copy=function(E,M,I,J){if(I||(I=0),J||J===0||(J=this.length),M>=E.length&&(M=E.length),M||(M=0),J>0&&J=this.length)throw new RangeError("sourceStart out of bounds");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),E.length-M=0;--X)E[X+M]=this[X+I];else if(se<1e3||!c.TYPED_ARRAY_SUPPORT)for(X=0;X>>=0,I=I===void 0?this.length:I>>>0,E||(E=0),typeof E=="number")for(se=M;se55295&&I<57344){if(!X){if(I>56319){(M-=3)>-1&&se.push(239,191,189);continue}if(ge+1===J){(M-=3)>-1&&se.push(239,191,189);continue}X=I;continue}if(I<56320){(M-=3)>-1&&se.push(239,191,189),X=I;continue}I=65536+(X-55296<<10|I-56320)}else X&&(M-=3)>-1&&se.push(239,191,189);if(X=null,I<128){if((M-=1)<0)break;se.push(I)}else if(I<2048){if((M-=2)<0)break;se.push(I>>6|192,63&I|128)}else if(I<65536){if((M-=3)<0)break;se.push(I>>12|224,I>>6&63|128,63&I|128)}else{if(!(I<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;se.push(I>>18|240,I>>12&63|128,I>>6&63|128,63&I|128)}}return se}function ae(E){return i.toByteArray(function(M){if((M=function(I){return I.trim?I.trim():I.replace(/^\s+|\s+$/g,"")}(M).replace(U,"")).length<2)return"";for(;M.length%4!=0;)M+="=";return M}(E))}function he(E,M,I,J){for(var X=0;X=M.length||X>=E.length);++X)M[X+I]=E[X];return X}}).call(this,n(0))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(x){if(n===setTimeout)return setTimeout(x,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(x,0);try{return n(x,0)}catch{try{return n.call(null,x,0)}catch{return n.call(this,x,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:a}catch{r=a}})();var l,c=[],f=!1,d=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):d=-1,c.length&&m())}function m(){if(!f){var x=s(p);f=!0;for(var b=c.length;b;){for(l=c,c=[];++d1)for(var w=1;w=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},l))},n(35),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(a){return typeof a=="function"}function i(a){return typeof a=="object"&&a!==null}function o(a){return a===void 0}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(a){if(!function(s){return typeof s=="number"}(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},n.prototype.emit=function(a){var s,l,c,f,d,p;if(this._events||(this._events={}),a==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((s=arguments[1])instanceof Error)throw s;var m=new Error('Uncaught, unspecified "error" event. ('+s+")");throw m.context=s,m}if(o(l=this._events[a]))return!1;if(r(l))switch(arguments.length){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),l.apply(this,f)}else if(i(l))for(f=Array.prototype.slice.call(arguments,1),c=(p=l.slice()).length,d=0;d0&&this._events[a].length>l&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),typeof console.trace=="function"&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(a,s){if(!r(s))throw TypeError("listener must be a function");var l=!1;function c(){this.removeListener(a,c),l||(l=!0,s.apply(this,arguments))}return c.listener=s,this.on(a,c),this},n.prototype.removeListener=function(a,s){var l,c,f,d;if(!r(s))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(f=(l=this._events[a]).length,c=-1,l===s||r(l.listener)&&l.listener===s)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,s);else if(i(l)){for(d=f;d-- >0;)if(l[d]===s||l[d].listener&&l[d].listener===s){c=d;break}if(c<0)return this;l.length===1?(l.length=0,delete this._events[a]):l.splice(c,1),this._events.removeListener&&this.emit("removeListener",a,s)}return this},n.prototype.removeAllListeners=function(a){var s,l;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[a]&&delete this._events[a],this;if(arguments.length===0){for(s in this._events)s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events={},this}if(r(l=this._events[a]))this.removeListener(a,l);else if(l)for(;l.length;)this.removeListener(a,l[l.length-1]);return delete this._events[a],this},n.prototype.listeners=function(a){return this._events&&this._events[a]?r(this._events[a])?[this._events[a]]:this._events[a].slice():[]},n.prototype.listenerCount=function(a){if(this._events){var s=this._events[a];if(r(s))return 1;if(s)return s.length}return 0},n.listenerCount=function(a,s){return a.listenerCount(s)}},function(e,t,n){(t=e.exports=n(23)).Stream=t,t.Readable=t,t.Writable=n(14),t.Duplex=n(1),t.Transform=n(27),t.PassThrough=n(45)},function(e,t,n){(function(r,i,o){var a=n(6);function s(R){var V=this;this.next=null,this.entry=null,this.finish=function(){(function(W,ee,q){var Q=W.entry;for(W.entry=null;Q;){var oe=Q.callback;ee.pendingcb--,oe(void 0),Q=Q.next}ee.corkedRequestsFree?ee.corkedRequestsFree.next=W:ee.corkedRequestsFree=W})(V,R)}}e.exports=S;var l,c=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:a.nextTick;S.WritableState=w;var f=n(5);f.inherits=n(2);var d,p={deprecate:n(44)},m=n(24),v=n(7).Buffer,y=o.Uint8Array||function(){},x=n(25);function b(){}function w(R,V){l=l||n(1),R=R||{};var W=V instanceof l;this.objectMode=!!R.objectMode,W&&(this.objectMode=this.objectMode||!!R.writableObjectMode);var ee=R.highWaterMark,q=R.writableHighWaterMark,Q=this.objectMode?16:16384;this.highWaterMark=ee||ee===0?ee:W&&(q||q===0)?q:Q,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var oe=R.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(le){(function(G,F){var A=G._writableState,z=A.sync,re=A.writecb;if(function(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}(A),F)(function(K,ie,ae,he,E){--ie.pendingcb,ae?(a.nextTick(E,he),a.nextTick(H,K,ie),K._writableState.errorEmitted=!0,K.emit("error",he)):(E(he),K._writableState.errorEmitted=!0,K.emit("error",he),H(K,ie))})(G,A,z,F,re);else{var U=j(A);U||A.corked||A.bufferProcessing||!A.bufferedRequest||P(G,A),z?c(k,G,A,U,re):k(G,A,U,re)}})(V,le)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function S(R){if(l=l||n(1),!(d.call(S,this)||this instanceof l))return new S(R);this._writableState=new w(R,this),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),m.call(this)}function C(R,V,W,ee,q,Q,oe){V.writelen=ee,V.writecb=oe,V.writing=!0,V.sync=!0,W?R._writev(q,V.onwrite):R._write(q,Q,V.onwrite),V.sync=!1}function k(R,V,W,ee){W||function(q,Q){Q.length===0&&Q.needDrain&&(Q.needDrain=!1,q.emit("drain"))}(R,V),V.pendingcb--,ee(),H(R,V)}function P(R,V){V.bufferProcessing=!0;var W=V.bufferedRequest;if(R._writev&&W&&W.next){var ee=V.bufferedRequestCount,q=new Array(ee),Q=V.corkedRequestsFree;Q.entry=W;for(var oe=0,le=!0;W;)q[oe]=W,W.isBuf||(le=!1),W=W.next,oe+=1;q.allBuffers=le,C(R,V,!0,V.length,q,"",Q.finish),V.pendingcb++,V.lastBufferedRequest=null,Q.next?(V.corkedRequestsFree=Q.next,Q.next=null):V.corkedRequestsFree=new s(V),V.bufferedRequestCount=0}else{for(;W;){var G=W.chunk,F=W.encoding,A=W.callback;if(C(R,V,!1,V.objectMode?1:G.length,G,F,A),W=W.next,V.bufferedRequestCount--,V.writing)break}W===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=W,V.bufferProcessing=!1}function j(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function N(R,V){R._final(function(W){V.pendingcb--,W&&R.emit("error",W),V.prefinished=!0,R.emit("prefinish"),H(R,V)})}function H(R,V){var W=j(V);return W&&(function(ee,q){q.prefinished||q.finalCalled||(typeof ee._final=="function"?(q.pendingcb++,q.finalCalled=!0,a.nextTick(N,ee,q)):(q.prefinished=!0,ee.emit("prefinish")))}(R,V),V.pendingcb===0&&(V.finished=!0,R.emit("finish"))),W}f.inherits(S,m),w.prototype.getBuffer=function(){for(var R=this.bufferedRequest,V=[];R;)V.push(R),R=R.next;return V},function(){try{Object.defineProperty(w.prototype,"buffer",{get:p.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(R){return!!d.call(this,R)||this===S&&R&&R._writableState instanceof w}})):d=function(R){return R instanceof this},S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},S.prototype.write=function(R,V,W){var ee=this._writableState,q=!1,Q=!ee.objectMode&&function(oe){return v.isBuffer(oe)||oe instanceof y}(R);return Q&&!v.isBuffer(R)&&(R=function(oe){return v.from(oe)}(R)),typeof V=="function"&&(W=V,V=null),Q?V="buffer":V||(V=ee.defaultEncoding),typeof W!="function"&&(W=b),ee.ended?function(oe,le){var G=new Error("write after end");oe.emit("error",G),a.nextTick(le,G)}(this,W):(Q||function(oe,le,G,F){var A=!0,z=!1;return G===null?z=new TypeError("May not write null values to stream"):typeof G=="string"||G===void 0||le.objectMode||(z=new TypeError("Invalid non-string/buffer chunk")),z&&(oe.emit("error",z),a.nextTick(F,z),A=!1),A}(this,ee,R,W))&&(ee.pendingcb++,q=function(oe,le,G,F,A,z){if(!G){var re=function(ae,he,E){return ae.objectMode||ae.decodeStrings===!1||typeof he!="string"||(he=v.from(he,E)),he}(le,F,A);F!==re&&(G=!0,A="buffer",F=re)}var U=le.objectMode?1:F.length;le.length+=U;var K=le.length-1))throw new TypeError("Unknown encoding: "+R);return this._writableState.defaultEncoding=R,this},Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(R,V,W){W(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(R,V,W){var ee=this._writableState;typeof R=="function"?(W=R,R=null,V=null):typeof V=="function"&&(W=V,V=null),R!=null&&this.write(R,V),ee.corked&&(ee.corked=1,this.uncork()),ee.ending||ee.finished||function(q,Q,oe){Q.ending=!0,H(q,Q),oe&&(Q.finished?a.nextTick(oe):q.once("finish",oe)),Q.ended=!0,q.writable=!1}(this,ee,W)},Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(R){this._writableState&&(this._writableState.destroyed=R)}}),S.prototype.destroy=x.destroy,S.prototype._undestroy=x.undestroy,S.prototype._destroy=function(R,V){this.end(),V(R)}}).call(this,n(4),n(11).setImmediate,n(0))},function(e,t,n){(function(r,i,o){e.exports=function a(s,l,c){function f(m,v){if(!l[m]){if(!s[m]){var y=typeof _dereq_=="function"&&_dereq_;if(!v&&y)return y(m,!0);if(d)return d(m,!0);var x=new Error("Cannot find module '"+m+"'");throw x.code="MODULE_NOT_FOUND",x}var b=l[m]={exports:{}};s[m][0].call(b.exports,function(w){return f(s[m][1][w]||w)},b,b.exports,a,s,l,c)}return l[m].exports}for(var d=typeof _dereq_=="function"&&_dereq_,p=0;p=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|E}function y(E,M){if(c.isBuffer(E))return E.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(E)||E instanceof ArrayBuffer))return E.byteLength;typeof E!="string"&&(E=""+E);var I=E.length;if(I===0)return 0;for(var J=!1;;)switch(M){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":case void 0:return ie(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*I;case"hex":return I>>>1;case"base64":return ae(E).length;default:if(J)return ie(E).length;M=(""+M).toLowerCase(),J=!0}}function x(E,M,I){var J=E[M];E[M]=E[I],E[I]=J}function b(E,M,I,J,X){if(E.length===0)return-1;if(typeof I=="string"?(J=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,isNaN(I)&&(I=X?0:E.length-1),I<0&&(I=E.length+I),I>=E.length){if(X)return-1;I=E.length-1}else if(I<0){if(!X)return-1;I=0}if(typeof M=="string"&&(M=c.from(M,J)),c.isBuffer(M))return M.length===0?-1:w(E,M,I,J,X);if(typeof M=="number")return M&=255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(E,M,I):Uint8Array.prototype.lastIndexOf.call(E,M,I):w(E,[M],I,J,X);throw new TypeError("val must be string, number or Buffer")}function w(E,M,I,J,X){var se,ge=1,De=E.length,ue=M.length;if(J!==void 0&&((J=String(J).toLowerCase())==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(E.length<2||M.length<2)return-1;ge=2,De/=2,ue/=2,I/=2}function ve(Me,je){return ge===1?Me[je]:Me.readUInt16BE(je*ge)}if(X){var _e=-1;for(se=I;seDe&&(I=De-ue),se=I;se>=0;se--){for(var Ce=!0,Le=0;LeX&&(J=X):J=X;var se=M.length;if(se%2!=0)throw new TypeError("Invalid hex string");J>se/2&&(J=se/2);for(var ge=0;ge>8,ue=ge%256,ve.push(ue),ve.push(De);return ve}(M,E.length-I),E,I,J)}function H(E,M,I){return M===0&&I===E.length?i.fromByteArray(E):i.fromByteArray(E.slice(M,I))}function R(E,M,I){I=Math.min(E.length,I);for(var J=[],X=M;X239?4:ve>223?3:ve>191?2:1;if(X+Ce<=I)switch(Ce){case 1:ve<128&&(_e=ve);break;case 2:(192&(se=E[X+1]))==128&&(ue=(31&ve)<<6|63&se)>127&&(_e=ue);break;case 3:se=E[X+1],ge=E[X+2],(192&se)==128&&(192&ge)==128&&(ue=(15&ve)<<12|(63&se)<<6|63&ge)>2047&&(ue<55296||ue>57343)&&(_e=ue);break;case 4:se=E[X+1],ge=E[X+2],De=E[X+3],(192&se)==128&&(192&ge)==128&&(192&De)==128&&(ue=(15&ve)<<18|(63&se)<<12|(63&ge)<<6|63&De)>65535&&ue<1114112&&(_e=ue)}_e===null?(_e=65533,Ce=1):_e>65535&&(_e-=65536,J.push(_e>>>10&1023|55296),_e=56320|1023&_e),J.push(_e),X+=Ce}return function(Le){var Me=Le.length;if(Me<=V)return String.fromCharCode.apply(String,Le);for(var je="",ce=0;cethis.length||((J===void 0||J>this.length)&&(J=this.length),J<=0)||(J>>>=0)<=(I>>>=0))return"";for(M||(M="utf8");;)switch(M){case"hex":return q(this,I,J);case"utf8":case"utf-8":return R(this,I,J);case"ascii":return W(this,I,J);case"latin1":case"binary":return ee(this,I,J);case"base64":return H(this,I,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,I,J);default:if(X)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),X=!0}}).apply(this,arguments)},c.prototype.equals=function(E){if(!c.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E||c.compare(this,E)===0},c.prototype.inspect=function(){var E="",M=t.INSPECT_MAX_BYTES;return this.length>0&&(E=this.toString("hex",0,M).match(/.{2}/g).join(" "),this.length>M&&(E+=" ... ")),""},c.prototype.compare=function(E,M,I,J,X){if(!c.isBuffer(E))throw new TypeError("Argument must be a Buffer");if(M===void 0&&(M=0),I===void 0&&(I=E?E.length:0),J===void 0&&(J=0),X===void 0&&(X=this.length),M<0||I>E.length||J<0||X>this.length)throw new RangeError("out of range index");if(J>=X&&M>=I)return 0;if(J>=X)return-1;if(M>=I)return 1;if(M>>>=0,I>>>=0,J>>>=0,X>>>=0,this===E)return 0;for(var se=X-J,ge=I-M,De=Math.min(se,ge),ue=this.slice(J,X),ve=E.slice(M,I),_e=0;_eX)&&(I=X),E.length>0&&(I<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");for(var se=!1;;)switch(J){case"hex":return S(this,E,M,I);case"utf8":case"utf-8":return C(this,E,M,I);case"ascii":return k(this,E,M,I);case"latin1":case"binary":return P(this,E,M,I);case"base64":return j(this,E,M,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,E,M,I);default:if(se)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),se=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var V=4096;function W(E,M,I){var J="";I=Math.min(E.length,I);for(var X=M;XJ)&&(I=J);for(var X="",se=M;seI)throw new RangeError("Trying to access beyond buffer length")}function le(E,M,I,J,X,se){if(!c.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>X||ME.length)throw new RangeError("Index out of range")}function G(E,M,I,J){M<0&&(M=65535+M+1);for(var X=0,se=Math.min(E.length-I,2);X>>8*(J?X:1-X)}function F(E,M,I,J){M<0&&(M=4294967295+M+1);for(var X=0,se=Math.min(E.length-I,4);X>>8*(J?X:3-X)&255}function A(E,M,I,J,X,se){if(I+J>E.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function z(E,M,I,J,X){return X||A(E,0,I,4),o.write(E,M,I,J,23,4),I+4}function re(E,M,I,J,X){return X||A(E,0,I,8),o.write(E,M,I,J,52,8),I+8}c.prototype.slice=function(E,M){var I,J=this.length;if(E=~~E,M=M===void 0?J:~~M,E<0?(E+=J)<0&&(E=0):E>J&&(E=J),M<0?(M+=J)<0&&(M=0):M>J&&(M=J),M0&&(X*=256);)J+=this[E+--M]*X;return J},c.prototype.readUInt8=function(E,M){return M||oe(E,1,this.length),this[E]},c.prototype.readUInt16LE=function(E,M){return M||oe(E,2,this.length),this[E]|this[E+1]<<8},c.prototype.readUInt16BE=function(E,M){return M||oe(E,2,this.length),this[E]<<8|this[E+1]},c.prototype.readUInt32LE=function(E,M){return M||oe(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+16777216*this[E+3]},c.prototype.readUInt32BE=function(E,M){return M||oe(E,4,this.length),16777216*this[E]+(this[E+1]<<16|this[E+2]<<8|this[E+3])},c.prototype.readIntLE=function(E,M,I){E|=0,M|=0,I||oe(E,M,this.length);for(var J=this[E],X=1,se=0;++se=(X*=128)&&(J-=Math.pow(2,8*M)),J},c.prototype.readIntBE=function(E,M,I){E|=0,M|=0,I||oe(E,M,this.length);for(var J=M,X=1,se=this[E+--J];J>0&&(X*=256);)se+=this[E+--J]*X;return se>=(X*=128)&&(se-=Math.pow(2,8*M)),se},c.prototype.readInt8=function(E,M){return M||oe(E,1,this.length),128&this[E]?-1*(255-this[E]+1):this[E]},c.prototype.readInt16LE=function(E,M){M||oe(E,2,this.length);var I=this[E]|this[E+1]<<8;return 32768&I?4294901760|I:I},c.prototype.readInt16BE=function(E,M){M||oe(E,2,this.length);var I=this[E+1]|this[E]<<8;return 32768&I?4294901760|I:I},c.prototype.readInt32LE=function(E,M){return M||oe(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},c.prototype.readInt32BE=function(E,M){return M||oe(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},c.prototype.readFloatLE=function(E,M){return M||oe(E,4,this.length),o.read(this,E,!0,23,4)},c.prototype.readFloatBE=function(E,M){return M||oe(E,4,this.length),o.read(this,E,!1,23,4)},c.prototype.readDoubleLE=function(E,M){return M||oe(E,8,this.length),o.read(this,E,!0,52,8)},c.prototype.readDoubleBE=function(E,M){return M||oe(E,8,this.length),o.read(this,E,!1,52,8)},c.prototype.writeUIntLE=function(E,M,I,J){E=+E,M|=0,I|=0,J||le(this,E,M,I,Math.pow(2,8*I)-1,0);var X=1,se=0;for(this[M]=255&E;++se=0&&(se*=256);)this[M+X]=E/se&255;return M+I},c.prototype.writeUInt8=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,1,255,0),c.TYPED_ARRAY_SUPPORT||(E=Math.floor(E)),this[M]=255&E,M+1},c.prototype.writeUInt16LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8):G(this,E,M,!0),M+2},c.prototype.writeUInt16BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>8,this[M+1]=255&E):G(this,E,M,!1),M+2},c.prototype.writeUInt32LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[M+3]=E>>>24,this[M+2]=E>>>16,this[M+1]=E>>>8,this[M]=255&E):F(this,E,M,!0),M+4},c.prototype.writeUInt32BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>24,this[M+1]=E>>>16,this[M+2]=E>>>8,this[M+3]=255&E):F(this,E,M,!1),M+4},c.prototype.writeIntLE=function(E,M,I,J){if(E=+E,M|=0,!J){var X=Math.pow(2,8*I-1);le(this,E,M,I,X-1,-X)}var se=0,ge=1,De=0;for(this[M]=255&E;++se>0)-De&255;return M+I},c.prototype.writeIntBE=function(E,M,I,J){if(E=+E,M|=0,!J){var X=Math.pow(2,8*I-1);le(this,E,M,I,X-1,-X)}var se=I-1,ge=1,De=0;for(this[M+se]=255&E;--se>=0&&(ge*=256);)E<0&&De===0&&this[M+se+1]!==0&&(De=1),this[M+se]=(E/ge>>0)-De&255;return M+I},c.prototype.writeInt8=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,1,127,-128),c.TYPED_ARRAY_SUPPORT||(E=Math.floor(E)),E<0&&(E=255+E+1),this[M]=255&E,M+1},c.prototype.writeInt16LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8):G(this,E,M,!0),M+2},c.prototype.writeInt16BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>8,this[M+1]=255&E):G(this,E,M,!1),M+2},c.prototype.writeInt32LE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[M]=255&E,this[M+1]=E>>>8,this[M+2]=E>>>16,this[M+3]=E>>>24):F(this,E,M,!0),M+4},c.prototype.writeInt32BE=function(E,M,I){return E=+E,M|=0,I||le(this,E,M,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),c.TYPED_ARRAY_SUPPORT?(this[M]=E>>>24,this[M+1]=E>>>16,this[M+2]=E>>>8,this[M+3]=255&E):F(this,E,M,!1),M+4},c.prototype.writeFloatLE=function(E,M,I){return z(this,E,M,!0,I)},c.prototype.writeFloatBE=function(E,M,I){return z(this,E,M,!1,I)},c.prototype.writeDoubleLE=function(E,M,I){return re(this,E,M,!0,I)},c.prototype.writeDoubleBE=function(E,M,I){return re(this,E,M,!1,I)},c.prototype.copy=function(E,M,I,J){if(I||(I=0),J||J===0||(J=this.length),M>=E.length&&(M=E.length),M||(M=0),J>0&&J=this.length)throw new RangeError("sourceStart out of bounds");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),E.length-M=0;--X)E[X+M]=this[X+I];else if(se<1e3||!c.TYPED_ARRAY_SUPPORT)for(X=0;X>>=0,I=I===void 0?this.length:I>>>0,E||(E=0),typeof E=="number")for(se=M;se55295&&I<57344){if(!X){if(I>56319){(M-=3)>-1&&se.push(239,191,189);continue}if(ge+1===J){(M-=3)>-1&&se.push(239,191,189);continue}X=I;continue}if(I<56320){(M-=3)>-1&&se.push(239,191,189),X=I;continue}I=65536+(X-55296<<10|I-56320)}else X&&(M-=3)>-1&&se.push(239,191,189);if(X=null,I<128){if((M-=1)<0)break;se.push(I)}else if(I<2048){if((M-=2)<0)break;se.push(I>>6|192,63&I|128)}else if(I<65536){if((M-=3)<0)break;se.push(I>>12|224,I>>6&63|128,63&I|128)}else{if(!(I<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;se.push(I>>18|240,I>>12&63|128,I>>6&63|128,63&I|128)}}return se}function ae(E){return i.toByteArray(function(M){if((M=function(I){return I.trim?I.trim():I.replace(/^\s+|\s+$/g,"")}(M).replace(U,"")).length<2)return"";for(;M.length%4!=0;)M+="=";return M}(E))}function he(E,M,I,J){for(var X=0;X=M.length||X>=E.length);++X)M[X+I]=E[X];return X}}).call(this,n(0))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(x){if(n===setTimeout)return setTimeout(x,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(x,0);try{return n(x,0)}catch{try{return n.call(null,x,0)}catch{return n.call(this,x,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:a}catch{r=a}})();var l,c=[],f=!1,d=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):d=-1,c.length&&g())}function g(){if(!f){var x=s(p);f=!0;for(var b=c.length;b;){for(l=c,c=[];++d1)for(var w=1;w=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},l))},n(35),t.setImmediate=typeof self<"u"&&self.setImmediate||r!==void 0&&r.setImmediate||this&&this.setImmediate,t.clearImmediate=typeof self<"u"&&self.clearImmediate||r!==void 0&&r.clearImmediate||this&&this.clearImmediate}).call(this,n(0))},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(a){return typeof a=="function"}function i(a){return typeof a=="object"&&a!==null}function o(a){return a===void 0}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(a){if(!function(s){return typeof s=="number"}(a)||a<0||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},n.prototype.emit=function(a){var s,l,c,f,d,p;if(this._events||(this._events={}),a==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((s=arguments[1])instanceof Error)throw s;var g=new Error('Uncaught, unspecified "error" event. ('+s+")");throw g.context=s,g}if(o(l=this._events[a]))return!1;if(r(l))switch(arguments.length){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),l.apply(this,f)}else if(i(l))for(f=Array.prototype.slice.call(arguments,1),c=(p=l.slice()).length,d=0;d0&&this._events[a].length>l&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),typeof console.trace=="function"&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(a,s){if(!r(s))throw TypeError("listener must be a function");var l=!1;function c(){this.removeListener(a,c),l||(l=!0,s.apply(this,arguments))}return c.listener=s,this.on(a,c),this},n.prototype.removeListener=function(a,s){var l,c,f,d;if(!r(s))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(f=(l=this._events[a]).length,c=-1,l===s||r(l.listener)&&l.listener===s)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,s);else if(i(l)){for(d=f;d-- >0;)if(l[d]===s||l[d].listener&&l[d].listener===s){c=d;break}if(c<0)return this;l.length===1?(l.length=0,delete this._events[a]):l.splice(c,1),this._events.removeListener&&this.emit("removeListener",a,s)}return this},n.prototype.removeAllListeners=function(a){var s,l;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[a]&&delete this._events[a],this;if(arguments.length===0){for(s in this._events)s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events={},this}if(r(l=this._events[a]))this.removeListener(a,l);else if(l)for(;l.length;)this.removeListener(a,l[l.length-1]);return delete this._events[a],this},n.prototype.listeners=function(a){return this._events&&this._events[a]?r(this._events[a])?[this._events[a]]:this._events[a].slice():[]},n.prototype.listenerCount=function(a){if(this._events){var s=this._events[a];if(r(s))return 1;if(s)return s.length}return 0},n.listenerCount=function(a,s){return a.listenerCount(s)}},function(e,t,n){(t=e.exports=n(23)).Stream=t,t.Readable=t,t.Writable=n(14),t.Duplex=n(1),t.Transform=n(27),t.PassThrough=n(45)},function(e,t,n){(function(r,i,o){var a=n(6);function s(R){var V=this;this.next=null,this.entry=null,this.finish=function(){(function(W,ee,q){var Q=W.entry;for(W.entry=null;Q;){var oe=Q.callback;ee.pendingcb--,oe(void 0),Q=Q.next}ee.corkedRequestsFree?ee.corkedRequestsFree.next=W:ee.corkedRequestsFree=W})(V,R)}}e.exports=S;var l,c=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:a.nextTick;S.WritableState=w;var f=n(5);f.inherits=n(2);var d,p={deprecate:n(44)},g=n(24),v=n(7).Buffer,y=o.Uint8Array||function(){},x=n(25);function b(){}function w(R,V){l=l||n(1),R=R||{};var W=V instanceof l;this.objectMode=!!R.objectMode,W&&(this.objectMode=this.objectMode||!!R.writableObjectMode);var ee=R.highWaterMark,q=R.writableHighWaterMark,Q=this.objectMode?16:16384;this.highWaterMark=ee||ee===0?ee:W&&(q||q===0)?q:Q,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var oe=R.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(le){(function(G,F){var A=G._writableState,z=A.sync,re=A.writecb;if(function(K){K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0}(A),F)(function(K,ie,ae,he,E){--ie.pendingcb,ae?(a.nextTick(E,he),a.nextTick(H,K,ie),K._writableState.errorEmitted=!0,K.emit("error",he)):(E(he),K._writableState.errorEmitted=!0,K.emit("error",he),H(K,ie))})(G,A,z,F,re);else{var U=j(A);U||A.corked||A.bufferProcessing||!A.bufferedRequest||P(G,A),z?c(k,G,A,U,re):k(G,A,U,re)}})(V,le)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function S(R){if(l=l||n(1),!(d.call(S,this)||this instanceof l))return new S(R);this._writableState=new w(R,this),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),g.call(this)}function C(R,V,W,ee,q,Q,oe){V.writelen=ee,V.writecb=oe,V.writing=!0,V.sync=!0,W?R._writev(q,V.onwrite):R._write(q,Q,V.onwrite),V.sync=!1}function k(R,V,W,ee){W||function(q,Q){Q.length===0&&Q.needDrain&&(Q.needDrain=!1,q.emit("drain"))}(R,V),V.pendingcb--,ee(),H(R,V)}function P(R,V){V.bufferProcessing=!0;var W=V.bufferedRequest;if(R._writev&&W&&W.next){var ee=V.bufferedRequestCount,q=new Array(ee),Q=V.corkedRequestsFree;Q.entry=W;for(var oe=0,le=!0;W;)q[oe]=W,W.isBuf||(le=!1),W=W.next,oe+=1;q.allBuffers=le,C(R,V,!0,V.length,q,"",Q.finish),V.pendingcb++,V.lastBufferedRequest=null,Q.next?(V.corkedRequestsFree=Q.next,Q.next=null):V.corkedRequestsFree=new s(V),V.bufferedRequestCount=0}else{for(;W;){var G=W.chunk,F=W.encoding,A=W.callback;if(C(R,V,!1,V.objectMode?1:G.length,G,F,A),W=W.next,V.bufferedRequestCount--,V.writing)break}W===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=W,V.bufferProcessing=!1}function j(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function N(R,V){R._final(function(W){V.pendingcb--,W&&R.emit("error",W),V.prefinished=!0,R.emit("prefinish"),H(R,V)})}function H(R,V){var W=j(V);return W&&(function(ee,q){q.prefinished||q.finalCalled||(typeof ee._final=="function"?(q.pendingcb++,q.finalCalled=!0,a.nextTick(N,ee,q)):(q.prefinished=!0,ee.emit("prefinish")))}(R,V),V.pendingcb===0&&(V.finished=!0,R.emit("finish"))),W}f.inherits(S,g),w.prototype.getBuffer=function(){for(var R=this.bufferedRequest,V=[];R;)V.push(R),R=R.next;return V},function(){try{Object.defineProperty(w.prototype,"buffer",{get:p.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(R){return!!d.call(this,R)||this===S&&R&&R._writableState instanceof w}})):d=function(R){return R instanceof this},S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},S.prototype.write=function(R,V,W){var ee=this._writableState,q=!1,Q=!ee.objectMode&&function(oe){return v.isBuffer(oe)||oe instanceof y}(R);return Q&&!v.isBuffer(R)&&(R=function(oe){return v.from(oe)}(R)),typeof V=="function"&&(W=V,V=null),Q?V="buffer":V||(V=ee.defaultEncoding),typeof W!="function"&&(W=b),ee.ended?function(oe,le){var G=new Error("write after end");oe.emit("error",G),a.nextTick(le,G)}(this,W):(Q||function(oe,le,G,F){var A=!0,z=!1;return G===null?z=new TypeError("May not write null values to stream"):typeof G=="string"||G===void 0||le.objectMode||(z=new TypeError("Invalid non-string/buffer chunk")),z&&(oe.emit("error",z),a.nextTick(F,z),A=!1),A}(this,ee,R,W))&&(ee.pendingcb++,q=function(oe,le,G,F,A,z){if(!G){var re=function(ae,he,E){return ae.objectMode||ae.decodeStrings===!1||typeof he!="string"||(he=v.from(he,E)),he}(le,F,A);F!==re&&(G=!0,A="buffer",F=re)}var U=le.objectMode?1:F.length;le.length+=U;var K=le.length-1))throw new TypeError("Unknown encoding: "+R);return this._writableState.defaultEncoding=R,this},Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(R,V,W){W(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(R,V,W){var ee=this._writableState;typeof R=="function"?(W=R,R=null,V=null):typeof V=="function"&&(W=V,V=null),R!=null&&this.write(R,V),ee.corked&&(ee.corked=1,this.uncork()),ee.ending||ee.finished||function(q,Q,oe){Q.ending=!0,H(q,Q),oe&&(Q.finished?a.nextTick(oe):q.once("finish",oe)),Q.ended=!0,q.writable=!1}(this,ee,W)},Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(R){this._writableState&&(this._writableState.destroyed=R)}}),S.prototype.destroy=x.destroy,S.prototype._undestroy=x.undestroy,S.prototype._destroy=function(R,V){this.end(),V(R)}}).call(this,n(4),n(11).setImmediate,n(0))},function(e,t,n){(function(r,i,o){e.exports=function a(s,l,c){function f(g,v){if(!l[g]){if(!s[g]){var y=typeof _dereq_=="function"&&_dereq_;if(!v&&y)return y(g,!0);if(d)return d(g,!0);var x=new Error("Cannot find module '"+g+"'");throw x.code="MODULE_NOT_FOUND",x}var b=l[g]={exports:{}};s[g][0].call(b.exports,function(w){return f(s[g][1][w]||w)},b,b.exports,a,s,l,c)}return l[g].exports}for(var d=typeof _dereq_=="function"&&_dereq_,p=0;p0;){var w=b.shift();if(typeof w=="function"){var S=b.shift(),C=b.shift();w.call(S,C)}else w._settlePromises()}},m.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},m.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},m.prototype._reset=function(){this._isTickUsed=!1},s.exports=m,s.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(a,s,l){s.exports=function(c,f,d,p){var m=!1,v=function(w,S){this._reject(S)},y=function(w,S){S.promiseRejectionQueued=!0,S.bindingPromise._then(v,v,null,this,w)},x=function(w,S){!(50397184&this._bitField)&&this._resolveCallback(S.target)},b=function(w,S){S.promiseRejectionQueued||this._reject(w)};c.prototype.bind=function(w){m||(m=!0,c.prototype._propagateFrom=p.propagateFromFunction(),c.prototype._boundValue=p.boundValueFunction());var S=d(w),C=new c(f);C._propagateFrom(this,1);var k=this._target();if(C._setBoundTo(S),S instanceof c){var P={promiseRejectionQueued:!1,promise:C,target:k,bindingPromise:S};k._then(f,y,void 0,C,P),S._then(x,b,void 0,C,P),C._setOnCancel(S)}else C._resolveCallback(k);return C},c.prototype._setBoundTo=function(w){w!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=w):this._bitField=-2097153&this._bitField},c.prototype._isBound=function(){return(2097152&this._bitField)==2097152},c.bind=function(w,S){return c.resolve(S).bind(w)}}},{}],4:[function(a,s,l){var c;typeof Promise<"u"&&(c=Promise);var f=a("./promise")();f.noConflict=function(){try{Promise===f&&(Promise=c)}catch{}return f},s.exports=f},{"./promise":22}],5:[function(a,s,l){var c=Object.create;if(c){var f=c(null),d=c(null);f[" size"]=d[" size"]=0}s.exports=function(p){var m=a("./util"),v=m.canEvaluate;function y(w){return function(S,C){var k;if(S!=null&&(k=S[C]),typeof k!="function"){var P="Object "+m.classString(S)+" has no method '"+m.toString(C)+"'";throw new p.TypeError(P)}return k}(w,this.pop()).apply(w,this)}function x(w){return w[this]}function b(w){var S=+this;return S<0&&(S=Math.max(0,S+w.length)),w[S]}m.isIdentifier,p.prototype.call=function(w){var S=[].slice.call(arguments,1);return S.push(w),this._then(y,void 0,void 0,S,void 0)},p.prototype.get=function(w){var S;if(typeof w=="number")S=b;else if(v){var C=(void 0)(w);S=C!==null?C:x}else S=x;return this._then(S,void 0,void 0,w,void 0)}}},{"./util":36}],6:[function(a,s,l){s.exports=function(c,f,d,p){var m=a("./util"),v=m.tryCatch,y=m.errorObj,x=c._async;c.prototype.break=c.prototype.cancel=function(){if(!p.cancellation())return this._warn("cancellation is disabled");for(var b=this,w=b;b._isCancellable();){if(!b._cancelBy(w)){w._isFollowing()?w._followee().cancel():w._cancelBranched();break}var S=b._cancellationParent;if(S==null||!S._isCancellable()){b._isFollowing()?b._followee().cancel():b._cancelBranched();break}b._isFollowing()&&b._followee().cancel(),b._setWillBeCancelled(),w=b,b=S}},c.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},c.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},c.prototype._cancelBy=function(b){return b===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},c.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},c.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),x.invoke(this._cancelPromises,this,void 0))},c.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},c.prototype._unsetOnCancel=function(){this._onCancelField=void 0},c.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},c.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},c.prototype._doInvokeOnCancel=function(b,w){if(m.isArray(b))for(var S=0;S=0)return d[v]}return c.prototype._promiseCreated=function(){},c.prototype._pushContext=function(){},c.prototype._popContext=function(){return null},c._peekContext=c.prototype._peekContext=function(){},p.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,d.push(this._trace))},p.prototype._popContext=function(){if(this._trace!==void 0){var v=d.pop(),y=v._promiseCreated;return v._promiseCreated=null,y}return null},p.CapturedTrace=null,p.create=function(){if(f)return new p},p.deactivateLongStackTraces=function(){},p.activateLongStackTraces=function(){var v=c.prototype._pushContext,y=c.prototype._popContext,x=c._peekContext,b=c.prototype._peekContext,w=c.prototype._promiseCreated;p.deactivateLongStackTraces=function(){c.prototype._pushContext=v,c.prototype._popContext=y,c._peekContext=x,c.prototype._peekContext=b,c.prototype._promiseCreated=w,f=!1},f=!0,c.prototype._pushContext=p.prototype._pushContext,c.prototype._popContext=p.prototype._popContext,c._peekContext=c.prototype._peekContext=m,c.prototype._promiseCreated=function(){var S=this._peekContext();S&&S._promiseCreated==null&&(S._promiseCreated=this)}},p}},{}],9:[function(a,s,l){s.exports=function(c,f){var d,p,m,v=c._getDomain,y=c._async,x=a("./errors").Warning,b=a("./util"),w=b.canAttachTrace,S=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,C=/\((?:timers\.js):\d+:\d+\)/,k=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,P=null,j=null,N=!1,H=b.env("BLUEBIRD_DEBUG")!=0,R=!(b.env("BLUEBIRD_WARNINGS")==0||!H&&!b.env("BLUEBIRD_WARNINGS")),V=!(b.env("BLUEBIRD_LONG_STACK_TRACES")==0||!H&&!b.env("BLUEBIRD_LONG_STACK_TRACES")),W=b.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(R||!!b.env("BLUEBIRD_W_FORGOTTEN_RETURN"));c.prototype.suppressUnhandledRejections=function(){var ce=this._target();ce._bitField=-1048577&ce._bitField|524288},c.prototype._ensurePossibleRejectionHandled=function(){if(!(524288&this._bitField)){this._setRejectionIsUnhandled();var ce=this;setTimeout(function(){ce._notifyUnhandledRejection()},1)}},c.prototype._notifyUnhandledRejectionIsHandled=function(){ge("rejectionHandled",d,void 0,this)},c.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},c.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!=0},c.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var ce=this._settledValue();this._setUnhandledRejectionIsNotified(),ge("unhandledRejection",p,ce,this)}},c.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},c.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},c.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},c.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},c.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},c.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},c.prototype._warn=function(ce,de,be){return I(ce,de,be||this)},c.onPossiblyUnhandledRejection=function(ce){var de=v();p=typeof ce=="function"?de===null?ce:b.domainBind(de,ce):void 0},c.onUnhandledRejectionHandled=function(ce){var de=v();d=typeof ce=="function"?de===null?ce:b.domainBind(de,ce):void 0};var ee=function(){};c.longStackTraces=function(){if(y.haveItemsQueued()&&!je.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created +`)}},p.hasDevTools?(g.prototype.invokeLater=function(b,w,S){this._trampolineEnabled?v.call(this,b,w,S):this._schedule(function(){setTimeout(function(){b.call(w,S)},100)})},g.prototype.invoke=function(b,w,S){this._trampolineEnabled?y.call(this,b,w,S):this._schedule(function(){b.call(w,S)})},g.prototype.settlePromises=function(b){this._trampolineEnabled?x.call(this,b):this._schedule(function(){b._settlePromises()})}):(g.prototype.invokeLater=v,g.prototype.invoke=y,g.prototype.settlePromises=x),g.prototype._drainQueue=function(b){for(;b.length()>0;){var w=b.shift();if(typeof w=="function"){var S=b.shift(),C=b.shift();w.call(S,C)}else w._settlePromises()}},g.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},g.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},g.prototype._reset=function(){this._isTickUsed=!1},s.exports=g,s.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(a,s,l){s.exports=function(c,f,d,p){var g=!1,v=function(w,S){this._reject(S)},y=function(w,S){S.promiseRejectionQueued=!0,S.bindingPromise._then(v,v,null,this,w)},x=function(w,S){!(50397184&this._bitField)&&this._resolveCallback(S.target)},b=function(w,S){S.promiseRejectionQueued||this._reject(w)};c.prototype.bind=function(w){g||(g=!0,c.prototype._propagateFrom=p.propagateFromFunction(),c.prototype._boundValue=p.boundValueFunction());var S=d(w),C=new c(f);C._propagateFrom(this,1);var k=this._target();if(C._setBoundTo(S),S instanceof c){var P={promiseRejectionQueued:!1,promise:C,target:k,bindingPromise:S};k._then(f,y,void 0,C,P),S._then(x,b,void 0,C,P),C._setOnCancel(S)}else C._resolveCallback(k);return C},c.prototype._setBoundTo=function(w){w!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=w):this._bitField=-2097153&this._bitField},c.prototype._isBound=function(){return(2097152&this._bitField)==2097152},c.bind=function(w,S){return c.resolve(S).bind(w)}}},{}],4:[function(a,s,l){var c;typeof Promise<"u"&&(c=Promise);var f=a("./promise")();f.noConflict=function(){try{Promise===f&&(Promise=c)}catch{}return f},s.exports=f},{"./promise":22}],5:[function(a,s,l){var c=Object.create;if(c){var f=c(null),d=c(null);f[" size"]=d[" size"]=0}s.exports=function(p){var g=a("./util"),v=g.canEvaluate;function y(w){return function(S,C){var k;if(S!=null&&(k=S[C]),typeof k!="function"){var P="Object "+g.classString(S)+" has no method '"+g.toString(C)+"'";throw new p.TypeError(P)}return k}(w,this.pop()).apply(w,this)}function x(w){return w[this]}function b(w){var S=+this;return S<0&&(S=Math.max(0,S+w.length)),w[S]}g.isIdentifier,p.prototype.call=function(w){var S=[].slice.call(arguments,1);return S.push(w),this._then(y,void 0,void 0,S,void 0)},p.prototype.get=function(w){var S;if(typeof w=="number")S=b;else if(v){var C=(void 0)(w);S=C!==null?C:x}else S=x;return this._then(S,void 0,void 0,w,void 0)}}},{"./util":36}],6:[function(a,s,l){s.exports=function(c,f,d,p){var g=a("./util"),v=g.tryCatch,y=g.errorObj,x=c._async;c.prototype.break=c.prototype.cancel=function(){if(!p.cancellation())return this._warn("cancellation is disabled");for(var b=this,w=b;b._isCancellable();){if(!b._cancelBy(w)){w._isFollowing()?w._followee().cancel():w._cancelBranched();break}var S=b._cancellationParent;if(S==null||!S._isCancellable()){b._isFollowing()?b._followee().cancel():b._cancelBranched();break}b._isFollowing()&&b._followee().cancel(),b._setWillBeCancelled(),w=b,b=S}},c.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},c.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},c.prototype._cancelBy=function(b){return b===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},c.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},c.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),x.invoke(this._cancelPromises,this,void 0))},c.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},c.prototype._unsetOnCancel=function(){this._onCancelField=void 0},c.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},c.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},c.prototype._doInvokeOnCancel=function(b,w){if(g.isArray(b))for(var S=0;S=0)return d[v]}return c.prototype._promiseCreated=function(){},c.prototype._pushContext=function(){},c.prototype._popContext=function(){return null},c._peekContext=c.prototype._peekContext=function(){},p.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,d.push(this._trace))},p.prototype._popContext=function(){if(this._trace!==void 0){var v=d.pop(),y=v._promiseCreated;return v._promiseCreated=null,y}return null},p.CapturedTrace=null,p.create=function(){if(f)return new p},p.deactivateLongStackTraces=function(){},p.activateLongStackTraces=function(){var v=c.prototype._pushContext,y=c.prototype._popContext,x=c._peekContext,b=c.prototype._peekContext,w=c.prototype._promiseCreated;p.deactivateLongStackTraces=function(){c.prototype._pushContext=v,c.prototype._popContext=y,c._peekContext=x,c.prototype._peekContext=b,c.prototype._promiseCreated=w,f=!1},f=!0,c.prototype._pushContext=p.prototype._pushContext,c.prototype._popContext=p.prototype._popContext,c._peekContext=c.prototype._peekContext=g,c.prototype._promiseCreated=function(){var S=this._peekContext();S&&S._promiseCreated==null&&(S._promiseCreated=this)}},p}},{}],9:[function(a,s,l){s.exports=function(c,f){var d,p,g,v=c._getDomain,y=c._async,x=a("./errors").Warning,b=a("./util"),w=b.canAttachTrace,S=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,C=/\((?:timers\.js):\d+:\d+\)/,k=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,P=null,j=null,N=!1,H=b.env("BLUEBIRD_DEBUG")!=0,R=!(b.env("BLUEBIRD_WARNINGS")==0||!H&&!b.env("BLUEBIRD_WARNINGS")),V=!(b.env("BLUEBIRD_LONG_STACK_TRACES")==0||!H&&!b.env("BLUEBIRD_LONG_STACK_TRACES")),W=b.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(R||!!b.env("BLUEBIRD_W_FORGOTTEN_RETURN"));c.prototype.suppressUnhandledRejections=function(){var ce=this._target();ce._bitField=-1048577&ce._bitField|524288},c.prototype._ensurePossibleRejectionHandled=function(){if(!(524288&this._bitField)){this._setRejectionIsUnhandled();var ce=this;setTimeout(function(){ce._notifyUnhandledRejection()},1)}},c.prototype._notifyUnhandledRejectionIsHandled=function(){ge("rejectionHandled",d,void 0,this)},c.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},c.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!=0},c.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var ce=this._settledValue();this._setUnhandledRejectionIsNotified(),ge("unhandledRejection",p,ce,this)}},c.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},c.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},c.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},c.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},c.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},c.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},c.prototype._warn=function(ce,de,be){return I(ce,de,be||this)},c.onPossiblyUnhandledRejection=function(ce){var de=v();p=typeof ce=="function"?de===null?ce:b.domainBind(de,ce):void 0},c.onUnhandledRejectionHandled=function(ce){var de=v();d=typeof ce=="function"?de===null?ce:b.domainBind(de,ce):void 0};var ee=function(){};c.longStackTraces=function(){if(y.haveItemsQueued()&&!je.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);if(!je.longStackTraces&&ue()){var ce=c.prototype._captureStackTrace,de=c.prototype._attachExtraTrace;je.longStackTraces=!0,ee=function(){if(y.haveItemsQueued()&&!je.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created @@ -932,23 +932,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)),b.notEnumerableProp(ce,"__stackCleaned__",!0)}}}function I(ce,de,be){if(je.warnings){var ye,Se=new x(ce);if(de)be._attachExtraTrace(Se);else if(je.longStackTraces&&(ye=c._peekContext()))ye.attachExtraTrace(Se);else{var Te=X(Se);Se.stack=Te.message+` `+Te.stack.join(` `)}G("warning",Se)||se(Se,"",!0)}}function J(ce){for(var de=[],be=0;be0?function(ye){for(var Se=ye.stack.replace(/\s+$/g,"").split(` -`),Te=0;Te0&&ye.name!="SyntaxError"&&(Se=Se.slice(Te)),Se}(ce):[" (No stack trace)"],{message:be,stack:ce.name=="SyntaxError"?de:J(de)}}function se(ce,de,be){if(typeof console<"u"){var ye;if(b.isObject(ce)){var Se=ce.stack;ye=de+j(Se,ce)}else ye=de+String(ce);typeof m=="function"?m(ye,be):typeof console.log!="function"&&typeof console.log!="object"||console.log(ye)}}function ge(ce,de,be,ye){var Se=!1;try{typeof de=="function"&&(Se=!0,ce==="rejectionHandled"?de(ye):de(be,ye))}catch(Te){y.throwLater(Te)}ce==="unhandledRejection"?G(ce,be,ye)||Se||se(be,"Unhandled rejection "):G(ce,ye)}function De(ce){var de;if(typeof ce=="function")de="[function "+(ce.name||"anonymous")+"]";else{if(de=ce&&typeof ce.toString=="function"?ce.toString():b.toString(ce),/\[object [a-zA-Z0-9$_]+\]/.test(de))try{de=JSON.stringify(ce)}catch{}de.length===0&&(de="(empty array)")}return"(<"+function(be){return be.length<41?be:be.substr(0,38)+"..."}(de)+">, no stack trace)"}function ue(){return typeof Me=="function"}var ve=function(){return!1},_e=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Ce(ce){var de=ce.match(_e);if(de)return{fileName:de[1],line:parseInt(de[2],10)}}function Le(ce){this._parent=ce,this._promisesCreated=0;var de=this._length=1+(ce===void 0?0:ce._length);Me(this,Le),de>32&&this.uncycle()}b.inherits(Le,Error),f.CapturedTrace=Le,Le.prototype.uncycle=function(){var ce=this._length;if(!(ce<2)){for(var de=[],be={},ye=0,Se=this;Se!==void 0;++ye)de.push(Se),Se=Se._parent;for(ye=(ce=this._length=ye)-1;ye>=0;--ye){var Te=de[ye].stack;be[Te]===void 0&&(be[Te]=ye)}for(ye=0;ye0&&(de[Ne-1]._parent=void 0,de[Ne-1]._length=1),de[ye]._parent=void 0,de[ye]._length=1;var Qe=ye>0?de[ye-1]:this;Ne=0;--qe)de[qe]._length=et,et++;return}}}},Le.prototype.attachExtraTrace=function(ce){if(!ce.__stackCleaned__){this.uncycle();for(var de=X(ce),be=de.message,ye=[de.stack],Se=this;Se!==void 0;)ye.push(J(Se.stack.split(` +`),Te=0;Te0&&ye.name!="SyntaxError"&&(Se=Se.slice(Te)),Se}(ce):[" (No stack trace)"],{message:be,stack:ce.name=="SyntaxError"?de:J(de)}}function se(ce,de,be){if(typeof console<"u"){var ye;if(b.isObject(ce)){var Se=ce.stack;ye=de+j(Se,ce)}else ye=de+String(ce);typeof g=="function"?g(ye,be):typeof console.log!="function"&&typeof console.log!="object"||console.log(ye)}}function ge(ce,de,be,ye){var Se=!1;try{typeof de=="function"&&(Se=!0,ce==="rejectionHandled"?de(ye):de(be,ye))}catch(Te){y.throwLater(Te)}ce==="unhandledRejection"?G(ce,be,ye)||Se||se(be,"Unhandled rejection "):G(ce,ye)}function De(ce){var de;if(typeof ce=="function")de="[function "+(ce.name||"anonymous")+"]";else{if(de=ce&&typeof ce.toString=="function"?ce.toString():b.toString(ce),/\[object [a-zA-Z0-9$_]+\]/.test(de))try{de=JSON.stringify(ce)}catch{}de.length===0&&(de="(empty array)")}return"(<"+function(be){return be.length<41?be:be.substr(0,38)+"..."}(de)+">, no stack trace)"}function ue(){return typeof Me=="function"}var ve=function(){return!1},_e=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Ce(ce){var de=ce.match(_e);if(de)return{fileName:de[1],line:parseInt(de[2],10)}}function Le(ce){this._parent=ce,this._promisesCreated=0;var de=this._length=1+(ce===void 0?0:ce._length);Me(this,Le),de>32&&this.uncycle()}b.inherits(Le,Error),f.CapturedTrace=Le,Le.prototype.uncycle=function(){var ce=this._length;if(!(ce<2)){for(var de=[],be={},ye=0,Se=this;Se!==void 0;++ye)de.push(Se),Se=Se._parent;for(ye=(ce=this._length=ye)-1;ye>=0;--ye){var Te=de[ye].stack;be[Te]===void 0&&(be[Te]=ye)}for(ye=0;ye0&&(de[Ne-1]._parent=void 0,de[Ne-1]._length=1),de[ye]._parent=void 0,de[ye]._length=1;var Qe=ye>0?de[ye-1]:this;Ne=0;--qe)de[qe]._length=et,et++;return}}}},Le.prototype.attachExtraTrace=function(ce){if(!ce.__stackCleaned__){this.uncycle();for(var de=X(ce),be=de.message,ye=[de.stack],Se=this;Se!==void 0;)ye.push(J(Se.stack.split(` `))),Se=Se._parent;(function(Te){for(var Ne=Te[0],Qe=1;Qe=0;--Sn)if(et[Sn]===Gt){zt=Sn;break}for(Sn=zt;Sn>=0;--Sn){var lr=et[Sn];if(Ne[qe]!==lr)break;Ne.pop(),qe--}Ne=et}})(ye),function(Te){for(var Ne=0;Ne=0)return P=/@/,j=de,N=!0,function(Te){Te.stack=new Error().stack};try{throw new Error}catch(Te){ye="stack"in Te}return"stack"in Se||!ye||typeof Error.stackTraceLimit!="number"?(j=function(Te,Ne){return typeof Te=="string"?Te:typeof Ne!="object"&&typeof Ne!="function"||Ne.name===void 0||Ne.message===void 0?De(Ne):Ne.toString()},null):(P=ce,j=de,function(Te){Error.stackTraceLimit+=6;try{throw new Error}catch(Ne){Te.stack=Ne.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(m=function(ce){console.warn(ce)},b.isNode&&r.stderr.isTTY?m=function(ce,de){var be=de?"\x1B[33m":"\x1B[31m";console.warn(be+ce+`\x1B[0m -`)}:b.isNode||typeof new Error().stack!="string"||(m=function(ce,de){console.warn("%c"+ce,de?"color: darkorange":"color: red")}));var je={warnings:R,longStackTraces:!1,cancellation:!1,monitoring:!1};return V&&c.longStackTraces(),{longStackTraces:function(){return je.longStackTraces},warnings:function(){return je.warnings},cancellation:function(){return je.cancellation},monitoring:function(){return je.monitoring},propagateFromFunction:function(){return ae},boundValueFunction:function(){return he},checkForgottenReturns:function(ce,de,be,ye,Se){if(ce===void 0&&de!==null&&W){if(Se!==void 0&&Se._returnedNonUndefined()||!(65535&ye._bitField))return;be&&(be+=" ");var Te="",Ne="";if(de._trace){for(var Qe=de._trace.stack.split(` +`)[0].indexOf("stackDetection@")>=0)return P=/@/,j=de,N=!0,function(Te){Te.stack=new Error().stack};try{throw new Error}catch(Te){ye="stack"in Te}return"stack"in Se||!ye||typeof Error.stackTraceLimit!="number"?(j=function(Te,Ne){return typeof Te=="string"?Te:typeof Ne!="object"&&typeof Ne!="function"||Ne.name===void 0||Ne.message===void 0?De(Ne):Ne.toString()},null):(P=ce,j=de,function(Te){Error.stackTraceLimit+=6;try{throw new Error}catch(Ne){Te.stack=Ne.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(g=function(ce){console.warn(ce)},b.isNode&&r.stderr.isTTY?g=function(ce,de){var be=de?"\x1B[33m":"\x1B[31m";console.warn(be+ce+`\x1B[0m +`)}:b.isNode||typeof new Error().stack!="string"||(g=function(ce,de){console.warn("%c"+ce,de?"color: darkorange":"color: red")}));var je={warnings:R,longStackTraces:!1,cancellation:!1,monitoring:!1};return V&&c.longStackTraces(),{longStackTraces:function(){return je.longStackTraces},warnings:function(){return je.warnings},cancellation:function(){return je.cancellation},monitoring:function(){return je.monitoring},propagateFromFunction:function(){return ae},boundValueFunction:function(){return he},checkForgottenReturns:function(ce,de,be,ye,Se){if(ce===void 0&&de!==null&&W){if(Se!==void 0&&Se._returnedNonUndefined()||!(65535&ye._bitField))return;be&&(be+=" ");var Te="",Ne="";if(de._trace){for(var Qe=de._trace.stack.split(` `),et=J(Qe),qe=et.length-1;qe>=0;--qe){var Gt=et[qe];if(!C.test(Gt)){var zt=Gt.match(k);zt&&(Te="at "+zt[1]+":"+zt[2]+":"+zt[3]+" ");break}}if(et.length>0){var Sn=et[0];for(qe=0;qe0&&(Ne=` `+Qe[qe-1]);break}}}var lr="a promise was created in a "+be+"handler "+Te+"but was not returned from it, see http://goo.gl/rRqMUw"+Ne;ye._warn(lr,!0,de)}},setBounds:function(ce,de){if(ue()){for(var be,ye,Se=ce.stack.split(` `),Te=de.stack.split(` -`),Ne=-1,Qe=-1,et=0;et=Qe||(ve=function(Gt){if(S.test(Gt))return!0;var zt=Ce(Gt);return!!(zt&&zt.fileName===be&&Ne<=zt.line&&zt.line<=Qe)})}},warn:I,deprecated:function(ce,de){var be=ce+" is deprecated and will be removed in a future version.";return de&&(be+=" Use "+de+" instead."),I(be)},CapturedTrace:Le,fireDomEvent:q,fireGlobalEvent:Q}}},{"./errors":12,"./util":36}],10:[function(a,s,l){s.exports=function(c){function f(){return this.value}function d(){throw this.reason}c.prototype.return=c.prototype.thenReturn=function(p){return p instanceof c&&p.suppressUnhandledRejections(),this._then(f,void 0,void 0,{value:p},void 0)},c.prototype.throw=c.prototype.thenThrow=function(p){return this._then(d,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,d,void 0,{reason:p},void 0);var m=arguments[1];return this.caught(p,function(){throw m})},c.prototype.catchReturn=function(p){if(arguments.length<=1)return p instanceof c&&p.suppressUnhandledRejections(),this._then(void 0,f,void 0,{value:p},void 0);var m=arguments[1];return m instanceof c&&m.suppressUnhandledRejections(),this.caught(p,function(){return m})}}},{}],11:[function(a,s,l){s.exports=function(c,f){var d=c.reduce,p=c.all;function m(){return p(this)}c.prototype.each=function(v){return d(this,v,f,0)._then(m,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(v){return d(this,v,f,f)},c.each=function(v,y){return d(v,y,f,0)._then(m,void 0,void 0,v,void 0)},c.mapSeries=function(v,y){return d(v,y,f,f)}}},{}],12:[function(a,s,l){var c,f,d=a("./es5"),p=d.freeze,m=a("./util"),v=m.inherits,y=m.notEnumerableProp;function x(R,V){function W(ee){if(!(this instanceof W))return new W(ee);y(this,"message",typeof ee=="string"?ee:V),y(this,"name",R),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return v(W,Error),W}var b=x("Warning","warning"),w=x("CancellationError","cancellation error"),S=x("TimeoutError","timeout error"),C=x("AggregateError","aggregate error");try{c=TypeError,f=RangeError}catch{c=x("TypeError","type error"),f=x("RangeError","range error")}for(var k="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),P=0;P=Qe||(ve=function(Gt){if(S.test(Gt))return!0;var zt=Ce(Gt);return!!(zt&&zt.fileName===be&&Ne<=zt.line&&zt.line<=Qe)})}},warn:I,deprecated:function(ce,de){var be=ce+" is deprecated and will be removed in a future version.";return de&&(be+=" Use "+de+" instead."),I(be)},CapturedTrace:Le,fireDomEvent:q,fireGlobalEvent:Q}}},{"./errors":12,"./util":36}],10:[function(a,s,l){s.exports=function(c){function f(){return this.value}function d(){throw this.reason}c.prototype.return=c.prototype.thenReturn=function(p){return p instanceof c&&p.suppressUnhandledRejections(),this._then(f,void 0,void 0,{value:p},void 0)},c.prototype.throw=c.prototype.thenThrow=function(p){return this._then(d,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,d,void 0,{reason:p},void 0);var g=arguments[1];return this.caught(p,function(){throw g})},c.prototype.catchReturn=function(p){if(arguments.length<=1)return p instanceof c&&p.suppressUnhandledRejections(),this._then(void 0,f,void 0,{value:p},void 0);var g=arguments[1];return g instanceof c&&g.suppressUnhandledRejections(),this.caught(p,function(){return g})}}},{}],11:[function(a,s,l){s.exports=function(c,f){var d=c.reduce,p=c.all;function g(){return p(this)}c.prototype.each=function(v){return d(this,v,f,0)._then(g,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(v){return d(this,v,f,f)},c.each=function(v,y){return d(v,y,f,0)._then(g,void 0,void 0,v,void 0)},c.mapSeries=function(v,y){return d(v,y,f,f)}}},{}],12:[function(a,s,l){var c,f,d=a("./es5"),p=d.freeze,g=a("./util"),v=g.inherits,y=g.notEnumerableProp;function x(R,V){function W(ee){if(!(this instanceof W))return new W(ee);y(this,"message",typeof ee=="string"?ee:V),y(this,"name",R),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return v(W,Error),W}var b=x("Warning","warning"),w=x("CancellationError","cancellation error"),S=x("TimeoutError","timeout error"),C=x("AggregateError","aggregate error");try{c=TypeError,f=RangeError}catch{c=x("TypeError","type error"),f=x("RangeError","range error")}for(var k="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),P=0;P1?P.cancelPromise._reject(j):P.cancelPromise._cancel(),P.cancelPromise=null,!0)}function S(){return k.call(this,this.promise._target()._settledValue())}function C(P){if(!w(this,P))return v.e=P,v}function k(P){var j=this.promise,N=this.handler;if(!this.called){this.called=!0;var H=this.isFinallyHandler()?N.call(j._boundValue()):N.call(j._boundValue(),P);if(H===d)return H;if(H!==void 0){j._setReturnedNonUndefined();var R=f(H,j);if(R instanceof c){if(this.cancelPromise!=null){if(R._isCancelled()){var V=new m("late cancellation observer");return j._attachExtraTrace(V),v.e=V,v}R.isPending()&&R._attachCancellationCallback(new b(this))}return R._then(S,C,void 0,this,void 0)}}}return j.isRejected()?(w(this),v.e=P,v):(w(this),P)}return x.prototype.isFinallyHandler=function(){return this.type===0},b.prototype._resultCancelled=function(){w(this.finallyHandler)},c.prototype._passThrough=function(P,j,N,H){return typeof P!="function"?this.then():this._then(N,H,void 0,new x(this,j,P),void 0)},c.prototype.lastly=c.prototype.finally=function(P){return this._passThrough(P,0,k,k)},c.prototype.tap=function(P){return this._passThrough(P,1,k)},c.prototype.tapCatch=function(P){var j=arguments.length;if(j===1)return this._passThrough(P,1,void 0,k);var N,H=new Array(j-1),R=0;for(N=0;N1?P.cancelPromise._reject(j):P.cancelPromise._cancel(),P.cancelPromise=null,!0)}function S(){return k.call(this,this.promise._target()._settledValue())}function C(P){if(!w(this,P))return v.e=P,v}function k(P){var j=this.promise,N=this.handler;if(!this.called){this.called=!0;var H=this.isFinallyHandler()?N.call(j._boundValue()):N.call(j._boundValue(),P);if(H===d)return H;if(H!==void 0){j._setReturnedNonUndefined();var R=f(H,j);if(R instanceof c){if(this.cancelPromise!=null){if(R._isCancelled()){var V=new g("late cancellation observer");return j._attachExtraTrace(V),v.e=V,v}R.isPending()&&R._attachCancellationCallback(new b(this))}return R._then(S,C,void 0,this,void 0)}}}return j.isRejected()?(w(this),v.e=P,v):(w(this),P)}return x.prototype.isFinallyHandler=function(){return this.type===0},b.prototype._resultCancelled=function(){w(this.finallyHandler)},c.prototype._passThrough=function(P,j,N,H){return typeof P!="function"?this.then():this._then(N,H,void 0,new x(this,j,P),void 0)},c.prototype.lastly=c.prototype.finally=function(P){return this._passThrough(P,0,k,k)},c.prototype.tap=function(P){return this._passThrough(P,1,k)},c.prototype.tapCatch=function(P){var j=arguments.length;if(j===1)return this._passThrough(P,1,void 0,k);var N,H=new Array(j-1),R=0;for(N=0;N0&&typeof arguments[b]=="function"&&(x=arguments[b]);var w=[].slice.call(arguments);x&&w.pop();var S=new f(w).promise();return x!==void 0?S.spread(x):S}}},{"./util":36}],18:[function(a,s,l){s.exports=function(c,f,d,p,m,v){var y=c._getDomain,x=a("./util"),b=x.tryCatch,w=x.errorObj,S=c._async;function C(P,j,N,H){this.constructor$(P),this._promise._captureStackTrace();var R=y();this._callback=R===null?j:x.domainBind(R,j),this._preservedValues=H===m?new Array(this.length()):null,this._limit=N,this._inFlight=0,this._queue=[],S.invoke(this._asyncInit,this,void 0)}function k(P,j,N,H){if(typeof j!="function")return d("expecting a function but got "+x.classString(j));var R=0;if(N!==void 0){if(typeof N!="object"||N===null)return c.reject(new TypeError("options argument must be an object but it is "+x.classString(N)));if(typeof N.concurrency!="number")return c.reject(new TypeError("'concurrency' must be a number but it is "+x.classString(N.concurrency)));R=N.concurrency}return new C(P,j,R=typeof R=="number"&&isFinite(R)&&R>=1?R:0,H).promise()}x.inherits(C,f),C.prototype._asyncInit=function(){this._init$(void 0,-2)},C.prototype._init=function(){},C.prototype._promiseFulfilled=function(P,j){var N=this._values,H=this.length(),R=this._preservedValues,V=this._limit;if(j<0){if(N[j=-1*j-1]=P,V>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(V>=1&&this._inFlight>=V)return N[j]=P,this._queue.push(j),!1;R!==null&&(R[j]=P);var W=this._promise,ee=this._callback,q=W._boundValue();W._pushContext();var Q=b(ee).call(q,P,j,H),oe=W._popContext();if(v.checkForgottenReturns(Q,oe,R!==null?"Promise.filter":"Promise.map",W),Q===w)return this._reject(Q.e),!0;var le=p(Q,this._promise);if(le instanceof c){var G=(le=le._target())._bitField;if(!(50397184&G))return V>=1&&this._inFlight++,N[j]=le,le._proxy(this,-1*(j+1)),!1;if(!(33554432&G))return 16777216&G?(this._reject(le._reason()),!0):(this._cancel(),!0);Q=le._value()}N[j]=Q}return++this._totalResolved>=H&&(R!==null?this._filter(N,R):this._resolve(N),!0)},C.prototype._drainQueue=function(){for(var P=this._queue,j=this._limit,N=this._values;P.length>0&&this._inFlight1){m.deprecated("calling Promise.try with more than 1 argument");var S=arguments[1],C=arguments[2];b=v.isArray(S)?y(x).apply(C,S):y(x).call(C,S)}else b=y(x)();var k=w._popContext();return m.checkForgottenReturns(b,k,"Promise.try",w),w._resolveFromSyncValue(b),w},c.prototype._resolveFromSyncValue=function(x){x===v.errorObj?this._rejectCallback(x.e,!1):this._resolveCallback(x,!0)}}},{"./util":36}],20:[function(a,s,l){var c=a("./util"),f=c.maybeWrapAsError,d=a("./errors").OperationalError,p=a("./es5"),m=/^(?:name|message|stack|cause)$/;function v(y){var x;if(function(C){return C instanceof Error&&p.getPrototypeOf(C)===Error.prototype}(y)){(x=new d(y)).name=y.name,x.message=y.message,x.stack=y.stack;for(var b=p.keys(y),w=0;w0&&typeof arguments[b]=="function"&&(x=arguments[b]);var w=[].slice.call(arguments);x&&w.pop();var S=new f(w).promise();return x!==void 0?S.spread(x):S}}},{"./util":36}],18:[function(a,s,l){s.exports=function(c,f,d,p,g,v){var y=c._getDomain,x=a("./util"),b=x.tryCatch,w=x.errorObj,S=c._async;function C(P,j,N,H){this.constructor$(P),this._promise._captureStackTrace();var R=y();this._callback=R===null?j:x.domainBind(R,j),this._preservedValues=H===g?new Array(this.length()):null,this._limit=N,this._inFlight=0,this._queue=[],S.invoke(this._asyncInit,this,void 0)}function k(P,j,N,H){if(typeof j!="function")return d("expecting a function but got "+x.classString(j));var R=0;if(N!==void 0){if(typeof N!="object"||N===null)return c.reject(new TypeError("options argument must be an object but it is "+x.classString(N)));if(typeof N.concurrency!="number")return c.reject(new TypeError("'concurrency' must be a number but it is "+x.classString(N.concurrency)));R=N.concurrency}return new C(P,j,R=typeof R=="number"&&isFinite(R)&&R>=1?R:0,H).promise()}x.inherits(C,f),C.prototype._asyncInit=function(){this._init$(void 0,-2)},C.prototype._init=function(){},C.prototype._promiseFulfilled=function(P,j){var N=this._values,H=this.length(),R=this._preservedValues,V=this._limit;if(j<0){if(N[j=-1*j-1]=P,V>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(V>=1&&this._inFlight>=V)return N[j]=P,this._queue.push(j),!1;R!==null&&(R[j]=P);var W=this._promise,ee=this._callback,q=W._boundValue();W._pushContext();var Q=b(ee).call(q,P,j,H),oe=W._popContext();if(v.checkForgottenReturns(Q,oe,R!==null?"Promise.filter":"Promise.map",W),Q===w)return this._reject(Q.e),!0;var le=p(Q,this._promise);if(le instanceof c){var G=(le=le._target())._bitField;if(!(50397184&G))return V>=1&&this._inFlight++,N[j]=le,le._proxy(this,-1*(j+1)),!1;if(!(33554432&G))return 16777216&G?(this._reject(le._reason()),!0):(this._cancel(),!0);Q=le._value()}N[j]=Q}return++this._totalResolved>=H&&(R!==null?this._filter(N,R):this._resolve(N),!0)},C.prototype._drainQueue=function(){for(var P=this._queue,j=this._limit,N=this._values;P.length>0&&this._inFlight1){g.deprecated("calling Promise.try with more than 1 argument");var S=arguments[1],C=arguments[2];b=v.isArray(S)?y(x).apply(C,S):y(x).call(C,S)}else b=y(x)();var k=w._popContext();return g.checkForgottenReturns(b,k,"Promise.try",w),w._resolveFromSyncValue(b),w},c.prototype._resolveFromSyncValue=function(x){x===v.errorObj?this._rejectCallback(x.e,!1):this._resolveCallback(x,!0)}}},{"./util":36}],20:[function(a,s,l){var c=a("./util"),f=c.maybeWrapAsError,d=a("./errors").OperationalError,p=a("./es5"),g=/^(?:name|message|stack|cause)$/;function v(y){var x;if(function(C){return C instanceof Error&&p.getPrototypeOf(C)===Error.prototype}(y)){(x=new d(y)).name=y.name,x.message=y.message,x.stack=y.stack;for(var b=p.keys(y),w=0;w1){var ie,ae=new Array(K-1),he=0;for(ie=0;ie0&&typeof U!="function"&&typeof K!="function"){var ie=".then() only accepts functions but was passed: "+y.classString(U);arguments.length>1&&(ie+=", "+y.classString(K)),this._warn(ie)}return this._then(U,K,void 0,void 0,void 0)},F.prototype.done=function(U,K){this._then(U,K,void 0,void 0,void 0)._setIsFinal()},F.prototype.spread=function(U){return typeof U!="function"?d("expecting a function but got "+y.classString(U)):this.all()._then(U,void 0,void 0,j,void 0)},F.prototype.toJSON=function(){var U={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(U.fulfillmentValue=this.value(),U.isFulfilled=!0):this.isRejected()&&(U.rejectionReason=this.reason(),U.isRejected=!0),U},F.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new R(this).promise()},F.prototype.error=function(U){return this.caught(y.originatesFromRejection,U)},F.getNewLibraryCopy=s.exports,F.is=function(U){return U instanceof F},F.fromNode=F.fromCallback=function(U){var K=new F(P);K._captureStackTrace();var ie=arguments.length>1&&!!Object(arguments[1]).multiArgs,ae=G(U)(oe(K,ie));return ae===le&&K._rejectCallback(ae.e,!0),K._isFateSealed()||K._setAsyncGuaranteed(),K},F.all=function(U){return new R(U).promise()},F.cast=function(U){var K=H(U);return K instanceof F||((K=new F(P))._captureStackTrace(),K._setFulfilled(),K._rejectionHandler0=U),K},F.resolve=F.fulfilled=F.cast,F.reject=F.rejected=function(U){var K=new F(P);return K._captureStackTrace(),K._rejectCallback(U,!0),K},F.setScheduler=function(U){if(typeof U!="function")throw new C("expecting a function but got "+y.classString(U));return w.setScheduler(U)},F.prototype._then=function(U,K,ie,ae,he){var E=he!==void 0,M=E?he:new F(P),I=this._target(),J=I._bitField;E||(M._propagateFrom(this,3),M._captureStackTrace(),ae===void 0&&2097152&this._bitField&&(ae=50397184&J?this._boundValue():I===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,M));var X=m();if(50397184&J){var se,ge,De=I._settlePromiseCtx;33554432&J?(ge=I._rejectionHandler0,se=U):16777216&J?(ge=I._fulfillmentHandler0,se=K,I._unsetRejectionIsUnhandled()):(De=I._settlePromiseLateCancellationObserver,ge=new k("late cancellation observer"),I._attachExtraTrace(ge),se=K),w.invoke(De,I,{handler:X===null?se:typeof se=="function"&&y.domainBind(X,se),promise:M,receiver:ae,value:ge})}else I._addCallbacks(U,K,M,ae,X);return M},F.prototype._length=function(){return 65535&this._bitField},F.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},F.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},F.prototype._setLength=function(U){this._bitField=-65536&this._bitField|65535&U},F.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},F.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},F.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},F.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},F.prototype._isFinal=function(){return(4194304&this._bitField)>0},F.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},F.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},F.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},F.prototype._setAsyncGuaranteed=function(){w.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},F.prototype._receiverAt=function(U){var K=U===0?this._receiver0:this[4*U-4+3];if(K!==v)return K===void 0&&this._isBound()?this._boundValue():K},F.prototype._promiseAt=function(U){return this[4*U-4+2]},F.prototype._fulfillmentHandlerAt=function(U){return this[4*U-4+0]},F.prototype._rejectionHandlerAt=function(U){return this[4*U-4+1]},F.prototype._boundValue=function(){},F.prototype._migrateCallback0=function(U){U._bitField;var K=U._fulfillmentHandler0,ie=U._rejectionHandler0,ae=U._promise0,he=U._receiverAt(0);he===void 0&&(he=v),this._addCallbacks(K,ie,ae,he,null)},F.prototype._migrateCallbackAt=function(U,K){var ie=U._fulfillmentHandlerAt(K),ae=U._rejectionHandlerAt(K),he=U._promiseAt(K),E=U._receiverAt(K);E===void 0&&(E=v),this._addCallbacks(ie,ae,he,E,null)},F.prototype._addCallbacks=function(U,K,ie,ae,he){var E=this._length();if(E>=65531&&(E=0,this._setLength(0)),E===0)this._promise0=ie,this._receiver0=ae,typeof U=="function"&&(this._fulfillmentHandler0=he===null?U:y.domainBind(he,U)),typeof K=="function"&&(this._rejectionHandler0=he===null?K:y.domainBind(he,K));else{var M=4*E-4;this[M+2]=ie,this[M+3]=ae,typeof U=="function"&&(this[M+0]=he===null?U:y.domainBind(he,U)),typeof K=="function"&&(this[M+1]=he===null?K:y.domainBind(he,K))}return this._setLength(E+1),E},F.prototype._proxy=function(U,K){this._addCallbacks(void 0,void 0,K,U,null)},F.prototype._resolveCallback=function(U,K){if(!(117506048&this._bitField)){if(U===this)return this._rejectCallback(c(),!1);var ie=H(U,this);if(!(ie instanceof F))return this._fulfill(U);K&&this._propagateFrom(ie,2);var ae=ie._target();if(ae!==this){var he=ae._bitField;if(50397184&he)if(33554432&he)this._fulfill(ae._value());else if(16777216&he)this._reject(ae._reason());else{var I=new k("late cancellation observer");ae._attachExtraTrace(I),this._reject(I)}else{var E=this._length();E>0&&ae._migrateCallback0(this);for(var M=1;M>>16)){if(U===this){var ie=c();return this._attachExtraTrace(ie),this._reject(ie)}this._setFulfilled(),this._rejectionHandler0=U,(65535&K)>0&&(134217728&K?this._settlePromises():w.settlePromises(this))}},F.prototype._reject=function(U){var K=this._bitField;if(!((117506048&K)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=U,this._isFinal())return w.fatalError(U,y.isNode);(65535&K)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled()}},F.prototype._fulfillPromises=function(U,K){for(var ie=1;ie0){if(16842752&U){var ie=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,ie,U),this._rejectPromises(K,ie)}else{var ae=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,ae,U),this._fulfillPromises(K,ae)}this._setLength(0)}this._clearCancellationData()},F.prototype._settledValue=function(){var U=this._bitField;return 33554432&U?this._rejectionHandler0:16777216&U?this._fulfillmentHandler0:void 0},F.defer=F.pending=function(){return ee.deprecated("Promise.defer","new Promise"),{promise:new F(P),resolve:A,reject:z}},y.notEnumerableProp(F,"_makeSelfResolutionError",c),a("./method")(F,P,H,d,ee),a("./bind")(F,P,H,ee),a("./cancel")(F,R,d,ee),a("./direct_resolve")(F),a("./synchronous_inspection")(F),a("./join")(F,R,H,P,w,m),F.Promise=F,F.version="3.5.1",a("./map.js")(F,R,d,H,P,ee),a("./call_get.js")(F),a("./using.js")(F,d,H,W,P,ee),a("./timers.js")(F,P,ee),a("./generators.js")(F,d,P,H,p,ee),a("./nodeify.js")(F),a("./promisify.js")(F,P),a("./props.js")(F,R,H,d),a("./race.js")(F,P,H,d),a("./reduce.js")(F,R,d,H,P,ee),a("./settle.js")(F,R,ee),a("./some.js")(F,R,d),a("./filter.js")(F,P),a("./each.js")(F,P),a("./any.js")(F),y.toFastProperties(F),y.toFastProperties(F.prototype),re({a:1}),re({b:2}),re({c:3}),re(1),re(function(){}),re(void 0),re(!1),re(new F(P)),ee.setBounds(b.firstLineError,y.lastLineError),F}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(a,s,l){s.exports=function(c,f,d,p,m){var v=a("./util");function y(x){var b=this._promise=new c(f);x instanceof c&&b._propagateFrom(x,3),b._setOnCancel(this),this._values=x,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return v.isArray,v.inherits(y,m),y.prototype.length=function(){return this._length},y.prototype.promise=function(){return this._promise},y.prototype._init=function x(b,w){var S=d(this._values,this._promise);if(S instanceof c){var C=(S=S._target())._bitField;if(this._values=S,(50397184&C)==0)return this._promise._setAsyncGuaranteed(),S._then(x,this._reject,void 0,this,w);if(!(33554432&C))return 16777216&C?this._reject(S._reason()):this._cancel();S=S._value()}if((S=v.asArray(S))!==null)S.length!==0?this._iterate(S):w===-5?this._resolveEmptyArray():this._resolve(function(P){switch(w){case-2:return[];case-3:return{};case-6:return new Map}}());else{var k=p("expecting an array or an iterable object but got "+v.classString(S)).reason();this._promise._rejectCallback(k,!1)}},y.prototype._iterate=function(x){var b=this.getActualLength(x.length);this._length=b,this._values=this.shouldCopyValues()?new Array(b):this._values;for(var w=this._promise,S=!1,C=null,k=0;k=this._length&&(this._resolve(this._values),!0)},y.prototype._promiseCancelled=function(){return this._cancel(),!0},y.prototype._promiseRejected=function(x){return this._totalResolved++,this._reject(x),!0},y.prototype._resultCancelled=function(){if(!this._isResolved()){var x=this._values;if(this._cancel(),x instanceof c)x.cancel();else for(var b=0;b1){var ie,ae=new Array(K-1),he=0;for(ie=0;ie0&&typeof U!="function"&&typeof K!="function"){var ie=".then() only accepts functions but was passed: "+y.classString(U);arguments.length>1&&(ie+=", "+y.classString(K)),this._warn(ie)}return this._then(U,K,void 0,void 0,void 0)},F.prototype.done=function(U,K){this._then(U,K,void 0,void 0,void 0)._setIsFinal()},F.prototype.spread=function(U){return typeof U!="function"?d("expecting a function but got "+y.classString(U)):this.all()._then(U,void 0,void 0,j,void 0)},F.prototype.toJSON=function(){var U={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(U.fulfillmentValue=this.value(),U.isFulfilled=!0):this.isRejected()&&(U.rejectionReason=this.reason(),U.isRejected=!0),U},F.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new R(this).promise()},F.prototype.error=function(U){return this.caught(y.originatesFromRejection,U)},F.getNewLibraryCopy=s.exports,F.is=function(U){return U instanceof F},F.fromNode=F.fromCallback=function(U){var K=new F(P);K._captureStackTrace();var ie=arguments.length>1&&!!Object(arguments[1]).multiArgs,ae=G(U)(oe(K,ie));return ae===le&&K._rejectCallback(ae.e,!0),K._isFateSealed()||K._setAsyncGuaranteed(),K},F.all=function(U){return new R(U).promise()},F.cast=function(U){var K=H(U);return K instanceof F||((K=new F(P))._captureStackTrace(),K._setFulfilled(),K._rejectionHandler0=U),K},F.resolve=F.fulfilled=F.cast,F.reject=F.rejected=function(U){var K=new F(P);return K._captureStackTrace(),K._rejectCallback(U,!0),K},F.setScheduler=function(U){if(typeof U!="function")throw new C("expecting a function but got "+y.classString(U));return w.setScheduler(U)},F.prototype._then=function(U,K,ie,ae,he){var E=he!==void 0,M=E?he:new F(P),I=this._target(),J=I._bitField;E||(M._propagateFrom(this,3),M._captureStackTrace(),ae===void 0&&2097152&this._bitField&&(ae=50397184&J?this._boundValue():I===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,M));var X=g();if(50397184&J){var se,ge,De=I._settlePromiseCtx;33554432&J?(ge=I._rejectionHandler0,se=U):16777216&J?(ge=I._fulfillmentHandler0,se=K,I._unsetRejectionIsUnhandled()):(De=I._settlePromiseLateCancellationObserver,ge=new k("late cancellation observer"),I._attachExtraTrace(ge),se=K),w.invoke(De,I,{handler:X===null?se:typeof se=="function"&&y.domainBind(X,se),promise:M,receiver:ae,value:ge})}else I._addCallbacks(U,K,M,ae,X);return M},F.prototype._length=function(){return 65535&this._bitField},F.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},F.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},F.prototype._setLength=function(U){this._bitField=-65536&this._bitField|65535&U},F.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},F.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},F.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},F.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},F.prototype._isFinal=function(){return(4194304&this._bitField)>0},F.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},F.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},F.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},F.prototype._setAsyncGuaranteed=function(){w.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},F.prototype._receiverAt=function(U){var K=U===0?this._receiver0:this[4*U-4+3];if(K!==v)return K===void 0&&this._isBound()?this._boundValue():K},F.prototype._promiseAt=function(U){return this[4*U-4+2]},F.prototype._fulfillmentHandlerAt=function(U){return this[4*U-4+0]},F.prototype._rejectionHandlerAt=function(U){return this[4*U-4+1]},F.prototype._boundValue=function(){},F.prototype._migrateCallback0=function(U){U._bitField;var K=U._fulfillmentHandler0,ie=U._rejectionHandler0,ae=U._promise0,he=U._receiverAt(0);he===void 0&&(he=v),this._addCallbacks(K,ie,ae,he,null)},F.prototype._migrateCallbackAt=function(U,K){var ie=U._fulfillmentHandlerAt(K),ae=U._rejectionHandlerAt(K),he=U._promiseAt(K),E=U._receiverAt(K);E===void 0&&(E=v),this._addCallbacks(ie,ae,he,E,null)},F.prototype._addCallbacks=function(U,K,ie,ae,he){var E=this._length();if(E>=65531&&(E=0,this._setLength(0)),E===0)this._promise0=ie,this._receiver0=ae,typeof U=="function"&&(this._fulfillmentHandler0=he===null?U:y.domainBind(he,U)),typeof K=="function"&&(this._rejectionHandler0=he===null?K:y.domainBind(he,K));else{var M=4*E-4;this[M+2]=ie,this[M+3]=ae,typeof U=="function"&&(this[M+0]=he===null?U:y.domainBind(he,U)),typeof K=="function"&&(this[M+1]=he===null?K:y.domainBind(he,K))}return this._setLength(E+1),E},F.prototype._proxy=function(U,K){this._addCallbacks(void 0,void 0,K,U,null)},F.prototype._resolveCallback=function(U,K){if(!(117506048&this._bitField)){if(U===this)return this._rejectCallback(c(),!1);var ie=H(U,this);if(!(ie instanceof F))return this._fulfill(U);K&&this._propagateFrom(ie,2);var ae=ie._target();if(ae!==this){var he=ae._bitField;if(50397184&he)if(33554432&he)this._fulfill(ae._value());else if(16777216&he)this._reject(ae._reason());else{var I=new k("late cancellation observer");ae._attachExtraTrace(I),this._reject(I)}else{var E=this._length();E>0&&ae._migrateCallback0(this);for(var M=1;M>>16)){if(U===this){var ie=c();return this._attachExtraTrace(ie),this._reject(ie)}this._setFulfilled(),this._rejectionHandler0=U,(65535&K)>0&&(134217728&K?this._settlePromises():w.settlePromises(this))}},F.prototype._reject=function(U){var K=this._bitField;if(!((117506048&K)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=U,this._isFinal())return w.fatalError(U,y.isNode);(65535&K)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled()}},F.prototype._fulfillPromises=function(U,K){for(var ie=1;ie0){if(16842752&U){var ie=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,ie,U),this._rejectPromises(K,ie)}else{var ae=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,ae,U),this._fulfillPromises(K,ae)}this._setLength(0)}this._clearCancellationData()},F.prototype._settledValue=function(){var U=this._bitField;return 33554432&U?this._rejectionHandler0:16777216&U?this._fulfillmentHandler0:void 0},F.defer=F.pending=function(){return ee.deprecated("Promise.defer","new Promise"),{promise:new F(P),resolve:A,reject:z}},y.notEnumerableProp(F,"_makeSelfResolutionError",c),a("./method")(F,P,H,d,ee),a("./bind")(F,P,H,ee),a("./cancel")(F,R,d,ee),a("./direct_resolve")(F),a("./synchronous_inspection")(F),a("./join")(F,R,H,P,w,g),F.Promise=F,F.version="3.5.1",a("./map.js")(F,R,d,H,P,ee),a("./call_get.js")(F),a("./using.js")(F,d,H,W,P,ee),a("./timers.js")(F,P,ee),a("./generators.js")(F,d,P,H,p,ee),a("./nodeify.js")(F),a("./promisify.js")(F,P),a("./props.js")(F,R,H,d),a("./race.js")(F,P,H,d),a("./reduce.js")(F,R,d,H,P,ee),a("./settle.js")(F,R,ee),a("./some.js")(F,R,d),a("./filter.js")(F,P),a("./each.js")(F,P),a("./any.js")(F),y.toFastProperties(F),y.toFastProperties(F.prototype),re({a:1}),re({b:2}),re({c:3}),re(1),re(function(){}),re(void 0),re(!1),re(new F(P)),ee.setBounds(b.firstLineError,y.lastLineError),F}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(a,s,l){s.exports=function(c,f,d,p,g){var v=a("./util");function y(x){var b=this._promise=new c(f);x instanceof c&&b._propagateFrom(x,3),b._setOnCancel(this),this._values=x,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return v.isArray,v.inherits(y,g),y.prototype.length=function(){return this._length},y.prototype.promise=function(){return this._promise},y.prototype._init=function x(b,w){var S=d(this._values,this._promise);if(S instanceof c){var C=(S=S._target())._bitField;if(this._values=S,(50397184&C)==0)return this._promise._setAsyncGuaranteed(),S._then(x,this._reject,void 0,this,w);if(!(33554432&C))return 16777216&C?this._reject(S._reason()):this._cancel();S=S._value()}if((S=v.asArray(S))!==null)S.length!==0?this._iterate(S):w===-5?this._resolveEmptyArray():this._resolve(function(P){switch(w){case-2:return[];case-3:return{};case-6:return new Map}}());else{var k=p("expecting an array or an iterable object but got "+v.classString(S)).reason();this._promise._rejectCallback(k,!1)}},y.prototype._iterate=function(x){var b=this.getActualLength(x.length);this._length=b,this._values=this.shouldCopyValues()?new Array(b):this._values;for(var w=this._promise,S=!1,C=null,k=0;k=this._length&&(this._resolve(this._values),!0)},y.prototype._promiseCancelled=function(){return this._cancel(),!0},y.prototype._promiseRejected=function(x){return this._totalResolved++,this._reject(x),!0},y.prototype._resultCancelled=function(){if(!this._isResolved()){var x=this._values;if(this._cancel(),x instanceof c)x.cancel();else for(var b=0;b=this._length){var P;if(this._isMap)P=function(R){for(var V=new m,W=R.length/2|0,ee=0;ee>1},c.prototype.props=function(){return S(this)},c.props=function(C){return S(C)}}},{"./es5":13,"./util":36}],26:[function(a,s,l){function c(f){this._capacity=f,this._length=0,this._front=0}c.prototype._willBeOverCapacity=function(f){return this._capacity"u"){var p=i.setImmediate,m=r.nextTick;c=f.isRecentNode?function(y){p.call(i,y)}:function(y){m.call(r,y)}}else if(typeof d=="function"&&typeof d.resolve=="function"){var v=d.resolve();c=function(y){v.then(y)}}else c=typeof MutationObserver>"u"||typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)?o!==void 0?function(y){o(y)}:typeof setTimeout<"u"?function(y){setTimeout(y,0)}:function(){throw new Error(`No async scheduler available +`)}v.inherits(w,f),w.prototype._init=function(){},w.prototype._promiseFulfilled=function(C,k){if(this._values[k]=C,++this._totalResolved>=this._length){var P;if(this._isMap)P=function(R){for(var V=new g,W=R.length/2|0,ee=0;ee>1},c.prototype.props=function(){return S(this)},c.props=function(C){return S(C)}}},{"./es5":13,"./util":36}],26:[function(a,s,l){function c(f){this._capacity=f,this._length=0,this._front=0}c.prototype._willBeOverCapacity=function(f){return this._capacity"u"){var p=i.setImmediate,g=r.nextTick;c=f.isRecentNode?function(y){p.call(i,y)}:function(y){g.call(r,y)}}else if(typeof d=="function"&&typeof d.resolve=="function"){var v=d.resolve();c=function(y){v.then(y)}}else c=typeof MutationObserver>"u"||typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)?o!==void 0?function(y){o(y)}:typeof setTimeout<"u"?function(y){setTimeout(y,0)}:function(){throw new Error(`No async scheduler available See http://goo.gl/MqrFmX -`)}:function(){var y=document.createElement("div"),x={attributes:!0},b=!1,w=document.createElement("div");return new MutationObserver(function(){y.classList.toggle("foo"),b=!1}).observe(w,x),function(S){var C=new MutationObserver(function(){C.disconnect(),S()});C.observe(y,x),b||(b=!0,w.classList.toggle("foo"))}}();s.exports=c},{"./util":36}],30:[function(a,s,l){s.exports=function(c,f,d){var p=c.PromiseInspection;function m(v){this.constructor$(v)}a("./util").inherits(m,f),m.prototype._promiseResolved=function(v,y){return this._values[v]=y,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},m.prototype._promiseFulfilled=function(v,y){var x=new p;return x._bitField=33554432,x._settledValueField=v,this._promiseResolved(y,x)},m.prototype._promiseRejected=function(v,y){var x=new p;return x._bitField=16777216,x._settledValueField=v,this._promiseResolved(y,x)},c.settle=function(v){return d.deprecated(".settle()",".reflect()"),new m(v).promise()},c.prototype.settle=function(){return c.settle(this)}}},{"./util":36}],31:[function(a,s,l){s.exports=function(c,f,d){var p=a("./util"),m=a("./errors").RangeError,v=a("./errors").AggregateError,y=p.isArray,x={};function b(S){this.constructor$(S),this._howMany=0,this._unwrap=!1,this._initialized=!1}function w(S,C){if((0|C)!==C||C<0)return d(`expecting a positive integer +`)}:function(){var y=document.createElement("div"),x={attributes:!0},b=!1,w=document.createElement("div");return new MutationObserver(function(){y.classList.toggle("foo"),b=!1}).observe(w,x),function(S){var C=new MutationObserver(function(){C.disconnect(),S()});C.observe(y,x),b||(b=!0,w.classList.toggle("foo"))}}();s.exports=c},{"./util":36}],30:[function(a,s,l){s.exports=function(c,f,d){var p=c.PromiseInspection;function g(v){this.constructor$(v)}a("./util").inherits(g,f),g.prototype._promiseResolved=function(v,y){return this._values[v]=y,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},g.prototype._promiseFulfilled=function(v,y){var x=new p;return x._bitField=33554432,x._settledValueField=v,this._promiseResolved(y,x)},g.prototype._promiseRejected=function(v,y){var x=new p;return x._bitField=16777216,x._settledValueField=v,this._promiseResolved(y,x)},c.settle=function(v){return d.deprecated(".settle()",".reflect()"),new g(v).promise()},c.prototype.settle=function(){return c.settle(this)}}},{"./util":36}],31:[function(a,s,l){s.exports=function(c,f,d){var p=a("./util"),g=a("./errors").RangeError,v=a("./errors").AggregateError,y=p.isArray,x={};function b(S){this.constructor$(S),this._howMany=0,this._unwrap=!1,this._initialized=!1}function w(S,C){if((0|C)!==C||C<0)return d(`expecting a positive integer See http://goo.gl/MqrFmX -`);var k=new b(S),P=k.promise();return k.setHowMany(C),k.init(),P}p.inherits(b,f),b.prototype._init=function(){if(this._initialized)if(this._howMany!==0){this._init$(void 0,-5);var S=y(this._values);!this._isResolved()&&S&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},b.prototype.init=function(){this._initialized=!0,this._init()},b.prototype.setUnwrap=function(){this._unwrap=!0},b.prototype.howMany=function(){return this._howMany},b.prototype.setHowMany=function(S){this._howMany=S},b.prototype._promiseFulfilled=function(S){return this._addFulfilled(S),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},b.prototype._promiseRejected=function(S){return this._addRejected(S),this._checkOutcome()},b.prototype._promiseCancelled=function(){return this._values instanceof c||this._values==null?this._cancel():(this._addRejected(x),this._checkOutcome())},b.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var S=new v,C=this.length();C0?this._reject(S):this._cancel(),!0}return!1},b.prototype._fulfilled=function(){return this._totalResolved},b.prototype._rejected=function(){return this._values.length-this.length()},b.prototype._addRejected=function(S){this._values.push(S)},b.prototype._addFulfilled=function(S){this._values[this._totalResolved++]=S},b.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},b.prototype._getRangeError=function(S){var C="Input array must contain at least "+this._howMany+" items but contains only "+S+" items";return new m(C)},b.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},c.some=function(S,C){return w(S,C)},c.prototype.some=function(S){return w(this,S)},c._SomePromiseArray=b}},{"./errors":12,"./util":36}],32:[function(a,s,l){s.exports=function(c){function f(b){b!==void 0?(b=b._target(),this._bitField=b._bitField,this._settledValueField=b._isFateSealed()?b._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}f.prototype._settledValue=function(){return this._settledValueField};var d=f.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise +`);var k=new b(S),P=k.promise();return k.setHowMany(C),k.init(),P}p.inherits(b,f),b.prototype._init=function(){if(this._initialized)if(this._howMany!==0){this._init$(void 0,-5);var S=y(this._values);!this._isResolved()&&S&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},b.prototype.init=function(){this._initialized=!0,this._init()},b.prototype.setUnwrap=function(){this._unwrap=!0},b.prototype.howMany=function(){return this._howMany},b.prototype.setHowMany=function(S){this._howMany=S},b.prototype._promiseFulfilled=function(S){return this._addFulfilled(S),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},b.prototype._promiseRejected=function(S){return this._addRejected(S),this._checkOutcome()},b.prototype._promiseCancelled=function(){return this._values instanceof c||this._values==null?this._cancel():(this._addRejected(x),this._checkOutcome())},b.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var S=new v,C=this.length();C0?this._reject(S):this._cancel(),!0}return!1},b.prototype._fulfilled=function(){return this._totalResolved},b.prototype._rejected=function(){return this._values.length-this.length()},b.prototype._addRejected=function(S){this._values.push(S)},b.prototype._addFulfilled=function(S){this._values[this._totalResolved++]=S},b.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},b.prototype._getRangeError=function(S){var C="Input array must contain at least "+this._howMany+" items but contains only "+S+" items";return new g(C)},b.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},c.some=function(S,C){return w(S,C)},c.prototype.some=function(S){return w(this,S)},c._SomePromiseArray=b}},{"./errors":12,"./util":36}],32:[function(a,s,l){s.exports=function(c){function f(b){b!==void 0?(b=b._target(),this._bitField=b._bitField,this._settledValueField=b._isFateSealed()?b._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}f.prototype._settledValue=function(){return this._settledValueField};var d=f.prototype.value=function(){if(!this.isFulfilled())throw new TypeError(`cannot get fulfillment value of a non-fulfilled promise See http://goo.gl/MqrFmX `);return this._settledValue()},p=f.prototype.error=f.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise See http://goo.gl/MqrFmX -`);return this._settledValue()},m=f.prototype.isFulfilled=function(){return(33554432&this._bitField)!=0},v=f.prototype.isRejected=function(){return(16777216&this._bitField)!=0},y=f.prototype.isPending=function(){return(50397184&this._bitField)==0},x=f.prototype.isResolved=function(){return(50331648&this._bitField)!=0};f.prototype.isCancelled=function(){return(8454144&this._bitField)!=0},c.prototype.__isCancelled=function(){return(65536&this._bitField)==65536},c.prototype._isCancelled=function(){return this._target().__isCancelled()},c.prototype.isCancelled=function(){return(8454144&this._target()._bitField)!=0},c.prototype.isPending=function(){return y.call(this._target())},c.prototype.isRejected=function(){return v.call(this._target())},c.prototype.isFulfilled=function(){return m.call(this._target())},c.prototype.isResolved=function(){return x.call(this._target())},c.prototype.value=function(){return d.call(this._target())},c.prototype.reason=function(){var b=this._target();return b._unsetRejectionIsUnhandled(),p.call(b)},c.prototype._value=function(){return this._settledValue()},c.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},c.PromiseInspection=f}},{}],33:[function(a,s,l){s.exports=function(c,f){var d=a("./util"),p=d.errorObj,m=d.isObject,v={}.hasOwnProperty;return function(y,x){if(m(y)){if(y instanceof c)return y;var b=function(S){try{return function(C){return C.then}(S)}catch(C){return p.e=C,p}}(y);if(b===p){x&&x._pushContext();var w=c.reject(b.e);return x&&x._popContext(),w}if(typeof b=="function")return function(S){try{return v.call(S,"_promise0")}catch{return!1}}(y)?(w=new c(f),y._then(w._fulfill,w._reject,void 0,w,null),w):function(S,C,k){var P=new c(f),j=P;k&&k._pushContext(),P._captureStackTrace(),k&&k._popContext();var N=!0,H=d.tryCatch(C).call(S,function(R){P&&(P._resolveCallback(R),P=null)},function(R){P&&(P._rejectCallback(R,N,!0),P=null)});return N=!1,P&&H===p&&(P._rejectCallback(H.e,!0,!0),P=null),j}(y,b,x)}return y}}},{"./util":36}],34:[function(a,s,l){s.exports=function(c,f,d){var p=a("./util"),m=c.TimeoutError;function v(S){this.handle=S}v.prototype._resultCancelled=function(){clearTimeout(this.handle)};var y=function(S){return x(+this).thenReturn(S)},x=c.delay=function(S,C){var k,P;return C!==void 0?(k=c.resolve(C)._then(y,null,null,S,void 0),d.cancellation()&&C instanceof c&&k._setOnCancel(C)):(k=new c(f),P=setTimeout(function(){k._fulfill()},+S),d.cancellation()&&k._setOnCancel(new v(P)),k._captureStackTrace()),k._setAsyncGuaranteed(),k};function b(S){return clearTimeout(this.handle),S}function w(S){throw clearTimeout(this.handle),S}c.prototype.delay=function(S){return x(S,this)},c.prototype.timeout=function(S,C){var k,P;S=+S;var j=new v(setTimeout(function(){k.isPending()&&function(N,H,R){var V;V=typeof H!="string"?H instanceof Error?H:new m("operation timed out"):new m(H),p.markAsOriginatingFromRejection(V),N._attachExtraTrace(V),N._reject(V),R!=null&&R.cancel()}(k,C,P)},S));return d.cancellation()?(P=this.then(),(k=P._then(b,w,void 0,j,void 0))._setOnCancel(j)):k=this._then(b,w,void 0,j,void 0),k}}},{"./util":36}],35:[function(a,s,l){s.exports=function(c,f,d,p,m,v){var y=a("./util"),x=a("./errors").TypeError,b=a("./util").inherits,w=y.errorObj,S=y.tryCatch,C={};function k(V){setTimeout(function(){throw V},0)}function P(V,W){var ee=0,q=V.length,Q=new c(m);return function oe(){if(ee>=q)return Q._fulfill();var le=function(G){var F=d(G);return F!==G&&typeof G._isDisposable=="function"&&typeof G._getDisposer=="function"&&G._isDisposable()&&F._setDisposable(G._getDisposer()),F}(V[ee++]);if(le instanceof c&&le._isDisposable()){try{le=d(le._getDisposer().tryDispose(W),V.promise)}catch(G){return k(G)}if(le instanceof c)return le._then(oe,k,null,null,null)}oe()}(),Q}function j(V,W,ee){this._data=V,this._promise=W,this._context=ee}function N(V,W,ee){this.constructor$(V,W,ee)}function H(V){return j.isDisposer(V)?(this.resources[this.index]._setDisposable(V),V.promise()):V}function R(V){this.length=V,this.promise=null,this[V-1]=null}j.prototype.data=function(){return this._data},j.prototype.promise=function(){return this._promise},j.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():C},j.prototype.tryDispose=function(V){var W=this.resource(),ee=this._context;ee!==void 0&&ee._pushContext();var q=W!==C?this.doDispose(W,V):null;return ee!==void 0&&ee._popContext(),this._promise._unsetDisposable(),this._data=null,q},j.isDisposer=function(V){return V!=null&&typeof V.resource=="function"&&typeof V.tryDispose=="function"},b(N,j),N.prototype.doDispose=function(V,W){return this.data().call(V,V,W)},R.prototype._resultCancelled=function(){for(var V=this.length,W=0;W0},c.prototype._getDisposer=function(){return this._disposer},c.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},c.prototype.disposer=function(V){if(typeof V=="function")return new N(V,this,p());throw new x}}},{"./errors":12,"./util":36}],36:[function(a,s,l){var c,f=a("./es5"),d=typeof navigator>"u",p={e:{}},m=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:this!==void 0?this:null;function v(){try{var q=c;return c=null,q.apply(this,arguments)}catch(Q){return p.e=Q,p}}function y(q){return q==null||q===!0||q===!1||typeof q=="string"||typeof q=="number"}function x(q,Q,oe){if(y(q))return q;var le={value:oe,configurable:!0,enumerable:!1,writable:!0};return f.defineProperty(q,Q,le),q}var b=function(){var q=[Array.prototype,Object.prototype,Function.prototype],Q=function(G){for(var F=0;F1,le=Q.length>0&&!(Q.length===1&&Q[0]==="constructor"),G=w.test(q+"")&&f.names(q).length>0;if(oe||le||G)return!0}return!1}catch{return!1}},isIdentifier:function(q){return S.test(q)},inheritedDataKeys:b,getDataPropertyOrDefault:function(q,Q,oe){if(!f.isES5)return{}.hasOwnProperty.call(q,Q)?q[Q]:void 0;var le=Object.getOwnPropertyDescriptor(q,Q);return le!=null?le.get==null&&le.set==null?le.value:oe:void 0},thrower:function(q){throw q},isArray:f.isArray,asArray:H,notEnumerableProp:x,isPrimitive:y,isObject:function(q){return typeof q=="function"||typeof q=="object"&&q!==null},isError:k,canEvaluate:d,errorObj:p,tryCatch:function(q){return c=q,v},inherits:function(q,Q){var oe={}.hasOwnProperty;function le(){for(var G in this.constructor=q,this.constructor$=Q,Q.prototype)oe.call(Q.prototype,G)&&G.charAt(G.length-1)!=="$"&&(this[G+"$"]=Q.prototype[G])}return le.prototype=Q.prototype,q.prototype=new le,q.prototype},withAppended:function(q,Q){var oe,le=q.length,G=new Array(le+1);for(oe=0;oe10||q[0]>0}(),ee.isNode&&ee.toFastProperties(r);try{throw new Error}catch(q){ee.lastLineError=q}s.exports=ee},{"./es5":13}]},{},[4])(4),typeof window<"u"&&window!==null?window.P=window.Promise:typeof self<"u"&&self!==null&&(self.P=self.Promise)}).call(this,n(4),n(0),n(11).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,i){if(!i.eol&&r){for(var o=0,a=r.length;o=q)return Q._fulfill();var le=function(G){var F=d(G);return F!==G&&typeof G._isDisposable=="function"&&typeof G._getDisposer=="function"&&G._isDisposable()&&F._setDisposable(G._getDisposer()),F}(V[ee++]);if(le instanceof c&&le._isDisposable()){try{le=d(le._getDisposer().tryDispose(W),V.promise)}catch(G){return k(G)}if(le instanceof c)return le._then(oe,k,null,null,null)}oe()}(),Q}function j(V,W,ee){this._data=V,this._promise=W,this._context=ee}function N(V,W,ee){this.constructor$(V,W,ee)}function H(V){return j.isDisposer(V)?(this.resources[this.index]._setDisposable(V),V.promise()):V}function R(V){this.length=V,this.promise=null,this[V-1]=null}j.prototype.data=function(){return this._data},j.prototype.promise=function(){return this._promise},j.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():C},j.prototype.tryDispose=function(V){var W=this.resource(),ee=this._context;ee!==void 0&&ee._pushContext();var q=W!==C?this.doDispose(W,V):null;return ee!==void 0&&ee._popContext(),this._promise._unsetDisposable(),this._data=null,q},j.isDisposer=function(V){return V!=null&&typeof V.resource=="function"&&typeof V.tryDispose=="function"},b(N,j),N.prototype.doDispose=function(V,W){return this.data().call(V,V,W)},R.prototype._resultCancelled=function(){for(var V=this.length,W=0;W0},c.prototype._getDisposer=function(){return this._disposer},c.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},c.prototype.disposer=function(V){if(typeof V=="function")return new N(V,this,p());throw new x}}},{"./errors":12,"./util":36}],36:[function(a,s,l){var c,f=a("./es5"),d=typeof navigator>"u",p={e:{}},g=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:this!==void 0?this:null;function v(){try{var q=c;return c=null,q.apply(this,arguments)}catch(Q){return p.e=Q,p}}function y(q){return q==null||q===!0||q===!1||typeof q=="string"||typeof q=="number"}function x(q,Q,oe){if(y(q))return q;var le={value:oe,configurable:!0,enumerable:!1,writable:!0};return f.defineProperty(q,Q,le),q}var b=function(){var q=[Array.prototype,Object.prototype,Function.prototype],Q=function(G){for(var F=0;F1,le=Q.length>0&&!(Q.length===1&&Q[0]==="constructor"),G=w.test(q+"")&&f.names(q).length>0;if(oe||le||G)return!0}return!1}catch{return!1}},isIdentifier:function(q){return S.test(q)},inheritedDataKeys:b,getDataPropertyOrDefault:function(q,Q,oe){if(!f.isES5)return{}.hasOwnProperty.call(q,Q)?q[Q]:void 0;var le=Object.getOwnPropertyDescriptor(q,Q);return le!=null?le.get==null&&le.set==null?le.value:oe:void 0},thrower:function(q){throw q},isArray:f.isArray,asArray:H,notEnumerableProp:x,isPrimitive:y,isObject:function(q){return typeof q=="function"||typeof q=="object"&&q!==null},isError:k,canEvaluate:d,errorObj:p,tryCatch:function(q){return c=q,v},inherits:function(q,Q){var oe={}.hasOwnProperty;function le(){for(var G in this.constructor=q,this.constructor$=Q,Q.prototype)oe.call(Q.prototype,G)&&G.charAt(G.length-1)!=="$"&&(this[G+"$"]=Q.prototype[G])}return le.prototype=Q.prototype,q.prototype=new le,q.prototype},withAppended:function(q,Q){var oe,le=q.length,G=new Array(le+1);for(oe=0;oe10||q[0]>0}(),ee.isNode&&ee.toFastProperties(r);try{throw new Error}catch(q){ee.lastLineError=q}s.exports=ee},{"./es5":13}]},{},[4])(4),typeof window<"u"&&window!==null?window.P=window.Promise:typeof self<"u"&&self!==null&&(self.P=self.Promise)}).call(this,n(4),n(0),n(11).setImmediate)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,i){if(!i.eol&&r){for(var o=0,a=r.length;o0?(typeof z=="string"||ae.objectMode||Object.getPrototypeOf(z)===f.prototype||(z=function(he){return f.from(he)}(z)),U?ae.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):P(A,ae,z,!0):ae.ended?A.emit("error",new Error("stream.push() after EOF")):(ae.reading=!1,ae.decoder&&!re?(z=ae.decoder.write(z),ae.objectMode||z.length!==0?P(A,ae,z,!1):V(A,ae)):P(A,ae,z,!1))):U||(ae.reading=!1)),function(he){return!he.ended&&(he.needReadable||he.lengthz.highWaterMark&&(z.highWaterMark=function(re){return re>=j?re=j:(re--,re|=re>>>1,re|=re>>>2,re|=re>>>4,re|=re>>>8,re|=re>>>16,re++),re}(A)),A<=z.length?A:z.ended?z.length:(z.needReadable=!0,0))}function H(A){var z=A._readableState;z.needReadable=!1,z.emittedReadable||(v("emitReadable",z.flowing),z.emittedReadable=!0,z.sync?o.nextTick(R,A):R(A))}function R(A){v("emit readable"),A.emit("readable"),Q(A)}function V(A,z){z.readingMore||(z.readingMore=!0,o.nextTick(W,A,z))}function W(A,z){for(var re=z.length;!z.reading&&!z.flowing&&!z.ended&&z.length=z.length?(re=z.decoder?z.buffer.join(""):z.buffer.length===1?z.buffer.head.data:z.buffer.concat(z.length),z.buffer.clear()):re=function(U,K,ie){var ae;return UX.length?X.length:he;if(se===X.length?J+=X:J+=X.slice(0,he),(he-=se)==0){se===X.length?(++I,M.next?E.head=M.next:E.head=E.tail=null):(E.head=M,M.data=X.slice(se));break}++I}return E.length-=I,J}(U,K):function(he,E){var M=f.allocUnsafe(he),I=E.head,J=1;for(I.data.copy(M),he-=I.data.length;I=I.next;){var X=I.data,se=he>X.length?X.length:he;if(X.copy(M,M.length-he,0,se),(he-=se)==0){se===X.length?(++J,I.next?E.head=I.next:E.head=E.tail=null):(E.head=I,I.data=X.slice(se));break}++J}return E.length-=J,M}(U,K),ae}(A,z.buffer,z.decoder),re);var re}function le(A){var z=A._readableState;if(z.length>0)throw new Error('"endReadable()" called on non-empty stream');z.endEmitted||(z.ended=!0,o.nextTick(G,z,A))}function G(A,z){A.endEmitted||A.length!==0||(A.endEmitted=!0,z.readable=!1,z.emit("end"))}function F(A,z){for(var re=0,U=A.length;re=z.highWaterMark||z.ended))return v("read: emitReadable",z.length,z.ended),z.length===0&&z.ended?le(this):H(this),null;if((A=N(A,z))===0&&z.ended)return z.length===0&&le(this),null;var U,K=z.needReadable;return v("need readable",K),(z.length===0||z.length-A0?oe(A,z):null)===null?(z.needReadable=!0,A=0):z.length-=A,z.length===0&&(z.ended||(z.needReadable=!0),re!==A&&z.ended&&le(this)),U!==null&&this.emit("data",U),U},C.prototype._read=function(A){this.emit("error",new Error("_read() is not implemented"))},C.prototype.pipe=function(A,z){var re=this,U=this._readableState;switch(U.pipesCount){case 0:U.pipes=A;break;case 1:U.pipes=[U.pipes,A];break;default:U.pipes.push(A)}U.pipesCount+=1,v("pipe count=%d opts=%j",U.pipesCount,z);var K=z&&z.end===!1||A===i.stdout||A===i.stderr?se:ie;function ie(){v("onend"),A.end()}U.endEmitted?o.nextTick(K):re.once("end",K),A.on("unpipe",function ge(De,ue){v("onunpipe"),De===re&&ue&&ue.hasUnpiped===!1&&(ue.hasUnpiped=!0,v("cleanup"),A.removeListener("close",J),A.removeListener("finish",X),A.removeListener("drain",ae),A.removeListener("error",I),A.removeListener("unpipe",ge),re.removeListener("end",ie),re.removeListener("end",se),re.removeListener("data",M),he=!0,!U.awaitDrain||A._writableState&&!A._writableState.needDrain||ae())});var ae=function(ge){return function(){var De=ge._readableState;v("pipeOnDrain",De.awaitDrain),De.awaitDrain&&De.awaitDrain--,De.awaitDrain===0&&l(ge,"data")&&(De.flowing=!0,Q(ge))}}(re);A.on("drain",ae);var he=!1,E=!1;function M(ge){v("ondata"),E=!1,A.write(ge)!==!1||E||((U.pipesCount===1&&U.pipes===A||U.pipesCount>1&&F(U.pipes,A)!==-1)&&!he&&(v("false write response, pause",re._readableState.awaitDrain),re._readableState.awaitDrain++,E=!0),re.pause())}function I(ge){v("onerror",ge),se(),A.removeListener("error",I),l(A,"error")===0&&A.emit("error",ge)}function J(){A.removeListener("finish",X),se()}function X(){v("onfinish"),A.removeListener("close",J),se()}function se(){v("unpipe"),re.unpipe(A)}return re.on("data",M),function(ge,De,ue){if(typeof ge.prependListener=="function")return ge.prependListener(De,ue);ge._events&&ge._events[De]?s(ge._events[De])?ge._events[De].unshift(ue):ge._events[De]=[ue,ge._events[De]]:ge.on(De,ue)}(A,"error",I),A.once("close",J),A.once("finish",X),A.emit("pipe",re),U.flowing||(v("pipe resume"),re.resume()),A},C.prototype.unpipe=function(A){var z=this._readableState,re={hasUnpiped:!1};if(z.pipesCount===0)return this;if(z.pipesCount===1)return A&&A!==z.pipes?this:(A||(A=z.pipes),z.pipes=null,z.pipesCount=0,z.flowing=!1,A&&A.emit("unpipe",this,re),this);if(!A){var U=z.pipes,K=z.pipesCount;z.pipes=null,z.pipesCount=0,z.flowing=!1;for(var ie=0;ie>5==6?2:v>>4==14?3:v>>3==30?4:v>>6==2?-1:-2}function s(v){var y=this.lastTotal-this.lastNeed,x=function(b,w,S){if((192&w[0])!=128)return b.lastNeed=0,"�";if(b.lastNeed>1&&w.length>1){if((192&w[1])!=128)return b.lastNeed=1,"�";if(b.lastNeed>2&&w.length>2&&(192&w[2])!=128)return b.lastNeed=2,"�"}}(this,v);return x!==void 0?x:this.lastNeed<=v.length?(v.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(v.copy(this.lastChar,y,0,v.length),void(this.lastNeed-=v.length))}function l(v,y){if((v.length-y)%2==0){var x=v.toString("utf16le",y);if(x){var b=x.charCodeAt(x.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",y,v.length-1)}function c(v){var y=v&&v.length?this.write(v):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,x)}return y}function f(v,y){var x=(v.length-y)%3;return x===0?v.toString("base64",y):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",y,v.length-x))}function d(v){var y=v&&v.length?this.write(v):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(v){return v.toString(this.encoding)}function m(v){return v&&v.length?this.write(v):""}t.StringDecoder=o,o.prototype.write=function(v){if(v.length===0)return"";var y,x;if(this.lastNeed){if((y=this.fillLast(v))===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0?(P>0&&(w.lastNeed=P-1),P):--k=0?(P>0&&(w.lastNeed=P-2),P):--k=0?(P>0&&(P===2?P=0:w.lastNeed=P-3),P):0}(this,v,y);if(!this.lastNeed)return v.toString("utf8",y);this.lastTotal=x;var b=v.length-(x-this.lastNeed);return v.copy(this.lastChar,0,b),v.toString("utf8",y,b)},o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length}},function(e,t,n){e.exports=o;var r=n(1),i=n(5);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l),this._transformState={afterTransform:(function(c,f){var d=this._transformState;d.transforming=!1;var p=d.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,f!=null&&this.push(f),p(c);var m=this._readableState;m.reading=!1,(m.needReadable||m.length-1&&a.push(i[s]);return a},t.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},t.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)s.hasOwnProperty(l)&&(a[l]=s[l])};return function(a,s){function l(){this.constructor=a}o(a,s),a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function a(s,l,c){var f=o.call(this,"Error: "+s+". JSON Line number: "+l+(c?" near: "+c:""))||this;return f.err=s,f.line=l,f.extra=c,f.name="CSV Parse Error",f}return r(a,o),a.column_mismatched=function(s,l){return new a("column_mismatched",s,l)},a.unclosed_quote=function(s,l){return new a("unclosed_quote",s,l)},a.fromJSON=function(s){return new a(s.err,s.line,s.extra)},a.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},a}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),a=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":a&&a in Object(s)?i(s):o(s)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(33)},function(e,t,n){var r=n(34),i=function(o,a){return new r.Converter(o,a)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var x in y)y.hasOwnProperty(x)&&(v[x]=y[x])};return function(v,y){function x(){this.constructor=v}m(v,y),v.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),o=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(36),s=n(50),l=n(51),c=o(n(15)),f=n(52),d=n(105),p=function(m){function v(y,x){x===void 0&&(x={});var b=m.call(this,x)||this;return b.options=x,b.params=s.mergeParams(y),b.runtime=l.initParseRuntime(b),b.result=new d.Result(b),b.processor=new f.ProcessorLocal(b),b.once("error",function(w){r(function(){b.result.processError(w),b.emit("done",w)})}),b.once("done",function(){b.processor.destroy()}),b}return i(v,m),v.prototype.preRawData=function(y){return this.runtime.preRawDataHook=y,this},v.prototype.preFileLine=function(y){return this.runtime.preFileLineHook=y,this},v.prototype.subscribe=function(y,x,b){return this.parseRuntime.subscribe={onNext:y,onError:x,onCompleted:b},this},v.prototype.fromFile=function(y,x){var b=this,w=n(!function(){var S=new Error("Cannot find module 'fs'");throw S.code="MODULE_NOT_FOUND",S}());return w.exists(y,function(S){S?w.createReadStream(y,x).pipe(b):b.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},v.prototype.fromStream=function(y){return y.pipe(this),this},v.prototype.fromString=function(y){y.toString();var x=new a.Readable,b=0;return x._read=function(w){if(b>=y.length)this.push(null);else{var S=y.substr(b,w);this.push(S),b+=w}},this.fromStream(x)},v.prototype.then=function(y,x){var b=this;return new c.default(function(w,S){b.parseRuntime.then={onfulfilled:function(C){w(y?y(C):C)},onrejected:function(C){x?w(x(C)):S(C)}}})},Object.defineProperty(v.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),v.prototype._transform=function(y,x,b){var w=this;this.processor.process(y).then(function(S){if(S.length>0)return w.runtime.started=!0,w.result.processResult(S)}).then(function(){w.emit("drained"),b()},function(S){w.runtime.hasError=!0,w.runtime.error=S,w.emit("error",S),b()})},v.prototype._flush=function(y){var x=this;this.processor.flush().then(function(b){if(b.length>0)return x.result.processResult(b)}).then(function(){x.processEnd(y)},function(b){x.emit("error",b),y()})},v.prototype.processEnd=function(y){this.result.endProcess(),this.emit("done"),y()},Object.defineProperty(v.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),v}(a.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,a){if(!o.setImmediate){var s,l=1,c={},f=!1,d=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?s=function(y){i.nextTick(function(){v(y)})}:function(){if(o.postMessage&&!o.importScripts){var y=!0,x=o.onmessage;return o.onmessage=function(){y=!1},o.postMessage("","*"),o.onmessage=x,y}}()?function(){var y="setImmediate$"+Math.random()+"$",x=function(b){b.source===o&&typeof b.data=="string"&&b.data.indexOf(y)===0&&v(+b.data.slice(y.length))};o.addEventListener?o.addEventListener("message",x,!1):o.attachEvent("onmessage",x),s=function(b){o.postMessage(y+b,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(x){v(x.data)},s=function(x){y.port2.postMessage(x)}}():d&&"onreadystatechange"in d.createElement("script")?function(){var y=d.documentElement;s=function(x){var b=d.createElement("script");b.onreadystatechange=function(){v(x),b.onreadystatechange=null,y.removeChild(b),b=null},y.appendChild(b)}}():s=function(y){setTimeout(v,0,y)},p.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var x=new Array(arguments.length-1),b=0;b"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(e,t,n){e.exports=i;var r=n(12).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(13),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,a){var s=this;function l(y){o.writable&&o.write(y)===!1&&s.pause&&s.pause()}function c(){s.readable&&s.resume&&s.resume()}s.on("data",l),o.on("drain",c),o._isStdio||a&&a.end===!1||(s.on("end",d),s.on("close",p));var f=!1;function d(){f||(f=!0,o.end())}function p(){f||(f=!0,typeof o.destroy=="function"&&o.destroy())}function m(y){if(v(),r.listenerCount(this,"error")===0)throw y}function v(){s.removeListener("data",l),o.removeListener("drain",c),s.removeListener("end",d),s.removeListener("close",p),s.removeListener("error",m),o.removeListener("error",m),s.removeListener("end",v),s.removeListener("close",v),o.removeListener("close",v)}return s.on("error",m),o.on("error",m),s.on("end",v),s.on("close",v),o.on("close",v),o.emit("pipe",s),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(p){var m=c(p),v=m[0],y=m[1];return 3*(v+y)/4-y},t.toByteArray=function(p){for(var m,v=c(p),y=v[0],x=v[1],b=new o(3*(y+x)/4-x),w=0,S=x>0?y-4:y,C=0;C>16&255,b[w++]=m>>8&255,b[w++]=255&m;return x===2&&(m=i[p.charCodeAt(C)]<<2|i[p.charCodeAt(C+1)]>>4,b[w++]=255&m),x===1&&(m=i[p.charCodeAt(C)]<<10|i[p.charCodeAt(C+1)]<<4|i[p.charCodeAt(C+2)]>>2,b[w++]=m>>8&255,b[w++]=255&m),b},t.fromByteArray=function(p){for(var m,v=p.length,y=v%3,x=[],b=0,w=v-y;bw?w:b+16383));return y===1?(m=p[v-1],x.push(r[m>>2]+r[m<<4&63]+"==")):y===2&&(m=(p[v-2]<<8)+p[v-1],x.push(r[m>>10]+r[m>>4&63]+r[m<<2&63]+"=")),x.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var v=p.indexOf("=");return v===-1&&(v=m),[v,v===m?0:4-v%4]}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function d(p,m,v){for(var y,x=[],b=m;b>1,p=-7,m=i?a-1:0,v=i?-1:1,y=n[r+m];for(m+=v,s=y&(1<<-p)-1,y>>=-p,p+=c;p>0;s=256*s+n[r+m],m+=v,p-=8);for(l=s&(1<<-p)-1,s>>=-p,p+=o;p>0;l=256*l+n[r+m],m+=v,p-=8);if(s===0)s=1-d;else{if(s===f)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),s-=d}return(y?-1:1)*l*Math.pow(2,s-o)},t.write=function(n,r,i,o,a,s){var l,c,f,d=8*s-a-1,p=(1<>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:s-1,x=o?1:-1,b=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,l=p):(l=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-l))<1&&(l--,f*=2),(r+=l+m>=1?v/f:v*Math.pow(2,1-m))*f>=2&&(l++,f/=2),l+m>=p?(c=0,l=p):l+m>=1?(c=(r*f-1)*Math.pow(2,a),l+=m):(c=r*Math.pow(2,m-1)*Math.pow(2,a),l=0));a>=8;n[i+y]=255&c,y+=x,c/=256,a-=8);for(l=l<0;n[i+y]=255&l,y+=x,l/=256,d-=8);n[i+y-x]|=128*b}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t){},function(e,t,n){var r=n(7).Buffer,i=n(43);function o(a,s,l){a.copy(s,l)}e.exports=function(){function a(){(function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(s){var l={data:s,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},a.prototype.unshift=function(s){var l={data:s,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},a.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(s){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=s+l.data;return c},a.prototype.concat=function(s){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(s>>>0),c=this.head,f=0;c;)o(c.data,l,f),f+=c.data.length,c=c.next;return l},a}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var a=i.inspect({length:this.length});return this.constructor.name+" "+a})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var a=r.localStorage[o];return a!=null&&String(a).toLowerCase()==="true"}e.exports=function(o,a){if(i("noDeprecation"))return o;var s=!1;return function(){if(!s){if(i("throwDeprecation"))throw new Error(a);i("traceDeprecation")?console.trace(a):console.warn(a),s=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=o;var r=n(27),i=n(5);function o(a){if(!(this instanceof o))return new o(a);r.call(this,a)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(a,s,l){l(null,a)}},function(e,t,n){e.exports=n(14)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(13).Transform},function(e,t,n){e.exports=n(13).PassThrough},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(r){var i={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};for(var o in r||(r={}),r)r.hasOwnProperty(o)&&(Array.isArray(r[o])?i[o]=[].concat(r[o]):i[o]=r[o]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var S in w)w.hasOwnProperty(S)&&(b[S]=w[S])};return function(b,w){function S(){this.constructor=b}x(b,w),b.prototype=w===null?Object.create(w):(S.prototype=w.prototype,new S)}}(),o=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(53),s=o(n(15)),l=n(54),c=o(n(16)),f=n(57),d=n(28),p=n(58),m=o(n(59)),v=o(n(29)),y=function(x){function b(){var w=x!==null&&x.apply(this,arguments)||this;return w.rowSplit=new p.RowSplit(w.converter),w.eolEmitted=!1,w._needEmitEol=void 0,w.headEmitted=!1,w._needEmitHead=void 0,w}return i(b,x),b.prototype.flush=function(){var w=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var S=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(S,!0).then(function(C){return w.runtime.csvLineBuffer&&w.runtime.csvLineBuffer.length>0?s.default.reject(v.default.unclosed_quote(w.runtime.parsedLineNumber,w.runtime.csvLineBuffer.toString())):s.default.resolve(C)})}return s.default.resolve([])},b.prototype.destroy=function(){return s.default.resolve()},Object.defineProperty(b.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),b.prototype.process=function(w,S){var C,k=this;return S===void 0&&(S=!1),C=S?w.toString():l.prepareData(w,this.converter.parseRuntime),s.default.resolve().then(function(){return k.runtime.preRawDataHook?k.runtime.preRawDataHook(C):C}).then(function(P){return P&&P.length>0?k.processCSV(P,S):s.default.resolve([])})},b.prototype.processCSV=function(w,S){var C=this,k=this.params,P=this.runtime;P.eol||c.default(w,P),this.needEmitEol&&!this.eolEmitted&&P.eol&&(this.converter.emit("eol",P.eol),this.eolEmitted=!0),k.ignoreEmpty&&!P.started&&(w=d.trimLeft(w));var j=f.stringToLines(w,P);return S?(j.lines.push(j.partial),j.partial=""):this.prependLeftBuf(d.bufFromString(j.partial)),j.lines.length>0?(P.preFileLineHook?this.runPreLineHook(j.lines):s.default.resolve(j.lines)).then(function(N){return P.started||C.runtime.headers?C.processCSVBody(N):C.processDataWithHead(N)}):s.default.resolve([])},b.prototype.processDataWithHead=function(w){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var S="",C=[];w.length;){var k=S+w.shift(),P=this.rowSplit.parse(k);if(P.closed){C=P.cells,S="";break}S=k+c.default(k,this.runtime)}if(this.prependLeftBuf(d.bufFromString(S)),C.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=C}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(w)},b.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var w=this.runtime.headers,S=0;S=j.length)R();else if(N.preFileLineHook){var V=j[H],W=N.preFileLineHook(V,N.parsedLineNumber+H);if(H++,W&&W.then)W.then(function(ee){j[H-1]=ee,P(j,N,H,R)});else{for(j[H-1]=W;H0?r.concat([d.csvLineBuffer,f]):f}(a,s);s.csvLineBuffer=void 0;var c=function(f,d){var p=f.length-1;if(128&f[p]){for(;(192&f[p])==128;)p--;p--}return p!=f.length-1?(d.csvLineBuffer=f.slice(p+1),f.slice(0,p+1)):f}(l,s).toString("utf8");return s.started===!1?o.default(c):c}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(o){return typeof o=="string"&&o.charCodeAt(0)===65279?o.slice(1):r.isBuffer(o)&&i(o)&&o[0]===239&&o[1]===187&&o[2]===191?o.slice(3):o}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),l.prototype.parse=function(c){if(c.length===0||this.conv.parseParam.ignoreEmpty&&c.trim().length===0)return{cells:[],closed:!0};var f=this.quote,d=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(c)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,m=c.split(p);if(f==="off"){if(d)for(var v=0;vd&&(p=m,d=v)}),p},l.prototype.isQuoteOpen=function(c){var f=this.quote,d=this.escape;return c[0]===f&&(c[1]!==f||c[1]===d&&(c[2]===f||c.length===2))},l.prototype.isQuoteClose=function(c){var f=this.quote,d=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,m=c.length-1;c[m]===f||c[m]===d;)m--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){var f="es|"+this.quote+"|"+this.escape;this.cachedRegExp[f]===void 0&&(this.cachedRegExp[f]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var d=this.cachedRegExp[f];return c.replace(d,this.quote)},l.prototype.parseMultiLines=function(c){for(var f=[],d="";c.length;){var p=d+c.shift(),m=this.parse(p);m.cells.length===0&&this.conv.parseParam.ignoreEmpty||(m.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?f.push(o.filterArray(m.cells,this.conv.parseRuntime.selectedColumns)):f.push(m.cells),d=""):d=p+(i.default(p,this.conv.parseRuntime)||` -`))}return{rowsCells:f,partial:d}},l}();t.RowSplit=s},function(e,t,n){var r=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),a=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function s(b,w,S){if(w.parseParam.checkColumn&&w.parseRuntime.headers&&b.length!==w.parseRuntime.headers.length)throw i.default.column_mismatched(w.parseRuntime.parsedLineNumber+S);return function(C,k,P){for(var j=!1,N={},H=0,R=C.length;H-1){for(var P=w.split("."),j=!0;P.length>0;)if(P.shift().length===0){j=!1;break}!j||C.parseParam.colParser[w]&&C.parseParam.colParser[w].flat?C.parseRuntime.columnValueSetter[k]=d:C.parseRuntime.columnValueSetter[k]=p}else C.parseRuntime.columnValueSetter[k]=d;C.parseParam.nullObject===!0&&S==="null"&&(S=null),C.parseRuntime.columnValueSetter[k](b,w,S)}function d(b,w,S){b[w]=S}function p(b,w,S){o.default(b,w,S)}function m(b,w,S,C){return C.parseRuntime.headerType[S]?C.parseRuntime.headerType[S]:w.indexOf("number#!")>-1?C.parseRuntime.headerType[S]=v:w.indexOf("string#!")>-1?C.parseRuntime.headerType[S]=y:C.parseParam.checkType?C.parseRuntime.headerType[S]=x:C.parseRuntime.headerType[S]=y}function v(b){var w=parseFloat(b);return isNaN(w)?b:w}function y(b){return b.toString()}function x(b){var w=b.trim();return w===""?y(b):a.test(w)?v(b):w.length===5&&w.toLowerCase()==="false"||w.length===4&&w.toLowerCase()==="true"?function(S){var C=S.trim();return C.length!==5||C.toLowerCase()!=="false"}(b):w[0]==="{"&&w[w.length-1]==="}"||w[0]==="["&&w[w.length-1]==="]"?function(S){try{return JSON.parse(S)}catch{return S}}(b):y(b)}},function(e,t,n){var r=n(61);e.exports=function(i,o,a){return i==null?i:r(i,o,a)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),a=n(20),s=n(104);e.exports=function(l,c,f,d){if(!a(l))return l;for(var p=-1,m=(c=i(c,l)).length,v=m-1,y=l;y!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var a=this.__data__,s=r(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}},function(e,t,n){var r=n(17)(n(19),"Map");e.exports=r},function(e,t,n){var r=n(10);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(10);e.exports=function(i,o){var a=r(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}},function(e,t,n){var r=n(101);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(18),i=n(102),o=n(21),a=n(22),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function c(f){if(typeof f=="string")return f;if(o(f))return i(f,c)+"";if(a(f))return l?l.call(f):"";var d=f+"";return d=="0"&&1/f==-1/0?"-0":d}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,a=Array(o);++i-1&&r%1==0&&r0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),l.prototype.processResult=function(c){var f=this,d=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&d===0&&s(this.converter,"["+o.EOL),new i.default(function(p,m){f.needEmitLine?function v(y,x,b,w,S){if(b>=y.length)S();else if(x.parseRuntime.subscribe&&x.parseRuntime.subscribe.onNext){var C=x.parseRuntime.subscribe.onNext,k=y[b],P=C(k,x.parseRuntime.parsedLineNumber+b);if(b++,P&&P.then)P.then(function(){(function(N,H,R,V,W,ee,q){W&&s(R,q),v(N,R,V,W,ee)})(y,0,x,b,w,S,k)},S);else{for(w&&s(x,k);bnew Promise(t=>{R0e().fromString(e).then(t)}),A0e=new _5,I0e=e=>A0e.parse(e),F0e="shlink",lD=e=>`${F0e}.${e}`;class $0e{constructor(t){me(this,"get",t=>{const n=this.localStorage.getItem(lD(t));return n?JSON.parse(n):void 0});me(this,"set",(t,n)=>this.localStorage.setItem(lD(t),JSON.stringify(n)));this.localStorage=t}}class B0e{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const U0e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",$0e,"localStorage"),e.service("TagColorsStorage",B0e,"Storage"),e.constant("csvToJson",N0e),e.constant("jsonToCsv",I0e),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",wye,"setTimeout","clearTimeout")},xl=new tA,{container:uC}=xl,z0e=(e,t)=>(...n)=>e[t](...n),V0e=(e,t)=>({...e,[t]:z0e(uC,t)}),Yy=(e,t=[])=>LN(e?wS(e):null,t.reduce(V0e,{}));ase(xl,Yy);mye(xl,Yy);hae(xl);a0e(xl,Yy);U0e(xl);D0e(xl,Yy);var fC={},Ix={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],f=0;fF.length)&&(A=F.length);for(var z=0,re=Array(A);zbO({appUpdated:ose,servers:zye,selectedServer:e.selectedServerReducer,settings:b0e}),Y0e=e=>{var t;return e.settings&&((t=e.settings.visits)==null?void 0:t.defaultInterval)==="last180days"&&e.settings.visits&&(e.settings.visits.defaultInterval="last180Days"),e},q0e=!0,o8={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},G0e=Y0e(fC.load(o8)),K0e=e=>L6({devTools:!q0e,reducer:W0e(e),preloadedState:G0e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(fC.save(o8))}),Z0e=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Q0e(e){if("serviceWorker"in navigator){if(new URL(Og.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Og.homepage}/service-worker.js`;Z0e?(X0e(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):a8(n,e)})}}function a8(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function X0e(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(i=>{i.unregister().then(()=>{window.location.reload()})}):a8(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const J0e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",e_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",t_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",n_e=()=>{delete Kj.Icon.Default.prototype._getIconUrl,Kj.Icon.Default.mergeOptions({iconRetinaUrl:e_e,iconUrl:J0e,shadowUrl:t_e})};n_e();const s8=K0e(uC),{App:r_e,ScrollToTop:i_e,ErrorHandler:o_e,appUpdateAvailable:a_e}=uC;_N(document.getElementById("root")).render(g.jsx(RN,{store:s8,children:g.jsx(VN,{basename:Og.homepage,children:g.jsx(o_e,{children:g.jsx(i_e,{children:g.jsx(r_e,{})})})})}));Q0e({onUpdate(){s8.dispatch(a_e())}}); +`}},function(e,t,n){var r=n(65),i=n(73);e.exports=function(o,a){var s=i(o,a);return r(s)?s:void 0}},function(e,t,n){var r=n(19).Symbol;e.exports=r},function(e,t,n){var r=n(67),i=typeof self=="object"&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t){e.exports=function(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(30),i=n(76);e.exports=function(o){return typeof o=="symbol"||i(o)&&r(o)=="[object Symbol]"}},function(e,t,n){(function(r,i){var o=n(6);e.exports=C;var a,s=n(37);C.ReadableState=S,n(12).EventEmitter;var l=function(A,z){return A.listeners(z).length},c=n(24),f=n(7).Buffer,d=r.Uint8Array||function(){},p=n(5);p.inherits=n(2);var g=n(41),v=void 0;v=g&&g.debuglog?g.debuglog("stream"):function(){};var y,x=n(42),b=n(25);p.inherits(C,c);var w=["error","close","destroy","pause","resume"];function S(A,z){a=a||n(1),A=A||{};var re=z instanceof a;this.objectMode=!!A.objectMode,re&&(this.objectMode=this.objectMode||!!A.readableObjectMode);var U=A.highWaterMark,K=A.readableHighWaterMark,ie=this.objectMode?16:16384;this.highWaterMark=U||U===0?U:re&&(K||K===0)?K:ie,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new x,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=A.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,A.encoding&&(y||(y=n(26).StringDecoder),this.decoder=new y(A.encoding),this.encoding=A.encoding)}function C(A){if(a=a||n(1),!(this instanceof C))return new C(A);this._readableState=new S(A,this),this.readable=!0,A&&(typeof A.read=="function"&&(this._read=A.read),typeof A.destroy=="function"&&(this._destroy=A.destroy)),c.call(this)}function k(A,z,re,U,K){var ie,ae=A._readableState;return z===null?(ae.reading=!1,function(he,E){if(!E.ended){if(E.decoder){var M=E.decoder.end();M&&M.length&&(E.buffer.push(M),E.length+=E.objectMode?1:M.length)}E.ended=!0,H(he)}}(A,ae)):(K||(ie=function(he,E){var M;return function(I){return f.isBuffer(I)||I instanceof d}(E)||typeof E=="string"||E===void 0||he.objectMode||(M=new TypeError("Invalid non-string/buffer chunk")),M}(ae,z)),ie?A.emit("error",ie):ae.objectMode||z&&z.length>0?(typeof z=="string"||ae.objectMode||Object.getPrototypeOf(z)===f.prototype||(z=function(he){return f.from(he)}(z)),U?ae.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):P(A,ae,z,!0):ae.ended?A.emit("error",new Error("stream.push() after EOF")):(ae.reading=!1,ae.decoder&&!re?(z=ae.decoder.write(z),ae.objectMode||z.length!==0?P(A,ae,z,!1):V(A,ae)):P(A,ae,z,!1))):U||(ae.reading=!1)),function(he){return!he.ended&&(he.needReadable||he.lengthz.highWaterMark&&(z.highWaterMark=function(re){return re>=j?re=j:(re--,re|=re>>>1,re|=re>>>2,re|=re>>>4,re|=re>>>8,re|=re>>>16,re++),re}(A)),A<=z.length?A:z.ended?z.length:(z.needReadable=!0,0))}function H(A){var z=A._readableState;z.needReadable=!1,z.emittedReadable||(v("emitReadable",z.flowing),z.emittedReadable=!0,z.sync?o.nextTick(R,A):R(A))}function R(A){v("emit readable"),A.emit("readable"),Q(A)}function V(A,z){z.readingMore||(z.readingMore=!0,o.nextTick(W,A,z))}function W(A,z){for(var re=z.length;!z.reading&&!z.flowing&&!z.ended&&z.length=z.length?(re=z.decoder?z.buffer.join(""):z.buffer.length===1?z.buffer.head.data:z.buffer.concat(z.length),z.buffer.clear()):re=function(U,K,ie){var ae;return UX.length?X.length:he;if(se===X.length?J+=X:J+=X.slice(0,he),(he-=se)==0){se===X.length?(++I,M.next?E.head=M.next:E.head=E.tail=null):(E.head=M,M.data=X.slice(se));break}++I}return E.length-=I,J}(U,K):function(he,E){var M=f.allocUnsafe(he),I=E.head,J=1;for(I.data.copy(M),he-=I.data.length;I=I.next;){var X=I.data,se=he>X.length?X.length:he;if(X.copy(M,M.length-he,0,se),(he-=se)==0){se===X.length?(++J,I.next?E.head=I.next:E.head=E.tail=null):(E.head=I,I.data=X.slice(se));break}++J}return E.length-=J,M}(U,K),ae}(A,z.buffer,z.decoder),re);var re}function le(A){var z=A._readableState;if(z.length>0)throw new Error('"endReadable()" called on non-empty stream');z.endEmitted||(z.ended=!0,o.nextTick(G,z,A))}function G(A,z){A.endEmitted||A.length!==0||(A.endEmitted=!0,z.readable=!1,z.emit("end"))}function F(A,z){for(var re=0,U=A.length;re=z.highWaterMark||z.ended))return v("read: emitReadable",z.length,z.ended),z.length===0&&z.ended?le(this):H(this),null;if((A=N(A,z))===0&&z.ended)return z.length===0&&le(this),null;var U,K=z.needReadable;return v("need readable",K),(z.length===0||z.length-A0?oe(A,z):null)===null?(z.needReadable=!0,A=0):z.length-=A,z.length===0&&(z.ended||(z.needReadable=!0),re!==A&&z.ended&&le(this)),U!==null&&this.emit("data",U),U},C.prototype._read=function(A){this.emit("error",new Error("_read() is not implemented"))},C.prototype.pipe=function(A,z){var re=this,U=this._readableState;switch(U.pipesCount){case 0:U.pipes=A;break;case 1:U.pipes=[U.pipes,A];break;default:U.pipes.push(A)}U.pipesCount+=1,v("pipe count=%d opts=%j",U.pipesCount,z);var K=z&&z.end===!1||A===i.stdout||A===i.stderr?se:ie;function ie(){v("onend"),A.end()}U.endEmitted?o.nextTick(K):re.once("end",K),A.on("unpipe",function ge(De,ue){v("onunpipe"),De===re&&ue&&ue.hasUnpiped===!1&&(ue.hasUnpiped=!0,v("cleanup"),A.removeListener("close",J),A.removeListener("finish",X),A.removeListener("drain",ae),A.removeListener("error",I),A.removeListener("unpipe",ge),re.removeListener("end",ie),re.removeListener("end",se),re.removeListener("data",M),he=!0,!U.awaitDrain||A._writableState&&!A._writableState.needDrain||ae())});var ae=function(ge){return function(){var De=ge._readableState;v("pipeOnDrain",De.awaitDrain),De.awaitDrain&&De.awaitDrain--,De.awaitDrain===0&&l(ge,"data")&&(De.flowing=!0,Q(ge))}}(re);A.on("drain",ae);var he=!1,E=!1;function M(ge){v("ondata"),E=!1,A.write(ge)!==!1||E||((U.pipesCount===1&&U.pipes===A||U.pipesCount>1&&F(U.pipes,A)!==-1)&&!he&&(v("false write response, pause",re._readableState.awaitDrain),re._readableState.awaitDrain++,E=!0),re.pause())}function I(ge){v("onerror",ge),se(),A.removeListener("error",I),l(A,"error")===0&&A.emit("error",ge)}function J(){A.removeListener("finish",X),se()}function X(){v("onfinish"),A.removeListener("close",J),se()}function se(){v("unpipe"),re.unpipe(A)}return re.on("data",M),function(ge,De,ue){if(typeof ge.prependListener=="function")return ge.prependListener(De,ue);ge._events&&ge._events[De]?s(ge._events[De])?ge._events[De].unshift(ue):ge._events[De]=[ue,ge._events[De]]:ge.on(De,ue)}(A,"error",I),A.once("close",J),A.once("finish",X),A.emit("pipe",re),U.flowing||(v("pipe resume"),re.resume()),A},C.prototype.unpipe=function(A){var z=this._readableState,re={hasUnpiped:!1};if(z.pipesCount===0)return this;if(z.pipesCount===1)return A&&A!==z.pipes?this:(A||(A=z.pipes),z.pipes=null,z.pipesCount=0,z.flowing=!1,A&&A.emit("unpipe",this,re),this);if(!A){var U=z.pipes,K=z.pipesCount;z.pipes=null,z.pipesCount=0,z.flowing=!1;for(var ie=0;ie>5==6?2:v>>4==14?3:v>>3==30?4:v>>6==2?-1:-2}function s(v){var y=this.lastTotal-this.lastNeed,x=function(b,w,S){if((192&w[0])!=128)return b.lastNeed=0,"�";if(b.lastNeed>1&&w.length>1){if((192&w[1])!=128)return b.lastNeed=1,"�";if(b.lastNeed>2&&w.length>2&&(192&w[2])!=128)return b.lastNeed=2,"�"}}(this,v);return x!==void 0?x:this.lastNeed<=v.length?(v.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(v.copy(this.lastChar,y,0,v.length),void(this.lastNeed-=v.length))}function l(v,y){if((v.length-y)%2==0){var x=v.toString("utf16le",y);if(x){var b=x.charCodeAt(x.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",y,v.length-1)}function c(v){var y=v&&v.length?this.write(v):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,x)}return y}function f(v,y){var x=(v.length-y)%3;return x===0?v.toString("base64",y):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",y,v.length-x))}function d(v){var y=v&&v.length?this.write(v):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(v){return v.toString(this.encoding)}function g(v){return v&&v.length?this.write(v):""}t.StringDecoder=o,o.prototype.write=function(v){if(v.length===0)return"";var y,x;if(this.lastNeed){if((y=this.fillLast(v))===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0?(P>0&&(w.lastNeed=P-1),P):--k=0?(P>0&&(w.lastNeed=P-2),P):--k=0?(P>0&&(P===2?P=0:w.lastNeed=P-3),P):0}(this,v,y);if(!this.lastNeed)return v.toString("utf8",y);this.lastTotal=x;var b=v.length-(x-this.lastNeed);return v.copy(this.lastChar,0,b),v.toString("utf8",y,b)},o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length}},function(e,t,n){e.exports=o;var r=n(1),i=n(5);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l),this._transformState={afterTransform:(function(c,f){var d=this._transformState;d.transforming=!1;var p=d.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,f!=null&&this.push(f),p(c);var g=this._readableState;g.reading=!1,(g.needReadable||g.length-1&&a.push(i[s]);return a},t.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},t.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var l in s)s.hasOwnProperty(l)&&(a[l]=s[l])};return function(a,s){function l(){this.constructor=a}o(a,s),a.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function a(s,l,c){var f=o.call(this,"Error: "+s+". JSON Line number: "+l+(c?" near: "+c:""))||this;return f.err=s,f.line=l,f.extra=c,f.name="CSV Parse Error",f}return r(a,o),a.column_mismatched=function(s,l){return new a("column_mismatched",s,l)},a.unclosed_quote=function(s,l){return new a("unclosed_quote",s,l)},a.fromJSON=function(s){return new a(s.err,s.line,s.extra)},a.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},a}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),a=r?r.toStringTag:void 0;e.exports=function(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":a&&a in Object(s)?i(s):o(s)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(33)},function(e,t,n){var r=n(34),i=function(o,a){return new r.Converter(o,a)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var x in y)y.hasOwnProperty(x)&&(v[x]=y[x])};return function(v,y){function x(){this.constructor=v}g(v,y),v.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),o=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(36),s=n(50),l=n(51),c=o(n(15)),f=n(52),d=n(105),p=function(g){function v(y,x){x===void 0&&(x={});var b=g.call(this,x)||this;return b.options=x,b.params=s.mergeParams(y),b.runtime=l.initParseRuntime(b),b.result=new d.Result(b),b.processor=new f.ProcessorLocal(b),b.once("error",function(w){r(function(){b.result.processError(w),b.emit("done",w)})}),b.once("done",function(){b.processor.destroy()}),b}return i(v,g),v.prototype.preRawData=function(y){return this.runtime.preRawDataHook=y,this},v.prototype.preFileLine=function(y){return this.runtime.preFileLineHook=y,this},v.prototype.subscribe=function(y,x,b){return this.parseRuntime.subscribe={onNext:y,onError:x,onCompleted:b},this},v.prototype.fromFile=function(y,x){var b=this,w=n(!function(){var S=new Error("Cannot find module 'fs'");throw S.code="MODULE_NOT_FOUND",S}());return w.exists(y,function(S){S?w.createReadStream(y,x).pipe(b):b.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},v.prototype.fromStream=function(y){return y.pipe(this),this},v.prototype.fromString=function(y){y.toString();var x=new a.Readable,b=0;return x._read=function(w){if(b>=y.length)this.push(null);else{var S=y.substr(b,w);this.push(S),b+=w}},this.fromStream(x)},v.prototype.then=function(y,x){var b=this;return new c.default(function(w,S){b.parseRuntime.then={onfulfilled:function(C){w(y?y(C):C)},onrejected:function(C){x?w(x(C)):S(C)}}})},Object.defineProperty(v.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),v.prototype._transform=function(y,x,b){var w=this;this.processor.process(y).then(function(S){if(S.length>0)return w.runtime.started=!0,w.result.processResult(S)}).then(function(){w.emit("drained"),b()},function(S){w.runtime.hasError=!0,w.runtime.error=S,w.emit("error",S),b()})},v.prototype._flush=function(y){var x=this;this.processor.flush().then(function(b){if(b.length>0)return x.result.processResult(b)}).then(function(){x.processEnd(y)},function(b){x.emit("error",b),y()})},v.prototype.processEnd=function(y){this.result.endProcess(),this.emit("done"),y()},Object.defineProperty(v.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),v}(a.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,a){if(!o.setImmediate){var s,l=1,c={},f=!1,d=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?s=function(y){i.nextTick(function(){v(y)})}:function(){if(o.postMessage&&!o.importScripts){var y=!0,x=o.onmessage;return o.onmessage=function(){y=!1},o.postMessage("","*"),o.onmessage=x,y}}()?function(){var y="setImmediate$"+Math.random()+"$",x=function(b){b.source===o&&typeof b.data=="string"&&b.data.indexOf(y)===0&&v(+b.data.slice(y.length))};o.addEventListener?o.addEventListener("message",x,!1):o.attachEvent("onmessage",x),s=function(b){o.postMessage(y+b,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(x){v(x.data)},s=function(x){y.port2.postMessage(x)}}():d&&"onreadystatechange"in d.createElement("script")?function(){var y=d.documentElement;s=function(x){var b=d.createElement("script");b.onreadystatechange=function(){v(x),b.onreadystatechange=null,y.removeChild(b),b=null},y.appendChild(b)}}():s=function(y){setTimeout(v,0,y)},p.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var x=new Array(arguments.length-1),b=0;b"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(e,t,n){e.exports=i;var r=n(12).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(13),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,a){var s=this;function l(y){o.writable&&o.write(y)===!1&&s.pause&&s.pause()}function c(){s.readable&&s.resume&&s.resume()}s.on("data",l),o.on("drain",c),o._isStdio||a&&a.end===!1||(s.on("end",d),s.on("close",p));var f=!1;function d(){f||(f=!0,o.end())}function p(){f||(f=!0,typeof o.destroy=="function"&&o.destroy())}function g(y){if(v(),r.listenerCount(this,"error")===0)throw y}function v(){s.removeListener("data",l),o.removeListener("drain",c),s.removeListener("end",d),s.removeListener("close",p),s.removeListener("error",g),o.removeListener("error",g),s.removeListener("end",v),s.removeListener("close",v),o.removeListener("close",v)}return s.on("error",g),o.on("error",g),s.on("end",v),s.on("close",v),o.on("close",v),o.emit("pipe",s),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(p){var g=c(p),v=g[0],y=g[1];return 3*(v+y)/4-y},t.toByteArray=function(p){for(var g,v=c(p),y=v[0],x=v[1],b=new o(3*(y+x)/4-x),w=0,S=x>0?y-4:y,C=0;C>16&255,b[w++]=g>>8&255,b[w++]=255&g;return x===2&&(g=i[p.charCodeAt(C)]<<2|i[p.charCodeAt(C+1)]>>4,b[w++]=255&g),x===1&&(g=i[p.charCodeAt(C)]<<10|i[p.charCodeAt(C+1)]<<4|i[p.charCodeAt(C+2)]>>2,b[w++]=g>>8&255,b[w++]=255&g),b},t.fromByteArray=function(p){for(var g,v=p.length,y=v%3,x=[],b=0,w=v-y;bw?w:b+16383));return y===1?(g=p[v-1],x.push(r[g>>2]+r[g<<4&63]+"==")):y===2&&(g=(p[v-2]<<8)+p[v-1],x.push(r[g>>10]+r[g>>4&63]+r[g<<2&63]+"=")),x.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var v=p.indexOf("=");return v===-1&&(v=g),[v,v===g?0:4-v%4]}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function d(p,g,v){for(var y,x=[],b=g;b>1,p=-7,g=i?a-1:0,v=i?-1:1,y=n[r+g];for(g+=v,s=y&(1<<-p)-1,y>>=-p,p+=c;p>0;s=256*s+n[r+g],g+=v,p-=8);for(l=s&(1<<-p)-1,s>>=-p,p+=o;p>0;l=256*l+n[r+g],g+=v,p-=8);if(s===0)s=1-d;else{if(s===f)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),s-=d}return(y?-1:1)*l*Math.pow(2,s-o)},t.write=function(n,r,i,o,a,s){var l,c,f,d=8*s-a-1,p=(1<>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:s-1,x=o?1:-1,b=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,l=p):(l=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-l))<1&&(l--,f*=2),(r+=l+g>=1?v/f:v*Math.pow(2,1-g))*f>=2&&(l++,f/=2),l+g>=p?(c=0,l=p):l+g>=1?(c=(r*f-1)*Math.pow(2,a),l+=g):(c=r*Math.pow(2,g-1)*Math.pow(2,a),l=0));a>=8;n[i+y]=255&c,y+=x,c/=256,a-=8);for(l=l<0;n[i+y]=255&l,y+=x,l/=256,d-=8);n[i+y-x]|=128*b}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t){},function(e,t,n){var r=n(7).Buffer,i=n(43);function o(a,s,l){a.copy(s,l)}e.exports=function(){function a(){(function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(s){var l={data:s,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},a.prototype.unshift=function(s){var l={data:s,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},a.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(s){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=s+l.data;return c},a.prototype.concat=function(s){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(s>>>0),c=this.head,f=0;c;)o(c.data,l,f),f+=c.data.length,c=c.next;return l},a}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var a=i.inspect({length:this.length});return this.constructor.name+" "+a})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var a=r.localStorage[o];return a!=null&&String(a).toLowerCase()==="true"}e.exports=function(o,a){if(i("noDeprecation"))return o;var s=!1;return function(){if(!s){if(i("throwDeprecation"))throw new Error(a);i("traceDeprecation")?console.trace(a):console.warn(a),s=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=o;var r=n(27),i=n(5);function o(a){if(!(this instanceof o))return new o(a);r.call(this,a)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(a,s,l){l(null,a)}},function(e,t,n){e.exports=n(14)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(13).Transform},function(e,t,n){e.exports=n(13).PassThrough},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(r){var i={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};for(var o in r||(r={}),r)r.hasOwnProperty(o)&&(Array.isArray(r[o])?i[o]=[].concat(r[o]):i[o]=r[o]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var S in w)w.hasOwnProperty(S)&&(b[S]=w[S])};return function(b,w){function S(){this.constructor=b}x(b,w),b.prototype=w===null?Object.create(w):(S.prototype=w.prototype,new S)}}(),o=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(53),s=o(n(15)),l=n(54),c=o(n(16)),f=n(57),d=n(28),p=n(58),g=o(n(59)),v=o(n(29)),y=function(x){function b(){var w=x!==null&&x.apply(this,arguments)||this;return w.rowSplit=new p.RowSplit(w.converter),w.eolEmitted=!1,w._needEmitEol=void 0,w.headEmitted=!1,w._needEmitHead=void 0,w}return i(b,x),b.prototype.flush=function(){var w=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var S=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(S,!0).then(function(C){return w.runtime.csvLineBuffer&&w.runtime.csvLineBuffer.length>0?s.default.reject(v.default.unclosed_quote(w.runtime.parsedLineNumber,w.runtime.csvLineBuffer.toString())):s.default.resolve(C)})}return s.default.resolve([])},b.prototype.destroy=function(){return s.default.resolve()},Object.defineProperty(b.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),b.prototype.process=function(w,S){var C,k=this;return S===void 0&&(S=!1),C=S?w.toString():l.prepareData(w,this.converter.parseRuntime),s.default.resolve().then(function(){return k.runtime.preRawDataHook?k.runtime.preRawDataHook(C):C}).then(function(P){return P&&P.length>0?k.processCSV(P,S):s.default.resolve([])})},b.prototype.processCSV=function(w,S){var C=this,k=this.params,P=this.runtime;P.eol||c.default(w,P),this.needEmitEol&&!this.eolEmitted&&P.eol&&(this.converter.emit("eol",P.eol),this.eolEmitted=!0),k.ignoreEmpty&&!P.started&&(w=d.trimLeft(w));var j=f.stringToLines(w,P);return S?(j.lines.push(j.partial),j.partial=""):this.prependLeftBuf(d.bufFromString(j.partial)),j.lines.length>0?(P.preFileLineHook?this.runPreLineHook(j.lines):s.default.resolve(j.lines)).then(function(N){return P.started||C.runtime.headers?C.processCSVBody(N):C.processDataWithHead(N)}):s.default.resolve([])},b.prototype.processDataWithHead=function(w){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var S="",C=[];w.length;){var k=S+w.shift(),P=this.rowSplit.parse(k);if(P.closed){C=P.cells,S="";break}S=k+c.default(k,this.runtime)}if(this.prependLeftBuf(d.bufFromString(S)),C.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=C}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(w)},b.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var w=this.runtime.headers,S=0;S=j.length)R();else if(N.preFileLineHook){var V=j[H],W=N.preFileLineHook(V,N.parsedLineNumber+H);if(H++,W&&W.then)W.then(function(ee){j[H-1]=ee,P(j,N,H,R)});else{for(j[H-1]=W;H0?r.concat([d.csvLineBuffer,f]):f}(a,s);s.csvLineBuffer=void 0;var c=function(f,d){var p=f.length-1;if(128&f[p]){for(;(192&f[p])==128;)p--;p--}return p!=f.length-1?(d.csvLineBuffer=f.slice(p+1),f.slice(0,p+1)):f}(l,s).toString("utf8");return s.started===!1?o.default(c):c}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(o){return typeof o=="string"&&o.charCodeAt(0)===65279?o.slice(1):r.isBuffer(o)&&i(o)&&o[0]===239&&o[1]===187&&o[2]===191?o.slice(3):o}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),l.prototype.parse=function(c){if(c.length===0||this.conv.parseParam.ignoreEmpty&&c.trim().length===0)return{cells:[],closed:!0};var f=this.quote,d=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(c)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,g=c.split(p);if(f==="off"){if(d)for(var v=0;vd&&(p=g,d=v)}),p},l.prototype.isQuoteOpen=function(c){var f=this.quote,d=this.escape;return c[0]===f&&(c[1]!==f||c[1]===d&&(c[2]===f||c.length===2))},l.prototype.isQuoteClose=function(c){var f=this.quote,d=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,g=c.length-1;c[g]===f||c[g]===d;)g--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){var f="es|"+this.quote+"|"+this.escape;this.cachedRegExp[f]===void 0&&(this.cachedRegExp[f]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var d=this.cachedRegExp[f];return c.replace(d,this.quote)},l.prototype.parseMultiLines=function(c){for(var f=[],d="";c.length;){var p=d+c.shift(),g=this.parse(p);g.cells.length===0&&this.conv.parseParam.ignoreEmpty||(g.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?f.push(o.filterArray(g.cells,this.conv.parseRuntime.selectedColumns)):f.push(g.cells),d=""):d=p+(i.default(p,this.conv.parseRuntime)||` +`))}return{rowsCells:f,partial:d}},l}();t.RowSplit=s},function(e,t,n){var r=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),a=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function s(b,w,S){if(w.parseParam.checkColumn&&w.parseRuntime.headers&&b.length!==w.parseRuntime.headers.length)throw i.default.column_mismatched(w.parseRuntime.parsedLineNumber+S);return function(C,k,P){for(var j=!1,N={},H=0,R=C.length;H-1){for(var P=w.split("."),j=!0;P.length>0;)if(P.shift().length===0){j=!1;break}!j||C.parseParam.colParser[w]&&C.parseParam.colParser[w].flat?C.parseRuntime.columnValueSetter[k]=d:C.parseRuntime.columnValueSetter[k]=p}else C.parseRuntime.columnValueSetter[k]=d;C.parseParam.nullObject===!0&&S==="null"&&(S=null),C.parseRuntime.columnValueSetter[k](b,w,S)}function d(b,w,S){b[w]=S}function p(b,w,S){o.default(b,w,S)}function g(b,w,S,C){return C.parseRuntime.headerType[S]?C.parseRuntime.headerType[S]:w.indexOf("number#!")>-1?C.parseRuntime.headerType[S]=v:w.indexOf("string#!")>-1?C.parseRuntime.headerType[S]=y:C.parseParam.checkType?C.parseRuntime.headerType[S]=x:C.parseRuntime.headerType[S]=y}function v(b){var w=parseFloat(b);return isNaN(w)?b:w}function y(b){return b.toString()}function x(b){var w=b.trim();return w===""?y(b):a.test(w)?v(b):w.length===5&&w.toLowerCase()==="false"||w.length===4&&w.toLowerCase()==="true"?function(S){var C=S.trim();return C.length!==5||C.toLowerCase()!=="false"}(b):w[0]==="{"&&w[w.length-1]==="}"||w[0]==="["&&w[w.length-1]==="]"?function(S){try{return JSON.parse(S)}catch{return S}}(b):y(b)}},function(e,t,n){var r=n(61);e.exports=function(i,o,a){return i==null?i:r(i,o,a)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),a=n(20),s=n(104);e.exports=function(l,c,f,d){if(!a(l))return l;for(var p=-1,g=(c=i(c,l)).length,v=g-1,y=l;y!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var a=this.__data__,s=r(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}},function(e,t,n){var r=n(17)(n(19),"Map");e.exports=r},function(e,t,n){var r=n(10);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(10);e.exports=function(i,o){var a=r(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}},function(e,t,n){var r=n(101);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(18),i=n(102),o=n(21),a=n(22),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function c(f){if(typeof f=="string")return f;if(o(f))return i(f,c)+"";if(a(f))return l?l.call(f):"";var d=f+"";return d=="0"&&1/f==-1/0?"-0":d}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,a=Array(o);++i-1&&r%1==0&&r0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),l.prototype.processResult=function(c){var f=this,d=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&d===0&&s(this.converter,"["+o.EOL),new i.default(function(p,g){f.needEmitLine?function v(y,x,b,w,S){if(b>=y.length)S();else if(x.parseRuntime.subscribe&&x.parseRuntime.subscribe.onNext){var C=x.parseRuntime.subscribe.onNext,k=y[b],P=C(k,x.parseRuntime.parsedLineNumber+b);if(b++,P&&P.then)P.then(function(){(function(N,H,R,V,W,ee,q){W&&s(R,q),v(N,R,V,W,ee)})(y,0,x,b,w,S,k)},S);else{for(w&&s(x,k);bnew Promise(t=>{A0e().fromString(e).then(t)}),F0e=new _5,$0e=e=>F0e.parse(e),B0e="shlink",lD=e=>`${B0e}.${e}`;class U0e{constructor(t){me(this,"get",t=>{const n=this.localStorage.getItem(lD(t));return n?JSON.parse(n):void 0});me(this,"set",(t,n)=>this.localStorage.setItem(lD(t),JSON.stringify(n)));this.localStorage=t}}class z0e{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const V0e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",U0e,"localStorage"),e.service("TagColorsStorage",z0e,"Storage"),e.constant("csvToJson",I0e),e.constant("jsonToCsv",$0e),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",Sye,"setTimeout","clearTimeout")},xl=new tA,{container:uC}=xl,H0e=(e,t)=>(...n)=>e[t](...n),W0e=(e,t)=>({...e,[t]:H0e(uC,t)}),Yy=(e,t=[])=>LN(e?wS(e):null,t.reduce(W0e,{}));ase(xl,Yy);vye(xl,Yy);hae(xl);l0e(xl,Yy);V0e(xl);R0e(xl,Yy);var fC={},Ix={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],f=0;fF.length)&&(A=F.length);for(var z=0,re=Array(A);zbO({appUpdated:ose,servers:Hye,selectedServer:e.selectedServerReducer,settings:x0e}),G0e=e=>{var t;return e.settings&&((t=e.settings.visits)==null?void 0:t.defaultInterval)==="last180days"&&e.settings.visits&&(e.settings.visits.defaultInterval="last180Days"),e},K0e=!0,o8={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Z0e=G0e(fC.load(o8)),Q0e=e=>L6({devTools:!K0e,reducer:q0e(e),preloadedState:Z0e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(fC.save(o8))}),X0e=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function J0e(e){if("serviceWorker"in navigator){if(new URL(Og.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Og.homepage}/service-worker.js`;X0e?(e_e(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):a8(n,e)})}}function a8(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function e_e(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(i=>{i.unregister().then(()=>{window.location.reload()})}):a8(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const t_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",n_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",r_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",i_e=()=>{delete Kj.Icon.Default.prototype._getIconUrl,Kj.Icon.Default.mergeOptions({iconRetinaUrl:n_e,iconUrl:t_e,shadowUrl:r_e})};i_e();const s8=Q0e(uC),{App:o_e,ScrollToTop:a_e,ErrorHandler:s_e,appUpdateAvailable:l_e}=uC;_N(document.getElementById("root")).render(m.jsx(RN,{store:s8,children:m.jsx(VN,{basename:Og.homepage,children:m.jsx(s_e,{children:m.jsx(a_e,{children:m.jsx(o_e,{})})})})}));J0e({onUpdate(){s8.dispatch(l_e())}}); diff --git a/feature/react-tag-autocomplete-7/index.html b/feature/react-tag-autocomplete-7/index.html index 5f0fd334..e90ba2f3 100644 --- a/feature/react-tag-autocomplete-7/index.html +++ b/feature/react-tag-autocomplete-7/index.html @@ -79,7 +79,7 @@ Shlink — The URL shortener - + diff --git a/feature/react-tag-autocomplete-7/service-worker.js b/feature/react-tag-autocomplete-7/service-worker.js index f91a91c6..aa610a32 100644 --- a/feature/react-tag-autocomplete-7/service-worker.js +++ b/feature/react-tag-autocomplete-7/service-worker.js @@ -1812,7 +1812,7 @@ const Se = "shlink-web-client", We = "A React-based progressive web application browserslist: ze }; re(); -Ae([{"revision":null,"url":"assets/index-58ee5b56.css"},{"revision":null,"url":"assets/index-afa15ae3.js"},{"revision":"ce9cacf813f02fa87f75a91e3e393315","url":"index.html"},{"revision":"3e8169a112865ef0d76bba4e2dfd3a89","url":"./icons/icon-16x16.png"},{"revision":"20f0b51945ae3c973420e31d6b4d43c1","url":"./icons/icon-24x24.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"./icons/icon-32x32.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"./icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"./icons/icon-48x48.png"},{"revision":"40209a194f29b21882571c77bd2bd906","url":"./icons/icon-60x60.png"},{"revision":"c8ba5a8c1da76d74c7bb21827fcf975c","url":"./icons/icon-64x64.png"},{"revision":"ae3435baceb494f9c966e2c2c736ea35","url":"./icons/icon-72x72.png"},{"revision":"850aa5b026fd1452af6c1ddd9d71850f","url":"./icons/icon-76x76.png"},{"revision":"8c62535e6b7a498ece1f6c6ae62ede59","url":"./icons/icon-96x96.png"},{"revision":"2dff586aaefa4c8d17f4c0bcbdef8b53","url":"./icons/icon-114x114.png"},{"revision":"8e28257a68ef1c55bc68bfff80e1a310","url":"./icons/icon-120x120.png"},{"revision":"0059b6f0c97fa871a5c29643b2857585","url":"./icons/icon-128x128.png"},{"revision":"41478c2456281f61e54d714718743ecc","url":"./icons/icon-144x144.png"},{"revision":"625251910295f33a578ae6d8117711c9","url":"./icons/icon-150x150.png"},{"revision":"19b71508b1d05defe32cf16a7d453001","url":"./icons/icon-152x152.png"},{"revision":"9d029a32a54ba3084c67acd5d74f8ac4","url":"./icons/icon-160x160.png"},{"revision":"6ec104aeaf745f003ecdaef2edddce97","url":"./icons/icon-167x167.png"},{"revision":"871d67907434ed0ddf5d2a6c220e09af","url":"./icons/icon-180x180.png"},{"revision":"cee2529402074d73b2135e2ddee25f6b","url":"./icons/icon-192x192.png"},{"revision":"85055b452284c0193142936dee7d2cd1","url":"./icons/icon-196x196.png"},{"revision":"f471155dd70b99924422dd9dd87ea94d","url":"./icons/icon-228x228.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"./icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"./icons/icon-310x310.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"./icons/icon-384x384.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"./icons/icon-512x512.png"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"./icons/icon-1024x1024.png"},{"revision":"f826e7d2071e1ac7dc37f8c589eaf704","url":"manifest.json"}]); +Ae([{"revision":null,"url":"assets/index-58ee5b56.css"},{"revision":null,"url":"assets/index-b04000ec.js"},{"revision":"a320fc38c8217dc2de1338499058fae9","url":"index.html"},{"revision":"3e8169a112865ef0d76bba4e2dfd3a89","url":"./icons/icon-16x16.png"},{"revision":"20f0b51945ae3c973420e31d6b4d43c1","url":"./icons/icon-24x24.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"./icons/icon-32x32.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"./icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"./icons/icon-48x48.png"},{"revision":"40209a194f29b21882571c77bd2bd906","url":"./icons/icon-60x60.png"},{"revision":"c8ba5a8c1da76d74c7bb21827fcf975c","url":"./icons/icon-64x64.png"},{"revision":"ae3435baceb494f9c966e2c2c736ea35","url":"./icons/icon-72x72.png"},{"revision":"850aa5b026fd1452af6c1ddd9d71850f","url":"./icons/icon-76x76.png"},{"revision":"8c62535e6b7a498ece1f6c6ae62ede59","url":"./icons/icon-96x96.png"},{"revision":"2dff586aaefa4c8d17f4c0bcbdef8b53","url":"./icons/icon-114x114.png"},{"revision":"8e28257a68ef1c55bc68bfff80e1a310","url":"./icons/icon-120x120.png"},{"revision":"0059b6f0c97fa871a5c29643b2857585","url":"./icons/icon-128x128.png"},{"revision":"41478c2456281f61e54d714718743ecc","url":"./icons/icon-144x144.png"},{"revision":"625251910295f33a578ae6d8117711c9","url":"./icons/icon-150x150.png"},{"revision":"19b71508b1d05defe32cf16a7d453001","url":"./icons/icon-152x152.png"},{"revision":"9d029a32a54ba3084c67acd5d74f8ac4","url":"./icons/icon-160x160.png"},{"revision":"6ec104aeaf745f003ecdaef2edddce97","url":"./icons/icon-167x167.png"},{"revision":"871d67907434ed0ddf5d2a6c220e09af","url":"./icons/icon-180x180.png"},{"revision":"cee2529402074d73b2135e2ddee25f6b","url":"./icons/icon-192x192.png"},{"revision":"85055b452284c0193142936dee7d2cd1","url":"./icons/icon-196x196.png"},{"revision":"f471155dd70b99924422dd9dd87ea94d","url":"./icons/icon-228x228.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"./icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"./icons/icon-310x310.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"./icons/icon-384x384.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"./icons/icon-512x512.png"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"./icons/icon-1024x1024.png"},{"revision":"f826e7d2071e1ac7dc37f8c589eaf704","url":"manifest.json"}]); const Qe = new RegExp("/[^/?]+\\.[^/]+$"); M( // Return false to exempt requests from being fulfilled by index.html.