var W8=Object.defineProperty;var Y8=(e,t,n)=>t in e?W8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var me=(e,t,n)=>(Y8(e,typeof t!="symbol"?t+"":t,n),n);function q8(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function G8(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 ZD={exports:{}},xv={},QD={exports:{}},it={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Qd=Symbol.for("react.element"),K8=Symbol.for("react.portal"),Z8=Symbol.for("react.fragment"),Q8=Symbol.for("react.strict_mode"),X8=Symbol.for("react.profiler"),J8=Symbol.for("react.provider"),eF=Symbol.for("react.context"),tF=Symbol.for("react.forward_ref"),nF=Symbol.for("react.suspense"),rF=Symbol.for("react.memo"),iF=Symbol.for("react.lazy"),rE=Symbol.iterator;function oF(e){return e===null||typeof e!="object"?null:(e=rE&&e[rE]||e["@@iterator"],typeof e=="function"?e:null)}var XD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},JD=Object.assign,eL={};function ru(e,t,n){this.props=e,this.context=t,this.refs=eL,this.updater=n||XD}ru.prototype.isReactComponent={};ru.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ru.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function tL(){}tL.prototype=ru.prototype;function Rx(e,t,n){this.props=e,this.context=t,this.refs=eL,this.updater=n||XD}var jx=Rx.prototype=new tL;jx.constructor=Rx;JD(jx,ru.prototype);jx.isPureReactComponent=!0;var iE=Array.isArray,nL=Object.prototype.hasOwnProperty,Nx={current:null},rL={key:!0,ref:!0,__self:!0,__source:!0};function iL(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)nL.call(t,r)&&!rL.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1Math.max(Math.min(e,n),t);function nf(e){return pa(Xd(e*2.55),0,255)}function Ea(e){return pa(Xd(e*255),0,255)}function yo(e){return pa(Xd(e/2.55)/100,0,1)}function aE(e){return pa(Xd(e*100),0,100)}const Jr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ab=[..."0123456789ABCDEF"],vF=e=>ab[e&15],yF=e=>ab[(e&240)>>4]+ab[e&15],tp=e=>(e&240)>>4===(e&15),_F=e=>tp(e.r)&&tp(e.g)&&tp(e.b)&&tp(e.a);function bF(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Jr[e[1]]*17,g:255&Jr[e[2]]*17,b:255&Jr[e[3]]*17,a:t===5?Jr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Jr[e[1]]<<4|Jr[e[2]],g:Jr[e[3]]<<4|Jr[e[4]],b:Jr[e[5]]<<4|Jr[e[6]],a:t===9?Jr[e[7]]<<4|Jr[e[8]]:255})),n}const wF=(e,t)=>e<255?t(e):"";function xF(e){var t=_F(e)?vF:yF;return e?"#"+t(e.r)+t(e.g)+t(e.b)+wF(e.a,t):void 0}const SF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function aL(e,t,n){const r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function OF(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function CF(e,t,n){const r=aL(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function EF(e,t,n,r,i){return e===i?(t-n)/r+(t.5?f/(2-o-a):f/(o+a),l=EF(n,r,i,f,o),l=l*60+.5),[l|0,c||0,s]}function Fx(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Ea)}function $x(e,t,n){return Fx(aL,e,t,n)}function TF(e,t,n){return Fx(CF,e,t,n)}function PF(e,t,n){return Fx(OF,e,t,n)}function sL(e){return(e%360+360)%360}function kF(e){const t=SF.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?nf(+t[5]):Ea(+t[5]));const i=sL(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?r=TF(i,o,a):t[1]==="hsv"?r=PF(i,o,a):r=$x(i,o,a),{r:r[0],g:r[1],b:r[2],a:n}}function MF(e,t){var n=Ix(e);n[0]=sL(n[0]+t),n=$x(n),e.r=n[0],e.g=n[1],e.b=n[2]}function DF(e){if(!e)return;const t=Ix(e),n=t[0],r=aE(t[1]),i=aE(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${yo(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const sE={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},lE={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function LF(){const e={},t=Object.keys(lE),n=Object.keys(sE);let r,i,o,a,s;for(r=0;r>16&255,o>>8&255,o&255]}return e}let np;function RF(e){np||(np=LF(),np.transparent=[0,0,0,0]);const t=np[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const jF=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function NF(e){const t=jF.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const a=+t[7];n=t[8]?nf(a):pa(a*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?nf(r):pa(r,0,255)),i=255&(t[4]?nf(i):pa(i,0,255)),o=255&(t[6]?nf(o):pa(o,0,255)),{r,g:i,b:o,a:n}}}function AF(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${yo(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const g0=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Pl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function IF(e,t,n){const r=Pl(yo(e.r)),i=Pl(yo(e.g)),o=Pl(yo(e.b));return{r:Ea(g0(r+n*(Pl(yo(t.r))-r))),g:Ea(g0(i+n*(Pl(yo(t.g))-i))),b:Ea(g0(o+n*(Pl(yo(t.b))-o))),a:e.a+n*(t.a-e.a)}}function rp(e,t,n){if(e){let r=Ix(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=$x(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function lL(e,t){return e&&Object.assign(t||{},e)}function cE(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Ea(e[3]))):(t=lL(e,{r:0,g:0,b:0,a:1}),t.a=Ea(t.a)),t}function FF(e){return e.charAt(0)==="r"?NF(e):kF(e)}class Xf{constructor(t){if(t instanceof Xf)return t;const n=typeof t;let r;n==="object"?r=cE(t):n==="string"&&(r=bF(t)||RF(t)||FF(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=lL(this._rgb);return t&&(t.a=yo(t.a)),t}set rgb(t){this._rgb=cE(t)}rgbString(){return this._valid?AF(this._rgb):void 0}hexString(){return this._valid?xF(this._rgb):void 0}hslString(){return this._valid?DF(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const a=n===o?.5:n,s=2*a-1,l=r.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=IF(this._rgb,t._rgb,n)),this}clone(){return new Xf(this.rgb)}alpha(t){return this._rgb.a=Ea(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Xd(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return rp(this._rgb,2,t),this}darken(t){return rp(this._rgb,2,-t),this}saturate(t){return rp(this._rgb,1,t),this}desaturate(t){return rp(this._rgb,1,-t),this}rotate(t){return MF(this._rgb,t),this}}/*! * Chart.js v4.3.3 * https://www.chartjs.org * (c) 2023 Chart.js Contributors * Released under the MIT License */function po(){}const $F=(()=>{let e=0;return()=>e++})();function ft(e){return e===null||typeof e>"u"}function jt(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 Mr(e,t){return Qt(e)?e:t}function Ke(e,t){return typeof e>"u"?t:e}const BF=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,cL=(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(jt(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 HF(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 VF(e){const t=HF(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function $a(e,t){return(uE[t]||(uE[t]=VF(t)))(e)}function Bx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ed=e=>typeof e<"u",Ba=e=>typeof e=="function",fE=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function WF(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ut=Math.PI,Nt=2*Ut,YF=Nt+Ut,$m=Number.POSITIVE_INFINITY,qF=Ut/180,Xt=Ut/2,fs=Ut/4,dE=Ut*2/3,ma=Math.log10,Xi=Math.sign;function wf(e,t,n){return Math.abs(e-t)i-o).pop(),t}function Cc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function KF(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function fL(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 zx(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 So=(e,t,n,r)=>zx(e,n,r?i=>{const o=e[i][t];return oe[i][t]zx(e,n,r=>e[r][t]>=n);function JF(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+Bx(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 mE(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)&&(hL.forEach(o=>{delete e[o]}),delete e._chartjs)}function pL(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const mL=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function gL(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,mL.call(window,()=>{r=!1,e.apply(t,n)}))}}function t$(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Hx=e=>e==="start"?"left":e==="end"?"right":"center",Qn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,n$=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function vL(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:h,maxDefined:p}=a.getUserBounds();h&&(i=Pn(Math.min(So(s,l,c).lo,n?r:So(t,l,a.getPixelForValue(c)).lo),0,r-1)),p?o=Pn(Math.max(So(s,a.axis,f,!0).hi+1,n?0:So(t,l,a.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function yL(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 ip=e=>e===0||e===1,gE=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Nt/n)),vE=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Nt/n)+1,xf={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=>ip(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=>ip(e)?e:gE(e,.075,.3),easeOutElastic:e=>ip(e)?e:vE(e,.075,.3),easeInOutElastic(e){return ip(e)?e:e<.5?.5*gE(e*2,.1125,.45):.5+.5*vE(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-xf.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?xf.easeInBounce(e*2)*.5:xf.easeOutBounce(e*2-1)*.5+.5};function Vx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function yE(e){return Vx(e)?e:new Xf(e)}function v0(e){return Vx(e)?e:new Xf(e).saturate(.5).darken(.1).hexString()}const r$=["x","y","borderWidth","radius","tension"],i$=["color","borderColor","backgroundColor"];function o$(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:i$},numbers:{type:"number",properties:r$}}),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 a$(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const _E=new Map;function s$(e,t){t=t||{};const n=e+JSON.stringify(t);let r=_E.get(n);return r||(r=new Intl.NumberFormat(e,t),_E.set(n,r)),r}function Jd(e,t,n){return s$(t,n).format(e)}const _L={values(e){return jt(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=l$(e,n)}const a=ma(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),Jd(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(ma(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?_L.numeric.call(this,e,t,n):""}};function l$(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 Sv={formatters:_L};function c$(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:Sv.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 Ws=Object.create(null),lb=Object.create(null);function Sf(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)=>v0(i.backgroundColor),this.hoverBorderColor=(r,i)=>v0(i.borderColor),this.hoverColor=(r,i)=>v0(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 y0(this,t,n)}get(t){return Sf(this,t)}describe(t,n){return y0(lb,t,n)}override(t,n){return y0(Ws,t,n)}route(t,n,r,i){const o=Sf(this,t),a=Sf(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 u$({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[o$,a$,c$]);function f$(e){return!e||ft(e.size)||ft(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Bm(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 d$(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,h,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Oo(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,m$(e,o),l=0;l+e||0;function Wx(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]=w$(o(a));return n}function wL(e){return Wx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ns(e){return Wx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function tr(e){const t=wL(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(_$)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ke(e.family,t.family),lineHeight:b$(Ke(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ke(e.weight,t.weight),string:""};return i.string=f$(i),i}function rf(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 Za(e,t){return Object.assign(Object.create(e),t)}function Yx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=CL("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>Yx([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 SL(s,l,()=>M$(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return xE(s).includes(l)},ownKeys(s){return xE(s)},set(s,l,c){const f=s._storage||(s._storage=i());return s[l]=f[l]=c,delete s._keys,!0}})}function Ec(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:xL(e,r),setContext:o=>Ec(e,o,n,r),override:o=>Ec(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 SL(o,a,()=>O$(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 xL(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:Ba(n)?n:()=>n,isIndexable:Ba(r)?r:()=>r}}const S$=(e,t)=>e?e+Bx(t):t,qx=(e,t)=>nt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function SL(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function O$(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return Ba(s)&&a.isScriptable(t)&&(s=C$(t,s,e,n)),jt(s)&&s.length&&(s=E$(t,s,e,a.isIndexable)),qx(t,s)&&(s=Ec(s,i,o&&o[t],a)),s}function C$(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),qx(e,l)&&(l=Gx(i._scopes,i,e,l)),l}function E$(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 h=Gx(c,i,e,f);t.push(Ec(h,o,a&&a[e],s))}}return t}function OL(e,t,n){return Ba(e)?e(t,n):e}const T$=(e,t)=>e===!0?t:typeof e=="string"?$a(t,e):void 0;function P$(e,t,n,r,i){for(const o of t){const a=T$(n,o);if(a){e.add(a);const s=OL(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 Gx(e,t,n,r){const i=t._rootScopes,o=OL(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=wE(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=wE(s,a,o,l,r),l===null)?!1:Yx(Array.from(s),[""],i,o,()=>k$(t,n,r))}function wE(e,t,n,r,i){for(;n;)n=P$(e,t,n,r,i);return n}function k$(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return jt(i)&&nt(n)?n:i||{}}function M$(e,t,n,r){let i;for(const o of t)if(i=CL(S$(o,e),n),typeof i<"u")return qx(e,i)?Gx(n,r,e,i):i}function CL(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function xE(e){let t=e._keys;return t||(t=e._keys=D$(e._scopes)),t}function D$(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 EL(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 R$(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=sb(o,i),l=sb(a,o);let c=s/(s+l),f=l/(s+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const h=r*c,p=r*f;return{previous:{x:o.x-h*(a.x-i.x),y:o.y-h*(a.y-i.y)},next:{x:o.x+p*(a.x-i.x),y:o.y+p*(a.y-i.y)}}}function j$(e,t,n){const r=e.length;let i,o,a,s,l,c=Tc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")A$(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 $$(e,t){return Ev(e).getPropertyValue(t)}const B$=["top","right","bottom","left"];function As(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=B$[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const U$=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function z$(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(U$(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 _s(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Ev(n),o=i.boxSizing==="border-box",a=As(i,"padding"),s=As(i,"border","width"),{x:l,y:c,box:f}=z$(e,n),h=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-h)/g*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function H$(e,t,n){let r,i;if(t===void 0||n===void 0){const o=Kx(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=Ev(o),l=As(s,"border","width"),c=As(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=Um(s.maxWidth,o,"clientWidth"),i=Um(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||$m,maxHeight:i||$m}}const ap=e=>Math.round(e*10)/10;function V$(e,t,n,r){const i=Ev(e),o=As(i,"margin"),a=Um(i.maxWidth,e,"clientWidth")||$m,s=Um(i.maxHeight,e,"clientHeight")||$m,l=H$(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=As(i,"border","width"),g=As(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=ap(Math.min(c,a,l.maxWidth)),f=ap(Math.min(f,s,l.maxHeight)),c&&!f&&(f=ap(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=ap(Math.floor(f*r))),{width:c,height:f}}function SE(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 W$=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 OE(e,t){const n=$$(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function bs(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Y$(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 q$(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=bs(e,i,n),s=bs(i,o,n),l=bs(o,t,n),c=bs(a,s,n),f=bs(s,l,n);return bs(c,f,n)}const G$=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}}},K$=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function fc(e,t,n){return e?G$(t,n):K$()}function kL(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 ML(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function DL(e){return e==="angle"?{between:td,compare:ZF,normalize:Lr}:{between:xo,compare:(t,n)=>t-n,normalize:t=>t}}function CE({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 Z$(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=DL(r),l=t.length;let{start:c,end:f,loop:h}=e,p,g;if(h){for(c+=l,f+=l,p=0,g=l;pl(i,S,b)&&s(i,S)!==0,T=()=>s(o,b)===0||l(o,S,b),P=()=>y||C(),R=()=>!y||T();for(let j=f,z=f;j<=h;++j)w=t[j%a],!w.skip&&(b=c(w[r]),b!==S&&(y=l(b,i,o),x===null&&P()&&(x=s(b,i)===0?j:z),x!==null&&R()&&(v.push(CE({start:x,end:j,loop:p,count:a,style:g})),x=null),z=j,S=b));return x!==null&&v.push(CE({start:x,end:h,loop:p,count:a,style:g})),v}function RL(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 X$(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 J$(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=Q$(n,i,o,r);if(r===!0)return EE(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=mL.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 mo=new n7;const PE="transparent",r7={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=yE(e||PE),i=r.valid&&yE(t||PE);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class i7{constructor(t,n,r,i){const o=n[r];i=rf([t.to,i,o,t.from]);const a=rf([t.from,o,i]);this._active=!0,this._fn=t.fn||r7[t.type||typeof a],this._easing=xf[t.easing]||xf.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=rf([t.to,n,i,t.from]),this._from=rf([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];(jt(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=a7(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&o7(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 h=o[c];const p=r.get(c);if(h)if(p&&h.active()){h.update(p,f,s);continue}else h.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=h=new i7(p,t,c,f),i.push(h)}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 mo.add(this._chart,r),!0}}function o7(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function RE(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=u7(o,a,r),h=t.length;let p;for(let g=0;gn[r].axis===t).shift()}function h7(e,t){return Za(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function p7(e,t,n){return Za(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ju(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 b0=e=>e==="reset"||e==="none",jE=(e,t)=>t?e:Object.assign({},e),m7=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:NL(n,!0),values:null};class ki{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=DE(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&&ju(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(h,p,g,v)=>h==="x"?p:h==="r"?v:g,o=n.xAxisID=Ke(r.xAxisID,_0(t,"x")),a=n.yAxisID=Ke(r.yAxisID,_0(t,"y")),s=n.rAxisID=Ke(r.rAxisID,_0(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&&mE(this._data,this),t._stacked&&ju(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(nt(n))this._data=c7(n);else if(r!==n){if(r){mE(r,this);const i=this._cachedMeta;ju(i),i._parsed=[]}n&&Object.isExtensible(n)&&e$(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=DE(n.vScale,n),n.stack!==r.stack&&(i=!0,ju(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&RE(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,h,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{jt(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=()=>h[s]===null||c&&h[s]y||h=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,h);return y.$shared&&(y.$shared=l,o[a]=Object.freeze(jE(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,h=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),h);l=f.createResolver(p,this.getContext(t,r,n))}const c=new jL(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||b0(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){b0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!b0(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 v7(e){const t=e.iScale,n=g7(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(ed(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 AL(e,t,n,r){return jt(e)?b7(e,t,n,r):t[n.axis]=n.parse(e,r),t}function NE(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,f,h,p;for(c=n,f=n+r;c=n?1:-1)}function x7(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,h=s.axis;for(let p=n;ptd(S,s,l,!0)?1:Math.max(C,C*n,T,T*n),v=(S,C,T)=>td(S,s,l,!0)?-1:Math.min(C,C*n,T,T*n),y=g(0,c,h),x=g(Xt,f,p),b=v(Ut,c,h),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 ga extends ki{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=>+$a(r[c],l)}let a,s;for(a=t,s=t+n;a0&&!isNaN(t)?Nt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Jd(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(ga,"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 Cf extends ki{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}=vL(n,i,a);this._drawStart=s,this._drawCount=l,yL(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:h}=this._getSharedOptions(n,i),p=a.axis,g=s.axis,{spanGaps:v,segment:y}=this.options,x=Cc(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 T=0;T=w){R.skip=!0;continue}const j=this.getParsed(T),z=ft(j[g]),N=R[p]=a.getPixelForValue(j[p],T),V=R[g]=o||z?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,j,l):j[g],T);R.skip=isNaN(N)||isNaN(V)||z,R.stop=T>0&&Math.abs(j[p]-C[p])>x,y&&(R.parsed=j,R.raw=c.data[T]),h&&(R.options=f||this.resolveDataElementOptions(T,P.active?"active":i)),b||this.updateElement(P,T,R,i),C=j}}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(Cf,"id","line"),me(Cf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),me(Cf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ef extends ki{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=Jd(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return EL.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,h=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)?Ei(this.resolveDataElementOptions(t,n).angle||r):0}}me(Ef,"id","polarArea"),me(Ef,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),me(Ef,"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 ub extends ga{}me(ub,"id","pie"),me(ub,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class cm extends ki{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 EL.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&&(R.parsed=P,R.raw=c.data[C]),p&&(R.options=h||this.resolveDataElementOptions(C,T.active?"active":i)),w||this.updateElement(T,C,R,i),S=P}this.updateSharedOptions(h,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(um,"id","scatter"),me(um,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),me(um,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var T7=Object.freeze({__proto__:null,BarController:Of,BubbleController:lm,DoughnutController:ga,LineController:Cf,PieController:ub,PolarAreaController:Ef,RadarController:cm,ScatterController:um});function hs(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Zx{constructor(t){me(this,"options");this.options=t||{}}static override(t){Object.assign(Zx.prototype,t)}init(){}formats(){return hs()}parse(){return hs()}format(){return hs()}add(){return hs()}diff(){return hs()}startOf(){return hs()}endOf(){return hs()}}var P7={_date:Zx};function k7(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?XF:So;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const h=l(o,t,n-f),p=l(o,t,n+f);return{lo:h.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function eh(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 R7={evaluateInteractionItems:eh,modes:{index(e,t,n,r){const i=_s(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?x0(e,i,o,r,a):S0(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=s[0].index,h=c.data[f];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=_s(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?x0(e,i,o,r,a):S0(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 $E(e,t){return e.filter(n=>IL.indexOf(n.pos)===-1&&n.box.axis===t)}function Au(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 j7(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Au(Nu(t,"left"),!0),i=Au(Nu(t,"right")),o=Au(Nu(t,"top"),!0),a=Au(Nu(t,"bottom")),s=$E(t,"x"),l=$E(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Nu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function BE(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function FL(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 F7(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!nt(i)){n.size&&(e[i]-=n.size);const h=r[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?o.height:o.width),n.size=h.size/h.count,e[i]+=n.size}o.getPadding&&FL(a,o.getPadding());const s=Math.max(0,t.outerWidth-BE(a,e,"left","right")),l=Math.max(0,t.outerHeight-BE(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 $7(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 B7(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 of(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,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/f,hBoxMaxHeight:a/2}),p=Object.assign({},i);FL(p,tr(r));const g=Object.assign({maxPadding:p,w:o,h:a,x:i.left,y:i.top},i),v=A7(l.concat(c),h);of(s.fullSize,g,h,v),of(l,g,h,v),of(c,g,h,v)&&of(l,g,h,v),$7(g),UE(s.leftAndTop,g,h,v),g.x+=g.w,g.y+=g.h,UE(s.rightAndBottom,g,h,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 $L{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 U7 extends $L{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fm="$chartjs",z7={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},zE=e=>e===null||e==="";function H7(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[fm]={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",zE(i)){const o=OE(e,"width");o!==void 0&&(e.width=o)}if(zE(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=OE(e,"height");o!==void 0&&(e.height=o)}return e}const BL=W$?{passive:!0}:!1;function V7(e,t,n){e.addEventListener(t,n,BL)}function W7(e,t,n){e.canvas.removeEventListener(t,n,BL)}function Y7(e,t){const n=z7[e.type]||e.type,{x:r,y:i}=_s(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function zm(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function q7(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||zm(s.addedNodes,r),a=a&&!zm(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function G7(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||zm(s.removedNodes,r),a=a&&!zm(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const rd=new Map;let HE=0;function UL(){const e=window.devicePixelRatio;e!==HE&&(HE=e,rd.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function K7(e,t){rd.size||window.addEventListener("resize",UL),rd.set(e,t)}function Z7(e){rd.delete(e),rd.size||window.removeEventListener("resize",UL)}function Q7(e,t,n){const r=e.canvas,i=r&&Kx(r);if(!i)return;const o=gL((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),K7(e,o),a}function O0(e,t,n){n&&n.disconnect(),t==="resize"&&Z7(e)}function X7(e,t,n){const r=e.canvas,i=gL(o=>{e.ctx!==null&&n(Y7(o,e))},e);return V7(r,t,i),i}class J7 extends $L{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(H7(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[fm])return!1;const r=n[fm].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[fm],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:q7,detach:G7,resize:Q7}[n]||X7;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:O0,detach:O0,resize:O0}[n]||W7)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return V$(t,n,r,i)}isAttached(t){const n=Kx(t);return!!(n&&n.isConnected)}}function eB(e){return!PL()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?U7:J7}var om;let Bo=(om=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 Cc(this.x)&&Cc(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(om,"defaults",{}),me(om,"defaultRoutes"),om);function tB(e,t){const n=e.options.ticks,r=nB(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?iB(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return oB(t,c,o,a/i),c;const f=rB(o,t,i);if(a>0){let h,p;const g=a>1?Math.round((l-s)/(a-1)):null;for(lp(t,c,f,ft(g)?0:s-g,s),h=0,p=a-1;hi)return l}return Math.max(i,1)}function iB(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,VE=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,WE=(e,t)=>Math.min(t||e,e);function YE(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;oa+s)))return l}function cB(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:Mr(n,Mr(r,n)),max:Mr(r,Mr(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=x$(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(),h=f.widest.width,p=f.highest.height,g=Pn(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/r:g/(r-1),h+6>s&&(s=g/(r-(t.offset?.5:1)),l=this.maxHeight-Iu(t.grid)-n.padding-qE(t.title,this.chart.options.font),c=Math.sqrt(h*h+p*p),a=Ux(Math.min(Math.asin(Pn((f.highest.height+6)/s,-1,1)),Math.asin(Pn(l/c,-1,1))-Math.asin(Pn(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=Iu(o)+l):(t.height=this.maxHeight,t.width=Iu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:h,highest:p}=this._getLabelSizes(),g=r.padding*2,v=Ei(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(s){const b=r.mirror?0:x*h.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+b+g)}else{const b=r.mirror?0:y*h.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,h=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-h+a)*this.width/(this.width-h),0)}else{let f=n.height/2,h=t.height/2;o==="start"?(f=0,h=t.height):o==="end"&&(f=n.height,h=0),this.paddingTop=f+a,this.paddingBottom=h+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[z]||0,height:s[z]||0});return{first:j(0),last:j(n-1),widest:j(P),highest:j(R),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 QF(this._alignToPixels?ds(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(),h=this.ticks.length+(l?1:0),p=Iu(o),g=[],v=s.setContext(this.getContext()),y=v.display?v.width:0,x=y/2,b=function(oe){return ds(r,oe,y)};let w,S,C,T,P,R,j,z,N,V,W,ne;if(a==="top")w=b(this.bottom),R=this.bottom-p,z=w-x,V=b(t.top)+x,ne=t.bottom;else if(a==="bottom")w=b(this.top),V=t.top,ne=b(t.bottom)-x,R=w+x,z=this.top+p;else if(a==="left")w=b(this.right),P=this.right-p,j=w-x,N=b(t.left)+x,W=t.right;else if(a==="right")w=b(this.left),N=t.left,W=b(t.right)-x,P=w+x,j=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,ne=t.bottom,R=w+x,z=R+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,j=P-p,N=t.left,W=t.right}const q=Ke(i.ticks.maxTicksLimit,h),J=Math.max(1,Math.ceil(h/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 gB(e){return"id"in e&&"defaults"in e}class vB{constructor(){this.controllers=new cp(ki,"datasets",!0),this.elements=new cp(Bo,"elements"),this.plugins=new cp(Object,"plugins"),this.scales=new cp(ol,"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=Bx(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 _B(e){const t={},n=[],r=Object.keys(Vi.plugins.items);for(let o=0;o1&&GE(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function KE(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function EB(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 KE(e,"x",n[0])||KE(e,"y",n[0])}return{}}function TB(e,t){const n=Ws[e.type]||{scales:{}},r=t.scales||{},i=fb(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=db(a,s,EB(a,e),Jt.scales[s.type]),c=OB(l,i),f=n.scales||{};o[a]=bf(Object.create(null),[{axis:l},s,f[l],f[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||fb(s,t),f=(Ws[s]||{}).scales||{};Object.keys(f).forEach(h=>{const p=SB(h,l),g=a[p+"AxisID"]||p;o[g]=o[g]||Object.create(null),bf(o[g],[{axis:p},r[g],f[h]])})}),Object.keys(o).forEach(a=>{const s=o[a];bf(s,[Jt.scales[s.type],Jt.scale])}),o}function zL(e){const t=e.options||(e.options={});t.plugins=Ke(t.plugins,{}),t.scales=TB(e,t)}function HL(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function PB(e){return e=e||{},e.data=HL(e.data),zL(e),e}const ZE=new Map,VL=new Set;function up(e,t){let n=ZE.get(e);return n||(n=t(),ZE.set(e,n),VL.add(n)),n}const Fu=(e,t,n)=>{const r=$a(t,n);r!==void 0&&e.add(r)};class kB{constructor(t){this._config=PB(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=HL(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(),zL(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return up(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return up(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return up(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return up(`${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(h=>Fu(l,t,h))),f.forEach(h=>Fu(l,i,h)),f.forEach(h=>Fu(l,Ws[o]||{},h)),f.forEach(h=>Fu(l,Jt,h)),f.forEach(h=>Fu(l,lb,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),VL.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ws[n]||{},Jt.datasets[n]||{},{type:n},Jt,lb]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=QE(this._resolverCache,t,i);let l=a;if(DB(a,n)){o.$shared=!1,r=Ba(r)?r():r;const c=this.createResolver(t,r,s);l=Ec(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=QE(this._resolverCache,t,r);return nt(n)?Ec(o,n,void 0,i):o}}function QE(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:Yx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const MB=e=>nt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Ba(e[n]),!1);function DB(e,t){const{isScriptable:n,isIndexable:r}=xL(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(Ba(s)||MB(s))||a&&jt(s))return!0}return!1}var LB="4.3.3";const RB=["top","bottom","left","right","chartArea"];function XE(e,t){return e==="top"||e==="bottom"||RB.indexOf(e)===-1&&t==="x"}function JE(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function eT(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Pt(n&&n.onComplete,[e],t)}function jB(e){const t=e.chart,n=t.options.animation;Pt(n&&n.onProgress,[e],t)}function WL(e){return PL()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const dm={},tT=e=>{const t=WL(e);return Object.values(dm).filter(n=>n.canvas===t).pop()};function NB(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 AB(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function IB(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var ra;let Tv=(ra=class{static register(...t){Vi.add(...t),nT()}static unregister(...t){Vi.remove(...t),nT()}constructor(t,n){const r=this.config=new kB(n),i=WL(t),o=tT(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||eB(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=$F(),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 yB,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=t$(h=>this.update(h),a.resizeDelay||0),this._dataChanges=[],dm[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}mo.listen(this,"complete",eT),mo.listen(this,"progress",jB),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 Vi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():SE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return bE(this.canvas,this.ctx),this}stop(){return mo.stop(this),this}resize(t,n){mo.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,SE(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=db(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=db(l,s),f=Ke(s.type,a.dtype);(s.position===void 0||XE(s.position,c)!==XE(a.dposition))&&(s.position=a.dposition),i[l]=!0;let h=null;if(l in r&&r[l].type===f)h=r[l];else{const p=Vi.getScale(f);h=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(s,t)}),bt(i,(a,s)=>{a||delete r[s]}),bt(r,a=>{er.configure(this,a,a.options),er.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(JE("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=>{er.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!fE(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;NB(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;er.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=IB(t)||this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&Ov(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&&Cv(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Oo(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=R7.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=Za(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);ed(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(),mo.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}});!Im(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(h=>f.datasetIndex===h.datasetIndex&&f.index===h.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=WF(t),c=AB(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=!Im(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(ra,"defaults",Jt),me(ra,"instances",dm),me(ra,"overrides",Ws),me(ra,"registry",Vi),me(ra,"version",LB),me(ra,"getChart",tT),ra);function nT(){return bt(Tv.instances,e=>e._plugins.invalidate())}function FB(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 $B(e){return Wx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function BB(e,t,n,r){const i=$B(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 Pn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Pn(i.innerStart,0,a),innerEnd:Pn(i.innerEnd,0,a)}}function kl(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Hm(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:f}=t,h=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 J=f>0?f-r:0,oe=h>0?h-r:0,le=(J+oe)/2,G=le!==0?v*le/(le+r):v;g=(v-G)/2}const y=Math.max(.001,v*h-n/Ut)/h,x=(v-y)/2,b=l+x+g,w=i-x-g,{outerStart:S,outerEnd:C,innerStart:T,innerEnd:P}=BB(t,p,h,w-b),R=h-S,j=h-C,z=b+S/R,N=w-C/j,V=p+T,W=p+P,ne=b+T/V,q=w-P/W;if(e.beginPath(),o){const J=(z+N)/2;if(e.arc(a,s,h,z,J),e.arc(a,s,h,J,N),C>0){const F=kl(j,N,a,s);e.arc(F.x,F.y,C,N,w+Xt)}const oe=kl(W,w,a,s);if(e.lineTo(oe.x,oe.y),P>0){const F=kl(W,q,a,s);e.arc(F.x,F.y,P,w+Xt,q+Math.PI)}const le=(w-P/p+(b+T/p))/2;if(e.arc(a,s,p,w-P/p,le,!0),e.arc(a,s,p,le,b+T/p,!0),T>0){const F=kl(V,ne,a,s);e.arc(F.x,F.y,T,ne+Math.PI,b-Xt)}const G=kl(R,b,a,s);if(e.lineTo(G.x,G.y),S>0){const F=kl(R,z,a,s);e.arc(F.x,F.y,S,b-Xt,z)}}else{e.moveTo(a,s);const J=Math.cos(z)*h+a,oe=Math.sin(z)*h+s;e.lineTo(J,oe);const le=Math.cos(N)*h+a,G=Math.sin(N)*h+s;e.lineTo(le,G)}e.closePath()}function UB(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Hm(e,t,n,r,l,i);for(let c=0;c=Nt||td(a,l,c),x=xo(s,f+g,h+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,h=(o+a)/2,p=(s+l+f+c)/2;return{x:r+Math.cos(h)*p,y:i+Math.sin(h)*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>Nt?Math.floor(i/Nt):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,UB(n,this,f,a,s),zB(n,this,f,a,s),n.restore()}}me(af,"id","arc"),me(af,"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(af,"defaultRoutes",{backgroundColor:"backgroundColor"}),me(af,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function YL(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 HB(e,t,n){e.lineTo(n.x,n.y)}function VB(e){return e.stepped?h$:e.tension||e.cubicInterpolationMode==="monotone"?p$:HB}function qL(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,T=g.y,P=C|0;P===v?(Tx&&(x=T),f=(h*f+C)/++h):(S(),e.lineTo(C,T),v=P,h=0,y=x=T),b=T}S()}function hb(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?YB:WB}function qB(e){return e.stepped?Y$:e.tension||e.cubicInterpolationMode==="monotone"?q$:bs}function GB(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),YL(e,t.options),e.stroke(i)}function KB(e,t,n,r){const{segments:i,options:o}=t,a=hb(t);for(const s of i)YL(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const ZB=typeof Path2D=="function";function QB(e,t,n,r){ZB&&!t.options.segment?GB(e,t,n,r):KB(e,t,n,r)}class va extends Bo{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;F$(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=J$(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=RL(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=qB(r);let c,f;for(c=0,f=a.length;ct!=="borderDash"&&t!=="fill"});function rT(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 KL(e){return pb[e%pb.length]}function ZL(e){return iT[e%iT.length]}function i9(e,t){return e.borderColor=KL(t),e.backgroundColor=ZL(t),++t}function o9(e,t){return e.backgroundColor=e.data.map(()=>KL(t++)),t}function a9(e,t){return e.backgroundColor=e.data.map(()=>ZL(t++)),t}function s9(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof ga?t=o9(n,t):i instanceof Ef?t=a9(n,t):i&&(t=i9(n,t))}}function oT(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function l9(e){return e&&(e.borderColor||e.backgroundColor)}var c9={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&&(oT(r)||l9(i)||o&&oT(o)))return;const a=s9(e);r.forEach(a)}};function u9(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,h,p,g,v,y;for(a[l++]=e[f],h=0;hg&&(g=v,p=e[w],y=w);a[l++]=p,f=y}return a[l++]=e[c],a}function f9(e,t,n,r){let i=0,o=0,a,s,l,c,f,h,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(h)&&!ft(p)){const R=Math.min(h,p),j=Math.max(h,p);R!==g&&R!==P&&x.push({...e[R],x:i}),j!==g&&j!==P&&x.push({...e[j],x:i})}a>0&&P!==g&&x.push(e[P]),x.push(s),f=T,o=0,v=y=c,h=p=g=a}}return x}function QL(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 aT(e){e.data.datasets.forEach(t=>{QL(t)})}function d9(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=Pn(So(t,o.axis,a).lo,0,n-1)),c?i=Pn(So(t,o.axis,s).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var h9={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){aT(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(rf([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:h,count:p}=d9(l,c);const g=n.threshold||4*r;if(p<=g){QL(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=u9(c,h,p,r,n);break;case"min-max":v=f9(c,h,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){aT(e)}};function p9(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=Qx(l,c,i);const f=mb(n,i[l],i[c],s.loop);if(!t.segments){a.push({source:s,target:f,start:i[l],end:i[c]});continue}const h=RL(t,f);for(const p of h){const g=mb(n,o[p.start],o[p.end],p.loop),v=LL(s,i,g);for(const y of v)a.push({source:y,target:p,start:{[n]:sT(f,g,"start",Math.max)},end:{[n]:sT(f,g,"end",Math.min)}})}}return a}function mb(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Lr(i),o=Lr(o)),{property:e,start:i,end:o}}function m9(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:a,end:s})=>{s=Qx(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 Qx(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function sT(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function XL(e,t){let n=[],r=!1;return jt(e)?(r=!0,n=e):n=m9(e,t),n.length?new va({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function lT(e){return e&&e.fill!==!1}function g9(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 v9(e,t,n){const r=w9(e);if(nt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Qt(i)&&Math.floor(i)===i?y9(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function y9(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function _9(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 b9(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 w9(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 x9(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,a=r.points,s=S9(t,n);s.push(XL({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&&T0(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;lT(o)&&T0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!lT(r)||n.drawTime!=="beforeDatasetDraw"||T0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const dT=(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)}},j9=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class hT extends Bo{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}=dT(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 h=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)&&(h+=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}),h}_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 h=s,p=0,g=0,v=0,y=0;return this.legendItems.forEach((x,b)=>{const{itemWidth:w,itemHeight:S}=N9(r,n,o,x,i);b>0&&g+S+2*s>f&&(h+=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}),h+=p,c.push({width:p,height:g}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=fc(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=Qn(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=Qn(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=Qn(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=Qn(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;Ov(t,this),this._draw(),Cv(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Jt.color,l=fc(t.rtl,this.left,this.width),c=_n(a.font),{padding:f}=a,h=c.size,p=h/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}=dT(a,h),b=function(P,R,j){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const z=Ke(j.lineWidth,1);if(i.fillStyle=Ke(j.fillStyle,s),i.lineCap=Ke(j.lineCap,"butt"),i.lineDashOffset=Ke(j.lineDashOffset,0),i.lineJoin=Ke(j.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Ke(j.strokeStyle,s),i.setLineDash(Ke(j.lineDash,[])),a.usePointStyle){const N={radius:y*Math.SQRT2/2,pointStyle:j.pointStyle,rotation:j.rotation,borderWidth:z},V=l.xPlus(P,v/2),W=R+p;bL(i,N,V,W,a.pointStyleWidth&&v)}else{const N=R+Math.max((h-y)/2,0),V=l.leftForLtr(P,v),W=Ns(j.borderRadius);i.beginPath(),Object.values(W).some(ne=>ne!==0)?nd(i,{x:V,y:N,w:v,h:y,radius:W}):i.rect(V,N,v,y),i.fill(),z!==0&&i.stroke()}i.restore()},w=function(P,R,j){Ys(i,j.text,P,R+x/2,c,{strikethrough:j.hidden,textAlign:l.textAlign(j.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?g={x:Qn(o,this.left+f,this.right-r[0]),y:this.top+f+C,line:0}:g={x:this.left+f,y:Qn(o,this.top+C+f,this.bottom-n[0].height),line:0},kL(this.ctx,t.textDirection);const T=x+f;this.legendItems.forEach((P,R)=>{i.strokeStyle=P.fontColor,i.fillStyle=P.fontColor;const j=i.measureText(P.text).width,z=l.textAlign(P.textAlign||(P.textAlign=a.textAlign)),N=v+p+j;let V=g.x,W=g.y;l.setWidth(this.width),S?R>0&&V+N+f>this.right&&(W=g.y+=T,g.line++,V=g.x=Qn(o,this.left+f,this.right-r[g.line])):R>0&&W+T>this.bottom&&(V=g.x=V+n[g.line].width+f,g.line++,W=g.y=Qn(o,this.top+C+f,this.bottom-n[g.line].height));const ne=l.x(V);if(b(ne,W,P),V=n$(z,V+v+p,S?V+N:this.right,t.rtl),w(l.x(V),W,P),S)g.x+=N+f;else if(typeof P.text!="string"){const q=c.lineHeight;g.y+=eR(P,q)+f}else g.y+=T}),ML(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=_n(n.font),i=tr(n.padding);if(!n.display)return;const o=fc(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let f,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,h=Qn(t.align,h,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);f=c+Qn(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const g=Qn(s,h,h+p);a.textAlign=o.textAlign(Hx(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Ys(a,n.text,g,f,r)}_computeTitleHeight(){const t=this.options.title,n=_n(t.font),r=tr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(xo(t,this.left,this.right)&&xo(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 I9(e,t,n){let r=e;return typeof t.text!="string"&&(r=eR(t,n)),r}function eR(e,t){const n=e.text?e.text.length:0;return t*n}function F9(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var $9={id:"legend",_element:hT,start(e,t,n){const r=e.legend=new hT({ctx:e.ctx,options:n,chart:e});er.configure(e,r,n),er.addBox(e,r)},stop(e){er.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;er.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=tr(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 Xx extends Bo{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=jt(r.text)?r.text.length:1;this._padding=tr(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,h;return this.isHorizontal()?(f=Qn(s,r,o),h=n+t,c=o-r):(a.position==="left"?(f=r+t,h=Qn(s,i,n),l=Ut*-.5):(f=o-t,h=Qn(s,n,i),l=Ut*.5),c=i-n),{titleX:f,titleY:h,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);Ys(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Hx(n.align),textBaseline:"middle",translation:[a,s]})}}function B9(e,t){const n=new Xx({ctx:e.ctx,options:t,chart:e});er.configure(e,n,t),er.addBox(e,n),e.titleBlock=n}var U9={id:"title",_element:Xx,start(e,t,n){B9(e,n)},stop(e){const t=e.titleBlock;er.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;er.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 fp=new WeakMap;var z9={id:"subtitle",start(e,t,n){const r=new Xx({ctx:e.ctx,options:n,chart:e});er.configure(e,r,n),er.addBox(e,r),fp.set(e,r)},stop(e){er.removeBox(e,fp.get(e)),fp.delete(e)},beforeUpdate(e,t,n){const r=fp.get(e);er.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 sf={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 H9(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 pT(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),h=o.length,p=i.length,g=r.length,v=tr(t.padding);let y=v.height,x=0,b=r.reduce((C,T)=>C+T.before.length+T.lines.length+T.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,h&&(y+=h*c.lineHeight+(h-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 V9(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function W9(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 Y9(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"),W9(c,e,t,n)&&(c="center"),c}function mT(e,t,n){const r=n.yAlign||t.yAlign||V9(e,n);return{xAlign:n.xAlign||t.xAlign||Y9(e,t,n,r),yAlign:r}}function q9(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function G9(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function gT(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:g}=Ns(a);let v=q9(t,s);const y=G9(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(h,g)+i),{x:Pn(v,0,r.width-t.width),y:Pn(y,0,r.height-t.height)}}function dp(e,t,n){const r=tr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function vT(e){return Hi([],go(e))}function K9(e,t,n){return Za(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function yT(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const tR={beforeTitle:po,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"?tR[t].call(n,r):i}var ob;let _T=(ob=class extends Bo{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 jL(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=K9(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=yr(r,"beforeTitle",this,t),o=yr(r,"title",this,t),a=yr(r,"afterTitle",this,t);let s=[];return s=Hi(s,go(i)),s=Hi(s,go(o)),s=Hi(s,go(a)),s}getBeforeBody(t,n){return vT(yr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return bt(t,o=>{const a={before:[],lines:[],after:[]},s=yT(r,o);Hi(a.before,go(yr(s,"beforeLabel",this,o))),Hi(a.lines,yr(s,"label",this,o)),Hi(a.after,go(yr(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return vT(yr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=yr(r,"beforeFooter",this,t),o=yr(r,"footer",this,t),a=yr(r,"afterFooter",this,t);let s=[];return s=Hi(s,go(i)),s=Hi(s,go(o)),s=Hi(s,go(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,h,p,r))),t.itemSort&&(s=s.sort((f,h)=>t.itemSort(f,h,r))),bt(s,f=>{const h=yT(t.callbacks,f);i.push(yr(h,"labelColor",this,f)),o.push(yr(h,"labelPointStyle",this,f)),a.push(yr(h,"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=sf[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=pT(this,r),c=Object.assign({},s,l),f=mT(this.chart,r,c),h=gT(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:h.x,y:h.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:h}=Ns(s),{x:p,y:g}=t,{width:v,height:y}=n;let x,b,w,S,C,T;return o==="center"?(C=g+y/2,i==="left"?(x=p,b=x-a,S=C+a,T=C-a):(x=p+v,b=x+a,S=C-a,T=C+a),w=x):(i==="left"?b=p+Math.max(l,f)+a:i==="right"?b=p+v-Math.max(c,h)-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),T=S),{x1:x,x2:b,x3:w,y1:S,y2:C,y3:T}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=fc(r.rtl,this.x,this.width);for(t.x=dp(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,nd(t,{x:y,y:v,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),nd(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,h=_n(r.bodyFont);let p=h.lineHeight,g=0;const v=fc(r.rtl,this.x,this.width),y=function(j){n.fillText(j,v.x(t.x+g),t.y+p/2),t.y+=p+o},x=v.textAlign(a);let b,w,S,C,T,P,R;for(n.textAlign=a,n.textBaseline="middle",n.font=h.string,t.x=dp(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=sf[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=pT(this,t),l=Object.assign({},a,this._size),c=mT(n,t,l),f=gT(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=tr(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),kL(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),ML(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=!Im(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||!Im(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=sf[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}},me(ob,"positioners",sf),ob);var Z9={id:"tooltip",_element:_T,positioners:sf,afterInit(e,t,n){n&&(e.tooltip=new _T({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:tR},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"]},Q9=Object.freeze({__proto__:null,Colors:c9,Decimation:h9,Filler:R9,Legend:$9,SubTitle:z9,Title:U9,Tooltip:Z9});const X9=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function J9(e,t,n,r){const i=e.indexOf(t);if(i===-1)return X9(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const eU=(e,t)=>e===null?null:Pn(Math.round(e),0,t);function bT(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(gb,"id","category"),me(gb,"defaults",{ticks:{callback:bT}});function tU(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:f,maxDigits:h,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)/(h+1);let T=hE((x-y)/v/g)*g,P,R,j,z;if(T<1e-14&&!b&&!w)return[{value:y},{value:x}];z=Math.ceil(x/T)-Math.floor(y/T),z>v&&(T=hE(z*T/v/g)*g),ft(l)||(P=Math.pow(10,l),T=Math.ceil(T*P)/P),i==="ticks"?(R=Math.floor(y/T)*T,j=Math.ceil(x/T)*T):(R=y,j=x),b&&w&&o&&KF((s-a)/o,T/1e3)?(z=Math.round(Math.min((s-a)/T,f)),T=(s-a)/z,R=a,j=s):S?(R=b?a:R,j=w?s:j,z=c-1,T=(j-R)/z):(z=(j-R)/T,wf(z,Math.round(z),T/1e3)?z=Math.round(z):z=Math.ceil(z));const N=Math.max(pE(T),pE(R));P=Math.pow(10,ft(l)?N:l),R=Math.round(R*P)/P,j=Math.round(j*P)/P;let V=0;for(b&&(p&&R!==a?(n.push({value:a}),Rs)break;n.push({value:W})}return w&&p&&j!==s?n.length&&wf(n[n.length-1].value,s,wT(s,C,e))?n[n.length-1].value=s:n.push({value:s}):(!w||j===s)&&n.push({value:j}),n}function wT(e,t,{horizontal:n,minRotation:r}){const i=Ei(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Vm extends ol{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=Xi(i),c=Xi(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=tU(i,o);return t.bounds==="ticks"&&fL(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 Jd(t,this.chart.options.locale,this.options.ticks.format)}}class vb extends Vm{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=Ei(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(vb,"id","linear"),me(vb,"defaults",{ticks:{callback:Sv.formatters.numeric}});const id=e=>Math.floor(ma(e)),ps=(e,t)=>Math.pow(10,id(e)+t);function xT(e){return e/Math.pow(10,id(e))===1}function ST(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function nU(e,t){const n=t-e;let r=id(n);for(;ST(e,t,r)>10;)r++;for(;ST(e,t,r)<10;)r--;return Math.min(r,id(e))}function rU(e,{min:t,max:n}){t=Mr(e.min,t);const r=[],i=id(t);let o=nU(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 h=Math.floor((c-f)/Math.pow(10,o)),p=Mr(e.min,Math.round((l+f+h*Math.pow(10,o))*a)/a);for(;p=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,a=o>=0?1:a),p=Math.round((l+f+h*Math.pow(10,o))*a)/a;const g=Mr(e.max,p);return r.push({value:g,major:xT(g),significand:h}),r}class yb extends ol{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Vm.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===ps(this.min,0)?ps(this.min,-1):ps(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(ps(r,-1)),a(ps(i,1)))),r<=0&&o(ps(i,-1)),i<=0&&a(ps(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=rU(n,this);return t.bounds==="ticks"&&fL(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":Jd(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ma(t),this._valueRange=ma(this.max)-ma(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ma(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}me(yb,"id","logarithmic"),me(yb,"defaults",{ticks:{callback:Sv.formatters.logarithmic,major:{enabled:!0}}});function _b(e){const t=e.ticks;if(t.display&&e.display){const n=tr(t.backdropPadding);return Ke(t.font&&t.font.size,Jt.font.size)+n.height}return 0}function iU(e,t,n){return n=jt(n)?n:[n],{w:d$(e,t.string,n),h:n.length*t.lineHeight}}function OT(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 oU(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 sU(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(Ux(Lr(l.angle+Xt))),f=dU(l.y,s.h,c),h=uU(c),p=fU(l.x,s.w,h);return{visible:!0,x:l.x,y:f,textAlign:h,left:p,top:f,right:p+s.w,bottom:f+s.h}}function lU(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Oo({x:n,y:r},t)||Oo({x:n,y:o},t)||Oo({x:i,y:r},t)||Oo({x:i,y:o},t))}function cU(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:s}=o.pointLabels,l={extra:_b(o)/2,additionalAngle:a?Ut/i:0};let c;for(let f=0;f270||n<90)&&(e-=t),e}function hU(e,t,n){const{left:r,top:i,right:o,bottom:a}=n,{backdropColor:s}=t;if(!ft(s)){const l=Ns(t.borderRadius),c=tr(t.backdropPadding);e.fillStyle=s;const f=r-c.left,h=i-c.top,p=o-r+c.width,g=a-i+c.height;Object.values(l).some(v=>v!==0)?(e.beginPath(),nd(e,{x:f,y:h,w:p,h:g,radius:l}),e.fill()):e.fillRect(f,h,p,g)}}function pU(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));hU(n,a,o);const s=_n(a.font),{x:l,y:c,textAlign:f}=o;Ys(n,e._pointLabels[i],l,c+s.lineHeight/2,s,{color:a.color,textAlign:f,textBaseline:"middle"})}}function nR(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Nt);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?oU(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=Nt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Lr(t*n+Ei(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(h!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(h),g=i.setContext(p),v=o.setContext(p);mU(this,g,l,a,v)}}),r.display){for(t.save(),s=a-1;s>=0;s--){const f=r.setContext(this.getPointLabelContext(s)),{color:h,lineWidth:p}=f;!p||!h||(t.lineWidth=p,t.strokeStyle=h,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 h=tr(c.backdropPadding);t.fillRect(-a/2-h.left,-o-f.size/2-h.top,a+h.width,f.size+h.height)}Ys(t,s.label,0,-o,f,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}me(lf,"id","radialLinear"),me(lf,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Sv.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),me(lf,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),me(lf,"descriptors",{angleLines:{_fallback:"grid"}});const Pv={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}},br=Object.keys(Pv);function CT(e,t){return e-t}function ET(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"&&(Cc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function TT(e,t,n,r){const i=br.length;for(let o=br.indexOf(e);o=br.indexOf(n);o--){const a=br[o];if(Pv[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return br[n?br.indexOf(n):0]}function yU(e){for(let t=br.indexOf(e)+1,n=br.length;t=t?n[r]:n[i];e[o]=!0}}function _U(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 kT(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=Pn(n,0,a),r=Pn(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||TT(o.minUnit,n,r,this._getLabelCapacity(n)),s=Ke(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Cc(l)||l===!0,f={};let h=n,p,g;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,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=h,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],h=c&&s[c],p=r[n],g=c&&h&&p&&p.major;return this._adapter.format(t,i||(g?h: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}=So(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}=So(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 bb extends od{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=hp(n,this.min),this._tableRange=hp(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(hp(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return hp(this._table,r*this._tableRange+this._minPos,!0)}}me(bb,"id","timeseries"),me(bb,"defaults",od.defaults);var bU=Object.freeze({__proto__:null,CategoryScale:gb,LinearScale:vb,LogarithmicScale:yb,RadialLinearScale:lf,TimeScale:od,TimeSeriesScale:bb});const wU=[T7,r9,Q9,bU];Tv.register(...wU);var rR={exports:{}},Yr={},iR={exports:{}},oR={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * 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[B];if(0>>1;Bi(ie,A))aei(pe,ie)?(G[B]=pe,G[ae]=A,B=ae):(G[B]=ie,G[Z]=A,B=Z);else if(aei(pe,A))G[B]=pe,G[ae]=A,B=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,h=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(T);else{var F=n(c);F!==null&&le(C,F.startTime-G)}}function T(G,F){v=!1,y&&(y=!1,b(j),j=-1),g=!0;var A=p;try{for(S(F),h=n(l);h!==null&&(!(h.expirationTime>F)||G&&!V());){var B=h.callback;if(typeof B=="function"){h.callback=null,p=h.priorityLevel;var re=B(h.expirationTime<=F);F=e.unstable_now(),typeof re=="function"?h.callback=re:h===n(l)&&r(l),S(F)}else r(l);h=n(l)}if(h!==null)var U=!0;else{var Z=n(c);Z!==null&&le(C,Z.startTime-F),U=!1}return U}finally{h=null,p=A,g=!1}}var P=!1,R=null,j=-1,z=5,N=-1;function V(){return!(e.unstable_now()-NG||125B?(G.sortIndex=A,t(c,G),n(l)===null&&G===n(c)&&(y?(b(j),j=-1):y=!0,le(C,A-B))):(G.sortIndex=re,t(l,G),v||g||(v=!0,oe(T))),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}}}})(oR);iR.exports=oR;var xU=iR.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var aR=H,Ur=xU;function Ce(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"),wb=Object.prototype.hasOwnProperty,SU=/^[: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]*$/,MT={},DT={};function OU(e){return wb.call(DT,e)?!0:wb.call(MT,e)?!1:SU.test(e)?DT[e]=!0:(MT[e]=!0,!1)}function CU(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 EU(e,t,n,r){if(t===null||typeof t>"u"||CU(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 gr(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 Wn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Wn[e]=new gr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Wn[t]=new gr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Wn[e]=new gr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Wn[e]=new gr(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){Wn[e]=new gr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Wn[e]=new gr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Wn[e]=new gr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Wn[e]=new gr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Wn[e]=new gr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Jx=/[\-:]([a-z])/g;function e2(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(Jx,e2);Wn[t]=new gr(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(Jx,e2);Wn[t]=new gr(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(Jx,e2);Wn[t]=new gr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Wn[e]=new gr(e,1,!1,e.toLowerCase(),null,!1,!1)});Wn.xlinkHref=new gr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Wn[e]=new gr(e,1,!1,e.toLowerCase(),null,!0,!0)});function t2(e,t,n,r){var i=Wn.hasOwnProperty(t)?Wn[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{k0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?cf(e):""}function TU(e){switch(e.tag){case 5:return cf(e.type);case 16:return cf("Lazy");case 13:return cf("Suspense");case 19:return cf("SuspenseList");case 0:case 2:case 15:return e=M0(e.type,!1),e;case 11:return e=M0(e.type.render,!1),e;case 1:return e=M0(e.type,!0),e;default:return""}}function Cb(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 ql:return"Fragment";case Yl:return"Portal";case xb:return"Profiler";case n2:return"StrictMode";case Sb:return"Suspense";case Ob:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cR:return(e.displayName||"Context")+".Consumer";case lR:return(e._context.displayName||"Context")+".Provider";case r2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case i2:return t=e.displayName||null,t!==null?t:Cb(e.type)||"Memo";case aa:t=e._payload,e=e._init;try{return Cb(e(t))}catch{}}return null}function PU(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 Cb(t);case 8:return t===n2?"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 Ua(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kU(e){var t=fR(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 mp(e){e._valueTracker||(e._valueTracker=kU(e))}function dR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wm(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 Eb(e,t){var n=t.checked;return qt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function RT(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ua(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 hR(e,t){t=t.checked,t!=null&&t2(e,"checked",t,!1)}function Tb(e,t){hR(e,t);var n=Ua(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")?Pb(e,t.type,n):t.hasOwnProperty("defaultValue")&&Pb(e,t.type,Ua(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jT(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 Pb(e,t,n){(t!=="number"||Wm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var uf=Array.isArray;function dc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=gp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tf={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},MU=["Webkit","ms","Moz","O"];Object.keys(Tf).forEach(function(e){MU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tf[t]=Tf[e]})});function vR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tf.hasOwnProperty(e)&&Tf[e]?(""+t).trim():t+"px"}function yR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=vR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var DU=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(DU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ce(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 o2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jb=null,hc=null,pc=null;function IT(e){if(e=rh(e)){if(typeof jb!="function")throw Error(Ce(280));var t=e.stateNode;t&&(t=Rv(t),jb(e.stateNode,e.type,t))}}function _R(e){hc?pc?pc.push(e):pc=[e]:hc=e}function bR(){if(hc){var e=hc,t=pc;if(pc=hc=null,IT(e),t)for(e=0;e>>=0,e===0?32:31-(zU(e)/HU|0)|0}var vp=64,yp=4194304;function ff(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 Km(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=ff(s):(o&=a,o!==0&&(r=ff(o)))}else a=n&~i,a!==0?r=ff(a):o!==0&&(r=ff(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 th(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mi(t),e[t]=n}function qU(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=kf),YT=String.fromCharCode(32),qT=!1;function BR(e,t){switch(e){case"keyup":return wz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function UR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gl=!1;function Sz(e,t){switch(e){case"compositionend":return UR(t);case"keypress":return t.which!==32?null:(qT=!0,YT);case"textInput":return e=t.data,e===YT&&qT?null:e;default:return null}}function Oz(e,t){if(Gl)return e==="compositionend"||!h2&&BR(e,t)?(e=FR(),gm=u2=_a=null,Gl=!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=QT(n)}}function WR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?WR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function YR(){for(var e=window,t=Wm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wm(e.document)}return t}function p2(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 Rz(e){var t=YR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&WR(n.ownerDocument.documentElement,n)){if(r!==null&&p2(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=XT(n,o);var a=XT(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,Kl=null,Bb=null,Df=null,Ub=!1;function JT(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ub||Kl==null||Kl!==Wm(r)||(r=Kl,"selectionStart"in r&&p2(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}),Df&&hd(Df,r)||(Df=r,r=Xm(Bb,"onSelect"),0Xl||(e.current=qb[Xl],qb[Xl]=null,Xl--)}function kt(e,t){Xl++,qb[Xl]=e.current,e.current=t}var za={},nr=Xa(za),xr=Xa(!1),qs=za;function kc(e,t){var n=e.type.contextTypes;if(!n)return za;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 Sr(e){return e=e.childContextTypes,e!=null}function eg(){At(xr),At(nr)}function aP(e,t,n){if(nr.current!==za)throw Error(Ce(168));kt(nr,t),kt(xr,n)}function tj(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(Ce(108,PU(e)||"Unknown",i));return qt({},n,r)}function tg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||za,qs=nr.current,kt(nr,e),kt(xr,xr.current),!0}function sP(e,t,n){var r=e.stateNode;if(!r)throw Error(Ce(169));n?(e=tj(e,t,qs),r.__reactInternalMemoizedMergedChildContext=e,At(xr),At(nr),kt(nr,e)):At(xr),kt(xr,n)}var _o=null,jv=!1,V0=!1;function nj(e){_o===null?_o=[e]:_o.push(e)}function Wz(e){jv=!0,nj(e)}function Ja(){if(!V0&&_o!==null){V0=!0;var e=0,t=xt;try{var n=_o;for(xt=1;e>=a,i-=a,Co=1<<32-Mi(t)+i|n<j?(z=R,R=null):z=R.sibling;var N=p(b,R,S[j],C);if(N===null){R===null&&(R=z);break}e&&R&&N.alternate===null&&t(b,R),w=o(N,w,j),P===null?T=N:P.sibling=N,P=N,R=z}if(j===S.length)return n(b,R),Bt&&ws(b,j),T;if(R===null){for(;jj?(z=R,R=null):z=R.sibling;var V=p(b,R,N.value,C);if(V===null){R===null&&(R=z);break}e&&R&&V.alternate===null&&t(b,R),w=o(V,w,j),P===null?T=V:P.sibling=V,P=V,R=z}if(N.done)return n(b,R),Bt&&ws(b,j),T;if(R===null){for(;!N.done;j++,N=S.next())N=h(b,N.value,C),N!==null&&(w=o(N,w,j),P===null?T=N:P.sibling=N,P=N);return Bt&&ws(b,j),T}for(R=r(b,R);!N.done;j++,N=S.next())N=g(R,b,j,N.value,C),N!==null&&(e&&N.alternate!==null&&R.delete(N.key===null?j:N.key),w=o(N,w,j),P===null?T=N:P.sibling=N,P=N);return e&&R.forEach(function(W){return t(b,W)}),Bt&&ws(b,j),T}function x(b,w,S,C){if(typeof S=="object"&&S!==null&&S.type===ql&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case pp:e:{for(var T=S.key,P=w;P!==null;){if(P.key===T){if(T=S.type,T===ql){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===T||typeof T=="object"&&T!==null&&T.$$typeof===aa&&pP(T)===P.type){n(b,P.sibling),w=i(P,S.props),w.ref=Vu(b,P,S),w.return=b,b=w;break e}n(b,P);break}else t(b,P);P=P.sibling}S.type===ql?(w=Fs(S.props.children,b.mode,C,S.key),w.return=b,b=w):(C=Om(S.type,S.key,S.props,null,b.mode,C),C.ref=Vu(b,w,S),C.return=b,b=C)}return a(b);case Yl: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=X0(S,b.mode,C),w.return=b,b=w}return a(b);case aa:return P=S._init,x(b,w,P(S._payload),C)}if(uf(S))return v(b,w,S,C);if($u(S))return y(b,w,S,C);Cp(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=Q0(S,b.mode,C),w.return=b,b=w),a(b)):n(b,w)}return x}var Dc=uj(!0),fj=uj(!1),ih={},eo=Xa(ih),vd=Xa(ih),yd=Xa(ih);function Ds(e){if(e===ih)throw Error(Ce(174));return e}function S2(e,t){switch(kt(yd,t),kt(vd,e),kt(eo,ih),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mb(t,e)}At(eo),kt(eo,t)}function Lc(){At(eo),At(vd),At(yd)}function dj(e){Ds(yd.current);var t=Ds(eo.current),n=Mb(t,e.type);t!==n&&(kt(vd,e),kt(eo,n))}function O2(e){vd.current===e&&(At(eo),At(vd))}var Vt=Xa(0);function sg(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 W0=[];function C2(){for(var e=0;en?n:4,e(!0);var r=Y0.transition;Y0.transition={};try{e(!1),t()}finally{xt=n,Y0.transition=r}}function Pj(){return ui().memoizedState}function Kz(e,t,n){var r=Ra(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kj(e))Mj(t,n);else if(n=aj(e,t,n,r),n!==null){var i=pr();Di(n,e,r,i),Dj(n,t,r)}}function Zz(e,t,n){var r=Ra(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kj(e))Mj(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,Ri(s,a)){var l=t.interleaved;l===null?(i.next=i,w2(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=aj(e,t,i,r),n!==null&&(i=pr(),Di(n,e,r,i),Dj(n,t,r))}}function kj(e){var t=e.alternate;return e===Yt||t!==null&&t===Yt}function Mj(e,t){Lf=lg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dj(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,s2(e,n)}}var cg={readContext:ci,useCallback:qn,useContext:qn,useEffect:qn,useImperativeHandle:qn,useInsertionEffect:qn,useLayoutEffect:qn,useMemo:qn,useReducer:qn,useRef:qn,useState:qn,useDebugValue:qn,useDeferredValue:qn,useTransition:qn,useMutableSource:qn,useSyncExternalStore:qn,useId:qn,unstable_isNewReconciler:!1},Qz={readContext:ci,useCallback:function(e,t){return Wi().memoizedState=[e,t===void 0?null:t],e},useContext:ci,useEffect:gP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,bm(4194308,4,Sj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return bm(4194308,4,e,t)},useInsertionEffect:function(e,t){return bm(4,2,e,t)},useMemo:function(e,t){var n=Wi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wi();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=Kz.bind(null,Yt,e),[r.memoizedState,e]},useRef:function(e){var t=Wi();return e={current:e},t.memoizedState=e},useState:mP,useDebugValue:M2,useDeferredValue:function(e){return Wi().memoizedState=e},useTransition:function(){var e=mP(!1),t=e[0];return e=Gz.bind(null,e[1]),Wi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Yt,i=Wi();if(Bt){if(n===void 0)throw Error(Ce(407));n=n()}else{if(n=t(),kn===null)throw Error(Ce(349));Ks&30||mj(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,gP(vj.bind(null,r,o,e),[e]),r.flags|=2048,wd(9,gj.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Wi(),t=kn.identifierPrefix;if(Bt){var n=Eo,r=Co;n=(r&~(1<<32-Mi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_d++,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[gd]=r,Bj(e,t,!1,!1),t.stateNode=e;e:{switch(a=Lb(n,r),n){case"dialog":Dt("cancel",e),Dt("close",e),i=r;break;case"iframe":case"object":case"embed":Dt("load",e),i=r;break;case"video":case"audio":for(i=0;ijc&&(t.flags|=128,r=!0,Wu(o,!1),t.lanes=4194304)}else{if(!r)if(e=sg(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Bt)return Gn(t),null}else 2*on()-o.renderingStartTime>jc&&n!==1073741824&&(t.flags|=128,r=!0,Wu(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=Vt.current,kt(Vt,r?n&1|2:n&1),t):(Gn(t),null);case 22:case 23:return A2(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Dr&1073741824&&(Gn(t),t.subtreeFlags&6&&(t.flags|=8192)):Gn(t),null;case 24:return null;case 25:return null}throw Error(Ce(156,t.tag))}function oH(e,t){switch(g2(t),t.tag){case 1:return Sr(t.type)&&eg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Lc(),At(xr),At(nr),C2(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return O2(t),null;case 13:if(At(Vt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ce(340));Mc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return At(Vt),null;case 4:return Lc(),null;case 10:return b2(t.type._context),null;case 22:case 23:return A2(),null;case 24:return null;default:return null}}var Tp=!1,Xn=!1,aH=typeof WeakSet=="function"?WeakSet:Set,Be=null;function nc(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 o1(e,t,n){try{n()}catch(r){Kt(e,t,r)}}var CP=!1;function sH(e,t){if(zb=Zm,e=YR(),p2(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,h=e,p=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(s=a+i),h!==o||r!==0&&h.nodeType!==3||(l=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++f===r&&(l=a),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=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},Zm=!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:wi(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(Ce(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=CP,CP=!1,v}function Rf(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&&o1(t,n,o)}i=i.next}while(i!==r)}}function Iv(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 a1(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 Hj(e){var t=e.alternate;t!==null&&(e.alternate=null,Hj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qi],delete t[gd],delete t[Yb],delete t[Hz],delete t[Vz])),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 Vj(e){return e.tag===5||e.tag===3||e.tag===4}function EP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vj(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 s1(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=Jm));else if(r!==4&&(e=e.child,e!==null))for(s1(e,t,n),e=e.sibling;e!==null;)s1(e,t,n),e=e.sibling}function l1(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(l1(e,t,n),e=e.sibling;e!==null;)l1(e,t,n),e=e.sibling}var zn=null,xi=!1;function Jo(e,t,n){for(n=n.child;n!==null;)Wj(e,t,n),n=n.sibling}function Wj(e,t,n){if(Ji&&typeof Ji.onCommitFiberUnmount=="function")try{Ji.onCommitFiberUnmount(kv,n)}catch{}switch(n.tag){case 5:Xn||nc(n,t);case 6:var r=zn,i=xi;zn=null,Jo(e,t,n),zn=r,xi=i,zn!==null&&(xi?(e=zn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):zn.removeChild(n.stateNode));break;case 18:zn!==null&&(xi?(e=zn,n=n.stateNode,e.nodeType===8?H0(e.parentNode,n):e.nodeType===1&&H0(e,n),fd(e)):H0(zn,n.stateNode));break;case 4:r=zn,i=xi,zn=n.stateNode.containerInfo,xi=!0,Jo(e,t,n),zn=r,xi=i;break;case 0:case 11:case 14:case 15:if(!Xn&&(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)&&o1(n,t,a),i=i.next}while(i!==r)}Jo(e,t,n);break;case 1:if(!Xn&&(nc(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)}Jo(e,t,n);break;case 21:Jo(e,t,n);break;case 22:n.mode&1?(Xn=(r=Xn)||n.memoizedState!==null,Jo(e,t,n),Xn=r):Jo(e,t,n);break;default:Jo(e,t,n)}}function TP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new aH),t.forEach(function(r){var i=gH.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bi(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*cH(r/1960))-r,10e?16:e,ba===null)var r=!1;else{if(e=ba,ba=null,dg=0,dt&6)throw Error(Ce(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()-j2?Is(e,0):R2|=n),Or(e,t)}function Jj(e,t){t===0&&(e.mode&1?(t=yp,yp<<=1,!(yp&130023424)&&(yp=4194304)):t=1);var n=pr();e=Do(e,t),e!==null&&(th(e,t,n),Or(e,n))}function mH(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jj(e,n)}function gH(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(Ce(314))}r!==null&&r.delete(t),Jj(e,n)}var eN;eN=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xr.current)wr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wr=!1,rH(e,t,n);wr=!!(e.flags&131072)}else wr=!1,Bt&&t.flags&1048576&&rj(t,rg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wm(e,t),e=t.pendingProps;var i=kc(t,nr.current);gc(t,n),i=T2(null,t,r,e,i,n);var o=P2();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,Sr(r)?(o=!0,tg(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,x2(t),i.updater=Nv,t.stateNode=i,i._reactInternals=t,Xb(t,r,e,n),t=t1(null,t,r,!0,o,n)):(t.tag=0,Bt&&o&&m2(t),cr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=yH(r),e=wi(r,e),i){case 0:t=e1(null,t,r,e,n);break e;case 1:t=xP(null,t,r,e,n);break e;case 11:t=bP(null,t,r,e,n);break e;case 14:t=wP(null,t,r,wi(r.type,e),n);break e}throw Error(Ce(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wi(r,i),e1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wi(r,i),xP(e,t,r,i,n);case 3:e:{if(Ij(t),e===null)throw Error(Ce(387));r=t.pendingProps,o=t.memoizedState,i=o.element,sj(e,t),ag(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=Rc(Error(Ce(423)),t),t=SP(e,t,r,n,i);break e}else if(r!==i){i=Rc(Error(Ce(424)),t),t=SP(e,t,r,n,i);break e}else for(Rr=Ma(t.stateNode.containerInfo.firstChild),Fr=t,Bt=!0,Si=null,n=fj(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mc(),r===i){t=Lo(e,t,n);break e}cr(e,t,r,n)}t=t.child}return t;case 5:return dj(t),e===null&&Kb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Vb(r,i)?a=null:o!==null&&Vb(r,o)&&(t.flags|=32),Aj(e,t),cr(e,t,a,n),t.child;case 6:return e===null&&Kb(t),null;case 13:return Fj(e,t,n);case 4:return S2(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Dc(t,null,r,n):cr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wi(r,i),bP(e,t,r,i,n);case 7:return cr(e,t,t.pendingProps,n),t.child;case 8:return cr(e,t,t.pendingProps.children,n),t.child;case 12:return cr(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,kt(ig,r._currentValue),r._currentValue=a,o!==null)if(Ri(o.value,a)){if(o.children===i.children&&!xr.current){t=Lo(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=To(-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),Zb(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(Ce(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Zb(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}cr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,gc(t,n),i=ci(i),r=r(i),t.flags|=1,cr(e,t,r,n),t.child;case 14:return r=t.type,i=wi(r,t.pendingProps),i=wi(r.type,i),wP(e,t,r,i,n);case 15:return jj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wi(r,i),wm(e,t),t.tag=1,Sr(r)?(e=!0,tg(t)):e=!1,gc(t,n),cj(t,r,i),Xb(t,r,i,n),t1(null,t,r,!0,e,n);case 19:return $j(e,t,n);case 22:return Nj(e,t,n)}throw Error(Ce(156,t.tag))};function tN(e,t){return TR(e,t)}function vH(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 ii(e,t,n,r){return new vH(e,t,n,r)}function F2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yH(e){if(typeof e=="function")return F2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===r2)return 11;if(e===i2)return 14}return 2}function ja(e,t){var n=e.alternate;return n===null?(n=ii(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 Om(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")F2(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ql:return Fs(n.children,i,o,t);case n2:a=8,i|=8;break;case xb:return e=ii(12,n,t,i|2),e.elementType=xb,e.lanes=o,e;case Sb:return e=ii(13,n,t,i),e.elementType=Sb,e.lanes=o,e;case Ob:return e=ii(19,n,t,i),e.elementType=Ob,e.lanes=o,e;case uR:return $v(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lR:a=10;break e;case cR:a=9;break e;case r2:a=11;break e;case i2:a=14;break e;case aa:a=16,r=null;break e}throw Error(Ce(130,e==null?e:typeof e,""))}return t=ii(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fs(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function $v(e,t,n,r){return e=ii(22,e,r,t),e.elementType=uR,e.lanes=n,e.stateNode={isHidden:!1},e}function Q0(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function X0(e,t,n){return t=ii(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _H(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=L0(0),this.expirationTimes=L0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=L0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $2(e,t,n,r,i,o,a,s,l){return e=new _H(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ii(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},x2(o),e}function bH(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oN)}catch(e){console.error(e)}}oN(),rR.exports=Yr;var au=rR.exports;const $s=pi(au);var aN,NP=au;aN=NP.createRoot,NP.hydrateRoot;var sN={exports:{}},lN={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Nc=H;function CH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var EH=typeof Object.is=="function"?Object.is:CH,TH=Nc.useState,PH=Nc.useEffect,kH=Nc.useLayoutEffect,MH=Nc.useDebugValue;function DH(e,t){var n=t(),r=TH({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return kH(function(){i.value=n,i.getSnapshot=t,J0(i)&&o({inst:i})},[e,n,t]),PH(function(){return J0(i)&&o({inst:i}),e(function(){J0(i)&&o({inst:i})})},[e]),MH(n),n}function J0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!EH(e,n)}catch{return!0}}function LH(e,t){return t()}var RH=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?LH:DH;lN.useSyncExternalStore=Nc.useSyncExternalStore!==void 0?Nc.useSyncExternalStore:RH;sN.exports=lN;var cN=sN.exports,jH={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Vv=H,NH=cN;function AH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var IH=typeof Object.is=="function"?Object.is:AH,FH=NH.useSyncExternalStore,$H=Vv.useRef,BH=Vv.useEffect,UH=Vv.useMemo,zH=Vv.useDebugValue;jH.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=$H(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=UH(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 h=v}return h=g}if(v=h,IH(f,g))return v;var y=r(g);return i!==void 0&&i(v,y)?v:(f=g,h=y)}var c=!1,f,h,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=FH(e,o[0],o[1]);return BH(function(){a.hasValue=!0,a.value=s},[s]),zH(s),s};function HH(e){e()}let uN=HH;const VH=e=>uN=e,WH=()=>uN,AP=Symbol.for("react-redux-context"),IP=typeof globalThis<"u"?globalThis:{};function YH(){var e;if(!H.createContext)return{};const t=(e=IP[AP])!=null?e:IP[AP]=new Map;let n=t.get(H.createContext);return n||(n=H.createContext(null),t.set(H.createContext,n)),n}const fN=YH(),qH=()=>{throw new Error("uSES not initialized!")};function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var dN={exports:{}},St={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Dn=typeof Symbol=="function"&&Symbol.for,V2=Dn?Symbol.for("react.element"):60103,W2=Dn?Symbol.for("react.portal"):60106,Wv=Dn?Symbol.for("react.fragment"):60107,Yv=Dn?Symbol.for("react.strict_mode"):60108,qv=Dn?Symbol.for("react.profiler"):60114,Gv=Dn?Symbol.for("react.provider"):60109,Kv=Dn?Symbol.for("react.context"):60110,Y2=Dn?Symbol.for("react.async_mode"):60111,Zv=Dn?Symbol.for("react.concurrent_mode"):60111,Qv=Dn?Symbol.for("react.forward_ref"):60112,Xv=Dn?Symbol.for("react.suspense"):60113,GH=Dn?Symbol.for("react.suspense_list"):60120,Jv=Dn?Symbol.for("react.memo"):60115,ey=Dn?Symbol.for("react.lazy"):60116,KH=Dn?Symbol.for("react.block"):60121,ZH=Dn?Symbol.for("react.fundamental"):60117,QH=Dn?Symbol.for("react.responder"):60118,XH=Dn?Symbol.for("react.scope"):60119;function Gr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case V2:switch(e=e.type,e){case Y2:case Zv:case Wv:case qv:case Yv:case Xv:return e;default:switch(e=e&&e.$$typeof,e){case Kv:case Qv:case ey:case Jv:case Gv:return e;default:return t}}case W2:return t}}}function hN(e){return Gr(e)===Zv}St.AsyncMode=Y2;St.ConcurrentMode=Zv;St.ContextConsumer=Kv;St.ContextProvider=Gv;St.Element=V2;St.ForwardRef=Qv;St.Fragment=Wv;St.Lazy=ey;St.Memo=Jv;St.Portal=W2;St.Profiler=qv;St.StrictMode=Yv;St.Suspense=Xv;St.isAsyncMode=function(e){return hN(e)||Gr(e)===Y2};St.isConcurrentMode=hN;St.isContextConsumer=function(e){return Gr(e)===Kv};St.isContextProvider=function(e){return Gr(e)===Gv};St.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===V2};St.isForwardRef=function(e){return Gr(e)===Qv};St.isFragment=function(e){return Gr(e)===Wv};St.isLazy=function(e){return Gr(e)===ey};St.isMemo=function(e){return Gr(e)===Jv};St.isPortal=function(e){return Gr(e)===W2};St.isProfiler=function(e){return Gr(e)===qv};St.isStrictMode=function(e){return Gr(e)===Yv};St.isSuspense=function(e){return Gr(e)===Xv};St.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Wv||e===Zv||e===qv||e===Yv||e===Xv||e===GH||typeof e=="object"&&e!==null&&(e.$$typeof===ey||e.$$typeof===Jv||e.$$typeof===Gv||e.$$typeof===Kv||e.$$typeof===Qv||e.$$typeof===ZH||e.$$typeof===QH||e.$$typeof===XH||e.$$typeof===KH)};St.typeOf=Gr;dN.exports=St;var JH=dN.exports,q2=JH,eV={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},tV={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},nV={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},pN={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},G2={};G2[q2.ForwardRef]=nV;G2[q2.Memo]=pN;function FP(e){return q2.isMemo(e)?pN:G2[e.$$typeof]||eV}var rV=Object.defineProperty,iV=Object.getOwnPropertyNames,$P=Object.getOwnPropertySymbols,oV=Object.getOwnPropertyDescriptor,aV=Object.getPrototypeOf,BP=Object.prototype;function mN(e,t,n){if(typeof t!="string"){if(BP){var r=aV(t);r&&r!==BP&&mN(e,r,n)}var i=iV(t);$P&&(i=i.concat($P(t)));for(var o=FP(e),a=FP(t),s=0;st(i(...o)))}return n}function h1(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function zP(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function vN(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=zP(e);let c=o(s,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=zP(c),c=o(s,l)),c},o}}function Q2(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function gV(e){return e&&typeof e=="object"?h1(t=>mV(e,t)):e?typeof e=="function"?vN(e):Q2(e,"mapDispatchToProps"):h1(t=>({dispatch:t}))}function vV(e){return e?typeof e=="function"?vN(e):Q2(e,"mapStateToProps"):h1(()=>({}))}function yV(e,t,n){return yc({},n,e,t)}function _V(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,a;return function(l,c,f){const h=e(l,c,f);return o?i(h,a)||(a=h):(o=!0,a=h),a}}}function bV(e){return e?typeof e=="function"?_V(e):Q2(e,"mergeProps"):()=>yV}function wV(){const e=WH();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 HP={notify(){},get:()=>[]};function yN(e,t){let n,r=HP;function i(h){return l(),r.subscribe(h)}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=wV())}function c(){n&&(n(),n=void 0,r.clear(),r=HP)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const xV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mg=xV?H.useLayoutEffect:H.useEffect;function VP(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function e_(e,t){if(VP(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{_N=e},CV=[null,null];function EV(e,t,n){mg(()=>e(...t),n)}function TV(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function PV(e,t,n,r,i,o,a,s,l,c,f){if(!e)return()=>{};let h=!1,p=null;const g=()=>{if(h||!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(h=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function kV(e,t){return e===t}function bN(e,t,n,{pure:r,areStatesEqual:i=kV,areOwnPropsEqual:o=e_,areStatePropsEqual:a=e_,areMergedPropsEqual:s=e_,forwardRef:l=!1,context:c=fN}={}){const f=c,h=vV(e),p=gV(t),g=bV(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:h,initMapDispatchToProps:p,initMergeProps:g,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function C(R){const[j,z,N]=H.useMemo(()=>{const{reactReduxForwardedRef:Q}=R,se=H2(R,SV);return[R.context,Q,se]},[R]),V=H.useMemo(()=>j&&j.Consumer&&fV.isContextConsumer(H.createElement(j.Consumer,null))?j:f,[j,f]),W=H.useContext(V),ne=!!R.store&&!!R.store.getState&&!!R.store.dispatch,q=!!W&&!!W.store,J=ne?R.store:W.store,oe=q?W.getServerState:J.getState,le=H.useMemo(()=>pV(J.dispatch,S),[J]),[G,F]=H.useMemo(()=>{if(!v)return CV;const Q=yN(J,ne?void 0:W.subscription),se=Q.notifyNestedSubs.bind(Q);return[Q,se]},[J,ne,W]),A=H.useMemo(()=>ne?W:yc({},W,{subscription:G}),[ne,W,G]),B=H.useRef(),re=H.useRef(N),U=H.useRef(),Z=H.useRef(!1);H.useRef(!1);const ie=H.useRef(!1),ae=H.useRef();mg(()=>(ie.current=!0,()=>{ie.current=!1}),[]);const pe=H.useMemo(()=>()=>U.current&&N===re.current?U.current:le(J.getState(),N),[J,N]),E=H.useMemo(()=>se=>G?PV(v,J,G,le,re,B,Z,ie,U,F,se):()=>{},[G]);EV(TV,[re,B,Z,N,U,F]);let M;try{M=_N(E,pe,oe?()=>le(oe(),N):pe)}catch(Q){throw ae.current&&(Q.message+=` The error may be correlated with this previous error: ${ae.current.stack} `),Q}mg(()=>{ae.current=void 0,U.current=void 0,B.current=M});const I=H.useMemo(()=>H.createElement(x,yc({},M,{ref:z})),[z,x,M]);return H.useMemo(()=>v?H.createElement(V.Provider,{value:A},I):I,[V,I,A])}const P=H.memo(C);if(P.WrappedComponent=x,P.displayName=C.displayName=w,l){const j=H.forwardRef(function(N,V){return H.createElement(P,yc({},N,{reactReduxForwardedRef:V}))});return j.displayName=w,j.WrappedComponent=x,UP(j,x)}return UP(P,x)}}function wN({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const a=H.useMemo(()=>{const c=yN(e);return{store:e,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),s=H.useMemo(()=>e.getState(),[e]);mg(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==e.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,s]);const l=t||fN;return H.createElement(l.Provider,{value:a},n)}OV(cN.useSyncExternalStore);VH(au.unstable_batchedUpdates);/** * @remix-run/router v1.7.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function X2(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function DV(){return Math.random().toString(36).substr(2,8)}function YP(e,t){return{usr:e.state,key:e.key,idx:t}}function p1(e,t,n,r){return n===void 0&&(n=null),Sd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?su(t):t,{state:n,key:t&&t.key||r||DV()})}function gg(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 su(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 LV(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=wa.Pop,l=null,c=f();c==null&&(c=0,a.replaceState(Sd({},a.state,{idx:c}),""));function f(){return(a.state||{idx:null}).idx}function h(){s=wa.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=wa.Push;let w=p1(y.location,x,b);n&&n(w,x),c=f()+1;let S=YP(w,c),C=y.createHref(w);try{a.pushState(S,"",C)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(C)}o&&l&&l({action:s,location:y.location,delta:1})}function g(x,b){s=wa.Replace;let w=p1(y.location,x,b);n&&n(w,x),c=f();let S=YP(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:gg(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(WP,h),l=x,()=>{i.removeEventListener(WP,h),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 RV(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?su(t):t,i=J2(r.pathname||"/",n);if(i==null)return null;let o=xN(e);jV(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=Na([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+'".')),xN(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:UV(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 SN(o.path))i(o,a,l)}),t}function SN(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=SN(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 jV(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:zV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const NV=/^:\w+$/,AV=3,IV=2,FV=1,$V=10,BV=-2,GP=e=>e==="*";function UV(e,t){let n=e.split("/"),r=n.length;return n.some(GP)&&(r+=BV),t&&(r+=IV),n.filter(i=>!GP(i)).reduce((i,o)=>i+(NV.test(o)?AV:o===""?FV:$V),r)}function zV(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 HV(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a{if(f==="*"){let p=s[h]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=qV(s[h]||"",f),c},{}),pathname:o,pathnameBase:a,pattern:e}}function WV(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),X2(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 YV(e){try{return decodeURI(e)}catch(t){return X2(!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 qV(e,t){try{return decodeURIComponent(e)}catch(n){return X2(!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 J2(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 GV(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?su(e):e;return{pathname:n?n.startsWith("/")?n:KV(n,t):t,search:QV(r),hash:XV(i)}}function KV(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 t_(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 eS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=su(e):(i=Sd({},e),cn(!i.pathname||!i.pathname.includes("?"),t_("?","pathname","search",i)),cn(!i.pathname||!i.pathname.includes("#"),t_("#","pathname","hash",i)),cn(!i.search||!i.search.includes("#"),t_("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(r||a==null)s=n;else{let h=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}s=h>=0?t[h]:"/"}let l=GV(i,s),c=a&&a!=="/"&&a.endsWith("/"),f=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Na=e=>e.join("/").replace(/\/\/+/g,"/"),ZV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),QV=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,XV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function JV(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ON=["post","put","patch","delete"];new Set(ON);const eW=["get",...ON];new Set(eW);/** * React Router v6.14.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=H.useRef(!1);return TN(()=>{a.current=!0}),H.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){n.go(l);return}let f=tS(l,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Na([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,i,e])}function ul(){let{matches:e}=H.useContext(zo),t=e[e.length-1];return t?t.params:{}}function rS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=H.useContext(zo),{pathname:i}=gn(),o=JSON.stringify(eS(r).map(a=>a.pathnameBase));return H.useMemo(()=>tS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function rW(e,t){return iW(e,t)}function iW(e,t,n){cl()||cn(!1);let{navigator:r}=H.useContext(ll),{matches:i}=H.useContext(zo),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"?su(t):t;s==="/"||(f=y.pathname)!=null&&f.startsWith(s)||cn(!1),c=y}else c=l;let h=c.pathname||"/",p=s==="/"?h:h.slice(s.length)||"/",g=RV(e,{pathname:p}),v=cW(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Na([s,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Na([s,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n);return t&&v?H.createElement(fy.Provider,{value:{location:vg({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:wa.Pop}},v):v}function oW(){let e=hW(),t=JV(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 H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},t),n?H.createElement("pre",{style:i},n):null,o)}const aW=H.createElement(oW,null);class sW extends H.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?H.createElement(zo.Provider,{value:this.props.routeContext},H.createElement(EN.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lW(e){let{routeContext:t,match:n,children:r}=e,i=H.useContext(nS);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),H.createElement(zo.Provider,{value:t},r)}function cW(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,h=null;n&&(h=l.route.errorElement||aW);let p=t.concat(o.slice(0,c+1)),g=()=>{let v;return f?v=h:l.route.Component?v=H.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=s,H.createElement(lW,{match:l,routeContext:{outlet:s,matches:p,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?H.createElement(sW,{location:n.location,revalidation:n.revalidation,component:h,error:f,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var m1;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(m1||(m1={}));var Od;(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"})(Od||(Od={}));function uW(e){let t=H.useContext(nS);return t||cn(!1),t}function fW(e){let t=H.useContext(CN);return t||cn(!1),t}function dW(e){let t=H.useContext(zo);return t||cn(!1),t}function PN(e){let t=dW(),n=t.matches[t.matches.length-1];return n.route.id||cn(!1),n.route.id}function hW(){var e;let t=H.useContext(EN),n=fW(Od.UseRouteError),r=PN(Od.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function pW(){let{router:e}=uW(m1.UseNavigateStable),t=PN(Od.UseNavigateStable),n=H.useRef(!1);return TN(()=>{n.current=!0}),H.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,vg({fromRouteId:t},o)))},[e,t])}function iS(e){let{to:t,replace:n,state:r,relative:i}=e;cl()||cn(!1);let{matches:o}=H.useContext(zo),{pathname:a}=gn(),s=ao(),l=tS(t,eS(o).map(f=>f.pathnameBase),a,i==="path"),c=JSON.stringify(l);return H.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:i}),[s,c,i,n,r]),null}function vt(e){cn(!1)}function mW(e){let{basename:t="/",children:n=null,location:r,navigationType:i=wa.Pop,navigator:o,static:a=!1}=e;cl()&&cn(!1);let s=t.replace(/^\/*/,"/"),l=H.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof r=="string"&&(r=su(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:g="default"}=r,v=H.useMemo(()=>{let y=J2(c,s);return y==null?null:{location:{pathname:y,search:f,hash:h,state:p,key:g},navigationType:i}},[s,c,f,h,p,g,i]);return v==null?null:H.createElement(ll.Provider,{value:l},H.createElement(fy.Provider,{children:n,value:v}))}function dy(e){let{children:t,location:n}=e;return rW(g1(t),n)}var KP;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(KP||(KP={}));new Promise(()=>{});function g1(e,t){t===void 0&&(t=[]);let n=[];return H.Children.forEach(e,(r,i)=>{if(!H.isValidElement(r))return;let o=[...t,i];if(r.type===H.Fragment){n.push.apply(n,g1(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=g1(r.props.children,o)),n.push(a)}),n}/** * React Router DOM v6.14.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function gW(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vW(e,t){return e.button===0&&(!t||t==="_self")&&!gW(e)}const yW=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],_W=["aria-current","caseSensitive","className","end","style","to","children"],bW="startTransition",ZP=uF[bW];function MN(e){let{basename:t,children:n,future:r,window:i}=e,o=H.useRef();o.current==null&&(o.current=MV({window:i,v5Compat:!0}));let a=o.current,[s,l]=H.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},f=H.useCallback(h=>{c&&ZP?ZP(()=>l(h)):l(h)},[l,c]);return H.useLayoutEffect(()=>a.listen(f),[a,f]),H.createElement(mW,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}const wW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ft=H.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:f}=t,h=kN(t,yW),{basename:p}=H.useContext(ll),g,v=!1;if(typeof c=="string"&&xW.test(c)&&(g=c,wW))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),C=J2(S.pathname,p);S.origin===w.origin&&C!=null?c=C+S.search+S.hash:v=!0}catch{}let y=tW(c,{relative:i}),x=SW(c,{replace:a,state:s,target:l,preventScrollReset:f,relative:i});function b(w){r&&r(w),w.defaultPrevented||x(w)}return H.createElement("a",yg({},h,{href:g||y,onClick:v||o?r:b,ref:n,target:l}))}),DN=H.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=kN(t,_W),h=rS(l,{relative:f.relative}),p=gn(),g=H.useContext(CN),{navigator:v}=H.useContext(ll),y=v.encodeLocation?v.encodeLocation(h).pathname:h.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,T;typeof o=="function"?T=o({isActive:w,isPending:S}):T=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let P=typeof s=="function"?s({isActive:w,isPending:S}):s;return H.createElement(Ft,yg({},f,{"aria-current":C,className:T,ref:n,style:P,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var QP;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(QP||(QP={}));var XP;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(XP||(XP={}));function SW(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a}=t===void 0?{}:t,s=ao(),l=gn(),c=rS(e,{relative:a});return H.useCallback(f=>{if(vW(f,n)){f.preventDefault();let h=r!==void 0?r:gg(l)===gg(c);s(e,{replace:h,state:i,preventScrollReset:o,relative:a})}},[l,s,c,r,i,n,e,o,a])}const OW="shlink-web-client",CW="A React-based progressive web application for shlink",EW="/shlink-web-client/feature/update-deps",TW="https://github.com/shlinkio/shlink-web-client",PW="MIT",kW={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss shlink-web-component/*.scss shlink-web-component/**/*.scss shlink-frontend-kit/*.scss shlink-frontend-kit/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src shlink-web-component shlink-frontend-kit 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"},MW={"@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",bootstrap:"^5.3.1",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",qs:"^6.11.2",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":"^6.3.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"},DW={"@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.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.15.0","@types/react-dom":"^18.0.10","@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"},LW=[">0.2%","not dead","not ie <= 11","not op_mini all"],_g={name:OW,description:CW,private:!1,homepage:EW,repository:TW,license:PW,scripts:kW,dependencies:MW,devDependencies:DW,browserslist:LW};var ji,ro=".",LN="function",RN="string",jN="__global__",oS="Provider",RW=0,aS=Array.prototype.slice,jW=function(t,n){var r=t[n];if(r===void 0&&ji.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},hy=function(t){var n;return this.nested[t]||(n=ji.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},NN=function(t){return t.split(ro).reduce(jW,this)},NW=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]},AW=function(t,n){var r,i;return typeof t===LN&&(n=t,t=jN),r=t.split(ro),i=r.shift(),r.length?hy.call(this,i).middleware(r.join(ro),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},IW=function(t,n){return n(t)},JP=function(t,n){return(t[n]||[]).concat(t.__global__||[])},FW=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+oS,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=JP(a,t).reduce(IW,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:NW(JP(s,t),t,f,o)}},Object.defineProperties(o,i),this},AN=function(t,n){var r,i;return r=t.split(ro),this.providerMap[t]&&r.length===1&&!this.container[t+oS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(hy.call(this,i).provider(r.join(ro),n),this):FW.call(this,i,n))},sS=function(t,n){return AN.call(this,t,function(){this.$get=n})},IN=function(t,n,r){var i=arguments.length>3?aS.call(arguments,3):[],o=this;return sS.call(this,t,function(){var s=n,l=i.map(NN,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},$W=function(t,n){return IN.apply(this,[t,n,!0].concat(aS.call(arguments,2)))},BW=function(t,n){return IN.apply(this,[t,n,!1].concat(aS.call(arguments,2)))},FN=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},$N=function(t,n){var r=t[n];return r||(r={},FN.call(t,n,r)),r},UW=function(t,n){var r;return r=t.split(ro),t=r.pop(),FN.call(r.reduce($N,this.container),t,n),this},zW=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},HW=function(t,n){var r=t.split(ro);return t=r.pop(),zW.call(r.reduce($N,this.container),t,n),this},BN=function(t,n){var r,i;return typeof t===LN&&(n=t,t=jN),r=t.split(ro),i=r.shift(),r.length?hy.call(this,i).decorator(r.join(ro),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},VW=function(t){return this.deferred.push(t),this},WW=function(t){return(t||[]).map(NN,this.container)},YW=function(t,n){return sS.call(this,t,function(i){return{instance:n.bind(n,i)}})},qW=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},lS=function(t){return Object.keys(t||this.container||{}).filter(qW)},bg={},GW=function(t){var n;return typeof t===RN?(n=bg[t],n||(bg[t]=n=new ji,n.constant("BOTTLE_NAME",t)),n):new ji},KW=function(t){typeof t===RN?delete bg[t]:bg={}},UN=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},ek=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+oS]},ZW=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(ro);a.length>1&&a.forEach(ek,hy.call(this,a[0])),ek.call(this,o),this.provider(o,n[o])}},this)},QW=function(t){return this.deferred.forEach(function(r){r(t)}),this};ji=function e(t){if(!(this instanceof e))return e.pop(t);this.id=RW++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:BN.bind(this),$register:UN.bind(this),$list:lS.bind(this)}};ji.prototype={constant:HW,decorator:BN,defer:VW,digest:WW,factory:sS,instanceFactory:YW,list:lS,middleware:AW,provider:AN,resetProviders:ZW,register:UN,resolve:QW,service:$W,serviceFactory:BW,value:UW};ji.pop=GW;ji.clear=KW;ji.list=lS;ji.config={strict:!1};const zN=ji;var XW=function(){return!0};const HN=XW;function Lt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function wt(e){return function t(n){return arguments.length===0||Lt(n)?t:e.apply(this,arguments)}}function ut(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Lt(n)?t:wt(function(i){return e(n,i)});default:return Lt(n)&&Lt(r)?t:Lt(n)?wt(function(i){return e(i,r)}):Lt(r)?wt(function(i){return e(n,i)}):e(n,r)}}}function JW(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,Lt(s)||(o-=1),a+=1}return o<=0?n.apply(this,r):lu(o,py(e,r,n))}}var eY=ut(function(t,n){return t===1?wt(n):lu(t,py(t,[],n))});const wg=eY;function es(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return Lt(n)?t:ut(function(o,a){return e(n,o,a)});case 2:return Lt(n)&&Lt(r)?t:Lt(n)?ut(function(o,a){return e(o,r,a)}):Lt(r)?ut(function(o,a){return e(n,o,a)}):wt(function(o){return e(n,r,o)});default:return Lt(n)&&Lt(r)&&Lt(i)?t:Lt(n)&&Lt(r)?ut(function(o,a){return e(o,a,i)}):Lt(n)&&Lt(i)?ut(function(o,a){return e(o,r,a)}):Lt(r)&&Lt(i)?ut(function(o,a){return e(n,o,a)}):Lt(n)?wt(function(o){return e(o,r,i)}):Lt(r)?wt(function(o){return e(n,o,i)}):Lt(i)?wt(function(o){return e(n,r,o)}):e(n,r,i)}}}const oh=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function tY(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function cS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!oh(i)){for(var o=0;ot?n:t});const VN=nY;function Cm(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const WN=rY;var iY=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 oY(e){return new iY(e)}var aY=ut(function(t,n){return lu(t.length,function(){return t.apply(n,arguments)})});const sY=aY;function lY(e,t,n){for(var r=0,i=n.length;r=0;)n=ok[r],jr(n,t)&&!pY(i,n)&&(i[i.length]=n),r-=1;return i});const io=mY;var gY=ut(cS(["fantasy-land/map","map"],fY,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return wg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return cu(function(r,i){return r[i]=t(n[i]),r},{},io(n));default:return Cm(t,n)}}));const ah=gY,v1=Number.isInteger||function(t){return t<<0===t};var vY=ut(function(t,n){var r=t<0?n.length+t:t;return my(n)?n.charAt(r):n[r]});const qN=vY;var yY=ut(function(t,n){return t.map(function(r){for(var i=n,o=0,a;o1){var o=!Ho(r)&&jr(i,r)?r[i]:v1(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(v1(i)&&oh(r)){var a=[].concat(r);return a[i]=n,a}else return Ed(i,n,r)});const Dl=MY;function DY(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var LY=ut(function(t,n){var r=wg(t,n);return wg(t,function(){return cu(EY,ah(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const RY=LY;var jY=wt(function(t){return RY(t.length,t)});const NY=jY;function AY(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:ck(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:ck(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=io(e);if(a.length!==io(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(!(jr(c,t)&&dS(t[c],e[c],s,l)))return!1;o-=1}return!0}var XY=ut(function(t,n){return dS(t,n,[],[])});const hS=XY;function JY(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 i_(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 qu=function(t){return(t<10?"0":"")+t},tq=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+qu(t.getUTCMonth()+1)+"-"+qu(t.getUTCDate())+"T"+qu(t.getUTCHours())+":"+qu(t.getUTCMinutes())+":"+qu(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const nq=tq;function rq(e){return function(){return!e.apply(this,arguments)}}function iq(e,t){for(var n=0,r=t.length,i=[];n":QN(a,s)},r=function(o,a){return Cm(function(s){return i_(s)+": "+n(o[s])},a.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Cm(n,e).join(", ")+"))";case"[object Array]":return"["+Cm(n,e).concat(r(e,sh(function(o){return/^\d+$/.test(o)},io(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):i_(nq(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())+")":i_(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,io(e)).join(", ")+"}"}}var uq=wt(function(t){return QN(t,[])});const fq=uq;var dq=wt(function(t){var n=uS(VN,0,ah(function(r){return r[0].length},t));return lu(n,function(){for(var r=0;ra?1:0})});const Gq=qq;var Kq=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),Af=e=>!!(e!=null&&e.id),oA=e=>!!(e!=null&&e.version),iG=e=>!!(e!=null&&e.serverNotFound),oG=e=>Af(e)?e.id:"",aG=e=>Bq(["id","autoConnect"],e);var sG={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"]},lG=sG,cG={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"]},vS=cG,uG={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"]},fG={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"]},dG=fG,aA={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"]},hG={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"]},sA={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"]},pG={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=pG,gG={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"]},yS=gG,vG={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"]},yG={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"]},_G={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"]},fk={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"]},bG={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"]},wG=bG,xG={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"]},lA=xG,SG={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"]},OG={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"]},CG={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"]},EG=CG,_S={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"]},cA={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"]},dk={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"]},TG={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"]},uA={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"]},PG={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"]},kG=PG,MG={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"]},DG={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"]},bS=DG,LG={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"]},RG=LG,jG={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"]},NG={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"]},AG=NG,IG={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"]},FG=IG,$G={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"]},BG=$G,UG={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"]},fA=UG,zG={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"]},HG={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"]},VG={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"]},WG=VG,YG={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"]},wS={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"]},qG={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"]},_1=qG,GG={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"]},KG={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"]},ZG=KG,hk={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"]},QG={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"]},XG=QG,JG={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"]},eK={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"]},tK={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"]},nK={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"]},Pd={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 pk(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 It.head.insertBefore(t,r),e}}var TK="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Rd(){for(var e=12,t="";e-- >0;)t+=TK[Math.random()*62|0];return t}function fu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function TS(e){return e.classList?fu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function SA(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function PK(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(SA(e[n]),'" ')},"").trim()}function vy(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function PS(e){return e.size!==Qi.size||e.x!==Qi.x||e.y!==Qi.y||e.rotate!==Qi.rotate||e.flipX||e.flipY}function kK(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 MK(e){var t=e.transform,n=e.width,r=n===void 0?w1:n,i=e.height,o=i===void 0?w1:i,a=e.startCentered,s=a===void 0?!1:a,l="";return s&&gA?l+="translate(".concat(t.x/ea-r/2,"em, ").concat(t.y/ea-o/2,"em) "):s?l+="translate(calc(-50% + ".concat(t.x/ea,"em), calc(-50% + ").concat(t.y/ea,"em)) "):l+="translate(".concat(t.x/ea,"em, ").concat(t.y/ea,"em) "),l+="scale(".concat(t.size/ea*(t.flipX?-1:1),", ").concat(t.size/ea*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var DK=`: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"; --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp"; --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp"; --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; } svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { overflow: visible; box-sizing: content-box; } .svg-inline--fa { display: var(--fa-display, inline-block); height: 1em; overflow: visible; vertical-align: -0.125em; } .svg-inline--fa.fa-2xs { vertical-align: 0.1em; } .svg-inline--fa.fa-xs { vertical-align: 0em; } .svg-inline--fa.fa-sm { vertical-align: -0.0714285705em; } .svg-inline--fa.fa-lg { vertical-align: -0.2em; } .svg-inline--fa.fa-xl { vertical-align: -0.25em; } .svg-inline--fa.fa-2xl { vertical-align: -0.3125em; } .svg-inline--fa.fa-pull-left { margin-right: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-pull-right { margin-left: var(--fa-pull-margin, 0.3em); width: auto; } .svg-inline--fa.fa-li { width: var(--fa-li-width, 2em); top: 0.25em; } .svg-inline--fa.fa-fw { width: var(--fa-fw-width, 1.25em); } .fa-layers svg.svg-inline--fa { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; } .fa-layers-counter, .fa-layers-text { display: inline-block; position: absolute; text-align: center; } .fa-layers { display: inline-block; height: 1em; position: relative; text-align: center; vertical-align: -0.125em; width: 1em; } .fa-layers svg.svg-inline--fa { -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-text { left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-counter { background-color: var(--fa-counter-background-color, #ff253a); border-radius: var(--fa-counter-border-radius, 1em); box-sizing: border-box; color: var(--fa-inverse, #fff); line-height: var(--fa-counter-line-height, 1); max-width: var(--fa-counter-max-width, 5em); min-width: var(--fa-counter-min-width, 1.5em); overflow: hidden; padding: var(--fa-counter-padding, 0.25em 0.5em); right: var(--fa-right, 0); text-overflow: ellipsis; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-counter-scale, 0.25)); transform: scale(var(--fa-counter-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-bottom-right { bottom: var(--fa-bottom, 0); right: var(--fa-right, 0); top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom right; transform-origin: bottom right; } .fa-layers-bottom-left { bottom: var(--fa-bottom, 0); left: var(--fa-left, 0); right: auto; top: auto; -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: bottom left; transform-origin: bottom left; } .fa-layers-top-right { top: var(--fa-top, 0); right: var(--fa-right, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-top-left { left: var(--fa-left, 0); right: auto; top: var(--fa-top, 0); -webkit-transform: scale(var(--fa-layers-scale, 0.25)); transform: scale(var(--fa-layers-scale, 0.25)); -webkit-transform-origin: top left; transform-origin: top left; } .fa-1x { font-size: 1em; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-6x { font-size: 6em; } .fa-7x { font-size: 7em; } .fa-8x { font-size: 8em; } .fa-9x { font-size: 9em; } .fa-10x { font-size: 10em; } .fa-2xs { font-size: 0.625em; line-height: 0.1em; vertical-align: 0.225em; } .fa-xs { font-size: 0.75em; line-height: 0.0833333337em; vertical-align: 0.125em; } .fa-sm { font-size: 0.875em; line-height: 0.0714285718em; vertical-align: 0.0535714295em; } .fa-lg { font-size: 1.25em; line-height: 0.05em; vertical-align: -0.075em; } .fa-xl { font-size: 1.5em; line-height: 0.0416666682em; vertical-align: -0.125em; } .fa-2xl { font-size: 2em; line-height: 0.03125em; vertical-align: -0.1875em; } .fa-fw { text-align: center; width: 1.25em; } .fa-ul { list-style-type: none; margin-left: var(--fa-li-margin, 2.5em); padding-left: 0; } .fa-ul > li { position: relative; } .fa-li { left: calc(var(--fa-li-width, 2em) * -1); position: absolute; text-align: center; width: var(--fa-li-width, 2em); line-height: inherit; } .fa-border { border-color: var(--fa-border-color, #eee); border-radius: var(--fa-border-radius, 0.1em); border-style: var(--fa-border-style, solid); border-width: var(--fa-border-width, 0.08em); padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); } .fa-pull-left { float: left; margin-right: var(--fa-pull-margin, 0.3em); } .fa-pull-right { float: right; margin-left: var(--fa-pull-margin, 0.3em); } .fa-beat { -webkit-animation-name: fa-beat; animation-name: fa-beat; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-bounce { -webkit-animation-name: fa-bounce; animation-name: fa-bounce; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); } .fa-fade { -webkit-animation-name: fa-fade; animation-name: fa-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-beat-fade { -webkit-animation-name: fa-beat-fade; animation-name: fa-beat-fade; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); } .fa-flip { -webkit-animation-name: fa-flip; animation-name: fa-flip; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); animation-timing-function: var(--fa-animation-timing, ease-in-out); } .fa-shake { -webkit-animation-name: fa-shake; animation-name: fa-shake; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-delay: var(--fa-animation-delay, 0s); animation-delay: var(--fa-animation-delay, 0s); -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 2s); animation-duration: var(--fa-animation-duration, 2s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, linear); animation-timing-function: var(--fa-animation-timing, linear); } .fa-spin-reverse { --fa-animation-direction: reverse; } .fa-pulse, .fa-spin-pulse { -webkit-animation-name: fa-spin; animation-name: fa-spin; -webkit-animation-direction: var(--fa-animation-direction, normal); animation-direction: var(--fa-animation-direction, normal); -webkit-animation-duration: var(--fa-animation-duration, 1s); animation-duration: var(--fa-animation-duration, 1s); -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); animation-iteration-count: var(--fa-animation-iteration-count, infinite); -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); animation-timing-function: var(--fa-animation-timing, steps(8)); } @media (prefers-reduced-motion: reduce) { .fa-beat, .fa-bounce, .fa-fade, .fa-beat-fade, .fa-flip, .fa-pulse, .fa-shake, .fa-spin, .fa-spin-pulse { -webkit-animation-delay: -1ms; animation-delay: -1ms; -webkit-animation-duration: 1ms; animation-duration: 1ms; -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-transition-delay: 0s; transition-delay: 0s; -webkit-transition-duration: 0s; transition-duration: 0s; } } @-webkit-keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @keyframes fa-beat { 0%, 90% { -webkit-transform: scale(1); transform: scale(1); } 45% { -webkit-transform: scale(var(--fa-beat-scale, 1.25)); transform: scale(var(--fa-beat-scale, 1.25)); } } @-webkit-keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @keyframes fa-bounce { 0% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 10% { -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); } 30% { -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); } 50% { -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); } 57% { -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); } 64% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } 100% { -webkit-transform: scale(1, 1) translateY(0); transform: scale(1, 1) translateY(0); } } @-webkit-keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @keyframes fa-fade { 50% { opacity: var(--fa-fade-opacity, 0.4); } } @-webkit-keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @keyframes fa-beat-fade { 0%, 100% { opacity: var(--fa-beat-fade-opacity, 0.4); -webkit-transform: scale(1); transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); transform: scale(var(--fa-beat-fade-scale, 1.125)); } } @-webkit-keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @keyframes fa-flip { 50% { -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } } @-webkit-keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @keyframes fa-shake { 0% { -webkit-transform: rotate(-15deg); transform: rotate(-15deg); } 4% { -webkit-transform: rotate(15deg); transform: rotate(15deg); } 8%, 24% { -webkit-transform: rotate(-18deg); transform: rotate(-18deg); } 12%, 28% { -webkit-transform: rotate(18deg); transform: rotate(18deg); } 16% { -webkit-transform: rotate(-22deg); transform: rotate(-22deg); } 20% { -webkit-transform: rotate(22deg); transform: rotate(22deg); } 32% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); } 36% { -webkit-transform: rotate(12deg); transform: rotate(12deg); } 40%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .fa-rotate-90 { -webkit-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { -webkit-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { -webkit-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { -webkit-transform: scale(1, -1); transform: scale(1, -1); } .fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { -webkit-transform: scale(-1, -1); transform: scale(-1, -1); } .fa-rotate-by { -webkit-transform: rotate(var(--fa-rotate-angle, none)); transform: rotate(var(--fa-rotate-angle, none)); } .fa-stack { display: inline-block; vertical-align: middle; height: 2em; position: relative; width: 2.5em; } .fa-stack-1x, .fa-stack-2x { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; z-index: var(--fa-stack-z-index, auto); } .svg-inline--fa.fa-stack-1x { height: 1em; width: 1.25em; } .svg-inline--fa.fa-stack-2x { height: 2em; width: 2.5em; } .fa-inverse { color: var(--fa-inverse, #fff); } .sr-only, .fa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .sr-only-focusable:not(:focus), .fa-sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } .svg-inline--fa .fa-primary { fill: var(--fa-primary-color, currentColor); opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa .fa-secondary { fill: var(--fa-secondary-color, currentColor); opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-primary { opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-secondary { opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa mask .fa-primary, .svg-inline--fa mask .fa-secondary { fill: black; } .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); }`;function OA(){var e=vA,t=yA,n=ze.cssPrefix,r=ze.replacementClass,i=DK;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 wk=!1;function o_(){ze.autoAddCss&&!wk&&(EK(OA()),wk=!0)}var LK={mixout:function(){return{dom:{css:OA,insertCss:o_}}},hooks:function(){return{beforeDOMElementCreation:function(){o_()},beforeI2svg:function(){o_()}}}},jo=Ha||{};jo[Ro]||(jo[Ro]={});jo[Ro].styles||(jo[Ro].styles={});jo[Ro].hooks||(jo[Ro].hooks={});jo[Ro].shims||(jo[Ro].shims=[]);var Ti=jo[Ro],CA=[],RK=function e(){It.removeEventListener("DOMContentLoaded",e),Eg=1,CA.map(function(t){return t()})},Eg=!1;Vo&&(Eg=(It.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(It.readyState),Eg||It.addEventListener("DOMContentLoaded",RK));function jK(e){Vo&&(Eg?setTimeout(e,0):CA.push(e))}function uh(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"?SA(e):"<".concat(t," ").concat(PK(r),">").concat(o.map(uh).join(""),"")}function xk(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var NK=function(t,n){return function(r,i,o,a){return t.call(n,r,i,o,a)}},a_=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=i!==void 0?NK(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 Sk(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 O1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=Sk(t);typeof Ti.hooks.addPack=="function"&&!i?Ti.hooks.addPack(e,Sk(t)):Ti.styles[e]=Fe(Fe({},Ti.styles[e]||{}),o),e==="fas"&&O1("fa",t)}var Ap,Ip,Fp,ic=Ti.styles,FK=Ti.shims,$K=(Ap={},xn(Ap,Rt,Object.values(Dd[Rt])),xn(Ap,Zt,Object.values(Dd[Zt])),Ap),kS=null,EA={},TA={},PA={},kA={},MA={},BK=(Ip={},xn(Ip,Rt,Object.keys(kd[Rt])),xn(Ip,Zt,Object.keys(kd[Zt])),Ip);function UK(e){return~wK.indexOf(e)}function zK(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!UK(i)?i:null}var DA=function(){var t=function(o){return a_(ic,function(a,s,l){return a[l]=a_(s,o,{}),a},{})};EA=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}),TA=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}),MA=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 ic||ze.autoFetchSvg,r=a_(FK,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:{}});PA=r.names,kA=r.unicodes,kS=yy(ze.styleDefault,{family:ze.familyDefault})};CK(function(e){kS=yy(e.styleDefault,{family:ze.familyDefault})});DA();function MS(e,t){return(EA[e]||{})[t]}function HK(e,t){return(TA[e]||{})[t]}function Rs(e,t){return(MA[e]||{})[t]}function LA(e){return PA[e]||{prefix:null,iconName:null}}function VK(e){var t=kA[e],n=MS("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Va(){return kS}var DS=function(){return{prefix:null,iconName:null,rest:[]}};function yy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Rt:n,i=kd[r][e],o=Md[r][e]||Md[r][i],a=e in Ti.styles?e:null;return o||a||null}var Ok=(Fp={},xn(Fp,Rt,Object.keys(Dd[Rt])),xn(Fp,Zt,Object.keys(Dd[Zt])),Fp);function _y(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,Rt,"".concat(ze.cssPrefix,"-").concat(Rt)),xn(t,Zt,"".concat(ze.cssPrefix,"-").concat(Zt)),t),a=null,s=Rt;(e.includes(o[Rt])||e.some(function(c){return Ok[Rt].includes(c)}))&&(s=Rt),(e.includes(o[Zt])||e.some(function(c){return Ok[Zt].includes(c)}))&&(s=Zt);var l=e.reduce(function(c,f){var h=zK(ze.cssPrefix,f);if(ic[f]?(f=$K[s].includes(f)?mK[s][f]:f,a=f,c.prefix=f):BK[s].indexOf(f)>-1?(a=f,c.prefix=yy(f,{family:s})):h?c.iconName=h:f!==ze.replacementClass&&f!==o[Rt]&&f!==o[Zt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=a==="fa"?LA(c.iconName):{},g=Rs(c.prefix,c.iconName);p.prefix&&(a=null),c.iconName=p.iconName||g||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!ic.far&&ic.fas&&!ze.autoFetchSvg&&(c.prefix="fas")}return c},DS());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&&(ic.fass||ze.autoFetchSvg)&&(l.prefix="fass",l.iconName=Rs(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||a==="fa")&&(l.prefix=Va()||"fas"),l}var WK=function(){function e(){rK(this,e),this.definitions={}}return iK(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(h){typeof h=="string"&&(n[s][h]=c)}),n[s][l]=c}),n}}]),e}(),Ck=[],oc={},_c={},YK=Object.keys(_c);function qK(e,t){var n=t.mixoutsTo;return Ck=e,oc={},Object.keys(_c).forEach(function(r){YK.indexOf(r)===-1&&delete _c[r]}),Ck.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(a){typeof i[a]=="function"&&(n[a]=i[a]),Cg(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){oc[a]||(oc[a]=[]),oc[a].push(o[a])})}r.provides&&r.provides(_c)}),n}function C1(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 Vo?(Js("beforeI2svg",t),No("pseudoElements2svg",t),No("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,jK(function(){QK({autoReplaceSvgRoot:n}),Js("watch",t)})}},ZK={icon:function(t){if(t===null)return null;if(Cg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Rs(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=yy(t[0]);return{prefix:r,iconName:Rs(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(ze.cssPrefix,"-"))>-1||t.match(gK))){var i=_y(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Va(),iconName:Rs(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=Va();return{prefix:o,iconName:Rs(o,t)||t}}}},Kr={noAuto:GK,config:ze,dom:KK,parse:ZK,library:RA,findIconDefinition:E1,toHtml:uh},QK=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?It:n;(Object.keys(Ti.styles).length>0||ze.autoFetchSvg)&&Vo&&ze.autoReplaceSvg&&Kr.dom.i2svg({node:r})};function by(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return uh(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Vo){var r=It.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function XK(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(PS(a)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=vy(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 JK(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 LS(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,h=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(z){return h.classes.indexOf(z)===-1}).filter(function(z){return z!==""||!!z}).concat(h.classes).join(" "),S={children:[],attributes:Fe(Fe({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},C=b&&!~h.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};g&&(S.attributes[Xs]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(f||Rd())},children:[l]}),delete S.attributes.title);var T=Fe(Fe({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:a,symbol:s,styles:Fe(Fe({},C),h.styles)}),P=r.found&&n.found?No("generateAbstractMask",T)||{children:[],attributes:{}}:No("generateAbstractIcon",T)||{children:[],attributes:{}},R=P.children,j=P.attributes;return T.children=R,T.attributes=j,s?JK(T):XK(T)}function Ek(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[Xs]="");var f=Fe({},a.styles);PS(i)&&(f.transform=MK({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var h=vy(f);h.length>0&&(c.style=h);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function eZ(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=vy(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 s_=Ti.styles;function T1(e){var t=e[0],n=e[1],r=e.slice(4),i=xS(r,1),o=i[0],a=null;return Array.isArray(o)?a={tag:"g",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ls.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ls.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(ze.cssPrefix,"-").concat(Ls.PRIMARY),fill:"currentColor",d:o[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:a}}var tZ={found:!1,width:512,height:512};function nZ(e,t){!_A&&!ze.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function P1(e,t){var n=t;return t==="fa"&&ze.styleDefault!==null&&(t=Va()),new Promise(function(r,i){if(No("missingIconAbstract"),n==="fa"){var o=LA(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&s_[t]&&s_[t][e]){var a=s_[t][e];return r(T1(a))}nZ(e,t),r(Fe(Fe({},tZ),{},{icon:ze.showMissingIcons&&e?No("missingIconAbstract")||{}:{}}))})}var Tk=function(){},k1=ze.measurePerformance&&Mp&&Mp.mark&&Mp.measure?Mp:{mark:Tk,measure:Tk},pf='FA "6.4.2"',rZ=function(t){return k1.mark("".concat(pf," ").concat(t," begins")),function(){return jA(t)}},jA=function(t){k1.mark("".concat(pf," ").concat(t," ends")),k1.measure("".concat(pf," ").concat(t),"".concat(pf," ").concat(t," begins"),"".concat(pf," ").concat(t," ends"))},RS={begin:rZ,end:jA},Em=function(){};function Pk(e){var t=e.getAttribute?e.getAttribute(Xs):null;return typeof t=="string"}function iZ(e){var t=e.getAttribute?e.getAttribute(OS):null,n=e.getAttribute?e.getAttribute(CS):null;return t&&n}function oZ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(ze.replacementClass)}function aZ(){if(ze.autoReplaceSvg===!0)return Tm.replace;var e=Tm[ze.autoReplaceSvg];return e||Tm.replace}function sZ(e){return It.createElementNS("http://www.w3.org/2000/svg",e)}function lZ(e){return It.createElement(e)}function NA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?sZ:lZ:n;if(typeof e=="string")return It.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(NA(a,{ceFn:r}))}),i}function cZ(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var Tm={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(NA(i),n)}),n.getAttribute(Xs)===null&&ze.keepOriginalSource){var r=It.createComment(cZ(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~TS(n).indexOf(ze.replacementClass))return Tm.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 uh(s)}).join(` `);n.setAttribute(Xs,""),n.innerHTML=a}};function kk(e){e()}function AA(e,t){var n=typeof t=="function"?t:Em;if(e.length===0)n();else{var r=kk;ze.mutateApproach===hK&&(r=Ha.requestAnimationFrame||kk),r(function(){var i=aZ(),o=RS.begin("mutate");e.map(i),o(),n()})}}var jS=!1;function IA(){jS=!0}function M1(){jS=!1}var Tg=null;function Mk(e){if(_k&&ze.observeMutations){var t=e.treeCallback,n=t===void 0?Em:t,r=e.nodeCallback,i=r===void 0?Em:r,o=e.pseudoElementsCallback,a=o===void 0?Em:o,s=e.observeMutationsRoot,l=s===void 0?It:s;Tg=new _k(function(c){if(!jS){var f=Va();fu(c).forEach(function(h){if(h.type==="childList"&&h.addedNodes.length>0&&!Pk(h.addedNodes[0])&&(ze.searchPseudoElements&&a(h.target),n(h.target)),h.type==="attributes"&&h.target.parentNode&&ze.searchPseudoElements&&a(h.target.parentNode),h.type==="attributes"&&Pk(h.target)&&~bK.indexOf(h.attributeName))if(h.attributeName==="class"&&iZ(h.target)){var p=_y(TS(h.target)),g=p.prefix,v=p.iconName;h.target.setAttribute(OS,g||f),v&&h.target.setAttribute(CS,v)}else oZ(h.target)&&i(h.target)})}}),Vo&&Tg.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function uZ(){Tg&&Tg.disconnect()}function fZ(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 dZ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=_y(TS(e));return i.prefix||(i.prefix=Va()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=HK(i.prefix,e.innerText)||MS(i.prefix,S1(e.innerText))),!i.iconName&&ze.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function hZ(e){var t=fu(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||Rd()):(t["aria-hidden"]="true",t.focusable="false")),t}function pZ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Qi,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Dk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=dZ(e),r=n.iconName,i=n.prefix,o=n.rest,a=hZ(e),s=C1("parseNodeAttributes",{},e),l=t.styleParser?fZ(e):[];return Fe({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:Qi,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:a}},s)}var mZ=Ti.styles;function FA(e){var t=ze.autoReplaceSvg==="nest"?Dk(e,{styleParser:!1}):Dk(e);return~t.extra.classes.indexOf(bA)?No("generateLayersText",e,t):No("generateSvgReplacementMutation",e,t)}var Wa=new Set;ES.map(function(e){Wa.add("fa-".concat(e))});Object.keys(kd[Rt]).map(Wa.add.bind(Wa));Object.keys(kd[Zt]).map(Wa.add.bind(Wa));Wa=lh(Wa);function Lk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Vo)return Promise.resolve();var n=It.documentElement.classList,r=function(h){return n.add("".concat(bk,"-").concat(h))},i=function(h){return n.remove("".concat(bk,"-").concat(h))},o=ze.autoFetchSvg?Wa:ES.map(function(f){return"fa-".concat(f)}).concat(Object.keys(mZ));o.includes("fa")||o.push("fa");var a=[".".concat(bA,":not([").concat(Xs,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(Xs,"])")})).join(", ");if(a.length===0)return Promise.resolve();var s=[];try{s=fu(e.querySelectorAll(a))}catch{}if(s.length>0)r("pending"),i("complete");else return Promise.resolve();var l=RS.begin("onTree"),c=s.reduce(function(f,h){try{var p=FA(h);p&&f.push(p)}catch(g){_A||g.name==="MissingIcon"&&console.error(g)}return f},[]);return new Promise(function(f,h){Promise.all(c).then(function(p){AA(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),h(p)})})}function gZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;FA(e).then(function(n){n&&AA([n],t)})}function vZ(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:E1(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:E1(i||{})),e(r,Fe(Fe({},n),{},{mask:i}))}}var yZ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Qi: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,h=n.title,p=h===void 0?null:h,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 T=t.prefix,P=t.iconName,R=t.icon;return by(Fe({type:"icon"},t),function(){return Js("beforeDOMElementCreation",{iconDefinition:t,params:n}),ze.autoA11y&&(p?w["aria-labelledby"]="".concat(ze.replacementClass,"-title-").concat(v||Rd()):(w["aria-hidden"]="true",w.focusable="false")),LS({icons:{main:T1(R),mask:l?T1(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:T,iconName:P,transform:Fe(Fe({},Qi),i),symbol:a,title:p,maskId:f,titleId:v,extra:{attributes:w,styles:C,classes:x}})})}},_Z={mixout:function(){return{icon:vZ(yZ)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=Lk,n.nodeCallback=gZ,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?It:r,o=n.callback,a=o===void 0?function(){}:o;return Lk(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,h=r.maskId,p=r.extra;return new Promise(function(g,v){Promise.all([P1(i,s),f.iconName?P1(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=xS(y,2),b=x[0],w=x[1];g([n,LS({icons:{main:b,mask:w},prefix:s,iconName:i,transform:l,symbol:c,maskId:h,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=vy(s);l.length>0&&(i.style=l);var c;return PS(a)&&(c=No("generateAbstractTransformGrouping",{main:o,transform:a,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},bZ={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 by({type:"layer"},function(){Js("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(lh(o)).join(" ")},children:a}]})}}}},wZ={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,h=f===void 0?{}:f;return by({type:"counter",content:n},function(){return Js("beforeDOMElementCreation",{content:n,params:r}),eZ({content:n.toString(),title:o,extra:{attributes:c,styles:h,classes:["".concat(ze.cssPrefix,"-layers-counter")].concat(lh(s))}})})}}}},xZ={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Qi:i,a=r.title,s=a===void 0?null:a,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,p=r.styles,g=p===void 0?{}:p;return by({type:"text",content:n},function(){return Js("beforeDOMElementCreation",{content:n,params:r}),Ek({content:n,transform:Fe(Fe({},Qi),o),title:s,extra:{attributes:h,styles:g,classes:["".concat(ze.cssPrefix,"-layers-text")].concat(lh(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,a=r.extra,s=null,l=null;if(gA){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,Ek({content:n.innerHTML,width:s,height:l,transform:o,title:i,extra:a,watchable:!0})])}}},SZ=new RegExp('"',"ug"),Rk=[1105920,1112319];function OZ(e){var t=e.replace(SZ,""),n=IK(t,0),r=n>=Rk[0]&&n<=Rk[1],i=t.length===2?t[0]===t[1]:!1;return{value:S1(i?t[0]:t),isSecondary:r||i}}function jk(e,t){var n="".concat(dK).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=fu(e.children),a=o.filter(function(R){return R.getAttribute(x1)===t})[0],s=Ha.getComputedStyle(e,t),l=s.getPropertyValue("font-family").match(vK),c=s.getPropertyValue("font-weight"),f=s.getPropertyValue("content");if(a&&!l)return e.removeChild(a),r();if(l&&f!=="none"&&f!==""){var h=s.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Zt:Rt,g=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?Md[p][l[2].toLowerCase()]:yK[p][c],v=OZ(h),y=v.value,x=v.isSecondary,b=l[0].startsWith("FontAwesome"),w=MS(g,y),S=w;if(b){var C=VK(y);C.iconName&&C.prefix&&(w=C.iconName,g=C.prefix)}if(w&&!x&&(!a||a.getAttribute(OS)!==g||a.getAttribute(CS)!==S)){e.setAttribute(n,S),a&&e.removeChild(a);var T=pZ(),P=T.extra;P.attributes[x1]=t,P1(w,g).then(function(R){var j=LS(Fe(Fe({},T),{},{icons:{main:R,mask:DS()},prefix:g,iconName:S,extra:P,watchable:!0})),z=It.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(z,e.firstChild):e.appendChild(z),z.outerHTML=j.map(function(N){return uh(N)}).join(` `),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function CZ(e){return Promise.all([jk(e,"::before"),jk(e,"::after")])}function EZ(e){return e.parentNode!==document.head&&!~pK.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(x1)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function Nk(e){if(Vo)return new Promise(function(t,n){var r=fu(e.querySelectorAll("*")).filter(EZ).map(CZ),i=RS.begin("searchPseudoElements");IA(),Promise.all(r).then(function(){i(),M1(),t()}).catch(function(){i(),M1(),n()})})}var TZ={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=Nk,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?It:r;ze.searchPseudoElements&&Nk(i)}}},Ak=!1,PZ={mixout:function(){return{dom:{unwatch:function(){IA(),Ak=!0}}}},hooks:function(){return{bootstrap:function(){Mk(C1("mutationObserverCallbacks",{}))},noAuto:function(){uZ()},watch:function(n){var r=n.observeMutationsRoot;Ak?M1():Mk(C1("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},Ik=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)},kZ={mixout:function(){return{parse:{transform:function(n){return Ik(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=Ik(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)"),h={transform:"".concat(l," ").concat(c," ").concat(f)},p={transform:"translate(".concat(a/2*-1," -256)")},g={outer:s,inner:h,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)}]}]}}}},l_={x:0,y:0,width:"100%",height:"100%"};function Fk(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 MZ(e){return e.tag==="g"?e.children:[e]}var DZ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?_y(i.split(" ").map(function(a){return a.trim()})):DS();return o.prefix||(o.prefix=Va()),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,h=a.width,p=a.icon,g=kK({transform:l,containerWidth:h,iconWidth:c}),v={tag:"rect",attributes:Fe(Fe({},l_),{},{fill:"white"})},y=f.children?{children:f.children.map(Fk)}:{},x={tag:"g",attributes:Fe({},g.inner),children:[Fk(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||Rd()),S="clip-".concat(s||Rd()),C={tag:"mask",attributes:Fe(Fe({},l_),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,b]},T={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:MZ(p)},C]};return r.push(T,{tag:"rect",attributes:Fe({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},l_)}),{children:r,attributes:i}}}},LZ={provides:function(t){var n=!1;Ha.matchMedia&&(n=Ha.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}}}},RZ={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}}}},jZ=[LK,_Z,bZ,wZ,xZ,TZ,PZ,kZ,DZ,LZ,RZ];qK(jZ,{mixoutsTo:Kr});Kr.noAuto;Kr.config;Kr.library;Kr.dom;var D1=Kr.parse;Kr.findIconDefinition;Kr.toHtml;var NZ=Kr.icon;Kr.layer;Kr.text;Kr.counter;var $A={exports:{}},AZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",IZ=AZ,FZ=IZ;function BA(){}function UA(){}UA.resetWarningCache=BA;var $Z=function(){function e(r,i,o,a,s,l){if(l!==FZ){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:UA,resetWarningCache:BA};return n.PropTypes=n,n};$A.exports=$Z();var BZ=$A.exports;const D=pi(BZ);function $k(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 xa(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function zZ(e,t){if(e==null)return{};var n=UZ(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 L1(e){return HZ(e)||VZ(e)||WZ(e)||YZ()}function HZ(e){if(Array.isArray(e))return R1(e)}function VZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WZ(e,t){if(e){if(typeof e=="string")return R1(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 R1(e,t)}}function R1(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 HA(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=QZ(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[zA(c)]=f}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=zZ(n,KZ);return i.attrs.style=xa(xa({},i.attrs.style),a),e.apply(void 0,[t.tag,xa(xa({},i.attrs),s)].concat(L1(r)))}var VA=!1;try{VA=!0}catch{}function XZ(){if(!VA&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function Bk(e){if(e&&Pg(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(D1.icon)return D1.icon(e);if(e===null)return null;if(e&&Pg(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 c_(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?ac({},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=Bk(n),f=c_("classes",[].concat(L1(qZ(e)),L1(o.split(" ")))),h=c_("transform",typeof e.transform=="string"?D1.transform(e.transform):e.transform),p=c_("mask",Bk(r)),g=NZ(c,xa(xa(xa(xa({},f),h),p),{},{symbol:i,title:a,titleId:s,maskId:l}));if(!g)return XZ("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])}),JZ(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 JZ=HA.bind(null,Y.createElement),WA={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 nQ(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oQ;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function ts(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function qA(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 Uk={};function j1(e){Uk[e]||(typeof console<"u"&&console.error(e),Uk[e]=!0)}function GA(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&j1('"'.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":Ic(window))==="object"&&window.Element||function(){};function NS(e,t,n){if(!(e[t]instanceof aQ))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var Fc=D.oneOfType([D.string,D.func,NS,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})]))]),kg={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},Mg=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],$p={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},sQ=["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"],AS=!!(typeof window<"u"&&window.document&&window.document.createElement);function lQ(e){return e&&Ic(e)==="object"?"current"in e:!1}function KA(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function N1(e){var t=Ic(e);return e!=null&&(t==="object"||t==="function")}function zk(e){var t=Ic(e),n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&KA(e)==="[object Symbol]")return n;if(N1(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=N1(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 cQ(e){if(!N1(e))return!1;var t=KA(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function uQ(e){if(lQ(e))return e.current;if(cQ(e))return e();if(typeof e=="string"&&AS){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 Hk(e){return e===null?!1:Array.isArray(e)||AS&&typeof e.length=="number"}function jd(e,t){var n=uQ(e);return t?Hk(n)?n:n===null?[]:[n]:Hk(n)?n[0]:n}var fQ=["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"])'],dQ=["className","cssModule","noGutters","tag","widths"];function A1(){return A1=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 pQ(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"],Ll=D.oneOfType([D.number,D.string]),gQ={tag:rt,noGutters:GA(D.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:D.string,cssModule:D.object,xs:Ll,sm:Ll,md:Ll,lg:Ll,xl:Ll,xxl:Ll,widths:D.array};function dr(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=hQ(e,dQ),c=[];s.forEach(function(h,p){var g=e[h];if(delete l[h],!!g){var v=!p;c.push(v?"row-cols-".concat(g):"row-cols-".concat(h,"-").concat(g))}});var f=Ve(Se(t,r?"gx-0":null,"row",c),n);return Y.createElement(o,A1({},l,{className:f}))}dr.propTypes=gQ;var vQ=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function I1(){return I1=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={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},wQ=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function ZA(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,h=e.container,p=h===void 0?"fluid":h,g=e.tag,v=g===void 0?"nav":g,y=e.children,x=yQ(e,vQ),b=Ve(Se(i,"navbar",wQ(r),(t={"navbar-light":a,"navbar-dark":s},u_(t,"bg-".concat(f),f),u_(t,"fixed-".concat(l),l),u_(t,"sticky-".concat(c),c),t)),o),w=p&&p===!0?"container":"container-".concat(p);return Y.createElement(v,I1({},x,{className:b}),p?Y.createElement("div",{className:w},y):y)}ZA.propTypes=bQ;var xQ=["className","cssModule","tag"];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 OQ(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 CQ={className:D.string,cssModule:D.object,tag:rt};function QA(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=SQ(e,xQ),a=Ve(Se(t,"navbar-brand"),n);return Y.createElement(i,F1({},o,{className:a}))}QA.propTypes=CQ;var EQ=["className","cssModule","children","tag"];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 MQ(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 DQ={className:D.string,cssModule:D.object,tag:rt,type:D.string,children:D.node};function XA(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=kQ(e,EQ),s=Ve(Se(t,"navbar-toggler"),n);return Y.createElement(o,$1({"aria-label":"Toggle navigation"},TQ({type:"button"},a),{className:s}),r||Y.createElement("span",{className:Ve("navbar-toggler-icon",n)}))}XA.propTypes=DQ;var LQ=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","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 jQ(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={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])},AQ=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function IS(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,h=e.card,p=e.tag,g=p===void 0?"ul":p,v=RQ(e,LQ),y=Ve(Se(t,f?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,AQ(a),{"nav-tabs":r,"card-header-tabs":h&&r,"nav-pills":i,"card-header-pills":h&&i,"nav-justified":l,"nav-fill":c}),n);return Y.createElement(g,B1({},v,{className:y}))}IS.propTypes=NQ;var IQ=["className","cssModule","active","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 $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={active:D.bool,className:D.string,cssModule:D.object,tag:rt};function JA(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=FQ(e,IQ),s=Ve(Se(t,"nav-item",r?"active":!1),n);return Y.createElement(o,U1({},a,{className:s}))}JA.propTypes=BQ;function z1(e){"@babel/helpers - typeof";return z1=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},z1(e)}var UQ=["className","cssModule","active","tag","innerRef"];function H1(){return H1=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 HQ(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 VQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wk(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 Dg(e){return Dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dg(e)}var ZQ={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},t4=function(e){YQ(n,e);var t=qQ(n);function n(r){var i;return VQ(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(e4(i)),i}return WQ(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,h=zQ(i,UQ),p=Ve(Se(o,"nav-link",{disabled:h.disabled,active:s}),a);return Y.createElement(c,H1({},h,{ref:f,onClick:this.onClick,className:p}))}}]),n}(Y.Component);t4.propTypes=ZQ;const n4=t4;var QQ=["className","cssModule","variant","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 tX(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 nX={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 r4(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=eX(e,QQ),o=Ve(Se(t,"btn-close",n&&"btn-close-".concat(n)));return Y.createElement("button",W1({ref:r,type:"button",className:o},XQ({"aria-label":"close"},i)))}r4.propTypes=nX;var rX=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function Y1(){return Y1=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 oX(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 aX={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=H.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,h=e.size,p=e.tag,g=p===void 0?"button":p,v=e.innerRef,y=iX(e,rX);if(a)return Y.createElement(r4,y);var x="btn".concat(f?"-outline":"","-").concat(c),b=Ve(Se(o,"btn",x,h?"btn-".concat(h):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&g==="button"&&(g="a"),Y.createElement(g,Y1({type:g==="button"&&y.onClick?"button":void 0},y,{className:b,ref:v,onClick:t,"aria-label":r}))}yt.propTypes=aX;var i4=H.createContext(),o4=H.createContext();function q1(e){var t=e.children,n=H.useState(null),r=n[0],i=n[1],o=H.useRef(!1);H.useEffect(function(){return function(){o.current=!0}},[]);var a=H.useCallback(function(s){o.current||i(s)},[]);return H.createElement(i4.Provider,{value:r},H.createElement(o4.Provider,{value:a},t))}var a4=function(t){return Array.isArray(t)?t[0]:t},s4=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=zr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function _X(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];!si(o)||!oo(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 bX(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},{});!si(i)||!oo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const wX={name:"applyStyles",enabled:!0,phase:"write",fn:_X,effect:bX,requires:["computeStyles"]};function to(e){return e.split("-")[0]}var Bs=Math.max,Lg=Math.min,Bc=Math.round;function K1(){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 u4(){return!/^((?!chrome|android).)*safari/i.test(K1())}function Uc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&si(e)&&(i=e.offsetWidth>0&&Bc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Bc(r.height)/e.offsetHeight||1);var a=el(e)?zr(e):window,s=a.visualViewport,l=!u4()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function BS(e){var t=Uc(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 f4(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&$S(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ao(e){return zr(e).getComputedStyle(e)}function xX(e){return["table","td","th"].indexOf(oo(e))>=0}function ns(e){return((el(e)?e.ownerDocument:e.document)||window.document).documentElement}function wy(e){return oo(e)==="html"?e:e.assignedSlot||e.parentNode||($S(e)?e.host:null)||ns(e)}function Zk(e){return!si(e)||Ao(e).position==="fixed"?null:e.offsetParent}function SX(e){var t=/firefox/i.test(K1()),n=/Trident/i.test(K1());if(n&&si(e)){var r=Ao(e);if(r.position==="fixed")return null}var i=wy(e);for($S(i)&&(i=i.host);si(i)&&["html","body"].indexOf(oo(i))<0;){var o=Ao(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 dh(e){for(var t=zr(e),n=Zk(e);n&&xX(n)&&Ao(n).position==="static";)n=Zk(n);return n&&(oo(n)==="html"||oo(n)==="body"&&Ao(n).position==="static")?t:n||SX(e)||t}function US(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function $f(e,t,n){return Bs(e,Lg(t,n))}function OX(e,t,n){var r=$f(e,t,n);return r>n?n:r}function d4(){return{top:0,right:0,bottom:0,left:0}}function h4(e){return Object.assign({},d4(),e)}function p4(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var CX=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,h4(typeof t!="number"?t:p4(t,fh))};function EX(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=to(n.placement),l=US(s),c=[Er,di].indexOf(s)>=0,f=c?"height":"width";if(!(!o||!a)){var h=CX(i.padding,n),p=BS(o),g=l==="y"?Cr:Er,v=l==="y"?fi:di,y=n.rects.reference[f]+n.rects.reference[l]-a[l]-n.rects.popper[f],x=a[l]-n.rects.reference[l],b=dh(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,S=y/2-x/2,C=h[g],T=w-p[f]-h[v],P=w/2-p[f]/2+S,R=$f(C,P,T),j=l;n.modifiersData[r]=(t={},t[j]=R,t.centerOffset=R-P,t)}}function TX(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)||f4(t.elements.popper,i)&&(t.elements.arrow=i))}const PX={name:"arrow",enabled:!0,phase:"main",fn:EX,effect:TX,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zc(e){return e.split("-")[1]}var kX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function MX(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Bc(n*i)/i||0,y:Bc(r*i)/i||0}}function Qk(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,h=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=Er,C=Cr,T=window;if(c){var P=dh(n),R="clientHeight",j="clientWidth";if(P===zr(n)&&(P=ns(n),Ao(P).position!=="static"&&s==="absolute"&&(R="scrollHeight",j="scrollWidth")),P=P,i===Cr||(i===Er||i===di)&&o===Nd){C=fi;var z=h&&P===T&&T.visualViewport?T.visualViewport.height:P[R];y-=z-r.height,y*=l?1:-1}if(i===Er||(i===Cr||i===fi)&&o===Nd){S=di;var N=h&&P===T&&T.visualViewport?T.visualViewport.width:P[j];g-=N-r.width,g*=l?1:-1}}var V=Object.assign({position:s},c&&kX),W=f===!0?MX({x:g,y},zr(n)):{x:g,y};if(g=W.x,y=W.y,l){var ne;return Object.assign({},V,(ne={},ne[C]=w?"0":"",ne[S]=b?"0":"",ne.transform=(T.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",ne))}return Object.assign({},V,(t={},t[C]=w?y+"px":"",t[S]=b?g+"px":"",t.transform="",t))}function DX(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:to(t.placement),variation:zc(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,Qk(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,Qk(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 LX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:DX,data:{}};var Bp={passive:!0};function RX(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=zr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Bp)}),s&&l.addEventListener("resize",n.update,Bp),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Bp)}),s&&l.removeEventListener("resize",n.update,Bp)}}const jX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:RX,data:{}};var NX={left:"right",right:"left",bottom:"top",top:"bottom"};function Pm(e){return e.replace(/left|right|bottom|top/g,function(t){return NX[t]})}var AX={start:"end",end:"start"};function Xk(e){return e.replace(/start|end/g,function(t){return AX[t]})}function zS(e){var t=zr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function HS(e){return Uc(ns(e)).left+zS(e).scrollLeft}function IX(e,t){var n=zr(e),r=ns(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=u4();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+HS(e),y:l}}function FX(e){var t,n=ns(e),r=zS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Bs(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Bs(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+HS(e),l=-r.scrollTop;return Ao(i||n).direction==="rtl"&&(s+=Bs(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function VS(e){var t=Ao(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function m4(e){return["html","body","#document"].indexOf(oo(e))>=0?e.ownerDocument.body:si(e)&&VS(e)?e:m4(wy(e))}function Bf(e,t){var n;t===void 0&&(t=[]);var r=m4(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=zr(r),a=i?[o].concat(o.visualViewport||[],VS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Bf(wy(a)))}function Z1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function $X(e,t){var n=Uc(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 Jk(e,t,n){return t===l4?Z1(IX(e,n)):el(t)?$X(t,n):Z1(FX(ns(e)))}function BX(e){var t=Bf(wy(e)),n=["absolute","fixed"].indexOf(Ao(e).position)>=0,r=n&&si(e)?dh(e):e;return el(r)?t.filter(function(i){return el(i)&&f4(i,r)&&oo(i)!=="body"}):[]}function UX(e,t,n,r){var i=t==="clippingParents"?BX(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var f=Jk(e,c,r);return l.top=Bs(f.top,l.top),l.right=Lg(f.right,l.right),l.bottom=Lg(f.bottom,l.bottom),l.left=Bs(f.left,l.left),l},Jk(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 g4(e){var t=e.reference,n=e.element,r=e.placement,i=r?to(r):null,o=r?zc(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Cr:l={x:a,y:t.y-n.height};break;case fi:l={x:a,y:t.y+t.height};break;case di:l={x:t.x+t.width,y:s};break;case Er:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?US(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case $c:l[c]=l[c]-(t[f]/2-n[f]/2);break;case Nd:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function Ad(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?sX:s,c=n.rootBoundary,f=c===void 0?l4:c,h=n.elementContext,p=h===void 0?Ku:h,g=n.altBoundary,v=g===void 0?!1:g,y=n.padding,x=y===void 0?0:y,b=h4(typeof x!="number"?x:p4(x,fh)),w=p===Ku?lX:Ku,S=e.rects.popper,C=e.elements[v?w:p],T=UX(el(C)?C:C.contextElement||ns(e.elements.popper),l,f,a),P=Uc(e.elements.reference),R=g4({reference:P,element:S,strategy:"absolute",placement:i}),j=Z1(Object.assign({},S,R)),z=p===Ku?j:P,N={top:T.top-z.top+b.top,bottom:z.bottom-T.bottom+b.bottom,left:T.left-z.left+b.left,right:z.right-T.right+b.right},V=e.modifiersData.offset;if(p===Ku&&V){var W=V[i];Object.keys(N).forEach(function(ne){var q=[di,fi].indexOf(ne)>=0?1:-1,J=[Cr,fi].indexOf(ne)>=0?"y":"x";N[ne]+=W[J]*q})}return N}function zX(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?c4:l,f=zc(r),h=f?s?Kk:Kk.filter(function(v){return zc(v)===f}):fh,p=h.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=h);var g=p.reduce(function(v,y){return v[y]=Ad(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[to(y)],v},{});return Object.keys(g).sort(function(v,y){return g[v]-g[y]})}function HX(e){if(to(e)===FS)return[];var t=Pm(e);return[Xk(e),t,Xk(t)]}function VX(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,h=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,y=n.allowedAutoPlacements,x=t.options.placement,b=to(x),w=b===x,S=l||(w||!v?[Pm(x)]:HX(x)),C=[x].concat(S).reduce(function(Z,ie){return Z.concat(to(ie)===FS?zX(t,{placement:ie,boundary:f,rootBoundary:h,padding:c,flipVariations:v,allowedAutoPlacements:y}):ie)},[]),T=t.rects.reference,P=t.rects.popper,R=new Map,j=!0,z=C[0],N=0;N=0,J=q?"width":"height",oe=Ad(t,{placement:V,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),le=q?ne?di:Er:ne?fi:Cr;T[J]>P[J]&&(le=Pm(le));var G=Pm(le),F=[];if(o&&F.push(oe[W]<=0),s&&F.push(oe[le]<=0,oe[G]<=0),F.every(function(Z){return Z})){z=V,j=!1;break}R.set(V,F)}if(j)for(var A=v?3:1,B=function(ie){var ae=C.find(function(pe){var E=R.get(pe);if(E)return E.slice(0,ie).every(function(M){return M})});if(ae)return z=ae,"break"},re=A;re>0;re--){var U=B(re);if(U==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const WX={name:"flip",enabled:!0,phase:"main",fn:VX,requiresIfExists:["offset"],data:{_skip:!1}};function eM(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 tM(e){return[Cr,di,fi,Er].some(function(t){return e[t]>=0})}function YX(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ad(t,{elementContext:"reference"}),s=Ad(t,{altBoundary:!0}),l=eM(a,r),c=eM(s,i,o),f=tM(l),h=tM(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const qX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:YX};function GX(e,t,n){var r=to(e),i=[Er,Cr].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,[Er,di].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function KX(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=c4.reduce(function(f,h){return f[h]=GX(h,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 ZX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:KX};function QX(e){var t=e.state,n=e.name;t.modifiersData[n]=g4({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const XX={name:"popperOffsets",enabled:!0,phase:"read",fn:QX,data:{}};function JX(e){return e==="x"?"y":"x"}function eJ(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,h=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=Ad(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),b=to(t.placement),w=zc(t.placement),S=!w,C=US(b),T=JX(C),P=t.modifiersData.popperOffsets,R=t.rects.reference,j=t.rects.popper,z=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(P){if(o){var ne,q=C==="y"?Cr:Er,J=C==="y"?fi:di,oe=C==="y"?"height":"width",le=P[C],G=le+x[q],F=le-x[J],A=g?-j[oe]/2:0,B=w===$c?R[oe]:j[oe],re=w===$c?-j[oe]:-R[oe],U=t.elements.arrow,Z=g&&U?BS(U):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:d4(),ae=ie[q],pe=ie[J],E=$f(0,R[oe],Z[oe]),M=S?R[oe]/2-A-E-ae-N.mainAxis:B-E-ae-N.mainAxis,I=S?-R[oe]/2+A+E+pe+N.mainAxis:re+E+pe+N.mainAxis,X=t.elements.arrow&&dh(t.elements.arrow),Q=X?C==="y"?X.clientTop||0:X.clientLeft||0:0,se=(ne=V==null?void 0:V[C])!=null?ne:0,ge=le+M-se-Q,Le=le+I-se,ue=$f(g?Lg(G,ge):G,le,g?Bs(F,Le):F);P[C]=ue,W[C]=ue-le}if(s){var ve,_e=C==="x"?Cr:Er,Ee=C==="x"?fi:di,Re=P[T],Me=T==="y"?"height":"width",De=Re+x[_e],ce=Re-x[Ee],de=[Cr,Er].indexOf(b)!==-1,be=(ve=V==null?void 0:V[T])!=null?ve:0,ye=de?De:Re-R[Me]-j[Me]-be+N.altAxis,Oe=de?Re+R[Me]+j[Me]-be-N.altAxis:ce,ke=g&&de?OX(ye,Re,Oe):$f(g?ye:De,Re,g?Oe:ce);P[T]=ke,W[T]=ke-Re}t.modifiersData[r]=W}}const tJ={name:"preventOverflow",enabled:!0,phase:"main",fn:eJ,requiresIfExists:["offset"]};function nJ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function rJ(e){return e===zr(e)||!si(e)?zS(e):nJ(e)}function iJ(e){var t=e.getBoundingClientRect(),n=Bc(t.width)/e.offsetWidth||1,r=Bc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function oJ(e,t,n){n===void 0&&(n=!1);var r=si(t),i=si(t)&&iJ(t),o=ns(t),a=Uc(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((oo(t)!=="body"||VS(o))&&(s=rJ(t)),si(t)?(l=Uc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=HS(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function aJ(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 sJ(e){var t=aJ(e);return yX.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function lJ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function cJ(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 nM={placement:"bottom",modifiers:[],strategy:"absolute"};function rM(){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 kJ(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 MJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iM(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 Rg(e){return Rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rg(e)}var AJ={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"])},IJ={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},FJ=[_t.space,_t.enter,_t.up,_t.down,_t.end,_t.home],xy=function(e){LJ(n,e);var t=RJ(n);function n(r){var i;return MJ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(ia(i)),i.handleDocumentClick=i.handleDocumentClick.bind(ia(i)),i.handleKeyDown=i.handleKeyDown.bind(ia(i)),i.removeEvents=i.removeEvents.bind(ia(i)),i.toggle=i.toggle.bind(ia(i)),i.handleMenuRef=i.handleMenuRef.bind(ia(i)),i.handleToggleRef=i.handleToggleRef.bind(ia(i)),i.containerRef=Y.createRef(),i.menuRef=Y.createRef(),i.toggleRef=Y.createRef(),i}return DJ(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))&&((FJ.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(),h=f.indexOf(i.target);_t.up===i.which||_t.p===i.which&&i.ctrlKey?h=h!==0?h-1:f.length-1:(_t.down===i.which||_t.n===i.which&&i.ctrlKey)&&(h=h===f.length-1?0:h+1),f[h].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 UJ(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 zJ(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 jg(e){return jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jg(e)}var GJ={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},YS=function(e){VJ(n,e);var t=WJ(n);function n(r){var i;return zJ(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(rw(i)),i.getTabIndex=i.getTabIndex.bind(rw(i)),i}return HJ(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=ts(this.props,["toggle"]),s=a.className,l=a.cssModule,c=a.divider,f=a.tag,h=f===void 0?"button":f,p=a.header,g=a.active,v=a.text,y=BJ(a,$J),x=Ve(Se(s,{disabled:y.disabled,"dropdown-item":!c&&!p&&!v,active:g,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":v}),l);return h==="button"&&(p?h="h6":c?h="div":y.href?h="a":v&&(h="span")),Y.createElement(h,tw({type:h==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(Y.Component);YS.propTypes=GJ;YS.contextType=Id;const Ue=YS;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 KJ=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function Ng(){return Ng=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 ree(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 iee(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 Ag(e){return Ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ag(e)}var fee={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:Fc,updateOnSelect:D.bool,right:GA(D.bool,'Please use "end" instead.')},dee={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},qS=function(e){aee(n,e);var t=see(n);function n(){return iee(this,n),t.apply(this,arguments)}return oee(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,h=o.tag,p=h===void 0?"div":h,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,T=nee(o,KJ),P=Ve(Se(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||f,show:this.context.isOpen}),s),R=p;if(b||this.context.isOpen&&!this.context.inNavbar){var j=dee[this.context.direction]||"bottom",z=c||f?"end":"start",N="".concat(j,"-").concat(z),V=[].concat(QJ(x),[{name:"flip",enabled:!!v}]),W=Y.createElement(WS,{placement:N,modifiers:V,strategy:w},function(q){var J=q.ref,oe=q.style,le=q.placement,G=q.update,F=sM(sM({},i.props.style),oe),A=function(re){J(re);var U=i.context.onMenuRef;U&&U(re)};return Y.createElement(R,Ng({tabIndex:"-1",role:i.getRole(),ref:A},T,{style:F,"aria-hidden":!i.context.isOpen,className:P,"data-popper-placement":le,onClick:function(){return C&&G()}}))});return S?$s.createPortal(W,jd(S)):W}var ne=this.context.onMenuRef;return Y.createElement(R,Ng({tabIndex:"-1",role:this.getRole()},T,{ref:ne,"aria-hidden":!this.context.isOpen,className:P,"data-popper-placement":T.placement}))}}]),n}(Y.Component);qS.propTypes=fee;qS.contextType=Id;const du=qS;function sw(e){"@babel/helpers - typeof";return sw=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},sw(e)}var hee=["className","color","cssModule","caret","split","nav","tag","innerRef"];function pee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ig(){return Ig=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 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 vee(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 See={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])},Oee={color:"secondary","aria-haspopup":!0},Sy=function(e){_ee(n,e);var t=bee(n);function n(r){var i;return vee(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(_4(i)),i}return yee(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,h=o.nav,p=o.tag,g=o.innerRef,v=mee(o,hee),y=v["aria-label"]||"Toggle Dropdown",x=Ve(Se(a,{"dropdown-toggle":c||f,"dropdown-toggle-split":f,"nav-link":h}),l),b=typeof v.children<"u"?v.children:Y.createElement("span",{className:"visually-hidden"},y),w;return h&&!p?(w="a",v.href="#"):p?w=p:(w=yt,v.color=s,v.cssModule=l),this.context.inNavbar?Y.createElement(w,Ig({},v,{className:x,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:b})):Y.createElement(v4,{innerRef:g},function(S){var C=S.ref,T=function(R){C(R);var j=i.context.onToggleRef;j&&j(R)};return Y.createElement(w,Ig({},v,pee({},typeof w=="string"?"ref":"innerRef",T),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:b}))})}}]),n}(Y.Component);Sy.propTypes=See;Sy.defaultProps=Oee;Sy.contextType=Id;const ph=Sy;function $g(e,t){return $g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$g(e,t)}function Cee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$g(e,t)}const uM={disabled:!1},b4=Y.createContext(null);var mf="unmounted",Ss="exited",Os="entering",zl="entered",cw="exiting",Wo=function(e){Cee(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=Ss,o.appearStatus=Os):l=zl:r.unmountOnExit||r.mountOnEnter?l=mf:l=Ss,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===mf?{status:Ss}: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!==Os&&a!==zl&&(o=Os):(a===Os||a===zl)&&(o=cw)}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===Os?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===Ss&&this.setState({status:mf})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[$s.findDOMNode(this),s],c=l[0],f=l[1],h=this.getTimeouts(),p=s?h.appear:h.enter;if(!i&&!a||uM.disabled){this.safeSetState({status:zl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:Os},function(){o.props.onEntering(c,f),o.onTransitionEnd(p,function(){o.safeSetState({status:zl},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:$s.findDOMNode(this);if(!o||uM.disabled){this.safeSetState({status:Ss},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:cw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Ss},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:$s.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===mf)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=H2(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(b4.Provider,{value:null},typeof a=="function"?a(i,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);Wo.contextType=b4;Wo.propTypes={};function Rl(){}Wo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Rl,onEntering:Rl,onEntered:Rl,onExit:Rl,onExiting:Rl,onExited:Rl};Wo.UNMOUNTED=mf;Wo.EXITED=Ss;Wo.ENTERING=Os;Wo.ENTERED=zl;Wo.EXITING=cw;const hu=Wo;function $e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Eee=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function Bg(){return Bg=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 Pee(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 fM(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 Fd(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ree(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 jee(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 zg(e){return zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zg(e)}function hM(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 Hc(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qee(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 Gee={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 Hr(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=Yee(e,Wee),h=Ve(Se(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return Y.createElement(l,dw({},f,{className:h,ref:c}))}Hr.propTypes=Gee;var Kee=["className","cssModule","innerRef","tag"];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 Qee(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 Xee={className:D.string,cssModule:D.object,innerRef:D.oneOfType([D.object,D.string,D.func]),tag:rt};function Vc(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=Zee(e,Kee),s=Ve(Se(t,"card-body"),n);return Y.createElement(o,hw({},a,{className:s,ref:r}))}Vc.propTypes=Xee;var Jee=["className","cssModule","tag"];function pw(){return pw=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 tte(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 nte={className:D.string,cssModule:D.object,tag:rt};function S4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=ete(e,Jee),a=Ve(Se(t,"card-footer"),n);return Y.createElement(i,pw({},o,{className:a}))}S4.propTypes=nte;var rte=["className","cssModule","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 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 ate={className:D.string,cssModule:D.object,tag:rt};function Wc(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=ite(e,rte),a=Ve(Se(t,"card-header"),n);return Y.createElement(i,mw({},o,{className:a}))}Wc.propTypes=ate;var ste=["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 cte(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 ute={className:D.string,cssModule:D.object,tag:rt};function O4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=lte(e,ste),a=Ve(Se(t,"card-text"),n);return Y.createElement(i,gw({},o,{className:a}))}O4.propTypes=ute;var fte=["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 hte(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 pte={className:D.string,cssModule:D.object,tag:rt};function C4(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=dte(e,fte),a=Ve(Se(t,"card-title"),n);return Y.createElement(i,vw({},o,{className:a}))}C4.propTypes=pte;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)}var mte=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function _w(){return _w=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 wte(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 xte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mM(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 Hg(e){return Hg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hg(e)}function gM(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 Mm(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 Vg(e){return Vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vg(e)}var Oy={children:D.oneOfType([D.node,D.func]),placement:D.oneOf(sQ),target:Fc.isRequired,container:Fc,isOpen:D.bool,disabled:D.bool,hideArrow:D.bool,boundariesElement:D.oneOfType([D.string,NS]),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},E4={show:0,hide:50},$te={isOpen:!1,hideArrow:!1,autohide:!1,delay:E4,toggle:function(){},trigger:"click",fade:!0};function T4(e,t){return t&&(e===t||t.contains(e))}function yM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return T4(e,n)})[0]}var ZS=function(e){Nte(n,e);var t=Ate(n);function n(r){var i;return Rte(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(kr(i)),i.handleDocumentClick=i.handleDocumentClick.bind(kr(i)),i.removeTargetEvents=i.removeTargetEvents.bind(kr(i)),i.toggle=i.toggle.bind(kr(i)),i.showWithDelay=i.showWithDelay.bind(kr(i)),i.hideWithDelay=i.hideWithDelay.bind(kr(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(kr(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(kr(i)),i.show=i.show.bind(kr(i)),i.hide=i.hide.bind(kr(i)),i.onEscKeyDown=i.onEscKeyDown.bind(kr(i)),i.getRef=i.getRef.bind(kr(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return jte(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||yM(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!T4(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&yM(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):$d(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return $d(o)==="object"?isNaN(o[i])?E4[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=jd(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,h=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,T=a.fade,P=a.flip,R=a.children,j=ts(this.props,Object.keys(Oy)),z=Ve(x,l),N=Ve(c,l);return Y.createElement(Lte,{className:s,target:o,isOpen:f,hideArrow:h,boundariesElement:p,placement:g,placementPrefix:v,arrowClassName:y,popperClassName:z,container:b,modifiers:w,strategy:S,offset:C,cssModule:l,fade:T,flip:P},function(V){var W=V.update;return Y.createElement("div",xw({},j,{ref:i.getRef,className:N,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof R=="function"?R({update:W}):R)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(Y.Component);ZS.propTypes=Oy;ZS.defaultProps=$te;const P4=ZS;function Ow(){return Ow=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 Vte(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={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 k4(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,h=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,T=C===void 0?{}:C,P=e.barAriaValueText,R=e.barAriaLabelledBy,j=Hte(e,Ute),z=zk(a)/zk(f)*100,N=Ve(Se(n,"progress"),i),V=Ve(Se("progress-bar",v&&n||r,h?"progress-bar-animated":null,g?"bg-".concat(g):null,p||h?"progress-bar-striped":null),i),W={className:V,style:f_(f_(f_({},v?S:{}),T),{},{width:"".concat(z,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":f,"aria-valuetext":P,"aria-labelledby":R,children:t};return v?Y.createElement(b,Wg({},j,W)):Y.createElement(b,Wg({},j,{style:S,className:N}),y?t:Y.createElement("div",W))}k4.propTypes=Wte;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)}function Yte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bM(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)}var Jte={children:D.node.isRequired,node:D.any},M4=function(e){Gte(n,e);var t=Kte(n);function n(){return Yte(this,n),t.apply(this,arguments)}return qte(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return AS?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),$s.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(Y.Component);M4.propTypes=Jte;const ene=M4;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 wM(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 Nl(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 Gg(){}var SM=D.shape(hr.propTypes),D4={autoFocus:D.bool,backdrop:D.oneOfType([D.bool,D.oneOf(["static"])]),backdropClassName:D.string,backdropTransition:SM,centered:D.bool,children:D.node,contentClassName:D.string,className:D.string,container:Fc,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:SM,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])},sne=Object.keys(D4),lne={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:Gg,onClosed:Gg,modalTransition:{timeout:kg.Modal},backdropTransition:{mountOnEnter:!0,timeout:kg.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},mh=function(e){rne(n,e);var t=ine(n);function n(r){var i;return tne(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(ei(i)),i.handleBackdropClick=i.handleBackdropClick.bind(ei(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(ei(i)),i.handleEscape=i.handleEscape.bind(ei(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(ei(i)),i.handleTab=i.handleTab.bind(ei(i)),i.onOpened=i.onOpened.bind(ei(i)),i.onClosed=i.onClosed.bind(ei(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(ei(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(ei(i)),i.trapFocus=i.trapFocus.bind(ei(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return nne(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=jd(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=rQ(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),iQ(),n.openCount===0&&(document.body.className=Se(document.body.className,Ve("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=Ve("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),YA(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=ts(this.props,sne),s="modal-dialog";return Y.createElement("div",Uf({},a,{className:Ve(Se(s,this.props.className,(i={},Hl(i,"modal-".concat(this.props.size),this.props.size),Hl(i,"".concat(s,"-centered"),this.props.centered),Hl(i,"".concat(s,"-scrollable"),this.props.scrollable),Hl(i,"modal-fullscreen",this.props.fullscreen===!0),Hl(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:Ve(Se("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,h=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=Nl(Nl(Nl({},hr.defaultProps),this.props.modalTransition),{},{baseClass:w?this.props.modalTransition.baseClass:"",timeout:w?this.props.modalTransition.timeout:0}),C=Nl(Nl(Nl({},hr.defaultProps),this.props.backdropTransition),{},{baseClass:w?this.props.backdropTransition.baseClass:"",timeout:w?this.props.backdropTransition.timeout:0}),T=p&&(w?Y.createElement(hr,Uf({},C,{in:h&&!!p,cssModule:f,className:Ve(Se("modal-backdrop",c),f)})):Y.createElement("div",{className:Ve(Se("modal-backdrop","show",c),f)}));return Y.createElement(ene,{node:this._element},Y.createElement("div",{className:Ve(s)},Y.createElement(hr,Uf({},b,S,{in:h,onEntered:this.onOpened,onExited:this.onClosed,cssModule:f,className:Ve(Se("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),f),innerRef:x}),y,this.renderModalDialog()),T))}return null}}]),n}(Y.Component);mh.propTypes=D4;mh.defaultProps=lne;mh.openCount=0;mh.originalBodyOverflow=null;const Yo=mh;var cne=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function kw(){return kw=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 fne(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 dne={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,h=f===void 0?"Close":f,p=e.close,g=une(e,cne),v=Ve(Se(n,"modal-header"),r);return!p&&o&&(t=Y.createElement("button",{type:"button",onClick:o,className:Ve("btn-close",r),"aria-label":h})),Y.createElement(c,kw({},g,{className:v}),Y.createElement(s,{className:Ve("modal-title",r)},i),p||t)}qo.propTypes=dne;var hne=["className","cssModule","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 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 gne={className:D.string,cssModule:D.object,tag:rt};function so(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=pne(e,hne),a=Ve(Se(t,"modal-body"),n);return Y.createElement(i,Mw({},o,{className:a}))}so.propTypes=gne;var vne=["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 _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,tag:rt};function fl(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=yne(e,vne),a=Ve(Se(t,"modal-footer"),n);return Y.createElement(i,Dw({},o,{className:a}))}fl.propTypes=bne;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 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 Cne={className:D.string,cssModule:D.object,flush:D.bool,horizontal:D.oneOfType([D.bool,D.string]),numbered:D.bool,tag:rt},Ene=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function L4(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=Sne(e,xne),h=Ve(Se(t,"list-group",o?"list-group-flush":Ene(s),{"list-group-numbered":c}),n);return Y.createElement(i,Rw({},f,{className:h}))}L4.propTypes=Cne;var Tne=["className","cssModule","row","disabled","check","inline","floating","tag","switch"];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 kne(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 Mne={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 Nr(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,h=Pne(e,Tne),p=o||f,g=Ve(Se(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"&&(h.disabled=i),Y.createElement(c,jw({},h,{className:g}))}Nr.propTypes=Mne;function Nw(e){"@babel/helpers - typeof";return Nw=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},Nw(e)}var Dne=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];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 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}function jne(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 Kg(e){return Kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kg(e)}var Bne={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},R4=function(e){Ane(n,e);var t=Ine(n);function n(r){var i;return jne(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(Fw(i)),i.focus=i.focus.bind(Fw(i)),i}return Nne(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,h=i.invalid,p=i.tag,g=i.addon,v=i.plaintext,y=i.innerRef,x=Lne(i,Dne),b=["switch","radio","checkbox"].indexOf(l)>-1,w=/\D/g,S=l==="textarea",C=l==="select",T=l==="range",P=p||(C||S?l:"input"),R="form-control";v?(R="".concat(R,"-plaintext"),P=p||"input"):T?R="form-range":C?R="form-select":b&&(g?R=null:R="form-check-input"),x.size&&w.test(x.size)&&(j1(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var j=Ve(Se(o,h&&"is-invalid",f&&"is-valid",c?C?"form-select-".concat(c):"form-control-".concat(c):!1,R),a);return(P==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(v||l==="select"||typeof P!="string"||P==="select")&&(j1('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),Y.createElement(P,Aw({},x,{ref:y,className:j,"aria-invalid":h}))}}]),n}(Y.Component);R4.propTypes=Bne;const Yc=R4;var Une=["className","cssModule","tag","type","size"];function Zg(){return Zg=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 Vne={className:D.string,cssModule:D.object,size:D.string,tag:rt,type:D.string};function Cy(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=zne(e,Une),s=Ve(Se(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?Y.createElement(hh,Zg({},a,{className:s})):Y.createElement(y4.Provider,{value:{insideInputGroup:!0}},Y.createElement(i,Zg({},a,{className:s})))}Cy.propTypes=Vne;var Wne=["className","listClassName","cssModule","size","tag","listTag","aria-label"];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 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}var Kne={children:D.node,className:D.string,listClassName:D.string,cssModule:D.object,size:D.string,tag:rt,listTag:rt,"aria-label":D.string};function XS(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,h=qne(e,Wne),p=Ve(Se(t),r),g=Ve(Se(n,"pagination",Yne({},"pagination-".concat(i),!!i)),r);return Y.createElement(a,{className:p,"aria-label":f},Y.createElement(l,$w({},h,{className:g})))}XS.propTypes=Kne;var Zne=["active","className","cssModule","disabled","tag"];function Bw(){return Bw=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 Xne(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={active:D.bool,children:D.node,className:D.string,cssModule:D.object,disabled:D.bool,tag:rt};function Us(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=Qne(e,Zne),l=Ve(Se(n,"page-item",{active:t,disabled:i}),r);return Y.createElement(a,Bw({},s,{className:l}))}Us.propTypes=Jne;var ere=["className","cssModule","next","previous","first","last","tag"];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 nre(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 rre={"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 zs(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=tre(e,ere),f=Ve(Se(t,"page-link"),n),h;i?h="Previous":r?h="Next":o?h="First":a&&(h="Last");var p=e["aria-label"]||h,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,Uw({},c,{className:f,"aria-label":p}),v)}zs.propTypes=rre;var ire=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];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 sre(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 lre={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(hr.propTypes)};function j4(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,h=f===void 0?!0:f,p=e.toggle,g=e.children,v=e.transition,y=v===void 0?Zu(Zu({},hr.defaultProps),{},{unmountOnExit:!0}):v,x=e.fade,b=x===void 0?!0:x,w=e.innerRef,S=are(e,ire),C=Ve(Se(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),T=Ve(Se("btn-close",n),o),P=Zu(Zu(Zu({},hr.defaultProps),y),{},{baseClass:b?y.baseClass:"",timeout:b?y.timeout:0});return Y.createElement(hr,zw({},S,P,{tag:s,className:C,in:h,role:"alert",innerRef:w}),p?Y.createElement("button",{type:"button",className:T,"aria-label":i,onClick:p}):null,g)}j4.propTypes=lre;var cre=["className","cssModule","tag","active","disabled","action","color"];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 fre(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 dre={action:D.bool,active:D.bool,className:D.string,cssModule:D.object,color:D.string,disabled:D.bool,tag:rt},hre=function(t){t.preventDefault()};function N4(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=ure(e,cre),f=Ve(Se(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=hre),Y.createElement(i,Hw({},c,{className:f}))}N4.propTypes=dre;function Vw(e){"@babel/helpers - typeof";return Vw=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},Vw(e)}function EM(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 pre(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)}var xre=["defaultOpen"],vh=function(e){yre(n,e);var t=_re(n);function n(r){var i;return gre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(A4(i)),i}return vre(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(hh,Ww({isOpen:this.state.isOpen,toggle:this.toggle},ts(this.props,xre)))}}]),n}(H.Component);vh.propTypes=pre({defaultOpen:D.bool,onToggle:D.func},hh.propTypes);function qw(e){"@babel/helpers - typeof";return qw=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},qw(e)}function PM(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 Sre(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 Xg(e){return Xg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xg(e)}var Dre=["defaultOpen"],Pr=function(e){Tre(n,e);var t=Pre(n);function n(r){var i;return Cre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(I4(i)),i}return Ere(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return Y.createElement(gh,Gw({isOpen:this.state.isOpen,toggle:this.toggle},ts(this.props,Dre)))}}]),n}(H.Component);Pr.propTypes=Sre({defaultOpen:D.bool},gh.propTypes);const Lre=e=>({error:"border-danger",default:""})[e],Rre=e=>({error:"text-danger",default:"text-muted"})[e],Po=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=Se({"col-md-12":i,"col-md-10 offset-md-1":!i});return m.jsx(dr,{className:Se("g-0",e),children:m.jsx("div",{className:o,children:m.jsx(Hr,{className:Lre(r),body:!0,children:m.jsxs("h3",{className:Se("text-center mb-0",Rre(r)),children:[n&&m.jsx(Ie,{icon:aA,spin:!0}),n&&m.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},hn=({title:e,children:t,bodyClassName:n,...r})=>m.jsxs(Hr,{...r,children:[e&&m.jsx(Wc,{role:"heading",children:e}),m.jsx(Vc,{className:n,children:t})]}),$r=({children:e,type:t,className:n,small:r=!1})=>m.jsx(dr,{className:n,children:m.jsx("div",{className:Se({"col-md-10 offset-md-1":!r,"col-12":r}),children:m.jsx(hn,{role:"document",className:Se("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:Se({"p-2":r}),children:e})})});let Up;const jre=new Uint8Array(16);function Nre(){if(!Up&&(Up=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Up))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Up(jre)}const Un=[];for(let e=0;e<256;++e)Un.push((e+256).toString(16).slice(1));function Are(e,t=0){return(Un[e[t+0]]+Un[e[t+1]]+Un[e[t+2]]+Un[e[t+3]]+"-"+Un[e[t+4]]+Un[e[t+5]]+"-"+Un[e[t+6]]+Un[e[t+7]]+"-"+Un[e[t+8]]+Un[e[t+9]]+"-"+Un[e[t+10]]+Un[e[t+11]]+Un[e[t+12]]+Un[e[t+13]]+Un[e[t+14]]+Un[e[t+15]]).toLowerCase()}const Ire=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),MM={randomUUID:Ire};function JS(e,t,n){if(MM.randomUUID&&!t&&!e)return MM.randomUUID();e=e||{};const r=e.random||(e.rng||Nre)();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 Are(r)}const mn=(e=!1)=>{const[t,n]=H.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},Ey=()=>{const{current:e}=H.useRef(`dom-${JS()}`);return e},dl=()=>H.useRef(null),F4=({checked:e=!1,onChange:t=gy,className:n,children:r,type:i,inline:o=!1})=>{const a=Ey(),s=f=>t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return m.jsxs("span",{className:Se("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})]})},$4=e=>m.jsx(F4,{type:"checkbox",...e}),qc=e=>m.jsx(F4,{type:"switch",...e}),pu=({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]}),Dm=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=Ey();return m.jsx(pu,{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)})})};const Fre=500;let zp;const yh=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,a]=H.useState(i),s=()=>{zp&&clearTimeout(zp),zp=null},l=(c,f=Fre)=>{a(c),s(),zp=setTimeout(()=>{e(c),s()},f)};return m.jsxs("div",{className:Se("search-field",t),children:[m.jsx("input",{type:"text",className:Se("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),m.jsx(Ie,{icon:WG,className:"search-field__icon"}),m.jsx("div",{className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})};const Go=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c})=>{const[f,h]=mn(),p=Se("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),g={minWidth:s&&`${s}px`};return m.jsxs(hh,{isOpen:f,toggle:h,disabled:t,className:i,children:[m.jsx(ph,{size:c,caret:!o,className:p,color:"primary",children:e}),m.jsx(du,{className:"w-100",end:a,style:g,children:r})]})},Ty=({children:e,minWidth:t})=>m.jsx(Go,{text:m.jsx(Ie,{className:"px-1",icon:AG}),size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e});const zf=({children:e,...t})=>m.jsx(n4,{className:"nav-pills__nav-link",tag:DN,...t,children:e}),B4=({children:e,fill:t=!1,className:n=""})=>m.jsx(Hr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:m.jsx(IS,{pills:!0,fill:t,children:H.Children.map(e,r=>{if(!H.isValidElement(r)||r.type!==zf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),Py=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",U4=(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}),z4=e=>e.dir?`${e.field}-${e.dir}`:void 0,$re=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function _h({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=Py(s,t.field,t.dir);n(l?s:void 0,l)};return m.jsxs(vh,{children:[m.jsxs(ph,{caret:!0,color:r?"primary":"link",className:Se({"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(du,{end:i,className:Se("w-100",{"ordering-dropdown__menu--link":!r}),children:[Og(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"?BG:EG,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 eO="#4696e5",Bre="rgba(70, 150, 229, 0.4)",H4="#f77f28",Ure="rgba(247, 127, 40, 0.4)",zre="white",Hre="#161b22",V4=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},Vre=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"};var Wre=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0},DM=typeof Symbol<"u"&&Symbol,Yre=Wre,qre=function(){return typeof DM!="function"||typeof Symbol!="function"||typeof DM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Yre()},Gre="Function.prototype.bind called on incompatible ",d_=Array.prototype.slice,Kre=Object.prototype.toString,Zre="[object Function]",Qre=function(t){var n=this;if(typeof n!="function"||Kre.call(n)!==Zre)throw new TypeError(Gre+n);for(var r=d_.call(arguments,1),i,o=function(){if(this instanceof i){var f=n.apply(this,r.concat(d_.call(arguments)));return Object(f)===f?f:this}else return n.apply(t,r.concat(d_.call(arguments)))},a=Math.max(0,n.length-r.length),s=[],l=0;l"u"?lt:la(Uint8Array),wc={"%AggregateError%":typeof AggregateError>"u"?lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?lt:ArrayBuffer,"%ArrayIteratorPrototype%":Al?la([][Symbol.iterator]()):lt,"%AsyncFromSyncIteratorPrototype%":lt,"%AsyncFunction%":Vl,"%AsyncGenerator%":Vl,"%AsyncGeneratorFunction%":Vl,"%AsyncIteratorPrototype%":Vl,"%Atomics%":typeof Atomics>"u"?lt:Atomics,"%BigInt%":typeof BigInt>"u"?lt:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?lt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?lt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?lt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?lt:FinalizationRegistry,"%Function%":W4,"%GeneratorFunction%":Vl,"%Int8Array%":typeof Int8Array>"u"?lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Al?la(la([][Symbol.iterator]())):lt,"%JSON%":typeof JSON=="object"?JSON:lt,"%Map%":typeof Map>"u"?lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Al?lt:la(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?lt:Promise,"%Proxy%":typeof Proxy>"u"?lt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Al?lt:la(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Al?la(""[Symbol.iterator]()):lt,"%Symbol%":Al?Symbol:lt,"%SyntaxError%":Bd,"%ThrowTypeError%":tie,"%TypedArray%":nie,"%TypeError%":bc,"%Uint8Array%":typeof Uint8Array>"u"?lt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?lt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?lt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?lt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?lt:WeakSet},rie=function e(t){var n;if(t==="%AsyncFunction%")n=h_("async function () {}");else if(t==="%GeneratorFunction%")n=h_("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=h_("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(n=la(i.prototype))}return wc[t]=n,n},LM={"%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"]},ky=tO,Jg=eie,iie=ky.call(Function.call,Array.prototype.concat),oie=ky.call(Function.apply,Array.prototype.splice),RM=ky.call(Function.call,String.prototype.replace),ev=ky.call(Function.call,String.prototype.slice),aie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,sie=/\\(\\)?/g,lie=function(t){var n=ev(t,0,1),r=ev(t,-1);if(n==="%"&&r!=="%")throw new Bd("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Bd("invalid intrinsic syntax, expected opening `%`");var i=[];return RM(t,aie,function(o,a,s,l){i[i.length]=s?RM(l,sie,"$1"):a||o}),i},cie=function(t,n){var r=t,i;if(Jg(LM,r)&&(i=LM[r],r="%"+i[0]+"%"),Jg(wc,r)){var o=wc[r];if(o===Vl&&(o=rie(r)),typeof o>"u"&&!n)throw new bc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Bd("intrinsic "+t+" does not exist!")},nO=function(t,n){if(typeof t!="string"||t.length===0)throw new bc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new bc('"allowMissing" argument must be a boolean');var r=lie(t),i=r.length>0?r[0]:"",o=cie("%"+i+"%",n),a=o.name,s=o.value,l=!1,c=o.alias;c&&(i=c[0],oie(r,iie([0,1],c)));for(var f=1,h=!0;f=r.length){var y=Hs(s,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else h=Jg(s,p),s=s[p];h&&!l&&(wc[a]=s)}}return s},Y4={exports:{}};(function(e){var t=tO,n=nO,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(h){var p=o(t,i,arguments);if(a&&s){var g=a(p,"length");g.configurable&&s(p,"length",{value:1+l(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c})(Y4);var uie=Y4.exports,q4=nO,G4=uie,fie=G4(q4("String.prototype.indexOf")),die=function(t,n){var r=q4(t,!!n);return typeof r=="function"&&fie(t,".prototype.")>-1?G4(r):r};const hie={},pie=Object.freeze(Object.defineProperty({__proto__:null,default:hie},Symbol.toStringTag,{value:"Module"})),mie=G8(pie);var rO=typeof Map=="function"&&Map.prototype,m_=Object.getOwnPropertyDescriptor&&rO?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,tv=rO&&m_&&typeof m_.get=="function"?m_.get:null,gie=rO&&Map.prototype.forEach,iO=typeof Set=="function"&&Set.prototype,g_=Object.getOwnPropertyDescriptor&&iO?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,nv=iO&&g_&&typeof g_.get=="function"?g_.get:null,vie=iO&&Set.prototype.forEach,yie=typeof WeakMap=="function"&&WeakMap.prototype,Hf=yie?WeakMap.prototype.has:null,_ie=typeof WeakSet=="function"&&WeakSet.prototype,Vf=_ie?WeakSet.prototype.has:null,bie=typeof WeakRef=="function"&&WeakRef.prototype,jM=bie?WeakRef.prototype.deref:null,wie=Boolean.prototype.valueOf,xie=Object.prototype.toString,Sie=Function.prototype.toString,Oie=String.prototype.match,oO=String.prototype.slice,Sa=String.prototype.replace,Cie=String.prototype.toUpperCase,NM=String.prototype.toLowerCase,K4=RegExp.prototype.test,AM=Array.prototype.concat,Yi=Array.prototype.join,Eie=Array.prototype.slice,IM=Math.floor,Zw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,v_=Object.getOwnPropertySymbols,Qw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",rr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Gc||"symbol")?Symbol.toStringTag:null,Z4=Object.prototype.propertyIsEnumerable,FM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function $M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||K4.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-IM(-e):IM(e);if(r!==e){var i=String(r),o=oO.call(t,i.length+1);return Sa.call(i,n,"$&_")+"."+Sa.call(Sa.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Sa.call(t,n,"$&_")}var y_=mie.custom,__=y_&&X4(y_)?y_:null,Tie=function e(t,n,r,i){var o=n||{};if(ca(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ca(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=ca(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(ca(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(ca(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 e6(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?$M(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?$M(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 Xw(t)?"[Array]":"[Object]";var h=Yie(o,r);if(typeof i>"u")i=[];else if(J4(i,t)>=0)return"[Circular]";function p(ne,q,J){if(q&&(i=Eie.call(i),i.push(q)),J){var oe={depth:o.depth};return ca(o,"quoteStyle")&&(oe.quoteStyle=o.quoteStyle),e(ne,oe,r+1,i)}return e(ne,o,r+1,i)}if(typeof t=="function"){var g=Iie(t),v=Hp(t,p);return"[Function"+(g?": "+g:" (anonymous)")+"]"+(v.length>0?" { "+Yi.call(v,", ")+" }":"")}if(X4(t)){var y=Gc?Sa.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Qw.call(t);return typeof t=="object"&&!Gc?Qu(y):y}if(Hie(t)){for(var x="<"+NM.call(String(t.nodeName)),b=t.attributes||[],w=0;w",x}if(Xw(t)){if(t.length===0)return"[]";var S=Hp(t,p);return h&&!Wie(S)?"["+Jw(S,h)+"]":"[ "+Yi.call(S,", ")+" ]"}if(Die(t)){var C=Hp(t,p);return"cause"in t&&!Z4.call(t,"cause")?"{ ["+String(t)+"] "+Yi.call(AM.call("[cause]: "+p(t.cause),C),", ")+" }":C.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Yi.call(C,", ")+" }"}if(typeof t=="object"&&a){if(__&&typeof t[__]=="function")return t[__]();if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Fie(t)){var T=[];return gie.call(t,function(ne,q){T.push(p(q,t,!0)+" => "+p(ne,t))}),BM("Map",tv.call(t),T,h)}if(Uie(t)){var P=[];return vie.call(t,function(ne){P.push(p(ne,t))}),BM("Set",nv.call(t),P,h)}if($ie(t))return b_("WeakMap");if(zie(t))return b_("WeakSet");if(Bie(t))return b_("WeakRef");if(Rie(t))return Qu(p(Number(t)));if(Nie(t))return Qu(p(Zw.call(t)));if(jie(t))return Qu(wie.call(t));if(Lie(t))return Qu(p(String(t)));if(!kie(t)&&!Mie(t)){var R=Hp(t,p),j=FM?FM(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",N=!j&&rr&&Object(t)===t&&rr in t?oO.call(rs(t),8,-1):z?"Object":"",V=j||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=V+(N||z?"["+Yi.call(AM.call([],N||[],z||[]),": ")+"] ":"");return R.length===0?W+"{}":h?W+"{"+Jw(R,h)+"}":W+"{ "+Yi.call(R,", ")+" }"}return String(t)};function Q4(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Pie(e){return Sa.call(String(e),/"/g,""")}function Xw(e){return rs(e)==="[object Array]"&&(!rr||!(typeof e=="object"&&rr in e))}function kie(e){return rs(e)==="[object Date]"&&(!rr||!(typeof e=="object"&&rr in e))}function Mie(e){return rs(e)==="[object RegExp]"&&(!rr||!(typeof e=="object"&&rr in e))}function Die(e){return rs(e)==="[object Error]"&&(!rr||!(typeof e=="object"&&rr in e))}function Lie(e){return rs(e)==="[object String]"&&(!rr||!(typeof e=="object"&&rr in e))}function Rie(e){return rs(e)==="[object Number]"&&(!rr||!(typeof e=="object"&&rr in e))}function jie(e){return rs(e)==="[object Boolean]"&&(!rr||!(typeof e=="object"&&rr in e))}function X4(e){if(Gc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Qw)return!1;try{return Qw.call(e),!0}catch{}return!1}function Nie(e){if(!e||typeof e!="object"||!Zw)return!1;try{return Zw.call(e),!0}catch{}return!1}var Aie=Object.prototype.hasOwnProperty||function(e){return e in this};function ca(e,t){return Aie.call(e,t)}function rs(e){return xie.call(e)}function Iie(e){if(e.name)return e.name;var t=Oie.call(Sie.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function J4(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 e6(oO.call(e,0,t.maxStringLength),t)+r}var i=Sa.call(Sa.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Vie);return Q4(i,"single",t)}function Vie(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":"")+Cie.call(t.toString(16))}function Qu(e){return"Object("+e+")"}function b_(e){return e+" { ? }"}function BM(e,t,n,r){var i=r?Jw(n,r):Yi.call(n,", ");return e+" ("+t+") {"+i+"}"}function Wie(e){for(var t=0;t=0)return!1;return!0}function Yie(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Yi.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Yi.call(Array(t+1),n)}}function Jw(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+Yi.call(e,","+n)+` `+t.prev}function Hp(e,t){var n=Xw(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Ts(r)){for(var i=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===soe.RFC1738&&(c===40||c===41)){s+=a.charAt(l);continue}if(c<128){s=s+Ui[c];continue}if(c<2048){s=s+(Ui[192|c>>6]+Ui[128|c&63]);continue}if(c<55296||c>=57344){s=s+(Ui[224|c>>12]+Ui[128|c>>6&63]+Ui[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|a.charCodeAt(l)&1023),s+=Ui[240|c>>18]+Ui[128|c>>12&63]+Ui[128|c>>6&63]+Ui[128|c&63]}return s},hoe=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(S=0)}if(typeof l=="function"?b=l(n,b):b instanceof Date?b=h(b):r==="comma"&&bo(b)&&(b=Lm.maybeMap(b,function(oe){return oe instanceof Date?h(oe):oe})),b===null){if(o)return s&&!v?s(n,Kn.encoder,y,"key",p):n;b=""}if(woe(b)||Lm.isBuffer(b)){if(s){var P=v?n:s(n,Kn.encoder,y,"key",p);return[g(P)+"="+g(s(b,Kn.encoder,y,"value",p))]}return[g(n)+"="+g(String(b))]}var R=[];if(typeof b>"u")return R;var j;if(r==="comma"&&bo(b))v&&s&&(b=Lm.maybeMap(b,s)),j=[{value:b.length>0?b.join(",")||null:void 0}];else if(bo(l))j=l;else{var z=Object.keys(b);j=c?z.sort(c):z}for(var N=i&&bo(b)&&b.length===1?n+"[]":n,V=0;V"u"?Kn.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Kn.charsetSentinel,delimiter:typeof t.delimiter>"u"?Kn.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Kn.encode,encoder:typeof t.encoder=="function"?t.encoder:Kn.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Kn.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Kn.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Kn.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Kn.strictNullHandling}},Ooe=function(e,t){var n=e,r=Soe(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):bo(r.filter)&&(o=r.filter,i=o);var a=[];if(typeof n!="object"||n===null)return"";var s;t&&t.arrayFormat in UM?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var l=UM[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=r6(),h=0;h0?v+g:""},Kc=n6,ex=Object.prototype.hasOwnProperty,Coe=Array.isArray,En={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Kc.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Eoe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},o6=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Toe="utf8=%26%2310003%3B",Poe="utf8=%E2%9C%93",koe=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,a=i.split(n.delimiter,o),s=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l-1&&(v=Coe(v)?[v]:v),ex.call(r,g)?r[g]=Kc.combine(r[g],v):r[g]=v}return r},Moe=function(e,t,n,r){for(var i=r?t:o6(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},Doe=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=r.depth>0&&a.exec(o),c=l?o.slice(0,l.index):o,f=[];if(c){if(!r.plainObjects&&ex.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var h=0;r.depth>0&&(l=s.exec(o))!==null&&h"u"?En.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?En.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:En.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:En.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:En.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:En.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:En.comma,decoder:typeof t.decoder=="function"?t.decoder:En.decoder,delimiter:typeof t.delimiter=="string"||Kc.isRegExp(t.delimiter)?t.delimiter:En.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:En.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:En.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:En.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:En.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:En.strictNullHandling}},Roe=function(e,t){var n=Loe(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;aa6.parse(e,{ignoreQueryPrefix:!0}),bh=e=>a6.stringify(e,{arrayFormat:"brackets"});var My=(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))(My||{}),Dy=(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))(Dy||{});const Foe=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},$oe=(e,t)=>`${e}/rest/v${t}`,Boe=sh(Ho),Uoe=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:z4(e)}),zoe=e=>e===null||!(typeof e=="object"&&"type"in e&&"status"in e)?!1:(e.type===My.NOT_FOUND||e.type===Dy.NOT_FOUND)&&e.status===404;class Hoe{constructor(t,n,r){me(this,"apiVersion");me(this,"listShortUrls",async(t={})=>this.performRequest({url:"/short-urls",query:Uoe(t)}).then(({shortUrls:n})=>n));me(this,"createShortUrl",async t=>{const n=sh(r=>Yn(r)||Ho(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=bh(Boe(r)),s=Yn(a)?"":`?${a}`,l=o?Foe(this.baseUrl,o):this.baseUrl;return[`${$oe(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});me(this,"handleFetchError",t=>n=>{if(!zoe(n))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const O_={},Voe=e=>typeof e=="function",Woe=e=>{const{selectedServer:t}=e();if(!iA(t))throw new Error("There's no selected server or it is not found");return t},Yoe=e=>t=>{const{url:n,apiKey:r}=Voe(t)?Woe(t):t,i=`${n}_${r}`;return O_[i]||(O_[i]=new Hoe(e,n,r)),O_[i]},qoe=e=>{e.serviceFactory("buildShlinkApiClient",Yoe,"HttpClient")};const Goe=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=mn(),o=()=>{i(),n()};return m.jsxs(j4,{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:ZG,className:"ms-1"})]}),r&&m.jsx(m.Fragment,{children:"Restarting..."})]})]})]})},s6=({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(Ft,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),Koe=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 Zoe=(e,t,n,r,i,o,a,s)=>({fetchServers:l,servers:c,settings:f,appUpdated:h,resetAppUpdate:p})=>{const v=gn().pathname==="/";return H.useEffect(()=>{var y;Object.keys(c).length===0&&l(),V4(((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:Se("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:m.jsxs(dy,{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(s6,{})})]})}),m.jsx("div",{className:"shlink-footer",children:m.jsx(s,{})})]}),m.jsx(Goe,{isOpen:h,toggle:p,forceUpdate:Koe})]})};function Ci(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:cO(e)?2:uO(e)?3:0}function xc(e,t){return gu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qoe(e,t){return gu(e)===2?e.get(t):e[t]}function l6(e,t,n){var r=gu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function c6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function cO(e){return rae&&e instanceof Map}function uO(e){return iae&&e instanceof Set}function Cs(e){return e.o||e.t}function fO(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=f6(e);delete t[$t];for(var n=Sc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Xoe),Object.freeze(e),t&&tl(e,function(n,r){return dO(r,!0)},!0)),e}function Xoe(){Ci(2)}function hO(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function no(e){var t=ix[e];return t||Ci(18,e),t}function Joe(e,t){ix[e]||(ix[e]=t)}function tx(){return Ud}function C_(e,t){t&&(no("Patches"),e.u=[],e.s=[],e.v=t)}function rv(e){nx(e),e.p.forEach(eae),e.p=null}function nx(e){e===Ud&&(Ud=e.l)}function HM(e){return Ud={p:[],l:Ud,h:e,m:!0,_:0}}function eae(e){var t=e[$t];t.i===0||t.i===1?t.j():t.g=!0}function E_(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||no("ES5").S(t,e,r),r?(n[$t].P&&(rv(t),Ci(4)),Io(e)&&(e=iv(t,e),t.l||ov(t,e)),t.u&&no("Patches").M(n[$t].t,e,t.u,t.s)):e=iv(t,n,[]),rv(t),t.u&&t.v(t.u,t.s),e!==u6?e:void 0}function iv(e,t,n){if(hO(t))return t;var r=t[$t];if(!r)return tl(t,function(s,l){return VM(e,r,t,s,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ov(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=fO(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),tl(o,function(s,l){return VM(e,r,i,s,l,n,a)}),ov(e,i,!1),n&&e.u&&no("Patches").N(r,n,e.u,e.s)}return r.o}function VM(e,t,n,r,i,o,a){if(Ya(i)){var s=iv(e,i,o&&t&&t.i!==3&&!xc(t.R,r)?o.concat(r):void 0);if(l6(n,r,s),!Ya(s))return;e.m=!1}else a&&n.add(i);if(Io(i)&&!hO(i)){if(!e.h.D&&e._<1)return;iv(e,i),t&&t.A.l||ov(e,i)}}function ov(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&dO(t,n)}function T_(e,t){var n=e[$t];return(n?Cs(n):e)[t]}function WM(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 ha(e){e.P||(e.P=!0,e.l&&ha(e.l))}function P_(e){e.o||(e.o=fO(e.t))}function rx(e,t,n){var r=cO(t)?no("MapSet").F(t,n):uO(t)?no("MapSet").T(t,n):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:tx(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,c=zd;a&&(l=[s],c=vf);var f=Proxy.revocable(l,c),h=f.revoke,p=f.proxy;return s.k=p,s.j=h,p}(t,n):no("ES5").J(t,n);return(n?n.A:tx()).p.push(r),r}function tae(e){return Ya(e)||Ci(22,e),function t(n){if(!Io(n))return n;var r,i=n[$t],o=gu(n);if(i){if(!i.P&&(i.i<4||!no("ES5").K(i)))return i.t;i.I=!0,r=YM(n,o),i.I=!1}else r=YM(n,o);return tl(r,function(a,s){i&&Qoe(i.t,a)===s||l6(r,a,t(s))}),o===3?new Set(r):r}(e)}function YM(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return fO(e)}function nae(){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 zd.get(l,o)},set:function(l){var c=this[$t];zd.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)&&ha(s);break;case 4:n(s)&&ha(s)}}}function n(o){for(var a=o.t,s=o.k,l=Sc(s),c=l.length-1;c>=0;c--){var f=l[c];if(f!==$t){var h=a[f];if(h===void 0&&!xc(a,f))return!0;var p=s[f],g=p&&p[$t];if(g?g.t!==h:!c6(p,h))return!0}}var v=!!a[$t];return l.length!==Sc(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=no("Patches").$;return Ya(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),Vr=new aae,d6=Vr.produce;Vr.produceWithPatches.bind(Vr);Vr.setAutoFreeze.bind(Vr);Vr.setUseProxies.bind(Vr);Vr.applyPatches.bind(Vr);Vr.createDraft.bind(Vr);Vr.finishDraft.bind(Vr);function Wr(e){"@babel/helpers - typeof";return Wr=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},Wr(e)}function sae(e,t){if(Wr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h6(e){var t=sae(e,"string");return Wr(t)==="symbol"?t:String(t)}function je(e,t,n){return t=h6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZM(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 QM(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zn(1));return n(p6)(e,t)}if(typeof e!="function")throw new Error(Zn(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(Zn(3));return o}function h(y){if(typeof y!="function")throw new Error(Zn(4));if(l)throw new Error(Zn(5));var x=!0;return c(),s.push(y),function(){if(x){if(l)throw new Error(Zn(6));x=!1,c();var w=s.indexOf(y);s.splice(w,1),a=null}}}function p(y){if(!lae(y))throw new Error(Zn(7));if(typeof y.type>"u")throw new Error(Zn(8));if(l)throw new Error(Zn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=a=s,b=0;b"u")throw new Error(Zn(12));if(typeof n(void 0,{type:av.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zn(13))})}function mO(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Zn(14));h[g]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?h:l}}function sv(){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:Iae,resetAppUpdate:Fae}=Nae,$ae=Aae,Bae=(e,t)=>{e.serviceFactory("App",Zoe,"MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Iae),e.serviceFactory("resetAppUpdate",()=>Fae)};const Uae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,a]=mn(),{domains:s}=n,l=Yn(t),c=()=>r("");return H.useEffect(()=>{e()},[]),i?m.jsxs(Cy,{children:[m.jsx(Yc,{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:Mt(c,a),children:m.jsx(Ie,{icon:RG})}),m.jsx(Pr,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):m.jsxs(Go,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[s.map(({domain:f,isDefault:h})=>m.jsxs(Ue,{active:(t===f||h)&&l,onClick:()=>r(f),children:[f,h&&m.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),m.jsx(Ue,{divider:!0}),m.jsx(Ue,{onClick:Mt(c,o),children:m.jsx("i",{children:"New domain"})})]})},zae=e=>(e==null?void 0:e.type)===My.INVALID_ARGUMENT||(e==null?void 0:e.type)===Dy.INVALID_ARGUMENT,Hae=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===My.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===Dy.INVALID_SHORT_URL_DELETION,Vae=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),Ko=e=>Vae(e)?e:void 0,Fo=({errorData:e,fallbackMessage:t})=>m.jsxs(m.Fragment,{children:[(e==null?void 0:e.detail)??t,zae(e)&&m.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Wae=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,i3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Wae);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},o3=e=>e==="*"||e==="x"||e==="X",a3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Yae=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],qae=(e,t)=>{if(o3(e)||o3(t))return 0;const[n,r]=Yae(a3(e),a3(t));return n>r?1:n{for(let n=0;n{const n=i3(e),r=i3(t),i=n.pop(),o=r.pop(),a=s3(n,r);return a!==0?a:i&&o?s3(i.split("."),o.split(".")):i||o?i?-1:1:0},ax=(e,t,n)=>{Kae(n);const r=Gae(e,t);return w6[n].includes(r)},w6={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},l3=Object.keys(w6),Kae=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(l3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${l3.join("|")}`)},Zae=(e,{maxVersion:t,minVersion:n})=>{const r=!n||ax(e,n,">=");return(!t||ax(e,t,"<="))&&r},x6={domainVisits:"3.1.0",excludeBotsOnShortUrls:"3.4.0",filterDisabledUrls:"3.4.0",deviceLongUrls:"3.5.0"};Object.freeze(x6);const Yp=(e,t)=>Zae(t,{minVersion:x6[e]}),S6=e=>({domainVisits:Yp("domainVisits",e),excludeBotsOnShortUrls:Yp("excludeBotsOnShortUrls",e),filterDisabledUrls:Yp("filterDisabledUrls",e),deviceLongUrls:Yp("deviceLongUrls",e)}),Qae=e=>H.useMemo(()=>S6(e),[e]),O6=H.createContext(S6("0.0.0")),Xae=O6.Provider,wh=e=>H.useContext(O6)[e],C6=H.createContext(""),Jae=C6.Provider,pl=()=>H.useContext(C6),Yf=(e,t,n)=>Ho(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,ese=(e,t)=>!e.domain&&t===eI?!0:e.domain===t,tse=(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}},E6="__",nse=e=>e.replaceAll("/",E6),Rm=e=>e.replaceAll(E6,"/");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 Te(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Pe(e){Te(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Wr(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 ml(e,t){Te(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function hi(e,t){Te(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 rse(e,t){if(Te(2,arguments),!t||Wr(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?hi(c,r+n*12):c,h=o||i?ml(f,o+i*7):f,p=s+a*60,g=l+p*60,v=g*1e3,y=new Date(h.getTime()+v);return y}function vO(e,t){Te(2,arguments);var n=Pe(e).getTime(),r=Ye(t);return new Date(n+r)}var ise=36e5;function ose(e,t){Te(2,arguments);var n=Ye(t);return vO(e,n*ise)}var ase={};function Zo(){return ase}function T6(e,t){var n,r,i,o,a,s,l,c;Te(1,arguments);var f=Zo(),h=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(!(h>=0&&h<=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 lse(e){Te(1,arguments);var t=sse(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Hd(n);return r}function Qc(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 Br(e){Te(1,arguments);var t=Pe(e);return t.setHours(0,0,0,0),t}var cse=864e5;function Vd(e,t){Te(2,arguments);var n=Br(e),r=Br(t),i=n.getTime()-Qc(n),o=r.getTime()-Qc(r);return Math.round((i-o)/cse)}var use=6e4;function sx(e,t){Te(2,arguments);var n=Ye(t);return vO(e,n*use)}function P6(e,t){Te(2,arguments);var n=Ye(t),r=n*3;return hi(e,r)}function yO(e,t){Te(2,arguments);var n=Ye(t),r=n*7;return ml(e,r)}function Xc(e,t){Te(2,arguments);var n=Ye(t);return hi(e,n*12)}function c3(e){Te(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Wr(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 jm(e,t){Te(2,arguments);var n=Pe(e),r=Pe(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var _O=6e4,Ly=36e5,fse=1e3;function dse(e,t){Te(2,arguments);var n=Br(e),r=Br(t);return n.getTime()===r.getTime()}function bO(e){return Te(1,arguments),e instanceof Date||Wr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function lv(e){if(Te(1,arguments),!bO(e)&&typeof e!="number")return!1;var t=Pe(e);return!isNaN(Number(t))}function Wd(e,t){Te(2,arguments);var n=Pe(e),r=Pe(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function lc(e){Te(1,arguments);var t=Pe(e),n=Math.floor(t.getMonth()/3)+1;return n}function cv(e,t){Te(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()-r.getFullYear()}function f3(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 wO(e,t){Te(2,arguments);var n=Pe(e),r=Pe(t),i=f3(n,r),o=Math.abs(Vd(n,r));n.setDate(n.getDate()-i*o);var a=+(f3(n,r)===-i),s=i*(o-a);return s===0?0:s}function k6(e,t){return Te(2,arguments),Pe(e).getTime()-Pe(t).getTime()}var d3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},hse="trunc";function xO(e){return e?d3[e]:d3[hse]}function pse(e,t,n){Te(2,arguments);var r=k6(e,t)/Ly;return xO(n==null?void 0:n.roundingMethod)(r)}function nl(e){Te(1,arguments);var t=Pe(e);return t.setHours(23,59,59,999),t}function M6(e){Te(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 mse(e){Te(1,arguments);var t=Pe(e);return nl(t).getTime()===M6(t).getTime()}function uv(e,t){Te(2,arguments);var n=Pe(e),r=Pe(t),i=jm(n,r),o=Math.abs(Wd(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=jm(n,r)===-i;mse(Pe(e))&&o===1&&jm(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function gse(e,t,n){Te(2,arguments);var r=k6(e,t)/1e3;return xO(n==null?void 0:n.roundingMethod)(r)}function vse(e,t,n){Te(2,arguments);var r=wO(e,t)/7;return xO(n==null?void 0:n.roundingMethod)(r)}function lx(e){Te(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 D6(e){Te(1,arguments);var t=Pe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function yse(e){Te(1,arguments);var t=Pe(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function L6(e){Te(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;Te(1,arguments);var f=Zo(),h=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(!(h>=0&&h<=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 Sse(e){Te(1,arguments);var t=j6(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Jc(n);return r}var Ose=6048e5;function N6(e){Te(1,arguments);var t=Pe(e),n=Jc(t).getTime()-Sse(t).getTime();return Math.round(n/Ose)+1}function rl(e,t){var n,r,i,o,a,s,l,c;Te(1,arguments);var f=Zo(),h=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(!(h>=0&&h<=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(h+1,0,g),v.setUTCHours(0,0,0,0);var y=rl(v,t),x=new Date(0);x.setUTCFullYear(h,0,g),x.setUTCHours(0,0,0,0);var b=rl(x,t);return f.getTime()>=y.getTime()?h+1:f.getTime()>=b.getTime()?h:h-1}function Cse(e,t){var n,r,i,o,a,s,l,c;Te(1,arguments);var f=Zo(),h=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=SO(e,t),g=new Date(0);g.setUTCFullYear(p,0,h),g.setUTCHours(0,0,0,0);var v=rl(g,t);return v}var Ese=6048e5;function A6(e,t){Te(1,arguments);var n=Pe(e),r=rl(n,t).getTime()-Cse(n,t).getTime();return Math.round(r/Ese)+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 na=Tse;var Il={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pse={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 na.y(t,n)},Y:function(t,n,r,i){var o=SO(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=j6(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 na.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=A6(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=N6(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"}):na.d(t,n)},D:function(t,n,r){var i=xse(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=Il.noon:i===0?o=Il.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=Il.evening:i>=12?o=Il.afternoon:i>=4?o=Il.morning:o=Il.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 na.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):na.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"}):na.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):na.s(t,n)},S:function(t,n){return na.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 p3(a);case"XXXX":case"XX":return Es(a);case"XXXXX":case"XXX":default:return Es(a,":")}},x:function(t,n,r,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(n){case"x":return p3(a);case"xxxx":case"xx":return Es(a);case"xxxxx":case"xxx":default:return Es(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"+h3(a,":");case"OOOO":default:return"GMT"+Es(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"+h3(a,":");case"zzzz":default:return"GMT"+Es(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 h3(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 p3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Es(e,t)}function Es(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=Pse;var m3=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"})}},I6=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"})}},Mse=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return m3(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}}",m3(i,n)).replace("{{time}}",I6(o,n))},Dse={p:I6,P:Mse};const cx=Dse;var Lse=["D","DD"],Rse=["YY","YYYY"];function F6(e){return Lse.indexOf(e)!==-1}function $6(e){return Rse.indexOf(e)!==-1}function fv(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 jse={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"}},Nse=function(t,n,r){var i,o=jse[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 Ase=Nse;function L_(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 Ise={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Fse={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$se={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Bse={date:L_({formats:Ise,defaultWidth:"full"}),time:L_({formats:Fse,defaultWidth:"full"}),dateTime:L_({formats:$se,defaultWidth:"full"})};const Use=Bse;var zse={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hse=function(t,n,r,i){return zse[t]};const Vse=Hse;function Xu(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 Wse={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Yse={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qse={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"]},Gse={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"]},Kse={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"}},Zse={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"}},Qse=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"},Xse={ordinalNumber:Qse,era:Xu({values:Wse,defaultWidth:"wide"}),quarter:Xu({values:Yse,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Xu({values:qse,defaultWidth:"wide"}),day:Xu({values:Gse,defaultWidth:"wide"}),dayPeriod:Xu({values:Kse,defaultWidth:"wide",formattingValues:Zse,defaultFormattingWidth:"wide"})};const Jse=Xse;function Ju(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)?tle(s,function(h){return h.test(a)}):ele(s,function(h){return h.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 ele(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function tle(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 rle=/^(\d+)(th|st|nd|rd)?/i,ile=/\d+/i,ole={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},ale={any:[/^b/i,/^(a|c)/i]},sle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lle={any:[/1/i,/2/i,/3/i,/4/i]},cle={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},ule={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]},fle={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]},hle={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},ple={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}},mle={ordinalNumber:nle({matchPattern:rle,parsePattern:ile,valueCallback:function(t){return parseInt(t,10)}}),era:Ju({matchPatterns:ole,defaultMatchWidth:"wide",parsePatterns:ale,defaultParseWidth:"any"}),quarter:Ju({matchPatterns:sle,defaultMatchWidth:"wide",parsePatterns:lle,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ju({matchPatterns:cle,defaultMatchWidth:"wide",parsePatterns:ule,defaultParseWidth:"any"}),day:Ju({matchPatterns:fle,defaultMatchWidth:"wide",parsePatterns:dle,defaultParseWidth:"any"}),dayPeriod:Ju({matchPatterns:hle,defaultMatchWidth:"any",parsePatterns:ple,defaultParseWidth:"any"})};const gle=mle;var vle={code:"en-US",formatDistance:Ase,formatLong:Use,formatRelative:Vse,localize:Jse,match:gle,options:{weekStartsOn:0,firstWeekContainsDate:1}};const OO=vle;var yle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_le=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ble=/^'([^]*?)'?$/,wle=/''/g,xle=/[a-zA-Z]/;function eu(e,t,n){var r,i,o,a,s,l,c,f,h,p,g,v,y,x,b,w,S,C;Te(2,arguments);var T=String(t),P=Zo(),R=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:P.locale)!==null&&r!==void 0?r:OO,j=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:(h=P.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=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(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!R.localize)throw new RangeError("locale must contain localize property");if(!R.formatLong)throw new RangeError("locale must contain formatLong property");var N=Pe(e);if(!lv(N))throw new RangeError("Invalid time value");var V=Qc(N),W=R6(N,V),ne={firstWeekContainsDate:j,weekStartsOn:z,locale:R,_originalDate:N},q=T.match(_le).map(function(J){var oe=J[0];if(oe==="p"||oe==="P"){var le=cx[oe];return le(J,R.formatLong)}return J}).join("").match(yle).map(function(J){if(J==="''")return"'";var oe=J[0];if(oe==="'")return Sle(J);var le=kse[oe];if(le)return!(n!=null&&n.useAdditionalWeekYearTokens)&&$6(J)&&fv(J,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&F6(J)&&fv(J,t,String(e)),le(W,J,R.localize,ne);if(oe.match(xle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+oe+"`");return J}).join("");return q}function Sle(e){var t=e.match(ble);return t?t[1].replace(wle,"'"):e}function CO(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 Ole(e){return CO({},e)}var g3=1440,Cle=2520,R_=43200,Ele=86400;function Tle(e,t,n){var r,i;Te(2,arguments);var o=Zo(),a=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:OO;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=jm(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=CO(Ole(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 h=gse(f,c),p=(Qc(f)-Qc(c))/1e3,g=Math.round((h-p)/60),v;if(g<2)return n!=null&&n.includeSeconds?h<5?a.formatDistance("lessThanXSeconds",5,l):h<10?a.formatDistance("lessThanXSeconds",10,l):h<20?a.formatDistance("lessThanXSeconds",20,l):h<40?a.formatDistance("halfAMinute",0,l):h<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 oi(e,t){Te(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&&$g(e,t)}function hv(e){return hv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hv(e)}function Nle(){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 Ale(e,t){if(t&&(Wr(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=Nle();return function(){var r=hv(e),i;if(t){var o=hv(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Ale(this,i)}}function ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b3(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 V6(e){return e%400===0||e%4===0&&e%100!==0}var Ule=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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=H6(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),zle=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(i,o,a,s){var l=SO(i,s);if(a.isTwoDigitYear){var c=H6(a.year,l);return i.setUTCFullYear(c,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),rl(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),rl(i,s)}}]),n}(gt),Hle=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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),Yle=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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),qle=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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),Gle=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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 Kle(e,t,n){Te(2,arguments);var r=Pe(e),i=Ye(t),o=A6(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}var Zle=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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 rl(Kle(i,a,s),s)}}]),n}(gt);function Qle(e,t){Te(2,arguments);var n=Pe(e),r=Ye(t),i=N6(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}var Xle=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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 Jc(Qle(i,a))}}]),n}(gt),Jle=[31,28,31,30,31,30,31,31,30,31,30,31],ece=[31,29,31,30,31,30,31,31,30,31,30,31],tce=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=ece[l]:o>=1&&o<=Jle[l]}},{key:"set",value:function(i,o,a){return i.setUTCDate(a),i.setUTCHours(0,0,0,0),i}}]),n}(gt),nce=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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 TO(e,t,n){var r,i,o,a,s,l,c,f;Te(2,arguments);var h=Zo(),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:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.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=TO(i,a,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt),ice=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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=TO(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;ot(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=TO(i,a,s),i.setUTCHours(0,0,0,0),i}}]),n}(gt);function ace(e,t){Te(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=ace(i,a),i.setUTCHours(0,0,0,0),i}}]),n}(gt),lce=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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;ot(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),hce=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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),pce=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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),mce=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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),gce=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(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),vce=function(e){ht(n,e);var t=pt(n);function n(){var r;ot(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=1&&N<=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:j.weekStartsOn)!==null&&y!==void 0?y:(C=j.locale)===null||C===void 0||(T=C.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&v!==void 0?v:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(R==="")return P===""?Pe(n):new Date(NaN);var W={firstWeekContainsDate:N,weekStartsOn:V,locale:z},ne=[new $le],q=R.match(Oce).map(function(E){var M=E[0];if(M in cx){var I=cx[M];return I(E,z.formatLong)}return E}).join("").match(Sce),J=[],oe=_3(q),le;try{var G=function(){var M=le.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&$6(M)&&fv(M,R,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&F6(M)&&fv(M,R,e);var I=M[0],X=xce[I];if(X){var Q=X.incompatibleTokens;if(Array.isArray(Q)){var se=J.find(function(Le){return Q.includes(Le.token)||Le.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(X.incompatibleTokens==="*"&&J.length>0)throw new RangeError("The format string mustn't contain `".concat(M,"` and any other token at the same time"));J.push({token:I,fullToken:M});var ge=X.run(P,M,z.match,W);if(!ge)return{v:new Date(NaN)};ne.push(ge.setter),P=ge.rest}else{if(I.match(Pce))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(Wr(F)==="object")return F.v}}catch(E){oe.e(E)}finally{oe.f()}if(P.length>0&&Tce.test(P))return new Date(NaN);var A=ne.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 ne.filter(function(M){return M.priority===E}).sort(function(M,I){return I.subPriority-M.subPriority})}).map(function(E){return E[0]}),B=Pe(n);if(isNaN(B.getTime()))return new Date(NaN);var re=R6(B,Qc(B)),U={},Z=_3(A),ie;try{for(Z.s();!(ie=Z.n()).done;){var ae=ie.value;if(!ae.validate(re,W))return new Date(NaN);var pe=ae.set(re,U,W);Array.isArray(pe)?(re=pe[0],CO(U,pe[1])):re=pe}}catch(E){Z.e(E)}finally{Z.f()}return re}function kce(e){return e.match(Cce)[1].replace(Ece,"'")}function Mce(e,t){Te(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Dce(e,t){Te(2,arguments);var n=lx(e),r=lx(t);return n.getTime()===r.getTime()}function Lce(e,t){Te(2,arguments);var n=Pe(e),r=Pe(t);return n.getFullYear()===r.getFullYear()}function tu(e,t){Te(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 PO(e,t){Te(2,arguments);var n=Ye(t);return ml(e,-n)}function $o(e,t){var n;Te(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=Ace(e),o;if(i.date){var a=Ice(i.date,r);o=Fce(a.restDateString,a.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var s=o.getTime(),l=0,c;if(i.time&&(l=$ce(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=Bce(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(s+l),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(s+l+c)}var qp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Rce=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,jce=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Nce=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ace(e){var t={},n=e.split(qp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],qp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(qp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=qp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Ice(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 Fce(e,t){if(t===null)return new Date(NaN);var n=e.match(Rce);if(!n)return new Date(NaN);var r=!!n[4],i=ef(n[1]),o=ef(n[2])-1,a=ef(n[3]),s=ef(n[4]),l=ef(n[5])-1;if(r)return Wce(t,s,l)?Uce(t,s,l):new Date(NaN);var c=new Date(0);return!Hce(t,o,a)||!Vce(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}function ef(e){return e?parseInt(e):1}function $ce(e){var t=e.match(jce);if(!t)return NaN;var n=A_(t[1]),r=A_(t[2]),i=A_(t[3]);return Yce(n,r,i)?n*Ly+r*_O+i*1e3:NaN}function A_(e){return e&&parseFloat(e.replace(",","."))||0}function Bce(e){if(e==="Z")return 0;var t=e.match(Nce);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return qce(r,i)?n*(r*Ly+i*_O):NaN}function Uce(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 zce=[31,null,31,30,31,30,31,31,30,31,30,31];function W6(e){return e%400===0||e%4===0&&e%100!==0}function Hce(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(zce[t]||(W6(e)?29:28))}function Vce(e,t){return t>=1&&t<=(W6(e)?366:365)}function Wce(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Yce(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function qce(e,t){return t>=0&&t<=59}function ur(e,t){Te(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=Mle(a);return n.setMonth(r,Math.min(o,s)),n}function Gce(e,t){if(Te(2,arguments),Wr(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=ur(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){Te(2,arguments);var n=Pe(e),r=Ye(t);return n.setHours(r),n}function Gf(e,t){Te(2,arguments);var n=Pe(e),r=Ye(t);return n.setMinutes(r),n}function Fl(e,t){Te(2,arguments);var n=Pe(e),r=Ye(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return ur(n,n.getMonth()+o*3)}function Kce(e,t){Te(2,arguments);var n=Pe(e),r=Ye(t);return n.setSeconds(r),n}function wo(e,t){Te(2,arguments);var n=Pe(e),r=Ye(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function nu(e,t){Te(2,arguments);var n=Ye(t);return hi(e,-n)}function Zce(e,t){Te(2,arguments);var n=Ye(t);return P6(e,-n)}function Qce(e,t){Te(2,arguments);var n=Ye(t);return yO(e,-n)}function Yd(e,t){Te(2,arguments);var n=Ye(t);return Xc(e,-n)}const Y6="yyyy-MM-dd",kO="yyyy-MM-dd HH:mm",Ga=()=>new Date,MO=e=>typeof e!="string",DO=(e,t)=>!e||!MO(e)?e:t?eu(e,t):Ple(e),Ka=e=>DO(e,void 0),js=e=>DO(e,Y6),mv=e=>DO(e,kO),Pi=e=>MO(e)?e:$o(e),xh=(e,t,n)=>{try{return tu(Pi(e),{start:Pi(t??e),end:Pi(n??e)})}catch{return!1}},ms=(e,t)=>B6(e,t)||oi(e,t),Sh="all",q6={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[Sh]:void 0},G6=Object.keys(q6),K6=e=>e===void 0||Yn(ZN(Boolean,e)),gv=e=>typeof e=="string"&&G6.includes(e),Xce=G6.filter(e=>e!==Sh),w3=e=>e?Pi(e):null,Z6=(e,t)=>({startDate:w3(e),endDate:w3(t)}),Jce=e=>{if(!(!e||K6(e)))return e.startDate&&!e.endDate?`Since ${js(e.startDate)}`:!e.startDate&&e.endDate?`Until ${js(e.endDate)}`:`${js(e.startDate)} - ${js(e.endDate)}`},Q6=e=>{if(!(!e||e===Sh))return gv(e)?q6[e]:Jce(e)},ri=e=>Br(PO(Ga(),e)),$l=e=>({startDate:e,endDate:nl(Ga())}),gs=e=>t=>e===t,X6=pS([[gs("today"),()=>$l(Br(Ga()))],[gs("yesterday"),()=>({startDate:ri(1),endDate:nl(PO(Ga(),1))})],[gs("last7Days"),()=>$l(ri(7))],[gs("last30Days"),()=>$l(ri(30))],[gs("last90Days"),()=>$l(ri(90))],[gs("last180Days"),()=>$l(ri(180))],[gs("last365Days"),()=>$l(ri(365))],[HN,()=>({})]]),eue=e=>{const t=Pi(e);return pS([[()=>ms(Br(Ga()),t),()=>"today"],[()=>ms(ri(1),t),()=>"yesterday"],[()=>ms(ri(7),t),()=>"last7Days"],[()=>ms(ri(30),t),()=>"last30Days"],[()=>ms(ri(90),t),()=>"last90Days"],[()=>ms(ri(180),t),()=>"last180Days"],[()=>ms(ri(365),t),()=>"last365Days"],[HN,()=>Sh]])()},tue=e=>gv(e)?X6(e):e,Tr=(e,t)=>b6(e,t,{serializeError:gy}),Oh=Mn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),x3=5e3,S3=4,O3=2,nue=({currentPage:e,pagesCount:t})=>e>=t,rue=(e,t)=>t*100/e,Ch=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=Mn(`${e}/progressChanged`),o=Mn(`${e}/large`),a=Mn(`${e}/fallbackToInterval`),s=Tr(e,async(l,{getState:c,dispatch:f})=>{var w;const[h,p]=t(l),g=async S=>Promise.all(S.map(async C=>h(C,x3).then(ct("data")))).then(Cq),v=async(S,C=0)=>{if(r(c))return[];const T=await g(S[C]);return f(i(rue(S.length,C+O3))),C{const{pagination:C,data:T}=await h(S,x3);if(!C||nue(C))return T;const P=gS(O3,C.pagesCount+1),R=Td(S3,P);return C.pagesCount-1>S3&&f(o()),T.concat(await v(R))},[x,b]=await Promise.all([y(),p((w=l.query)==null?void 0:w.excludeBots)]);return!x.length&&b&&f(a(eue(b.date))),{...n(l),visits:x}});return Object.assign(s,{progressChanged:i,large:o,fallbackToInterval:a})},Eh=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),Th=({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:h}=ir({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:Ko(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(Oh,(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}=h;return{reducer:f,cancelGetVisits:p}},J6="shlink/domainVisits",eI="DEFAULT",iue={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},oue=e=>Ch({typePrefix:`${J6}/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=Eh(r,async s=>i(t,s));return[o,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),aue=e=>Th({name:J6,initialState:iue,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:a,visit:s})=>a&&ese(a,t)&&xh(s.date,i,o))}}),Nm=({className:e="",placement:t,children:n})=>{const r=dl();return m.jsxs(m.Fragment,{children:[m.jsx("span",{className:e,ref:r,children:m.jsx(Ie,{icon:bS})}),m.jsx(Pr,{target:r,placement:t,children:n})]})},Ry=e=>Mt(t=>t.preventDefault(),e),LO=(e,t,n=1)=>gS(n,e+1).map(t),Zi=e=>!Ho(e)&&!Yn(e),I_=e=>Yn(e)?null:e,tI=e=>e?"true":"false",F_=e=>e===void 0?void 0:tI(e),$_=({isLast:e,...t})=>m.jsx(Dm,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),sue=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var h,p,g;const[i,o]=H.useState(((h=n.redirects)==null?void 0:h.baseUrlRedirect)??""),[a,s]=H.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=H.useState(((g=n.redirects)==null?void 0:g.invalidShortUrlRedirect)??""),f=Ry(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:I_(i),regular404Redirect:I_(a),invalidShortUrlRedirect:I_(l)}}).then(t));return m.jsx(Yo,{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(so,{children:[m.jsxs($_,{value:i,onChange:o,children:[m.jsxs(Nm,{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($_,{value:a,onChange:s,children:[m.jsxs(Nm,{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($_,{value:l,isLast:!0,onChange:c,children:[m.jsx(Nm,{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(fl,{children:[m.jsx(yt,{color:"link",type:"button",onClick:t,children:"Cancel"}),m.jsx(yt,{color:"primary",children:"Save"})]})]})})},lue=({domain:e,editDomainRedirects:t})=>{const[n,r]=mn(),i=wh("domainVisits"),o=pl();return m.jsxs(Ty,{children:[i&&m.jsxs(Ue,{tag:Ft,to:`${o}/domain/${e.domain}${e.isDefault?`_${eI}`:""}/visits`,children:[m.jsx(Ie,{icon:_S,fixedWidth:!0})," Visit stats"]}),m.jsxs(Ue,{onClick:r,children:[m.jsx(Ie,{fixedWidth:!0,icon:yS})," Edit redirects"]}),m.jsx(sue,{domain:e,isOpen:n,toggle:r,editDomainRedirects:t})]})},Li=({href:e,children:t,rel:n,...r})=>m.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),cue=({status:e,matchMedia:t=window.matchMedia})=>{const n=dl(),r=()=>t("(max-width: 991px)").matches,[i,o]=H.useState(r());return H.useEffect(()=>{const a=()=>o(r());return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),e==="validating"?m.jsx(Ie,{fixedWidth:!0,icon:aA,spin:!0}):m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:n,children:e==="valid"?m.jsx(Ie,{fixedWidth:!0,icon:Pd,className:"text-muted"}):m.jsx(Ie,{fixedWidth:!0,icon:_1,className:"text-danger"})}),m.jsx(Pr,{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(Li,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},B_=({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)"})]})]}),uue=()=>m.jsxs(m.Fragment,{children:[m.jsx(Ie,{fixedWidth:!0,icon:mG,className:"text-primary",id:"defaultDomainIcon"}),m.jsx(Pr,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),fue=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:o,redirects:a,status:s}=e;return H.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(uue,{})}),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(B_,{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(B_,{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(B_,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),m.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:m.jsx(cue,{status:s})}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(lue,{domain:e,editDomainRedirects:t})})]})},C3=["","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(H.useEffect(()=>{e()},[]),s)return m.jsx(Po,{loading:!0});const h=()=>l?m.jsx($r,{type:"error",children:m.jsx(Fo,{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:C3.map((g,v)=>m.jsx("th",{children:g},v))})}),m.jsxs("tbody",{children:[o.length<1&&m.jsx("tr",{children:m.jsx("td",{colSpan:C3.length,className:"text-center",children:"No results found"})}),o.map(g=>m.jsx(fue,{domain:g,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:f},g.domain))]})]})});return m.jsxs(m.Fragment,{children:[m.jsx(yh,{className:"mb-3",onChange:n}),h()]})},hue="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",pue=e=>Tr(hue,async({domain:t,redirects:n})=>{const i=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:i}}),Gp="shlink/domainsList",Kp={domains:[],filteredDomains:[],loading:!1,error:!1},E3=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},T3=(e,t)=>n=>n.domain!==e?n:{...n,status:t},mue=(e,t)=>{const n=Tr(`${Gp}/listDomains`,async()=>{const{data:a,defaultRedirects:s}=await e().listDomains();return{domains:a.map(l=>({...l,status:"validating"})),defaultRedirects:s}}),r=Tr(`${Gp}/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=Mn(`${Gp}/filterDomains`),{reducer:o}=ir({name:Gp,initialState:Kp,reducers:{},extraReducers:a=>{a.addCase(n.pending,()=>({...Kp,loading:!0})),a.addCase(n.rejected,(s,{error:l})=>({...Kp,error:!0,errorData:Ko(l)})),a.addCase(n.fulfilled,(s,{payload:l})=>({...Kp,...l,filteredDomains:l.domains})),a.addCase(r.fulfilled,({domains:s,filteredDomains:l,...c},{payload:f})=>({...c,domains:s.map(T3(f.domain,f.status)),filteredDomains:l.map(T3(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(E3(l)),filteredDomains:s.filteredDomains.map(E3(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},gue=(e,t)=>{e.serviceFactory("DomainSelector",()=>Uae),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>due),e.decorator("ManageDomains",t(["domainsList"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",mue,"apiClientFactory","editDomainRedirects"),e.serviceFactory("domainsListReducer",ct("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",ct("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",ct("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",pue,"apiClientFactory"),e.serviceFactory("checkDomainHealth",ct("checkDomainHealth"),"domainsListReducerCreator")},P3="shlink/mercure",vue={loading:!0,error:!1},yue=e=>{const t=Tr(`${P3}/loadMercureInfo`,({realTimeUpdates:r})=>{if(r&&!r.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=ir({name:P3,initialState:vue,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",yue,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",ct("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",ct("loadMercureInfo"),"mercureInfoReducerCreator")};var ux={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,h=n.fetch,p=n.Response,g=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=h;h=function(ue,ve){var _e=ve.signal;return x(ue,{headers:ve.headers,credentials:ve.credentials,cache:ve.cache}).then(function(Ee){var Re=Ee.body.getReader();return _e._reader=Re,_e._aborted&&_e._reader.cancel(),{status:Ee.status,statusText:Ee.statusText,headers:Ee.headers,body:{getReader:function(){return Re}}}})},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,Oe){if(Oe===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 Ee=65533,Re="",Me=this.bitsNeeded,De=this.codePoint,ce=0;ce191||!ve(De<<6|de&63,Me-6,_e(Me,De)))&&(Me=0,De=Ee,Re+=String.fromCharCode(De)),Me===0?(de>=0&&de<=127?(Me=0,De=de):de>=192&&de<=223?(Me=6*1,De=de&31):de>=224&&de<=239?(Me=6*2,De=de&15):de>=240&&de<=247?(Me=6*3,De=de&7):(Me=0,De=Ee),Me!==0&&!ve(De,Me,_e(Me,De))&&(Me=0,De=Ee)):(Me-=6,De=De<<6|de&63),Me===0&&(De<=65535?Re+=String.fromCharCode(De):(Re+=String.fromCharCode(55296+(De-65535-1>>10)),Re+=String.fromCharCode(56320+(De-65535-1&1023))))}return this.bitsNeeded=Me,this.codePoint=De,Re};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,Ee=this._xhr,Re=1,Me=0;this._abort=function(Oe){_e._sendTimeout!==0&&(i(_e._sendTimeout),_e._sendTimeout=0),(Re===1||Re===2||Re===3)&&(Re=4,Ee.onload=S,Ee.onerror=S,Ee.onabort=S,Ee.onprogress=S,Ee.onreadystatechange=S,Ee.abort(),Me!==0&&(i(Me),Me=0),Oe||(_e.readyState=4,_e.onabort(null),_e.onreadystatechange())),Re=0};var De=function(){if(Re===1){var Oe=0,ke="",Ne=void 0;if("contentType"in Ee)Oe=200,ke="OK",Ne=Ee.contentType;else try{Oe=Ee.status,ke=Ee.statusText,Ne=Ee.getResponseHeader("Content-Type")}catch{Oe=0,ke="",Ne=void 0}Oe!==0&&(Re=2,_e.readyState=2,_e.status=Oe,_e.statusText=ke,_e._contentType=Ne,_e.onreadystatechange())}},ce=function(){if(De(),Re===2||Re===3){Re=3;var Oe="";try{Oe=Ee.responseText}catch{}_e.readyState=3,_e.responseText=Oe,_e.onprogress()}},de=function(Oe,ke){if((ke==null||ke.preventDefault==null)&&(ke={preventDefault:S}),ce(),Re===1||Re===2||Re===3){if(Re=4,Me!==0&&(i(Me),Me=0),_e.readyState=4,Oe==="load")_e.onload(ke);else if(Oe==="error")_e.onerror(ke);else if(Oe==="abort")_e.onabort(ke);else throw new TypeError;_e.onreadystatechange()}},be=function(Oe){Ee!=null&&(Ee.readyState===4?(!("onload"in Ee)||!("onerror"in Ee)||!("onabort"in Ee))&&de(Ee.responseText===""?"error":"load",Oe):Ee.readyState===3?"onprogress"in Ee||ce():Ee.readyState===2&&De())},ye=function(){Me=r(function(){ye()},500),Ee.readyState===3&&ce()};"onload"in Ee&&(Ee.onload=function(Oe){de("load",Oe)}),"onerror"in Ee&&(Ee.onerror=function(Oe){de("error",Oe)}),"onabort"in Ee&&(Ee.onabort=function(Oe){de("abort",Oe)}),"onprogress"in Ee&&(Ee.onprogress=ce),"onreadystatechange"in Ee&&(Ee.onreadystatechange=function(Oe){be(Oe)}),("contentType"in Ee||!("ontimeout"in o.prototype))&&(ve+=(ve.indexOf("?")===-1?"?":"&")+"padding=true"),Ee.open(ue,ve,!0),"readyState"in Ee&&(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 T(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 `),Ee=0;Ee<_e.length;Ee+=1){var Re=_e[Ee],Me=Re.split(": "),De=Me.shift(),ce=Me.join(": ");ve[T(De)]=ce}this._map=ve}P.prototype.get=function(ue){return this._map[T(ue)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function R(){}R.prototype.open=function(ue,ve,_e,Ee,Re,Me,De){ue.open("GET",Re);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(),Ee(new Error("NetworkError"))},ue.onload=function(){Ee(null)},ue.onabort=function(){Ee(null)},ue.onreadystatechange=function(){if(ue.readyState===o.HEADERS_RECEIVED){var be=ue.status,ye=ue.statusText,Oe=ue.getResponseHeader("Content-Type"),ke=ue.getAllResponseHeaders();ve(be,ye,Oe,new P(ke))}},ue.withCredentials=Me;for(var de in De)Object.prototype.hasOwnProperty.call(De,de)&&ue.setRequestHeader(de,De[de]);return ue.send(),ue};function j(ue){this._headers=ue}j.prototype.get=function(ue){return this._headers.get(ue)};function z(){}z.prototype.open=function(ue,ve,_e,Ee,Re,Me,De){var ce=null,de=new y,be=de.signal,ye=new g;return h(Re,{headers:De,credentials:Me?"include":"same-origin",signal:be,cache:"no-store"}).then(function(Oe){return ce=Oe.body.getReader(),ve(Oe.status,Oe.statusText,Oe.headers.get("Content-Type"),new j(Oe.headers)),new f(function(ke,Ne){var Qe=function(){ce.read().then(function(et){if(et.done)ke(void 0);else{var qe=ye.decode(et.value,{stream:!0});_e(qe),Qe()}}).catch(function(et){Ne(et)})};Qe()})}).catch(function(Oe){if(Oe.name!=="AbortError")return Oe}).then(function(Oe){Ee(Oe)}),{abort:function(){ce!=null&&ce.cancel(),de.abort()}}};function N(){this._listeners=Object.create(null)}function V(ue){r(function(){throw ue},0)}N.prototype.dispatchEvent=function(ue){ue.target=this;var ve=this._listeners[ue.type];if(ve!=null)for(var _e=ve.length,Ee=0;Ee<_e;Ee+=1){var Re=ve[Ee];try{typeof Re.handleEvent=="function"?Re.handleEvent(ue):Re.call(this,ue)}catch(Me){V(Me)}}},N.prototype.addEventListener=function(ue,ve){ue=String(ue);var _e=this._listeners,Ee=_e[ue];Ee==null&&(Ee=[],_e[ue]=Ee);for(var Re=!1,Me=0;Me"u"?typeof window<"u"?window:typeof self<"u"?self:Wl:globalThis)})(ux,ux.exports);var bue=ux.exports;const wue=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:a,error:s}=e;if(a||s||!i)return;const l=({data:h})=>n(JSON.parse(h)),c=({status:h})=>h===401&&r(),f=t.map(h=>{const p=new URL(i);p.searchParams.append("topic",h);const g=new bue.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return g.onmessage=l,g.onerror=c,g});return()=>f.forEach(h=>h.close())};function is(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:a}=r,{interval:s}=a,l=ul();return H.useEffect(()=>{const c=g=>s?n.add(g):i([g]),f=t(r,l),h=wue(a,f,c,o);if(!s)return h;const p=setInterval(()=>{i([...n]),n.clear()},s*1e3*60);return Mt(()=>clearInterval(p),()=>h==null?void 0:h())},[a]),m.jsx(e,{...r})}}class li{}me(li,"visits","https://shlink.io/new-visit"),me(li,"orphanVisits","https://shlink.io/new-orphan-visit"),me(li,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const RO="shlink/shortUrlDeletion",k3={shortCode:"",loading:!1,deleted:!1,error:!1},xue=e=>Tr(`${RO}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl(t,n),{shortCode:t,domain:n})),nI=Mn(`${RO}/shortUrlDeleted`),Sue=e=>{const{actions:t,reducer:n}=ir({name:RO,initialState:k3,reducers:{resetDeleteShortUrl:()=>k3},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:a})=>({...o,errorData:Ko(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}},rI="shlink/shortUrlsList",iI=5,Oue={loading:!0,error:!1},Cue=e=>Tr(`${rI}/listShortUrls`,t=>e().listShortUrls(t??{})),Eue=(e,t,n)=>ir({name:rI,initialState:Oue,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,Mt((i,{payload:o})=>i.shortUrls?Dl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,iI-1)],i):i,i=>i.shortUrls?Dl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Dl(["shortUrls","data"],i.shortUrls.data.map(a=>{const{shortCode:s,domain:l}=o;return Yf(a,s,l)?o:a}),i):i),r.addCase(nI,Mt((i,{payload:o})=>i.shortUrls?Dl(["shortUrls","data"],sh(a=>Yf(a,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Dl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(Oh,(i,{payload:o})=>{var a,s;return Dl(["shortUrls","data"],(s=(a=i.shortUrls)==null?void 0:a.data)==null?void 0:s.map(l=>{var c;return((c=wq(o.createdVisits.filter(({shortUrl:f})=>f&&Yf(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),M3=10,{ceil:Tue}=Math,Pue=new Intl.NumberFormat("en-US"),wn=e=>Pue.format(Number(e)),kue=e=>Tue(e/M3)*M3,Mue={field:"dateCreated",dir:"DESC"},oI={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:Mue}},aI=H.createContext(oI),Due=aI.Provider,jO=()=>H.useContext(aI)??oI,gl=e=>jO()[e];var Lue={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"]},Rue=Lue,jue={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"]},Nue=jue,Aue={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"]},sI={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 Iue=e=>({tag:Ft,to:e}),fx=({children:e,title:t,link:n,tooltip:r})=>{const i=dl();return m.jsxs(m.Fragment,{children:[m.jsxs(Hr,{innerRef:i,className:"highlight-card",body:!0,...Iue(n),children:[m.jsx(Ie,{size:"3x",className:"highlight-card__link-icon",icon:Nue}),m.jsx(C4,{tag:"h5",className:"highlight-card__title",children:t}),m.jsx(O4,{tag:"h2",children:e})]}),r&&m.jsx(Pr,{target:i,placement:"bottom",children:r})]})},D3=({loading:e,excludeBots:t,visitsSummary:n,...r})=>m.jsx(fx,{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)}),Fue=(e,t)=>is(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,loadVisitsOverview:a,visitsOverview:s})=>{const{loading:l,shortUrls:c}=n,{loading:f}=o,{loading:h,nonOrphanVisits:p,orphanVisits:g}=s,v=pl(),y=ao(),x=gl("visits");return H.useEffect(()=>{r({itemsPerPage:iI,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),m.jsxs(m.Fragment,{children:[m.jsxs(dr,{children:[m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(D3,{title:"Visits",link:`${v}/non-orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:h,visitsSummary:p})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(D3,{title:"Orphan visits",link:`${v}/orphan-visits`,excludeBots:(x==null?void 0:x.excludeBots)??!1,loading:h,visitsSummary:g})}),m.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:m.jsx(fx,{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(fx,{title:"Tags",link:`${v}/manage-tags`,children:f?"Loading...":wn(o.tags.length)})})]}),m.jsxs(Hr,{className:"mb-3",children:[m.jsxs(Wc,{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(Ft,{className:"float-end",to:`${v}/create-short-url`,children:"Advanced options »"})]}),m.jsx(Vc,{children:m.jsx(t,{basicMode:!0})})]}),m.jsxs(Hr,{children:[m.jsxs(Wc,{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(Ft,{className:"float-end",to:`${v}/list-short-urls/1`,children:"See all »"})]}),m.jsx(Vc,{children:m.jsx(e,{shortUrlsList:n,className:"mb-0",onTagClick:b=>y(`${v}/list-short-urls/1?tags=${encodeURIComponent(b)}`)})})]})]})},()=>[li.visits,li.orphanVisits]);function $ue(e,t){e.serviceFactory("Overview",Fue,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const Bue=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}),Uue=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,basicMode:o=!1})=>{const a=gl("shortUrlCreation"),s=H.useMemo(()=>Bue(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})]})},zue="Left",Hue="Right",Vue="Up",Wue="Down",cc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},dx={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},L3="mousemove",R3="mouseup",Yue="touchend",que="touchmove",Gue="touchstart";function Kue(e,t,n,r){return e>t?n>0?Hue:zue:r>0?Wue:Vue}function j3(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 Zue(e,t){const n=f=>{const h="touches"in f;h&&f.touches.length>1||e((p,g)=>{g.trackMouse&&!h&&(document.addEventListener(L3,r),document.addEventListener(R3,a));const{clientX:v,clientY:y}=h?f.touches[0]:f,x=j3([v,y],g.rotationAngle);return g.onTouchStartOrOnMouseDown&&g.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),dx),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((h,p)=>{const g="touches"in f;if(g&&f.touches.length>1)return h;if(f.timeStamp-h.start>p.swipeDuration)return h.swiping?Object.assign(Object.assign({},h),{swiping:!1}):h;const{clientX:v,clientY:y}=g?f.touches[0]:f,[x,b]=j3([v,y],p.rotationAngle),w=x-h.xy[0],S=b-h.xy[1],C=Math.abs(w),T=Math.abs(S),P=(f.timeStamp||0)-h.start,R=Math.sqrt(C*C+T*T)/(P||1),j=[w/(P||1),S/(P||1)],z=Kue(C,T,w,S),N=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||cc.delta;if(C{e((h,p)=>{let g;if(h.swiping&&h.eventData){if(f.timeStamp-h.start{document.removeEventListener(L3,r),document.removeEventListener(R3,a)},a=f=>{o(),i(f)},s=(f,h)=>{let p=()=>{};if(f&&f.addEventListener){const g=Object.assign(Object.assign({},cc.touchEventOptions),h.touchEventOptions),v=[[Gue,n,g],[que,r,Object.assign(Object.assign({},g),h.preventScrollOnSwipe?{passive:!1}:{})],[Yue,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((h,p)=>{if(h.el===f)return h;const g={};return h.el&&h.el!==f&&h.cleanUpTouch&&(h.cleanUpTouch(),g.cleanUpTouch=void 0),p.trackTouch&&f&&(g.cleanUpTouch=s(f,p)),Object.assign(Object.assign(Object.assign({},h),{el:f}),g)})}};return t.trackMouse&&(c.onMouseDown=n),[c,s]}function Que(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 Xue(e){const{trackMouse:t}=e,n=H.useRef(Object.assign({},dx)),r=H.useRef(Object.assign({},cc)),i=H.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},cc),e);let o;for(o in cc)r.current[o]===void 0&&(r.current[o]=cc[o]);const[a,s]=H.useMemo(()=>Zue(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=Que(n.current,r.current,i.current,s),a}const Jue=2e3,efe=(e,t)=>(n=!1,r=Jue)=>{const[i,o]=H.useState(n),a=H.useRef(void 0);return[i,()=>{o(!n),a.current&&t(a.current),a.current=e(()=>o(n),r)}]},tfe=(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 Xue({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},nfe=(e,t)=>{const[n,r]=H.useState(t);return[n,o=>{const{location:a,history:s}=window,l=hl(a.search);l[e]=o,s.pushState(null,"",`${a.pathname}?${bh(l)}`),r(o)}]},rfe=(e,t)=>{const n=H.useRef(!0);H.useEffect(()=>{!n.current&&e(),n.current=!1},t)},vu=()=>{const e=ao();return()=>e(-1)},ife=e=>({shortUrlDetail:t,getShortUrlDetail:n,shortUrlEdition:r,editShortUrl:i})=>{const{search:o}=gn(),a=ul(),s=vu(),{loading:l,error:c,errorData:f,shortUrl:h}=t,{saving:p,saved:g,error:v,errorData:y}=r,{domain:x}=hl(o),b=gl("shortUrlCreation"),w=H.useMemo(()=>tse(h,b),[h,b]);return H.useEffect(()=>{a.shortCode&&n({shortCode:Rm(a.shortCode),domain:x})},[]),l?m.jsx(Po,{loading:!0}):c?m.jsx($r,{type:"error",children:m.jsx(Fo,{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(Hr,{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:uA})}),m.jsx("span",{className:"text-center",children:m.jsxs("small",{children:["Edit ",m.jsx(Li,{href:(h==null?void 0:h.shortUrl)??""})]})}),m.jsx("span",{})]})})}),m.jsx(e,{initialState:w,saving:p,mode:"edit",onSave:async S=>{h&&i({...h,data:S})}}),g&&v&&m.jsx($r,{type:"error",className:"mt-3",children:m.jsx(Fo,{errorData:y,fallbackMessage:"An error occurred while updating short URL :("})}),g&&!v&&m.jsx($r,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var jy={},ofe=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 h=N3[t.format]||N3.default;window.clipboardData.setData(h,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(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),r=lfe("message"in t?t.message:sfe),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var ufe=cfe;function hx(e){"@babel/helpers - typeof";return hx=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},hx(e)}Object.defineProperty(jy,"__esModule",{value:!0});jy.CopyToClipboard=void 0;var Zp=lI(H),ffe=lI(ufe),dfe=["text","onCopy","options","children"];function lI(e){return e&&e.__esModule?e:{default:e}}function A3(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 I3(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pfe(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 mfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F3(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 vv(e){return vv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},vv(e)}function NO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uI=function(e){vfe(n,e);var t=yfe(n);function n(){var r;mfe(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(H.useEffect(()=>{n()},[]),a)return m.jsxs($r,{type:"error",className:"mt-3",children:[r&&m.jsx(Ie,{icon:_1,className:"float-end pointer",onClick:n}),m.jsx(Fo,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=t.result;return m.jsxs($r,{type:"success",className:"mt-3",children:[r&&m.jsx(Ie,{icon:_1,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(fI,{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:sI})," Copy"]})}),m.jsx(gh,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},U_="delete",Ofe=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=H.useState("");H.useEffect(()=>i,[]);const{loading:c,error:f,deleted:h,errorData:p}=r,g=Mt(i,t),v=Ry(()=>o(e).then(t));return m.jsx(Yo,{isOpen:n,toggle:g,centered:!0,onClosed:()=>h&&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(so,{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:U_})," to confirm deletion."]}),m.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${U_}`,value:s,onChange:y=>l(y.target.value)}),f&&m.jsx($r,{type:Hae(p)?"warning":"error",small:!0,className:"mt-2",children:m.jsx(Fo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),m.jsxs(fl,{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!==U_||c,children:c?"Deleting...":"Delete"})]})]})})},dI=({amount:e=0,loading:t=!1,...n})=>m.jsxs(yt,{...n,outline:!0,color:"primary",disabled:t,children:[m.jsx(Ie,{icon:uG})," ",t?"Exporting...":m.jsxs(m.Fragment,{children:["Export (",wn(e),")"]})]}),Ny=()=>{const e=ao(),{search:t}=gn(),n=pl(),r=H.useMemo(Mt(()=>hl(t),({orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const h=o?$re(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...f,orderBy:h,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=H.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:h,...p}=a,g={...p,orderBy:s&&z4(s),tags:l.length>0?l.join(","):void 0,excludeBots:F_(c),excludeMaxVisitsReached:F_(f),excludePastValidUntil:F_(h)},v=bh(g),y=Yn(v)?"":`?${v}`;e(`${n}/list-short-urls/1${y}`)},[r,e,n]);return[r,i]},$3=20,Cfe=(e,{exportShortUrls:t})=>({amount:n=0})=>{const[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=Ny(),[c,,f,h]=mn(),p=H.useCallback(async()=>{const g=n/$3,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:$3});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}})),h()},[]);return m.jsx(dI,{loading:c,className:"btn-md-block",amount:n,onClick:p})};const hI=({text:e,onCopy:t})=>m.jsx(fI,{text:e,onCopy:t,children:m.jsx(Ie,{icon:sI,className:"ms-2 copy-to-clipboard-icon"})}),Efe=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=bh({...n,margin:t>0?t:void 0});return`${r}${Yn(i)?"":`?${i}`}`},Tfe=({errorCorrection:e,setErrorCorrection:t})=>m.jsxs(Go,{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"]})]}),Pfe=({format:e,setFormat:t})=>m.jsxs(Go,{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]=H.useState(300),[s,l]=H.useState(0),[c,f]=H.useState("png"),[h,p]=H.useState("L"),g=H.useMemo(()=>Efe(t,{size:o,format:c,margin:s,errorCorrection:h}),[t,o,c,s,h]),v=H.useMemo(()=>o+s,[o,s]),y=H.useMemo(()=>{if(!(v<500))return v<800?"lg":"xl"},[v]);return m.jsxs(Yo,{isOpen:i,toggle:r,centered:!0,size:y,children:[m.jsxs(qo,{toggle:r,children:["QR code for ",m.jsx(Li,{href:t,children:t})]}),m.jsxs(so,{children:[m.jsxs(dr,{children:[m.jsxs(Nr,{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(Nr,{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(Nr,{className:"d-grid col-md-6",children:m.jsx(Pfe,{format:c,setFormat:f})}),m.jsx(Nr,{className:"col-md-6",children:m.jsx(Tfe,{errorCorrection:h,setErrorCorrection:p})})]}),m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"mb-3",children:[m.jsx(Li,{href:g}),m.jsx(hI,{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:fA,className:"ms-1"})]})})]})]})]})},yv=({date:e,format:t=kO,relative:n=!1})=>{const r=MO(e)?e:$o(e);return m.jsx("time",{dateTime:`${Rle(r)}000`,children:n?`${Tle(Ga(),r)} ago`:eu(r,t)})},Mfe=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:tK,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&&oi(Pi(a),Ga())?{icon:dk,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be visited since ",m.jsx("b",{className:"indivisible",children:mv(Pi(a))}),"."]})}:o&&oi(Ga(),Pi(o))?{icon:dk,className:"text-warning",description:m.jsxs(m.Fragment,{children:["This short URL will start working on ",m.jsx("b",{className:"indivisible",children:mv(Pi(o))}),"."]})}:{icon:Pd,className:"text-primary",description:"This short URL can be visited normally."}},Dfe=({shortUrl:e})=>{const t=dl(),{icon:n,className:r,description:i}=Mfe(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(Pr,{target:t,placement:"bottom",children:i})]})},Lfe=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${nse(t)}/${r}${i}`},gx=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=pl();return!n||!e?m.jsx("span",{...i,children:r}):m.jsx(Ft,{to:Lfe(o,e,t),...i,children:r})};const pI=({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(gx,{shortUrl:t,suffix:"visits",asLink:r,children:m.jsx("strong",{className:Se("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:wn(e)})});if(!s)return l;const c=dl();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:bS})})]})]}),m.jsx(Pr,{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:mv(Pi(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:mv(Pi(a))}),"."]})]})})]})};const AO=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:a})=>m.jsxs("span",{className:Se("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:"×"})]}),Rfe=({tags:e,onTagClick:t,colorGenerator:n})=>Yn(e)?m.jsx("i",{className:"indivisible",children:m.jsx("small",{children:"No tags"})}):m.jsx(m.Fragment,{children:e.map(r=>m.jsx(AO,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const jfe=(e,t,n)=>({shortUrl:r,onTagClick:i})=>{var g,v,y,x;const[o,a]=n(),[s,l]=n(!1,500),c=H.useRef(!0),[{excludeBots:f}]=Ny(),h=gl("visits"),p=f??(h==null?void 0:h.excludeBots);return H.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(yv,{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(Li,{href:r.shortUrl})}),m.jsx(hI,{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(Li,{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(Li,{href:r.longUrl})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:m.jsx(Rfe,{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(pI,{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(Dfe,{shortUrl:r})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:m.jsx(e,{shortUrl:r})})]})},Nfe=(e,t)=>({shortUrl:n})=>{const[r,,i,o]=mn(),[a,,s,l]=mn();return m.jsxs(Ty,{minWidth:190,children:[m.jsxs(Ue,{tag:gx,shortUrl:n,suffix:"visits",asLink:!0,children:[m.jsx(Ie,{icon:_S,fixedWidth:!0})," Visit stats"]}),m.jsxs(Ue,{tag:gx,shortUrl:n,suffix:"edit",asLink:!0,children:[m.jsx(Ie,{icon:yS,fixedWidth:!0})," Edit short URL"]}),m.jsxs(Ue,{onClick:i,children:[m.jsx(Ie,{icon:JG,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:vS,fixedWidth:!0})," Delete short URL"]}),m.jsx(e,{shortUrl:n,isOpen:a,toggle:l})]})},mI="shlink/shortUrlCreation",B3={saving:!1,saved:!1,error:!1},Afe=e=>Tr(`${mI}/createShortUrl`,t=>e().createShortUrl(t)),Ife=e=>{const{reducer:t,actions:n}=ir({name:mI,initialState:B3,reducers:{resetCreateShortUrl:()=>B3},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:Ko(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},U3="shlink/shortUrlDetail",z3={loading:!1,error:!1},Ffe=e=>{const t=Tr(`${U3}/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=>Yf(c,r,i)))??await e().getShortUrl(r,i)}),{reducer:n}=ir({name:U3,initialState:z3,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:Ko(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...z3,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},gI="shlink/shortUrlEdition",$fe={saving:!1,saved:!1,error:!1},Bfe=e=>Tr(`${gI}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),Ufe=e=>ir({name:gI,initialState:$fe,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:Ko(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var zfe={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"]},Hfe={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 Vfe=({icon:e,className:t,...n})=>{const r=dl(),i=Se("icon-input-container__input",t);return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Yc,{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 Wfe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vx(e,t)}function vx(e,t){return vx=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},vx(e,t)}function Yfe(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 H3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qfe(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function Gfe(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&qfe(e,t,n))return!0;e=e.parentNode||e.host}return e}function Kfe(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var Zfe=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 Qfe(e){return e===void 0&&(e=0),function(){return++e}}var Xfe=Qfe(),yx,Qp={},z_={},Jfe=["touchstart","touchmove"],ede="ignore-react-onclickoutside";function V3(e,t){var n={},r=Jfe.indexOf(t)!==-1;return r&&yx&&(n.passive=!e.props.preventDefault),n}function Ay(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){Wfe(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 h=c.getInstance();if(typeof h.props.handleClickOutside=="function"){h.props.handleClickOutside(f);return}if(typeof h.handleClickOutside=="function"){h.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():au.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||z_[c._uid])){typeof yx>"u"&&(yx=Zfe()),z_[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),Qp[c._uid]=function(h){if(c.componentNode!==null&&(c.props.preventDefault&&h.preventDefault(),c.props.stopPropagation&&h.stopPropagation(),!(c.props.excludeScrollbar&&Kfe(h)))){var p=h.composed&&h.composedPath&&h.composedPath().shift()||h.target;Gfe(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(h)}},f.forEach(function(h){document.addEventListener(h,Qp[c._uid],V3(H3(c),h))})}},c.disableOnClickOutside=function(){delete z_[c._uid];var f=Qp[c._uid];if(f&&typeof document<"u"){var h=c.props.eventTypes;h.forEach||(h=[h]),h.forEach(function(p){return document.removeEventListener(p,f,V3(H3(c),p))}),delete Qp[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=Xfe(),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=Yfe(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,H.createElement(e,f)},a}(H.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:ede,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}function W3(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 Y3(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=_v(e);if(t){var i=_v(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 ee(o)}(this,n)}}function wx(e){return function(t){if(Array.isArray(t))return H_(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 H_(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 H_(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 H_(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 Fy(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return fr(e,c)})||o&&o.some(function(c){var f=c.start,h=c.end;return tu(e,{start:f,end:h})})||a&&!a.some(function(c){return fr(e,c)})||s&&!s.some(function(c){var f=c.start,h=c.end;return tu(e,{start:f,end:h})})||l&&!l(Ct(e))||!1}function $O(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 tu(e,{start:o,end:a})}):n&&n.some(function(i){return fr(e,i)})||!1}function _I(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 Fy(e,{minDate:D6(n),maxDate:M6(r)})||i&&i.some(function(s){return Oi(e,s)})||o&&!o.some(function(s){return Oi(e,s)})||a&&!a(Ct(e))||!1}function V_(e,t,n,r){var i=Je(e),o=Jn(e),a=Je(t),s=Jn(t),l=Je(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function rde(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 Fy(e,{minDate:n,maxDate:r})||i&&i.some(function(s){return bv(e,s)})||o&&!o.some(function(s){return bv(e,s)})||a&&!a(Ct(e))||!1}function W_(e,t,n){if(!lv(t)||!lv(n))return!1;var r=Je(t),i=Je(n);return r<=e&&i>=e}function bI(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 Fy(s,{minDate:L6(n),maxDate:yse(r)})||i&&i.some(function(l){return Oa(s,l)})||o&&!o.some(function(l){return Oa(s,l)})||a&&!a(Ct(s))||!1}function Y_(e,t,n,r){var i=Je(e),o=lc(e),a=Je(t),s=lc(t),l=Je(r);return i===a&&i===l?o<=n&&n<=s:i=n||li:void 0}function Fy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Vd(e,n)<0||r&&Vd(e,r)>0}function J3(e,t){return t.some(function(n){return Ar(n)===Ar(e)&&Ir(n)===Ir(e)})}function eD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&J3(e,n)||r&&!J3(e,r)||i&&!i(e)||!1}function tD(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=Ct(),a=qf(Gf(o,Ir(e)),Ar(e)),s=qf(Gf(o,Ir(n)),Ar(n)),l=qf(Gf(o,Ir(r)),Ar(r));try{i=!tu(a,{start:s,end:l})}catch{i=!1}return i}function nD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=nu(e,1);return n&&Wd(n,i)>0||r&&r.every(function(o){return Wd(o,i)>0})||!1}function rD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=hi(e,1);return n&&Wd(i,n)>0||r&&r.every(function(o){return Wd(i,o)>0})||!1}function iD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Yd(e,1);return n&&cv(n,i)>0||r&&r.every(function(o){return cv(o,i)>0})||!1}function oD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=Xc(e,1);return n&&cv(i,n)>0||r&&r.every(function(o){return cv(i,o)>0})||!1}function wI(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Vd(i,t)>=0});return u3(r)}return n?u3(n):t}function xI(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Vd(i,t)<=0});return c3(r)}return n?c3(n):t}function aD(){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]:Kf,n=Math.ceil(Je(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function ode(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 ade=Ay(function(e){jn(n,Y.Component);var t=Nn(n);function n(r){var i;Ln(this,n),K(ee(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(ee(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,h=i.props.maxDate?Je(i.props.maxDate):null;return h&&i.state.yearsList.find(function(p){return p===h})||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}),K(ee(i),"onChange",function(l){i.props.onChange(l)}),K(ee(i),"handleClickOutside",function(){i.props.onCancel()}),K(ee(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),K(ee(i),"incrementYears",function(){return i.shiftYears(1)}),K(ee(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,a=r.scrollableYearDropdown,s=o||(a?10:5);return i.state={yearsList:ode(i.props.year,s,i.props.minDate,i.props.maxDate)},i.dropdownRef=H.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=Se({"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}()),sde=function(e){jn(n,Y.Component);var t=Nn(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})}),K(ee(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(v3(r.props.day),r.props.day):v3(r.props.day)}),K(ee(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}(),pde=function(e){jn(n,Y.Component);var t=Nn(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(h);if(p||g){if(!r.props.peekNextMonth)break;f=!0}}return s}),K(ee(r),"onMonthClick",function(s,l){r.handleDayClick(Ia(ur(r.props.day,l)),s)}),K(ee(r),"onMonthMouseEnter",function(s){r.handleDayMouseEnter(Ia(ur(r.props.day,s)))}),K(ee(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())}),K(ee(r),"onMonthKeyDown",function(s,l){var c=r.props,f=c.selected,h=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=lD(v,g),w=q_[b].verticalNavigationOffset,S=q_[b].grid;switch(x){case"Enter":r.onMonthClick(s,l),y(f);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,hi(h,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,nu(h,1));break;case"ArrowUp":r.handleMonthNavigation(S[0].includes(l)?l+12-w:l-w,nu(h,w));break;case"ArrowDown":r.handleMonthNavigation(S[S.length-1].includes(l)?l-12+w:l+w,hi(h,w))}}}),K(ee(r),"onQuarterClick",function(s,l){r.handleDayClick(Q3(Fl(r.props.day,l)),s)}),K(ee(r),"onQuarterMouseEnter",function(s){r.handleDayMouseEnter(Q3(Fl(r.props.day,s)))}),K(ee(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())}),K(ee(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,P6(r.props.preSelection,1));break;case"ArrowLeft":r.handleQuarterNavigation(l===1?4:l-1,Zce(r.props.preSelection,1))}}),K(ee(r),"getMonthClassNames",function(s){var l=r.props,c=l.day,f=l.startDate,h=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(ur(c,s)):void 0,C=ur(c,s);return Se("react-datepicker__month-text","react-datepicker__month-".concat(s),S,{"react-datepicker__month-text--disabled":(g||v||b||w)&&_I(C,r.props),"react-datepicker__month-text--selected":r.isSelectedMonth(c,s,p),"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&Jn(y)===s,"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(s),"react-datepicker__month-text--in-range":V_(f,h,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)})}),K(ee(r),"getTabIndex",function(s){var l=Jn(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),K(ee(r),"getQuarterTabIndex",function(s){var l=lc(r.props.preSelection);return r.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),K(ee(r),"getAriaLabel",function(s){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,h=l.disabledDayAriaLabelPrefix,p=h===void 0?"Not available":h,g=l.day,v=ur(g,s),y=r.isDisabled(v)||r.isExcluded(v)?p:f;return"".concat(y," ").concat(ln(v,"MMMM yyyy"))}),K(ee(r),"getQuarterClassNames",function(s){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,g=l.minDate,v=l.maxDate,y=l.preSelection;return Se("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter-text--disabled":(g||v)&&rde(Fl(c,s),r.props),"react-datepicker__quarter-text--selected":r.isSelectedQuarter(c,s,p),"react-datepicker__quarter-text--keyboard-selected":lc(y)===s,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(s),"react-datepicker__quarter-text--in-range":Y_(f,h,s,c),"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(s),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(s)})}),K(ee(r),"getMonthContent",function(s){var l=r.props,c=l.showFullMonthYearPicker,f=l.renderMonthContent,h=l.locale,p=yI(s,h),g=FO(s,h);return f?f(s,p,g):c?g:p}),K(ee(r),"getQuarterContent",function(s){var l=r.props,c=l.renderQuarterContent,f=function(h,p){return ln(Fl(Ct(),h),"QQQ",p)}(s,l.locale);return c?c(s,f):f}),K(ee(r),"renderMonths",function(){var s=r.props,l=s.showTwoColumnMonthYearPicker,c=s.showFourColumnMonthYearPicker,f=s.day,h=s.selected;return q_[lD(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,h)},r.getMonthContent(v))}))})}),K(ee(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,h){return Y.createElement("div",{key:h,ref:r.QUARTER_REFS[h],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))}))}),K(ee(r),"getClassNames",function(){var s=r.props,l=s.selectingDate,c=s.selectsStart,f=s.selectsEnd,h=s.showMonthYearPicker,p=s.showQuarterYearPicker;return Se("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":h},{"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}(),EI=function(e){jn(n,Y.Component);var t=Nn(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()}),K(ee(i),"getDateInView",function(){var o=i.props,a=o.preSelection,s=o.selected,l=o.openToDate,c=wI(i.props),f=xI(i.props),h=Ct(),p=l||s||a;return p||(c&&oi(h,c)?c:f&&qa(h,f)?f:h)}),K(ee(i),"increaseMonth",function(){i.setState(function(o){var a=o.date;return{date:hi(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),K(ee(i),"decreaseMonth",function(){i.setState(function(o){var a=o.date;return{date:nu(a,1)}},function(){return i.handleMonthChange(i.state.date)})}),K(ee(i),"handleDayClick",function(o,a,s){i.props.onSelect(o,a,s),i.props.setPreSelection&&i.props.setPreSelection(o)}),K(ee(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),K(ee(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),K(ee(i),"handleYearMouseEnter",function(o,a){i.setState({selectingDate:wo(Ct(),a)}),i.props.onYearMouseEnter&&i.props.onYearMouseEnter(o,a)}),K(ee(i),"handleYearMouseLeave",function(o,a){i.props.onYearMouseLeave&&i.props.onYearMouseLeave(o,a)}),K(ee(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)}),K(ee(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)}),K(ee(i),"handleCustomMonthChange",function(o){i.props.onMonthChange&&(i.props.onMonthChange(o),i.setState({isRenderAriaLiveMessage:!0}))}),K(ee(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),K(ee(i),"changeYear",function(o){i.setState(function(a){var s=a.date;return{date:wo(s,o)}},function(){return i.handleYearChange(i.state.date)})}),K(ee(i),"changeMonth",function(o){i.setState(function(a){var s=a.date;return{date:ur(s,o)}},function(){return i.handleMonthChange(i.state.date)})}),K(ee(i),"changeMonthYear",function(o){i.setState(function(a){var s=a.date;return{date:wo(ur(s,Jn(o)),Je(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),K(ee(i),"header",function(){var o=IO(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=ml(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:Se("react-datepicker__day-name",f)},c)}))}),K(ee(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)}),K(ee(i),"decreaseYear",function(){i.setState(function(o){var a=o.date;return{date:Yd(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),K(ee(i),"clearSelectingDate",function(){i.setState({selectingDate:null})}),K(ee(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=iD(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,T=C===void 0?Kf:C,P=uc(yf(Yd(b,T)),T).endPeriod,R=S&&Je(S);return R&&R>P||!1}(i.state.date,i.props);break;default:o=nD(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,h=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 h=="string"?h:"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))}}}),K(ee(i),"increaseYear",function(){i.setState(function(o){var a=o.date;return{date:Xc(a,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),K(ee(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=oD(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,T=C===void 0?Kf:C,P=uc(Xc(b,T),T).startPeriod,R=S&&Je(S);return R&&R0&&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))}),K(ee(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return Y.createElement(sde,{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})}),K(ee(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return Y.createElement(cde,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:Jn(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),K(ee(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})}),K(ee(i),"handleTodayButtonClick",function(o){i.props.onSelect(X3(),o),i.props.setPreSelection&&i.props.setPreSelection(X3())}),K(ee(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)}),K(ee(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)))}),K(ee(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=nD(i.state.date,i.props),c=rD(i.state.date,i.props),f=iD(i.state.date,i.props),h=oD(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(Y3(Y3({},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:h})),p&&Y.createElement("div",{className:"react-datepicker__day-names"},i.header(a)))}),K(ee(i),"renderYearHeader",function(){var o=i.state.date,a=i.props,s=a.showYearPicker,l=uc(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))}),K(ee(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)}}),K(ee(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],a=i.props.showPreviousMonths?i.props.monthsShown-1:0,s=nu(i.state.date,a),l=0;l0;o.push(Y.createElement("div",{key:h,ref:function(v){i.monthContainer=v},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),Y.createElement(gde,{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}}),K(ee(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?Y.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),Y.createElement(vde,qd({onDayClick:i.handleDayClick,selectingDate:i.state.selectingDate,clearSelectingDate:i.clearSelectingDate,date:i.state.date},i.props,{onYearMouseEnter:i.handleYearMouseEnter,onYearMouseLeave:i.handleYearMouseLeave}))):void 0}),K(ee(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return Y.createElement(EI,{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})}),K(ee(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),a=ua(o)&&i.props.selected?"".concat(sD(o.getHours()),":").concat(sD(o.getMinutes())):"";if(i.props.showTimeInput)return Y.createElement(yde,{date:o,timeString:a,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),K(ee(i),"renderAriaLiveRegion",function(){var o,a=uc(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(FO(Jn(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)}),K(ee(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||fr(this.props.preSelection,r.preSelection)&&this.props.monthSelectedIn===r.monthSelectedIn)this.props.openToDate&&!fr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate});else{var o=!Oi(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:Se("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:Kf}}}]),n}(),TI=function(e){jn(n,Y.Component);var t=Nn(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 $s.createPortal(this.props.children,this.el)}}]),n}(),xde=function(e){return!e.disabled&&e.tabIndex!==-1},PI=function(e){jn(n,Y.Component);var t=Nn(n);function n(r){var i;return Ln(this,n),K(ee(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(xde)}),K(ee(i),"handleFocusStart",function(){var o=i.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),K(ee(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}(),Sde=function(e){jn(n,Y.Component);var t=Nn(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,h=i.popperProps,p=i.targetComponent,g=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!s){var b=Se("react-datepicker-popper",o);r=Y.createElement(WS,qd({modifiers:c,placement:f},h),function(S){var C=S.ref,T=S.style,P=S.placement,R=S.arrowProps;return Y.createElement(PI,{enableTabLoop:g},Y.createElement("div",{ref:C,style:T,className:b,"data-placement":P,onKeyDown:v},Y.cloneElement(l,{arrowProps:R})))})}this.props.popperContainer&&(r=Y.createElement(this.props.popperContainer,{},r)),y&&!s&&(r=Y.createElement(TI,{portalId:y,portalHost:x},r));var w=Se("react-datepicker-wrapper",a);return Y.createElement(q1,{className:"react-datepicker-manager"},Y.createElement(v4,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}(),cD="react-datepicker-ignore-onclickoutside",Ode=Ay(wde),G_="Date input not valid.",Cde=function(e){jn(n,Y.Component);var t=Nn(n);function n(r){var i;return Ln(this,n),K(ee(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:Ct()}),K(ee(i),"calcInitialState",function(){var o,a=i.getPreSelection(),s=wI(i.props),l=xI(i.props),c=s&&oi(a,Br(s))?s:l&&qa(a,nl(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:aD(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1}}),K(ee(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),K(ee(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),K(ee(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),K(ee(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:K_},function(){o||i.setState(function(s){return{focused:!!a&&s.focused}},function(){!a&&i.setBlur(),i.setState({inputValue:null})})})}),K(ee(i),"inputOk",function(){return bO(i.state.preSelection)}),K(ee(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),K(ee(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),K(ee(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),K(ee(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),K(ee(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),K(ee(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),K(ee(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),K(ee(i),"handleChange",function(){for(var o=arguments.length,a=new Array(o),s=0;s0&&(v=N_(c,f.slice(0,c.length),new Date)),ua(v)||(v=new Date(c))),ua(v)&&x?v:null));i.props.showTimeSelectOnly&&i.props.selected&&!fr(b,i.props.selected)&&(b=Gce(i.props.selected,b==null?{hours:Ar(i.props.selected),minutes:Ir(i.props.selected),seconds:j_(i.props.selected)}:{hours:Ar(b),minutes:Ir(b),seconds:j_(b)})),!b&&l.target.value||i.setSelected(b,l,!0)}}),K(ee(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||oi(o,c)||i.setOpen(!1)}}),K(ee(i),"setSelected",function(o,a,s,l){var c=o;if(i.props.showYearPicker){if(c!==null&&bI(Je(c),i.props))return}else if(i.props.showMonthYearPicker){if(c!==null&&_I(c,i.props))return}else if(c!==null&&Iy(c,i.props))return;var f=i.props,h=f.onChange,p=f.selectsRange,g=f.startDate,v=f.endDate;if(!Ca(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=Z3(c,{hour:Ar(i.props.selected),minute:Ir(i.props.selected),second:j_(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?h([c,null],a):y&&(oi(c,g)?h([c,null],a):h([g,c],a)),x&&h([c,null],a)}else h(c,a);s||(i.props.onSelect(c,a),i.setState({inputValue:null}))}),K(ee(i),"setPreSelection",function(o){var a=i.props.minDate!==void 0,s=i.props.maxDate!==void 0,l=!0;if(o){var c=Br(o);if(a&&s)l=Am(o,i.props.minDate,i.props.maxDate);else if(a){var f=Br(i.props.minDate);l=qa(o,f)||Ca(c,f)}else if(s){var h=nl(i.props.maxDate);l=oi(o,h)||Ca(c,h)}}l&&i.setState({preSelection:o})}),K(ee(i),"handleTimeChange",function(o){var a=Z3(i.props.selected?i.props.selected:i.getPreSelection(),{hour:Ar(o),minute:Ir(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})}),K(ee(i),"onInputClick",function(){i.props.disabled||i.props.readOnly||i.setOpen(!0),i.props.onInputClick()}),K(ee(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=Ct(i.state.preSelection);a==="Enter"?(o.preventDefault(),i.inputOk()&&i.state.lastPreSelectChange===K_?(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:G_})}}else a!=="ArrowDown"&&a!=="ArrowUp"&&a!=="Enter"||i.onInputClick()}),K(ee(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})})}))}),K(ee(i),"onDayKeyDown",function(o){i.props.onKeyDown(o);var a=o.key,s=Ct(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:G_});else if(!i.props.disabledKeyboardNavigation){var l;switch(a){case"ArrowLeft":l=PO(s,1);break;case"ArrowRight":l=ml(s,1);break;case"ArrowUp":l=Qce(s,1);break;case"ArrowDown":l=yO(s,1);break;case"PageUp":l=nu(s,1);break;case"PageDown":l=hi(s,1);break;case"Home":l=Yd(s,1);break;case"End":l=Xc(s,1)}if(!l)return void(i.props.onInputError&&i.props.onInputError({code:1,msg:G_}));if(o.preventDefault(),i.setState({lastPreSelectChange:K_}),i.props.adjustDateOnChange&&i.setSelected(l),i.setPreSelection(l),i.props.inline){var c=Jn(s),f=Jn(l),h=Je(s),p=Je(l);c!==f||h!==p?i.setState({shouldFocusDayInline:!0}):i.setState({shouldFocusDayInline:!1})}}}),K(ee(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})})}))}),K(ee(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})}),K(ee(i),"clear",function(){i.onClearClick()}),K(ee(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)}),K(ee(i),"renderCalendar",function(){return i.props.inline||i.isCalendarOpen()?Y.createElement(Ode,{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:cD,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}),K(ee(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(zi(i.props.startDate,{dateFormat:c,locale:l}),". ").concat(i.props.endDate?"End date: "+zi(i.props.endDate,{dateFormat:c,locale:l}):""):i.props.showTimeSelectOnly?"Selected time: ".concat(zi(i.props.selected,{dateFormat:s,locale:l})):i.props.showYearPicker?"Selected year: ".concat(zi(i.props.selected,{dateFormat:"yyyy",locale:l})):i.props.showMonthYearPicker?"Selected month: ".concat(zi(i.props.selected,{dateFormat:"MMMM yyyy",locale:l})):i.props.showQuarterYearPicker?"Selected quarter: ".concat(zi(i.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):"Selected date: ".concat(zi(i.props.selected,{dateFormat:c,locale:l})),Y.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)}),K(ee(i),"renderDateInput",function(){var o,a=Se(i.props.className,K({},cD,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,h,p){if(!f)return"";var g=zi(f,p),v=h?zi(h,p):"";return"".concat(g," - ").concat(v)}(i.props.startDate,i.props.endDate,i.props):zi(i.props.selected,i.props);return Y.cloneElement(s,(K(o={},l,function(f){i.input=f}),K(o,"value",c),K(o,"onBlur",i.handleBlur),K(o,"onChange",i.handleChange),K(o,"onClick",i.onInputClick),K(o,"onFocus",i.handleFocus),K(o,"onKeyDown",i.onInputKeyDown),K(o,"id",i.props.id),K(o,"name",i.props.name),K(o,"form",i.props.form),K(o,"autoFocus",i.props.autoFocus),K(o,"placeholder",i.props.placeholderText),K(o,"disabled",i.props.disabled),K(o,"autoComplete",i.props.autoComplete),K(o,"className",Se(s.props.className,a)),K(o,"title",i.props.title),K(o,"readOnly",i.props.readOnly),K(o,"required",i.props.required),K(o,"tabIndex",i.props.tabIndex),K(o,"aria-describedby",i.props.ariaDescribedBy),K(o,"aria-invalid",i.props.ariaInvalid),K(o,"aria-labelledby",i.props.ariaLabelledBy),K(o,"aria-required",i.props.ariaRequired),o))}),K(ee(i),"renderClearButton",function(){var o=i.props,a=o.isClearable,s=o.selected,l=o.startDate,c=o.endDate,f=o.clearButtonTitle,h=o.clearButtonClassName,p=h===void 0?"":h,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?Jn(o)!==Jn(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:aD(this.props.highlightDates)}),i.focused||Ca(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(PI,{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(TI,{portalId:this.props.portalId,portalHost:this.props.portalHost},i)),Y.createElement("div",null,this.renderInputContainer(),i)}return Y.createElement(Sde,{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:Kf,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0}}}]),n}(),Ede="input",K_="navigate";const xx=e=>{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||Ho(r),a=H.useRef();return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Cde,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??Y6,className:Se("icon-input-container__input form-control",t),ref:a}),o&&m.jsx(Ie,{icon:Rue,className:"icon-input-container__icon",onClick:()=>{var s;return(s=a.current)==null?void 0:s.input.focus()}})]})},Tde=e=>m.jsx(xx,{...e,dateFormat:kO,showTimeSelect:!0,timeIntervals:10}),Z_=({children:e,infoTooltip:t,checked:n,onChange:r})=>m.jsxs("p",{children:[m.jsx($4,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&m.jsx(Nm,{placement:"right",children:t})]});const Pde=({isOpen:e,toggle:t})=>m.jsxs(Yo,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[m.jsx(qo,{toggle:t,children:"Info"}),m.jsxs(so,{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:bS,style:{cursor:"pointer"},onClick:t})}),m.jsx(Pde,{isOpen:e,toggle:t})]})};const Mde=Mt(nG,Yq(/ /g,"-")),Q_=e=>typeof e=="string"?$o(e):e,Dde=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,Lde=(e,t)=>function({mode:r,saving:i,onSave:o,initialState:a}){const[s,l]=H.useState(a),c=()=>l(a),f=wh("deviceLongUrls"),h=r==="edit",p=Dde(s),g=r==="create-basic",v=T=>l({...s,tags:T.map(Mde)}),y=(T,P)=>Zi(T)?T:Zi(P)?null:void 0,x=Ry(async()=>o({...s,validSince:Ka(s.validSince)??null,validUntil:Ka(s.validUntil)??null,maxVisits:Zi(s.maxVisits)?Number(s.maxVisits):null}).then(()=>!h&&c()).catch(()=>{}));H.useEffect(()=>{l(a)},[a]);const b=(T,P,R="text",j={},z={})=>m.jsx(Nr,{...z,children:m.jsx(Yc,{id:T,type:R,placeholder:P,value:s[T]??"",onChange:j.onChange??(N=>l({...s,[T]:N.target.value})),...j})}),w=(T,P,R)=>{var j;return m.jsx(Vfe,{icon:R,id:T,type:"url",placeholder:P,value:((j=s.deviceLongUrls)==null?void 0:j[T])??"",onChange:z=>{var N;return l({...s,deviceLongUrls:{...s.deviceLongUrls??{},[T]:y(z.target.value,(N=a.deviceLongUrls)==null?void 0:N[T])}})}})},S=(T,P,R={})=>m.jsx(Tde,{selected:s[T]?Q_(s[T]):null,placeholderText:P,isClearable:!0,onChange:j=>l({...s,[T]:j}),...R}),C=m.jsxs(m.Fragment,{children:[m.jsx(Nr,{children:m.jsx(Yc,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:s.longUrl,onChange:T=>l({...s,longUrl:T.target.value})})}),m.jsxs(dr,{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(dr,{children:[m.jsx("div",{className:Se("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(Nr,{children:w("android","Android-specific redirection",Hfe)}),m.jsx(Nr,{children:w("ios","iOS-specific redirection",zfe)}),w("desktop","Desktop-specific redirection",nK)]})})]}),m.jsxs(dr,{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:T})=>l({...s,title:y(T.value,a.title)})}),!h&&p&&m.jsxs(m.Fragment,{children:[m.jsxs(dr,{children:[m.jsx("div",{className:"col-lg-6",children:b("customSlug","Custom slug","text",{disabled:Zi(s.shortCodeLength)})}),m.jsx("div",{className:"col-lg-6",children:b("shortCodeLength","Short code length","number",{min:4,disabled:Zi(s.customSlug)})})]}),m.jsx(t,{value:s.domain,onChange:T=>l({...s,domain:T})})]})]})}),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?Q_(s.validUntil):void 0})}),S("validUntil","Enabled until...",{minDate:s.validSince?Q_(s.validSince):void 0})]})})]}),m.jsxs(dr,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(hn,{title:"Extra checks",children:[m.jsx(Z_,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:s.validateUrl,onChange:T=>l({...s,validateUrl:T}),children:"Validate URL"}),!h&&p&&m.jsxs("p",{children:[m.jsx($4,{inline:!0,className:"me-2",checked:s.findIfExists,onChange:T=>l({...s,findIfExists:T}),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(Z_,{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:T=>l({...s,crawlable:T}),children:"Make it crawlable"}),m.jsx(Z_,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:s.forwardQuery,onChange:T=>l({...s,forwardQuery:T}),children:"Forward query params on redirect"})]})})]})]}),m.jsx("div",{className:"text-center",children:m.jsx(yt,{outline:!0,color:"primary",disabled:i||Yn(s.longUrl),className:"btn-xs-block",children:i?"Saving...":"Save"})})]})},Rde=({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}),Xce.map(r=>m.jsx(Ue,{active:e===r,onClick:()=>n(r),children:Q6(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(xx,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),m.jsx("div",{className:"col-md-6",children:m.jsx(xx,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&nl(o))})})]}),kI=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=gv(t),[a,s]=H.useState(o?t:void 0),[l,c]=H.useState(o?void 0:t),f=p=>{s(K6(p)?Sh:void 0),c(p),e(p)},h=p=>{s(p),c(void 0),e(X6(p))};return i&&rfe(()=>{const p=gv(t);p&&h(t),t&&!p&&f(t)},[t]),m.jsxs(Go,{disabled:r,text:Q6(a??l)??n,children:[m.jsx(Rde,{allText:n,active:a,onChange:h}),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})})})]})},Nde={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},Ade=({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(Go,{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:!Zi(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:m.jsx("i",{children:"Clear filters"})})]})};const Ide=(e,t)=>({className:n,shortUrlsAmount:r,order:i,handleOrderBy:o})=>{const[a,s]=Ny(),{search:l,tags:c,startDate:f,endDate:h,excludeBots:p,excludeMaxVisitsReached:g,excludePastValidUntil:v,tagsMode:y="any"}=a,x=wh("filterDisabledUrls"),b=gl("visits"),w=Mt(({startDate:P,endDate:R})=>({startDate:Ka(P)??void 0,endDate:Ka(R)??void 0}),s),S=Mt(P=>Yn(P)?void 0:P,P=>s({search:P})),C=P=>s({tags:P}),T=Mt(()=>y==="any"?"all":"any",P=>s({tagsMode:P}));return m.jsxs("div",{className:Se("short-urls-filtering-bar-container",n),children:[m.jsx(yh,{initialValue:l,onChange:S}),m.jsxs(Cy,{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:T,id:"tagsModeBtn","aria-label":"Change tags mode",children:m.jsx(Ie,{className:"short-urls-filtering-bar__tags-icon",icon:y==="all"?cA:MG})}),m.jsx(Pr,{target:"tagsModeBtn",placement:"left",children:y==="all"?"With all the tags.":"With any of the tags."})]})]}),m.jsxs(dr,{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(kI,{defaultText:"All short URLs",initialDateRange:Z6(f,h),onDatesChange:w})}),m.jsx(Ade,{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(_h,{prefixed:!1,items:Nde,order:i,onChange:o})})]})]})};function Zf({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:m.jsx(Ie,{icon:e.dir==="ASC"?SG:jG,className:n})}const Bl=2,Sx="...",MI=(e,t)=>{const n=gS(VN(Bl,e-Bl),nA(t-1,e+Bl)+1);return e-Bl>Bl&&n.unshift(Sx),e+Ble===Sx,DI=e=>Gd(e)?e:wn(e),LI=(e,t)=>Gd(e)?`${e}_${t}`:`${e}`,Fde=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=pl(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return m.jsx("div",{className:"pb-3"});const a=()=>MI(n,r).map((s,l)=>m.jsx(Us,{disabled:Gd(s),active:n===s,children:m.jsx(zs,{tag:Ft,to:o(s),children:DI(s)})},LI(s,l)));return m.jsxs(XS,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[m.jsx(Us,{disabled:n===1,children:m.jsx(zs,{previous:!0,tag:Ft,to:o(n-1)})}),a(),m.jsx(Us,{disabled:n>=r,children:m.jsx(zs,{next:!0,tag:Ft,to:o(n+1)})})]})},$de={field:"dateCreated",dir:"DESC"},Bde=(e,t)=>is(({listShortUrls:n,shortUrlsList:r})=>{var W,ne,q;const{page:i}=ul(),o=gn(),[a,s]=Ny(),l=jO(),{tags:c,search:f,startDate:h,endDate:p,orderBy:g,tagsMode:v,excludeBots:y,excludePastValidUntil:x,excludeMaxVisitsReached:b}=a,[w,S]=H.useState(g??((W=l.shortUrlsList)==null?void 0:W.defaultOrdering)??$de),{pagination:C}=(r==null?void 0:r.shortUrls)??{},T=y??((ne=l.visits)==null?void 0:ne.excludeBots),P=wh("excludeBotsOnShortUrls"),R=(J,oe)=>{s({orderBy:{field:J,dir:oe}}),S({field:J,dir:oe})},j=J=>()=>R(J,Py(J,w.field,w.dir)),z=J=>m.jsx(Zf,{currentOrder:w,field:J}),N=Mt(J=>[...new Set([...c,J])],J=>s({tags:J})),V=({field:J,dir:oe})=>P&&T&&J==="visits"?{field:"nonBotVisits",dir:oe}:{field:J,dir:oe};return H.useEffect(()=>{n({page:i,searchTerm:f,tags:c,startDate:h,endDate:p,orderBy:V(w),tagsMode:v,excludePastValidUntil:x,excludeMaxVisitsReached:b})},[i,f,c,h,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:R,className:"mb-3"}),m.jsxs(Hr,{body:!0,className:"pb-0",children:[m.jsx(e,{shortUrlsList:r,orderByColumn:j,renderOrderIcon:z,onTagClick:N}),m.jsx(Fde,{paginator:C,currentQueryString:o.search})]})]})},()=>[li.visits]);const Ude=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,className:o})=>{const{error:a,loading:s,shortUrls:l}=r,c=Se({"short-urls-table__header-cell--with-action":!!t}),f=Se("short-urls-table__header-cell",c),h=Se("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&&Yn(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:h,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()})]})},zde=(e,t)=>{e.serviceFactory("ShortUrlsList",Bde,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",Ude,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",jfe,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.serviceFactory("ShortUrlsRowMenu",Nfe,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Sfe,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",Lde,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",Uue,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",ife,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>Ofe),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",kfe,"ImageDownloader"),e.serviceFactory("ShortUrlsFilteringBar",Ide,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",Cfe,"apiClientFactory","ReportExporter"),e.serviceFactory("shortUrlsListReducerCreator",Eue,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",ct("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",Ife,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",ct("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",Ufe,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",ct("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Sue,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",ct("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",Ffe,"apiClientFactory"),e.serviceFactory("shortUrlDetailReducer",ct("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Cue,"apiClientFactory"),e.serviceFactory("createShortUrl",Afe,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",ct("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",xue,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",ct("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>nI),e.serviceFactory("getShortUrlDetail",ct("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",Bfe,"apiClientFactory")},Hde=({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(Yo,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[m.jsx(qo,{toggle:t,className:"text-danger",children:"Delete tag"}),m.jsxs(so,{children:["Are you sure you want to delete tag ",m.jsx("b",{children:e}),"?",s&&m.jsx($r,{type:"error",small:!0,className:"mt-2",children:m.jsx(Fo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),m.jsxs(fl,{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 $y(){return($y=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function Ox(e){var t=H.useRef(e),n=H.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Kd=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(uD(i.current,x,s.current)):y(!1)},v=function(){return y(!1)};function y(x){var b=l.current,w=Cx(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&&(fD(b),!function(C,T){return T&&!Qf(C)}(b,l.current)&&w)){if(Qf(b)){l.current=!0;var S=b.changedTouches||[];S.length&&(s.current=S[0].identifier)}w.focus(),o(uD(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],h=c[1],p=c[2];return H.useEffect(function(){return p},[p]),Y.createElement("div",$y({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),BO=function(e){return e.filter(Boolean).join(" ")},NI=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=BO(["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}}))},Hn=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Vde=function(e){return Kde(Ex(e))},Ex=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?Hn(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?Hn(parseInt(e.substring(6,8),16)/255,2):1}},Wde=function(e){return Gde(qde(e))},Yde=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Hn(e.h),s:Hn(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Hn(i/2),a:Hn(r,2)}},Tx=function(e){var t=Yde(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},qde=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:Hn(255*[r,s,a,a,l,r][c]),g:Hn(255*[l,r,r,s,a,a][c]),b:Hn(255*[a,a,l,r,r,s][c]),a:Hn(i,2)}},Jp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Gde=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?Jp(Hn(255*i)):"";return"#"+Jp(t)+Jp(n)+Jp(r)+o},Kde=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:Hn(60*(s<0?s+6:s)),s:Hn(o?a/o*100:0),v:Hn(o/255*100),a:i}},Zde=Y.memo(function(e){var t=e.hue,n=e.onChange,r=BO(["react-colorful__hue",e.className]);return Y.createElement("div",{className:r},Y.createElement(jI,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Kd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Hn(t),"aria-valuemax":"360","aria-valuemin":"0"},Y.createElement(NI,{className:"react-colorful__hue-pointer",left:t/360,color:Tx({h:t,s:100,v:100,a:1})})))}),Qde=Y.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:Tx({h:t.h,s:100,v:100,a:1})};return Y.createElement("div",{className:"react-colorful__saturation",style:r},Y.createElement(jI,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Kd(t.s+100*i.left,0,100),v:Kd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Hn(t.s)+"%, Brightness "+Hn(t.v)+"%"},Y.createElement(NI,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Tx(t)})))}),AI=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Xde=function(e,t){return e.toLowerCase()===t.toLowerCase()||AI(Ex(e),Ex(t))};function Jde(e,t,n){var r=Ox(n),i=H.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=H.useRef({color:t,hsva:o});H.useEffect(function(){if(!e.equal(t,s.current.color)){var c=e.toHsva(t);s.current={hsva:c,color:t},a(c)}},[t,e]),H.useEffect(function(){var c;AI(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=H.useCallback(function(c){a(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var ehe=typeof window<"u"?H.useLayoutEffect:H.useEffect,the=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},dD=new Map,nhe=function(e){ehe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!dD.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}`,dD.set(t,n);var r=the();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},rhe=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=RI(e,["className","colorModel","color","onChange"]),s=H.useRef(null);nhe(s);var l=Jde(n,i,o),c=l[0],f=l[1],h=BO(["react-colorful",t]);return Y.createElement("div",$y({},a,{ref:s,className:h}),Y.createElement(Qde,{hsva:c,onChange:f}),Y.createElement(Zde,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},ihe={defaultColor:"000",toHsva:Vde,fromHsva:function(e){return Wde({h:e.h,s:e.s,v:e.v,a:1})},equal:Xde},ohe=function(e){return Y.createElement(rhe,$y({},e,{colorModel:ihe}))};const ahe=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:a})=>{const[s,l]=H.useState(t),[c,f]=H.useState(e(t)),[h,p,,g]=mn(),{editing:v,error:y,edited:x,errorData:b}=a,w=Ry(async()=>{await n({oldName:t,newName:s,color:c}),r()}),S=Mt(g,()=>x&&i({oldName:t,newName:s,color:c}));return m.jsx(Yo,{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(so,{children:[m.jsxs(Cy,{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:OG,className:"edit-tag-modal__color-icon"})}),m.jsx(QS,{isOpen:h,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:m.jsx(ohe,{color:c,onChange:f})}),m.jsx(Yc,{value:s,placeholder:"Tag",required:!0,onChange:({target:C})=>l(C.value)})]}),y&&m.jsx($r,{type:"error",small:!0,className:"mt-2",children:m.jsx(Fo,{errorData:b,fallbackMessage:"Something went wrong while editing the tag :("})})]}),m.jsxs(fl,{children:[m.jsx(yt,{type:"button",color:"link",onClick:r,children:"Cancel"}),m.jsx(yt,{color:"primary",disabled:v,children:v?"Saving...":"Save"})]})]})})};function she(e){return Y.createElement("button",{type:"button",className:e.classNames.selectedTag,title:e.removeButtonText,onClick:e.onDelete},Y.createElement("span",{className:e.classNames.selectedTagName},e.tag.name))}const lhe={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},che=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"];class uhe extends Y.Component{constructor(t){super(t),this.state={inputWidth:null},this.input=Y.createRef(),this.sizer=Y.createRef()}componentDidMount(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth())}componentDidUpdate({query:t,placeholderText:n}){(t!==this.props.query||n!==this.props.placeholderText)&&this.updateInputWidth()}copyInputStyles(){const t=window.getComputedStyle(this.input.current);che.forEach(n=>{this.sizer.current.style[n]=t[n]})}updateInputWidth(){let t;this.props.autoresize&&(t=Math.ceil(this.sizer.current.scrollWidth)+2),t!==this.state.inputWidth&&this.setState({inputWidth:t})}render(){const{id:t,query:n,ariaLabelText:r,placeholderText:i,expanded:o,classNames:a,inputAttributes:s,inputEventHandlers:l,index:c}=this.props;return Y.createElement("div",{className:a.searchWrapper},Y.createElement("input",Object.assign({},s,l,{ref:this.input,value:n,placeholder:i,className:a.searchInput,role:"combobox","aria-autocomplete":"list","aria-label":r||i,"aria-owns":t,"aria-activedescendant":c>-1?`${t}-${c}`:null,"aria-expanded":o,style:{width:this.state.inputWidth}})),Y.createElement("div",{ref:this.sizer,style:lhe},n||i))}}function UO(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function fhe(e){return new RegExp(UO(e),"gi")}function dhe(e){return new RegExp(`(?:^|\\s)${UO(e)}`,"i")}function hhe(e){return new RegExp(`^${UO(e)}$`,"i")}function phe(e,t){const n=fhe(t);return e.replace(n,"$&")}function mhe({item:e,query:t}){return Y.createElement("span",{dangerouslySetInnerHTML:{__html:phe(e.name,t)}})}function ghe(e){const t=e.suggestionComponent||mhe,n=e.options.map((r,i)=>{const o=`${e.id}-${i}`,a=[];return e.index===i&&a.push(e.classNames.suggestionActive),r.disabled&&a.push(e.classNames.suggestionDisabled),Y.createElement("li",{id:o,key:o,role:"option",className:a.join(" "),"aria-disabled":!!r.disabled,onMouseDown:s=>s.preventDefault(),onClick:()=>e.addTag(r)},r.prefix?Y.createElement("span",{className:e.classNames.suggestionPrefix},r.prefix," "):null,r.disableMarkIt?r.name:Y.createElement(t,{item:r,query:e.query}))});return Y.createElement("div",{className:e.classNames.suggestions},Y.createElement("ul",{role:"listbox",id:e.id},n))}function vhe(e,t){const n=e.querySelectorAll("a,button,input"),r=Array.prototype.findIndex.call(n,o=>o===t),i=n[r-1]||n[r+1];i&&i.focus()}const Ps={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down"},II={root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchWrapper:"react-tags__search-wrapper",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled",suggestionPrefix:"react-tags__suggestion-prefix"};function FI(e,t){return e.findIndex(n=>hhe(t).test(n.name))}function X_(){if(this.state.query.length>=this.props.minQueryLength){const e=FI(this.state.options,this.state.query),t=this.state.index===-1?e:this.state.index,n=t>-1?this.state.options[t]:null;n?this.addTag(n):this.props.allowNew&&this.addTag({name:this.state.query})}}function yhe(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index<=0?t:this.state.index-1})}function _he(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index>=t?0:this.state.index+1})}function bhe(){this.state.query.length||this.deleteTag(this.props.tags.length-1)}function whe(e,t){return dhe(t).test(e.name)}function xhe(e,t){let n;return e.suggestionsTransform?n=e.suggestionsTransform(t.query,e.suggestions):n=e.suggestions.filter(r=>e.suggestionsFilter(r,t.query)),n=n.slice(0,e.maxSuggestionsLength),e.allowNew&&e.newTagText&&FI(n,t.query)===-1?n.push({id:0,name:t.query,prefix:e.newTagText,disableMarkIt:!0}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,disabled:!0,disableMarkIt:!0}),n}class zO extends Y.Component{constructor(t){super(t),this.state={query:"",focused:!1,index:-1},this.inputEventHandlers={onChange:()=>{},onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this),onKeyDown:this.onKeyDown.bind(this)},this.container=Y.createRef(),this.input=Y.createRef()}onInput(t){const n=t.target.value;this.props.onInput&&this.props.onInput(n),n.length===this.state.query.length+1&&this.props.delimiters.indexOf(n.slice(-1))>-1?X_.call(this):n!==this.state.query&&this.setState({query:n})}onKeyDown(t){this.props.delimiters.indexOf(t.key)>-1&&((this.state.query||this.state.index>-1)&&t.preventDefault(),X_.call(this)),t.key===Ps.BACKSPACE&&this.props.allowBackspace&&bhe.call(this,t),(t.key===Ps.UP_ARROW||t.key===Ps.UP_ARROW_COMPAT)&&yhe.call(this,t),(t.key===Ps.DOWN_ARROW||t.key===Ps.DOWN_ARROW_COMPAT)&&_he.call(this,t)}onClick(t){document.activeElement!==t.target&&this.focusInput()}onBlur(){this.setState({focused:!1,index:-1}),this.props.onBlur&&this.props.onBlur(),this.props.addOnBlur&&X_.call(this)}onFocus(){this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus()}onDeleteTag(t,n){this.container.current&&vhe(this.container.current,n.currentTarget),this.deleteTag(t)}addTag(t){t.disabled||typeof this.props.onValidate=="function"&&!this.props.onValidate(t)||(this.props.onAddition({id:t.id,name:t.name}),this.clearInput())}deleteTag(t){this.props.onDelete(t)}clearInput(){this.setState({query:"",index:-1})}clearSelectedIndex(){this.setState({index:-1})}focusInput(){this.input.current&&this.input.current.input.current&&this.input.current.input.current.focus()}render(){const t=this.props.tagComponent||she,n=this.state.focused&&this.state.query.length>=this.props.minQueryLength,r=Object.assign({},II,this.props.classNames),i=[r.root];return this.state.focused&&i.push(r.rootFocused),Y.createElement("div",{ref:this.container,className:i.join(" "),onClick:this.onClick.bind(this)},Y.createElement("div",{className:r.selected,"aria-relevant":"additions removals","aria-live":"polite"},this.props.tags.map((o,a)=>Y.createElement(t,{key:a,tag:o,removeButtonText:this.props.removeButtonText,classNames:r,onDelete:this.onDeleteTag.bind(this,a)}))),Y.createElement("div",{className:r.search},Y.createElement(uhe,Object.assign({},this.state,{id:this.props.id,ref:this.input,classNames:r,inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,autoresize:this.props.autoresize,expanded:n,placeholderText:this.props.placeholderText,ariaLabelText:this.props.ariaLabelText})),n&&this.state.options.length?Y.createElement(ghe,Object.assign({},this.state,{id:this.props.id,classNames:r,expanded:n,addTag:this.addTag.bind(this),suggestionComponent:this.props.suggestionComponent})):null))}static getDerivedStateFromProps(t,n){return n.prevQuery!==n.query||n.prevSuggestions!==t.suggestions?{prevQuery:n.query,prevSuggestions:t.suggestions,options:xhe(t,n)}:null}}zO.defaultProps={id:"ReactTags",tags:[],placeholderText:"Add new tag",removeButtonText:"Click to remove tag",noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:whe,suggestionsTransform:null,autoresize:!0,classNames:II,delimiters:[Ps.TAB,Ps.ENTER],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,addOnBlur:!1,tagComponent:null,suggestionComponent:null,inputAttributes:{}};zO.propTypes={id:D.string,tags:D.arrayOf(D.object),placeholderText:D.string,ariaLabelText:D.string,removeButtonText:D.string,noSuggestionsText:D.string,newTagText:D.string,suggestions:D.arrayOf(D.object),suggestionsFilter:D.func,suggestionsTransform:D.func,autoresize:D.bool,delimiters:D.arrayOf(D.string),onDelete:D.func.isRequired,onAddition:D.func.isRequired,onInput:D.func,onFocus:D.func,onBlur:D.func,onValidate:D.func,minQueryLength:D.number,maxSuggestionsLength:D.number,classNames:D.object,allowNew:D.bool,allowBackspace:D.bool,addOnBlur:D.bool,tagComponent:D.oneOfType([D.func,D.element]),suggestionComponent:D.oneOfType([D.func,D.element]),inputAttributes:D.object};const $I=({tag:e,colorGenerator:t})=>m.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),hD=e=>({id:e,name:e}),She=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,allowNew:a=!0})=>{const s=gl("shortUrlCreation");H.useEffect(()=>{i()},[]);const l=(s==null?void 0:s.tagFilteringMode)??"startsWith",c=({tag:h,onDelete:p})=>m.jsx(AO,{colorGenerator:e,text:h.name,clearable:!0,className:"react-tags__tag",onClose:p}),f=({item:h})=>m.jsxs(m.Fragment,{children:[m.jsx($I,{tag:`${h.name}`,colorGenerator:e}),h.name]});return m.jsx(zO,{tags:t.map(hD),tagComponent:c,suggestions:o.tags.filter(h=>!t.includes(h)).map(hD),suggestionComponent:f,allowNew:a,addOnBlur:!0,placeholderText:r??"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:l==="includes"?(h,p)=>p.filter(({name:g})=>g.includes(h)):void 0,onDelete:h=>{const p=[...t];p.splice(h,1),n(p)},onAddition:({name:h})=>n([...new Set([...t,...h.toLowerCase().split(",")])])})},Px="shlink/tagDelete",Ohe={deleting:!1,deleted:!1,error:!1},BI=Mn(`${Px}/tagDeleted`),Che=e=>{const t=Tr(`${Px}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=ir({name:Px,initialState:Ohe,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:Ko(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},HO="shlink/tagEdit",Ehe={editing:!1,edited:!1,error:!1},UI=Mn(`${HO}/tagEdited`),The=(e,t)=>Tr(`${HO}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),Phe=e=>ir({name:HO,initialState:Ehe,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:Ko(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...mS(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),VO="shlink/tagsList",J_={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},pD=(e,t)=>n=>n===e?t:n,mD=(e,t)=>sh(n=>n===t,e),khe=(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}),Mhe=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),{})),Dhe=(e,t=!0)=>Tr(`${VO}/listTags`,async(n,{getState:r})=>{const{tagsList:i}=r();if(!t&&!Yn(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}}),zI=Mn(`${VO}/filterTags`),Lhe=(e,t)=>ir({name:VO,initialState:J_,reducers:{},extraReducers:n=>{n.addCase(zI,(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})=>({...J_,error:!0,errorData:Ko(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...J_,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(BI,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:mD(r,a),filteredTags:mD(i,a)})),n.addCase(UI,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map(pD(s.oldName,s.newName)).sort(),filteredTags:i.map(pD(s.oldName,s.newName)).sort()})),n.addCase(Oh,(r,{payload:i})=>({...r,stats:khe(Mhe(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),Rhe={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},jhe=e=>is(({filterTags:t,forceListTags:n,tagsList:r})=>{var f;const i=jO(),[o,a]=H.useState(((f=i.tags)==null?void 0:f.defaultOrdering)??{}),s=Mt(()=>r.filteredTags.map(h=>{var v,y,x;const p=r.stats[h],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:h,visits:g,shortUrls:(p==null?void 0:p.shortUrlsCount)??0}}),h=>U4(h,o));if(H.useEffect(()=>{n()},[]),r.loading)return m.jsx(Po,{loading:!0});if(r.error)return m.jsx($r,{type:"error",children:m.jsx(Fo,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const l=h=>()=>{const p=Py(h,o.field,o.dir);a({field:p?h:void 0,dir:p})},c=()=>{if(r.filteredTags.length<1)return m.jsx(Po,{children:"No tags found"});const h=s();return m.jsx(e,{sortedTags:h,currentOrder:o,orderByColumn:l})};return m.jsxs(m.Fragment,{children:[m.jsx(yh,{className:"mb-3",onChange:t}),m.jsx(dr,{className:"mb-3",children:m.jsx("div",{className:"col-lg-6 offset-lg-6",children:m.jsx(_h,{items:Rhe,order:o,onChange:(h,p)=>a({field:h,dir:p})})})}),c()]})},()=>[li.visits]);const WO=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Gd(o)&&n(o);return m.jsxs(XS,{listClassName:Se("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[m.jsx(Us,{disabled:t<=1,children:m.jsx(zs,{previous:!0,tag:"span",onClick:i(t-1)})}),MI(t,e).map((o,a)=>m.jsx(Us,{disabled:Gd(o),active:t===o,children:m.jsx(zs,{role:"link",tag:"span",onClick:i(o),children:DI(o)})},LI(o,a))),m.jsx(Us,{disabled:t>=e,children:m.jsx(zs,{next:!0,tag:"span",onClick:i(t+1)})})]})};const Nhe=20,Ahe=e=>({sortedTags:t,orderByColumn:n,currentOrder:r})=>{const i=H.useRef(!0),{search:o}=gn(),{page:a=1}=hl(o),[s,l]=nfe("page",Number(a)),c=Td(Nhe,t),f=c.length>1,h=c[s-1]??[];return H.useEffect(()=>{!i.current&&l(1),i.current=!1},[t]),H.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(Zf,{currentOrder:r,field:"tag"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("shortUrls"),children:["Short URLs ",m.jsx(Zf,{currentOrder:r,field:"shortUrls"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:n("visits"),children:["Visits ",m.jsx(Zf,{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:[h.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),h.map(p=>m.jsx(e,{tag:p},p.tag))]})]}),f&&m.jsx("div",{className:"sticky-card-paginator",children:m.jsx(WO,{pagesCount:c.length,currentPage:s,setCurrentPage:l})})]},s)},Ihe=(e,t,n)=>({tag:r})=>{const[i,o]=mn(),[a,s]=mn(),l=pl();return m.jsxs("tr",{className:"responsive-table__row",children:[m.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[m.jsx($I,{tag:r.tag,colorGenerator:n})," ",r.tag]}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:m.jsx(Ft,{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(Ft,{to:`${l}/tag/${r.tag}/visits`,children:wn(r.visits)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end",children:m.jsxs(Ty,{children:[m.jsxs(Ue,{onClick:s,children:[m.jsx(Ie,{icon:dG,fixedWidth:!0,className:"me-1"})," Edit"]}),m.jsxs(Ue,{onClick:o,children:[m.jsx(Ie,{icon:TG,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})]})},Fhe=(e,t)=>{e.serviceFactory("TagsSelector",She,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>Hde),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",ahe,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",Ihe,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.serviceFactory("TagsTable",Ahe,"TagsTableRow"),e.serviceFactory("TagsList",jhe,"TagsTable"),e.decorator("TagsList",t(["tagsList","mercureInfo"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",Phe,"editTag"),e.serviceFactory("tagEditReducer",ct("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Che,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",ct("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",Lhe,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",ct("reducer"),"tagsListReducerCreator");const n=r=>({apiClientFactory:i})=>Dhe(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>zI),e.serviceFactory("deleteTag",ct("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>BI),e.serviceFactory("editTag",The,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>UI)};var $he="Expected a function",HI="__lodash_hash_undefined__",VI=1/0,Bhe="[object Function]",Uhe="[object GeneratorFunction]",zhe="[object Symbol]",Hhe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vhe=/^\w*$/,Whe=/^\./,Yhe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qhe=/[\\^$.*+?()[\]{}|]/g,Ghe=/\\(\\)?/g,Khe=/^\[object .+?Constructor\]$/,Zhe=typeof Wl=="object"&&Wl&&Wl.Object===Object&&Wl,Qhe=typeof self=="object"&&self&&self.Object===Object&&self,YO=Zhe||Qhe||Function("return this")();function Xhe(e,t){return e==null?void 0:e[t]}function Jhe(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var epe=Array.prototype,tpe=Function.prototype,WI=Object.prototype,eb=YO["__core-js_shared__"],gD=function(){var e=/[^.]+$/.exec(eb&&eb.keys&&eb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),YI=tpe.toString,qO=WI.hasOwnProperty,qI=WI.toString,npe=RegExp("^"+YI.call(qO).replace(qhe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vD=YO.Symbol,rpe=epe.splice,ipe=GI(YO,"Map"),Zd=GI(Object,"create"),yD=vD?vD.prototype:void 0,_D=yD?yD.toString:void 0;function il(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function ppe(e,t){var n=this.__data__,r=By(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}yu.prototype.clear=upe;yu.prototype.delete=fpe;yu.prototype.get=dpe;yu.prototype.has=hpe;yu.prototype.set=ppe;function vl(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 ZO(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 Ipe(e={stringFormatter:ZO()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function Fpe(e={stringFormatter:ZO()}){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 wD(e,t,n){const r=e[t];return r===void 0?n:r}function QI(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function kx(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var xD;(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"})(xD||(xD={}));class $pe{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||ZO(),i=Fpe({stringFormatter:r}),o={header:r,undefined:tb,boolean:tb,number:Ape(),bigint:tb,string:r,symbol:Ipe({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=>bD(i,r,n):i=>wD(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=>bD(a,o,i):a=>wD(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 kx(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(QI,[]),[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 kx(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 XI extends $pe{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(QI,[])}processData(t){return kx(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 SD;(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"})(SD||(SD={}));var OD;(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"})(OD||(OD={}));var CD;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(CD||(CD={}));var ED;(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"})(ED||(ED={}));const Bpe=new XI,Upe=e=>Bpe.parse(e),zpe=6,TD="0123456789ABCDEF",Hpe=128,{floor:Vpe,random:Wpe,sqrt:Ype,round:qpe}=Math,Gpe=()=>`#${LO(zpe,()=>TD[Vpe(Wpe()*TD.length)]).join("")}`,PD=e=>e.toLowerCase().trim(),Kpe=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),Zpe=(e=0,t=0,n=0)=>qpe(Ype(.299*e**2+.587*t**2+.114*n**2));class Qpe{constructor(t){me(this,"colors");me(this,"lights");me(this,"getColorForKey",t=>{const n=PD(t),r=this.colors[n];return r||this.setColorForKey(n,Gpe())});me(this,"setColorForKey",(t,n)=>{var i;const r=PD(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(Ho(this.lights[n])){const r=Kpe(n);this.lights[n]=Zpe(...r)>=Hpe}return this.lights[n]});var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}}const JI=({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)},Xpe=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);JI(e,i,n)};class Jpe{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);JI(this.window,i,n)}}class eme{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);Xpe(this.window,r,t)});this.window=t,this.jsonToCsv=n}}function tme(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",Jpe,"fetch","window"),e.service("ColorGenerator",Qpe,"TagColorsStorage"),e.constant("jsonToCsv",Upe),e.service("ReportExporter",eme,"window","jsonToCsv"),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",efe,"setTimeout","clearTimeout")}const QO=e=>e.visitedUrl!==void 0,nme=e=>e.visitedUrl!==void 0,rme=Mt(Pq(e=>QO(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),em=(e,t)=>JN(ct(t),e),Ph=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&Ka(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&Ka(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}},kh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>m.jsx("header",{children:m.jsxs(Hr,{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:uA})}),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(pI,{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 e5=({title:e,footer:t,children:n})=>m.jsxs(Hr,{role:"document",children:[m.jsx(Wc,{className:"chart-card__header",children:typeof e=="function"?e():e}),m.jsx(Vc,{children:n}),t&&m.jsx(S4,{className:"chart-card__footer--sticky",children:t})]}),t5="label";function kD(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function ime(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function n5(e,t){e.labels=t}function r5(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t5;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 ome(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t5;const n={labels:[],datasets:[]};return n5(n,e.labels),r5(n,e.datasets,t),n}function i5(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function ame(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:h,...p}=e,g=H.useRef(null),v=H.useRef(),y=()=>{g.current&&(v.current=new Tv(g.current,{type:a,data:ome(s,o),options:l&&{...l},plugins:c}),kD(t,v.current))},x=()=>{kD(t,null),v.current&&(v.current.destroy(),v.current=null)};return H.useEffect(()=>{!i&&v.current&&l&&ime(v.current,l)},[i,l]),H.useEffect(()=>{!i&&v.current&&n5(v.current.config.data,s.labels)},[i,s.labels]),H.useEffect(()=>{!i&&v.current&&s.datasets&&r5(v.current.config.data,s.datasets,o)},[i,s.datasets]),H.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(h))},[i,l,s.labels,s.datasets,h]),H.useEffect(()=>{v.current&&(x(),setTimeout(y))},[a]),H.useEffect(()=>(y(),()=>x()),[]),Y.createElement("canvas",Object.assign({ref:g,role:"img",height:n,width:r},p),f)}const sme=H.forwardRef(ame);function XO(e,t){return Tv.register(t),H.forwardRef((n,r)=>Y.createElement(sme,Object.assign({},n,{ref:r,type:e})))}const lme=XO("line",Cf),cme=XO("bar",Of),ume=XO("doughnut",ga),o5=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},a5=({dataset:e,raw:t})=>`${e.label}: ${wn(`${t}`)}`,fme=({label:e,raw:t})=>`${e}: ${wn(`${t}`)}`;const dme=({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))})},hme=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Vre()?Hre:zre,borderWidth:2}],pme=(e,t)=>({labels:e,datasets:hme(t)}),mme=H.memo(({stats:e})=>{const[t,n]=H.useState(),r=io(e),i=uu(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:fme}}}},a=pme(r,i);return m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-sm-12 col-md-7",children:m.jsx(ume,{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(dme,{chart:t})})]})}),MD=({title:e,stats:t})=>m.jsx(e5,{title:e,children:m.jsx(mme,{stats:t})}),gme={"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"},s5={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"},lr={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"},oa={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),h=c+new Array(f+1).join(".0");return we.map(h.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 gme[t]}static getBrowserTypeByAlias(t){return s5[t]||""}}const Et=/version\/(\d+(\.?_?\d+)+)/i,vme=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=we.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(Et,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(Et,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=we.getFirstMatch(Et,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(Et,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(Et,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(Et,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(Et,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=we.getFirstMatch(Et,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(Et,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(Et,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=we.getFirstMatch(Et,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(Et,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(Et,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(Et,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(Et,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(Et,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(Et,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(Et,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(Et,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(Et,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(Et,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(Et,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(Et,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(Et,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=we.getFirstMatch(Et,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=we.getFirstMatch(Et,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)}}}],yme=[{test:[/Roku\/DVP/],describe(e){const t=we.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:lr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=we.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:lr.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:lr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:lr.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:lr.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:lr.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:lr.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:lr.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:lr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=we.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:lr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=we.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:lr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:lr.Linux}}},{test:[/CrOS/],describe(){return{name:lr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=we.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:lr.PlayStation4,version:t}}}],_me=[{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}}}],bme=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:oa.Blink};const n=we.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:oa.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:oa.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:oa.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:oa.Gecko},n=we.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:oa.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:oa.WebKit},n=we.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class DD{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(vme,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(yme,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(_me,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(bme,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 wme{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new DD(t,n)}static parse(t){return new DD(t).getResult()}static get BROWSER_MAP(){return s5}static get ENGINE_MAP(){return oa}static get OS_MAP(){return lr}static get PLATFORMS_MAP(){return rn}}const tm="Others",xme=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],Sme=e=>{if(!Zi(e))return{browser:tm,os:tm};const{browser:{name:t},os:{name:n}}=wme.parse(e);return{os:n??tm,browser:t&&xme.includes(t)?t:tm}},Ome=e=>{var t;return Zi(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},JO=(e,t)=>Object.values({...rA(t,t.map(()=>0)),...e});const LD={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},Cme={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},Eme={hourly:pse,daily:wO,weekly:vse,monthly:uv},eC={hourly:e=>eu(e,"yyyy-MM-dd HH:00"),daily:e=>js(e),weekly(e){const t=js(Hd(e)),n=js(bse(e));return`${t} - ${n}`},monthly:e=>eu(e,"yyyy-MM")},Tme=e=>{const t=new Date,n=$o(e);return pS([[()=>wO(t,n)<=2,n_("hourly")],[()=>uv(t,n)<=1,n_("daily")],[()=>uv(t,n)<=6,n_("weekly")]])()??"monthly"},RD=(e,t)=>JN(n=>eC[e]($o(n.date)),t),Pme=(e,t)=>t.reduce((n,r)=>{const i=eC[e]($o(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),kme=(e,t)=>{const n=Eme[e],r=eC[e],i=$o(t[0].date),o=$o(t[t.length-1].date),a=n(i,o),s=Cme[e];return[r(o),...LO(a,l=>r(rse(o,s(l))))]},Mme=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=kme(n,e);return[i,JO(t,i)]},jD=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let nb=null;const Dme=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;nb===e[i]?(r([]),nb=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),nb=e[i]??null)},Lme=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,a]=H.useState(t.length>0?Tme(t[t.length-1].date):"monthly"),[s,l]=mn(!0),c=H.useRef(null),f=H.useRef(null),h=H.useMemo(()=>Pme(o,t),[o,t]),p=H.useMemo(()=>RD(o,y1(t)),[o,t]),[g,v]=H.useMemo(()=>Mme(t,p,o,s),[t,o,s]),y=H.useMemo(()=>JO(RD(o,y1(n)),g),[n,o,g]),x=()=>{const C=jD(v,"Visits",eO);if(n.length===0)return[C];const T=jD(y,r,H4);return[C,T]},b=()=>({labels:g,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:a5}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:wn}},x:{title:{display:!0,text:LD[o]}}},onHover:o5},S=C=>m.jsx(lme,{ref:C,data:b(),options:w,onClick:T=>Dme(g,h,i5(C.current,T),i)});return m.jsxs(Hr,{children:[m.jsxs(Wc,{role:"heading",children:[e,m.jsx("div",{className:"float-end",children:m.jsxs(vh,{children:[m.jsx(ph,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),m.jsx(du,{end:!0,children:Object.entries(LD).map(([C,T])=>m.jsx(Ue,{active:o===C,onClick:()=>a(C),children:T},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(Vc,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(f)]})]})},Rme=({toggleClassName:e,ranges:t,value:n,setValue:r})=>m.jsxs(vh,{children:[m.jsx(ph,{caret:!0,color:"link",className:e,children:"Paginate"}),m.jsxs(du,{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"})})]})]}),jme=e=>e.startsWith("hidden")?"":e,Nme=e=>!!e&&Object.keys(e).length>0,Ame=e=>e.length>20?e.length*10:void 0,Ime=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:Bre,borderColor:eO,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:Ure,borderColor:H4,borderWidth:2}]},Fme=(e,t,n,r)=>({labels:e,datasets:Ime(t,n,r)}),$me=(e,[t],n)=>{!n||!t||n(e[t.index])},Bme=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=io(e).map(jme),a=uu(Nme(t)?io(t).reduce((v,y)=>(v[y]&&(v[y]-=t[y]),v),{...e}):e),s=JO(t??{},o),l=H.useRef(null),c=H.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:v})=>v!=="",callbacks:{label:a5}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:wn}},y:{stacked:!0}},onHover:o5,indexAxis:"y"},h=Fme(o,a,s,n),p=Ame(o),g=(v,y)=>m.jsx(cme,{ref:y,data:h,options:f,height:p,onClick:x=>$me(o,i5(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)]})},Ume=e=>xg(e)==="String"?Qq(e):e,ND=([e])=>e,AD=([,e])=>e,nm=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...a})=>{const[s,l]=H.useState({}),[c,f]=H.useState(1),[h,p]=H.useState(50),g=(R,j)=>{const z=Og(R),N=s.field?Gq(Mt(s.field===Object.keys(j)[0]?ND:AD,Ume),z):z;return!s.dir||s.dir==="ASC"?N:y1(N)},v=R=>{const j=R[c-1];if(c[`hidden_${N}`,0])]},y=R=>m.jsx(WO,{currentPage:c,pagesCount:R,setCurrentPage:f}),x=(R,j,z)=>{const N=g(R,j),V=N.map(ND),W=z&&Og({...rA(V,V.map(()=>0)),...z});if(N.length<=h)return{currentPageStats:hf(N),currentPageHighlightedStats:W&&hf(W)};const ne=Td(h,N),q=W&&Td(h,W);return{currentPageStats:hf(v(ne)),currentPageHighlightedStats:q&&hf(v(q)),pagination:y(ne.length),max:kue(Math.max(...N.map(AD)))}},{currentPageStats:b,currentPageHighlightedStats:w,pagination:S,max:C}=x(e,r,t&&Object.keys(t).length>0?t:void 0),T=Object.keys(b),P=()=>m.jsxs(m.Fragment,{children:[n,m.jsx("div",{className:"float-end",children:m.jsx(_h,{isButton:!1,right:!0,items:r,order:s,onChange:(R,j)=>{l({field:R,dir:j}),f(1)}})}),o&&Object.keys(e).length>50&&m.jsx("div",{className:"float-end",children:m.jsx(Rme,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:h,setValue:R=>{p(R),f(1)}})}),i&&m.jsx("div",{className:"float-end",children:i(S?T:void 0)})]});return m.jsx(e5,{title:P,footer:S,children:m.jsx(Bme,{stats:b,highlightedStats:w,max:C,...a})})},zme=()=>{const e=ao(),{search:t}=gn(),{filtering:n,domain:r}=H.useMemo(Mt(()=>hl(t),({startDate:o,endDate:a,orphanVisitsType:s,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||a!=null?Z6(o,a):void 0,visitsFilter:{orphanVisitsType:s,excludeBots:Ho(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:a,visitsFilter:s}=tA(n,o),{excludeBots:l,orphanVisitsType:c}=s,f={startDate:(a==null?void 0:a.startDate)&&Ka(a.startDate)||"",endDate:(a==null?void 0:a.endDate)&&Ka(a.endDate)||"",excludeBots:l===void 0?void 0:tI(l),orphanVisitsType:c,domain:r},h=bh(f),p=Yn(h)?"":`?${h}`;e(p,{replace:!0,relative:"route"})}]};function l5(e,t){const n=H.useRef(t);H.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 Hme=1;function Vme(e){return Object.freeze({__version:Hme,map:e})}function Wme(e,t){return Object.freeze({...e,...t})}const c5=H.createContext(null),u5=c5.Provider;function f5(){const e=H.useContext(c5);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function Yme(e){function t(n,r){const{instance:i,context:o}=e(n).current;return H.useImperativeHandle(r,()=>i),n.children==null?null:Y.createElement(u5,{value:o},n.children)}return H.forwardRef(t)}function qme(e){function t(n,r){const[i,o]=H.useState(!1),{instance:a}=e(n,o).current;H.useImperativeHandle(r,()=>a),H.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?au.createPortal(n.children,s):null}return H.forwardRef(t)}function Gme(e){function t(n,r){const{instance:i}=e(n).current;return H.useImperativeHandle(r,()=>i),null}return H.forwardRef(t)}function d5(e,t){const n=H.useRef();H.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 tC(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Kme(e,t){return function(r,i){const o=f5(),a=e(tC(r,o),o);return l5(o.map,r.attribution),d5(a.current,r.eventHandlers),t(a.current,o,r,i),a}}var Mx={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)})(Wl,function(n){var r="1.9.4";function i(u){var d,_,O,k;for(_=1,O=arguments.length;_"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var d=0;d0?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 d=u.x-this.x,_=u.y-this.y;return Math.sqrt(d*d+_*_)},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,d,_){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,d,_)}function B(u,d){if(u)for(var _=d?[u,d]:u,O=0,k=_.length;O=this.min.x&&_.x<=this.max.x&&d.y>=this.min.y&&_.y<=this.max.y},intersects:function(u){u=re(u);var d=this.min,_=this.max,O=u.min,k=u.max,$=k.x>=d.x&&O.x<=_.x,te=k.y>=d.y&&O.y<=_.y;return $&&te},overlaps:function(u){u=re(u);var d=this.min,_=this.max,O=u.min,k=u.max,$=k.x>d.x&&O.x<_.x,te=k.y>d.y&&O.y<_.y;return $&&te},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var d=this.min,_=this.max,O=Math.abs(d.x-_.x)*u,k=Math.abs(d.y-_.y)*u;return re(A(d.x-O,d.y-k),A(_.x+O,_.y+k))},equals:function(u){return u?(u=re(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function re(u,d){return!u||u instanceof B?u:new B(u,d)}function U(u,d){if(u)for(var _=d?[u,d]:u,O=0,k=_.length;O=d.lat&&k.lat<=_.lat&&O.lng>=d.lng&&k.lng<=_.lng},intersects:function(u){u=Z(u);var d=this._southWest,_=this._northEast,O=u.getSouthWest(),k=u.getNorthEast(),$=k.lat>=d.lat&&O.lat<=_.lat,te=k.lng>=d.lng&&O.lng<=_.lng;return $&&te},overlaps:function(u){u=Z(u);var d=this._southWest,_=this._northEast,O=u.getSouthWest(),k=u.getNorthEast(),$=k.lat>d.lat&&O.lat<_.lat,te=k.lng>d.lng&&O.lng<_.lng;return $&&te},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,d){return u?(u=Z(u),this._southWest.equals(u.getSouthWest(),d)&&this._northEast.equals(u.getNorthEast(),d)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Z(u,d){return u instanceof U?u:new U(u,d)}function ie(u,d,_){if(isNaN(u)||isNaN(d))throw new Error("Invalid LatLng object: ("+u+", "+d+")");this.lat=+u,this.lng=+d,_!==void 0&&(this.alt=+_)}ie.prototype={equals:function(u,d){if(!u)return!1;u=ae(u);var _=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return _<=(d===void 0?1e-9:d)},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 d=180*u/40075017,_=d/Math.cos(Math.PI/180*this.lat);return Z([this.lat-d,this.lng-_],[this.lat+d,this.lng+_])},clone:function(){return new ie(this.lat,this.lng,this.alt)}};function ae(u,d,_){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):d===void 0?null:new ie(u,d,_)}var pe={latLngToPoint:function(u,d){var _=this.projection.project(u),O=this.scale(d);return this.transformation._transform(_,O)},pointToLatLng:function(u,d){var _=this.scale(d),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 d=this.projection.bounds,_=this.scale(u),O=this.transformation.transform(d.min,_),k=this.transformation.transform(d.max,_);return new B(O,k)},infinite:!1,wrapLatLng:function(u){var d=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(_,d,O)},wrapLatLngBounds:function(u){var d=u.getCenter(),_=this.wrapLatLng(d),O=d.lat-_.lat,k=d.lng-_.lng;if(O===0&&k===0)return u;var $=u.getSouthWest(),te=u.getNorthEast(),fe=new ie($.lat-O,$.lng-k),he=new ie(te.lat-O,te.lng-k);return new U(fe,he)}},E=i({},pe,{wrapLng:[-180,180],R:6371e3,distance:function(u,d){var _=Math.PI/180,O=u.lat*_,k=d.lat*_,$=Math.sin((d.lat-u.lat)*_/2),te=Math.sin((d.lng-u.lng)*_/2),fe=$*$+Math.cos(O)*Math.cos(k)*te*te,he=2*Math.atan2(Math.sqrt(fe),Math.sqrt(1-fe));return this.R*he}}),M=6378137,I={R:M,MAX_LATITUDE:85.0511287798,project:function(u){var d=Math.PI/180,_=this.MAX_LATITUDE,O=Math.max(Math.min(_,u.lat),-_),k=Math.sin(O*d);return new G(this.R*u.lng*d,this.R*Math.log((1+k)/(1-k))/2)},unproject:function(u){var d=180/Math.PI;return new ie((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*d,u.x*d/this.R)},bounds:function(){var u=M*Math.PI;return new B([-u,-u],[u,u])}()};function X(u,d,_,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=d,this._c=_,this._d=O}X.prototype={transform:function(u,d){return this._transform(u.clone(),d)},_transform:function(u,d){return d=d||1,u.x=d*(this._a*u.x+this._b),u.y=d*(this._c*u.y+this._d),u},untransform:function(u,d){return d=d||1,new G((u.x/d-this._b)/this._a,(u.y/d-this._d)/this._c)}};function Q(u,d,_,O){return new X(u,d,_,O)}var se=i({},E,{code:"EPSG:3857",projection:I,transformation:function(){var u=.5/(Math.PI*I.R);return Q(u,.5,-u,.5)}()}),ge=i({},se,{code:"EPSG:900913"});function Le(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function ue(u,d){var _="",O,k,$,te,fe,he;for(O=0,$=u.length;O<$;O++){for(fe=u[O],k=0,te=fe.length;k1,tn=function(){var u=!1;try{var d=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",h,d),window.removeEventListener("testPassiveEventSupport",h,d)}catch{}return u}(),ar=function(){return!!document.createElement("canvas").getContext}(),In=!!(document.createElementNS&&Le("svg").createSVGRect),Fn=!!In&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),vn=!In&&function(){try{var u=document.createElement("div");u.innerHTML='';var d=u.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),gi=navigator.platform.indexOf("Mac")===0,vi=navigator.platform.indexOf("Linux")===0;function $n(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var He={ie:_e,ielt9:Ee,edge:Re,webkit:Me,android:De,android23:ce,androidStock:be,opera:ye,chrome:Oe,gecko:ke,safari:Ne,phantom:Qe,opera12:et,win:qe,ie3d:Gt,webkit3d:zt,gecko3d:Sn,any3d:or,mobile:Ni,mobileWebkit:An,mobileWebkit3d:bu,msPointer:Ai,pointer:Rh,touch:Nh,touchNative:jh,mobileOpera:wu,mobileGecko:os,retina:un,passiveEvents:tn,canvas:ar,svg:In,vml:vn,inlineSvg:Fn,mac:gi,linux:vi},lC=He.msPointer?"MSPointerDown":"pointerdown",cC=He.msPointer?"MSPointerMove":"pointermove",uC=He.msPointer?"MSPointerUp":"pointerup",fC=He.msPointer?"MSPointerCancel":"pointercancel",Hy={touchstart:lC,touchmove:cC,touchend:uC,touchcancel:fC},dC={touchstart:W5,touchmove:Ah,touchend:Ah,touchcancel:Ah},_l={},hC=!1;function B5(u,d,_){return d==="touchstart"&&V5(),dC[d]?(_=dC[d].bind(this,_),u.addEventListener(Hy[d],_,!1),_):(console.warn("wrong event specified:",d),h)}function U5(u,d,_){if(!Hy[d]){console.warn("wrong event specified:",d);return}u.removeEventListener(Hy[d],_,!1)}function z5(u){_l[u.pointerId]=u}function H5(u){_l[u.pointerId]&&(_l[u.pointerId]=u)}function pC(u){delete _l[u.pointerId]}function V5(){hC||(document.addEventListener(lC,z5,!0),document.addEventListener(cC,H5,!0),document.addEventListener(uC,pC,!0),document.addEventListener(fC,pC,!0),hC=!0)}function Ah(u,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var _ in _l)d.touches.push(_l[_]);d.changedTouches=[d],u(d)}}function W5(u,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&Bn(d),Ah(u,d)}function Y5(u){var d={},_,O;for(O in u)_=u[O],d[O]=_&&_.bind?_.bind(u):_;return u=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var q5=200;function G5(u,d){u.addEventListener("dblclick",d);var _=0,O;function k($){if($.detail!==1){O=$.detail;return}if(!($.pointerType==="mouse"||$.sourceCapabilities&&!$.sourceCapabilities.firesTouchEvents)){var te=_C($);if(!(te.some(function(he){return he instanceof HTMLLabelElement&&he.attributes.for})&&!te.some(function(he){return he instanceof HTMLInputElement||he instanceof HTMLSelectElement}))){var fe=Date.now();fe-_<=q5?(O++,O===2&&d(Y5($))):O=1,_=fe}}}return u.addEventListener("click",k),{dblclick:d,simDblclick:k}}function K5(u,d){u.removeEventListener("dblclick",d.dblclick),u.removeEventListener("click",d.simDblclick)}var Vy=$h(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),xu=$h(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),mC=xu==="webkitTransition"||xu==="OTransition"?xu+"End":"transitionend";function gC(u){return typeof u=="string"?document.getElementById(u):u}function Su(u,d){var _=u.style[d]||u.currentStyle&&u.currentStyle[d];if((!_||_==="auto")&&document.defaultView){var O=document.defaultView.getComputedStyle(u,null);_=O?O[d]:null}return _==="auto"?null:_}function mt(u,d,_){var O=document.createElement(u);return O.className=d||"",_&&_.appendChild(O),O}function Ht(u){var d=u.parentNode;d&&d.removeChild(u)}function Ih(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function bl(u){var d=u.parentNode;d&&d.lastChild!==u&&d.appendChild(u)}function wl(u){var d=u.parentNode;d&&d.firstChild!==u&&d.insertBefore(u,d.firstChild)}function Wy(u,d){if(u.classList!==void 0)return u.classList.contains(d);var _=Fh(u);return _.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(_)}function Ze(u,d){if(u.classList!==void 0)for(var _=v(d),O=0,k=_.length;O0?2*window.devicePixelRatio:1;function wC(u){return He.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/X5: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 r0(u,d){var _=d.relatedTarget;if(!_)return!0;try{for(;_&&_!==u;)_=_.parentNode}catch{return!1}return _!==u}var J5={__proto__:null,on:Ge,off:Tt,stopPropagation:ls,disableScrollPropagation:n0,disableClickPropagation:Tu,preventDefault:Bn,stop:cs,getPropagationPath:_C,getMousePosition:bC,getWheelDelta:wC,isExternalTarget:r0,addListener:Ge,removeListener:Tt},xC=le.extend({run:function(u,d,_,O){this.stop(),this._el=u,this._inProgress=!0,this._duration=_||.25,this._easeOutPower=1/Math.max(O||.5,.2),this._startPos=ss(u),this._offset=d.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 d=+new Date-this._startTime,_=this._duration*1e3;d<_?this._runFrame(this._easeOut(d/_),u):(this._runFrame(1),this._complete())},_runFrame:function(u,d){var _=this._startPos.add(this._offset.multiplyBy(u));d&&_._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)}}),st=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,d){d=y(this,d),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),d.maxBounds&&this.setMaxBounds(d.maxBounds),d.zoom!==void 0&&(this._zoom=this._limitZoom(d.zoom)),d.center&&d.zoom!==void 0&&this.setView(ae(d.center),d.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=xu&&He.any3d&&!He.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ge(this._proxy,mC,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,d,_){if(d=d===void 0?this._zoom:this._limitZoom(d),u=this._limitCenter(ae(u),d,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!==d?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,d,_.zoom):this._tryAnimatedPan(u,_.pan);if(O)return clearTimeout(this._sizeTimer),this}return this._resetView(u,d,_.pan&&_.pan.noMoveStart),this},setZoom:function(u,d){return this._loaded?this.setView(this.getCenter(),u,{zoom:d}):(this._zoom=u,this)},zoomIn:function(u,d){return u=u||(He.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,d)},zoomOut:function(u,d){return u=u||(He.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,d)},setZoomAround:function(u,d,_){var O=this.getZoomScale(d),k=this.getSize().divideBy(2),$=u instanceof G?u:this.latLngToContainerPoint(u),te=$.subtract(k).multiplyBy(1-1/O),fe=this.containerPointToLatLng(k.add(te));return this.setView(fe,d,{zoom:_})},_getBoundsCenterZoom:function(u,d){d=d||{},u=u.getBounds?u.getBounds():Z(u);var _=A(d.paddingTopLeft||d.padding||[0,0]),O=A(d.paddingBottomRight||d.padding||[0,0]),k=this.getBoundsZoom(u,!1,_.add(O));if(k=typeof d.maxZoom=="number"?Math.min(d.maxZoom,k):k,k===1/0)return{center:u.getCenter(),zoom:k};var $=O.subtract(_).divideBy(2),te=this.project(u.getSouthWest(),k),fe=this.project(u.getNorthEast(),k),he=this.unproject(te.add(fe).divideBy(2).add($),k);return{center:he,zoom:k}},fitBounds:function(u,d){if(u=Z(u),!u.isValid())throw new Error("Bounds are not valid.");var _=this._getBoundsCenterZoom(u,d);return this.setView(_.center,_.zoom,d)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,d){return this.setView(u,this._zoom,{pan:d})},panBy:function(u,d){if(u=A(u).round(),d=d||{},!u.x&&!u.y)return this.fire("moveend");if(d.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 xC,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),d.noMoveStart||this.fire("movestart"),d.animate!==!1){Ze(this._mapPane,"leaflet-pan-anim");var _=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,_,d.duration||.25,d.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,d,_){if(_=_||{},_.animate===!1||!He.any3d)return this.setView(u,d,_);this._stop();var O=this.project(this.getCenter()),k=this.project(u),$=this.getSize(),te=this._zoom;u=ae(u),d=d===void 0?te:d;var fe=Math.max($.x,$.y),he=fe*this.getZoomScale(te,d),xe=k.distanceTo(O)||1,Ae=1.42,We=Ae*Ae;function Xe(dn){var Jh=dn?-1:1,U8=dn?he:fe,z8=he*he-fe*fe+Jh*We*We*xe*xe,H8=2*U8*We*xe,p0=z8/H8,nE=Math.sqrt(p0*p0+1)-p0,V8=nE<1e-9?-18:Math.log(nE);return V8}function sr(dn){return(Math.exp(dn)-Math.exp(-dn))/2}function On(dn){return(Math.exp(dn)+Math.exp(-dn))/2}function Xr(dn){return sr(dn)/On(dn)}var vr=Xe(0);function Tl(dn){return fe*(On(vr)/On(vr+Ae*dn))}function I8(dn){return fe*(On(vr)*Xr(vr+Ae*dn)-sr(vr))/We}function F8(dn){return 1-Math.pow(1-dn,1.5)}var $8=Date.now(),eE=(Xe(1)-vr)/Ae,B8=_.duration?1e3*_.duration:1e3*eE*.8;function tE(){var dn=(Date.now()-$8)/B8,Jh=F8(dn)*eE;dn<=1?(this._flyToFrame=V(tE,this),this._move(this.unproject(O.add(k.subtract(O).multiplyBy(I8(Jh)/xe)),te),this.getScaleZoom(fe/Tl(Jh),te),{flyTo:!0})):this._move(u,d)._moveEnd(!0)}return this._moveStart(!0,_.noMoveStart),tE.call(this),this},flyToBounds:function(u,d){var _=this._getBoundsCenterZoom(u,d);return this.flyTo(_.center,_.zoom,d)},setMaxBounds:function(u){return u=Z(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 d=this.options.minZoom;return this.options.minZoom=u,this._loaded&&d!==u&&(this.fire("zoomlevelschange"),this.getZoom()this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,d){this._enforcingBounds=!0;var _=this.getCenter(),O=this._limitCenter(_,this._zoom,Z(u));return _.equals(O)||this.panTo(O,d),this._enforcingBounds=!1,this},panInside:function(u,d){d=d||{};var _=A(d.paddingTopLeft||d.padding||[0,0]),O=A(d.paddingBottomRight||d.padding||[0,0]),k=this.project(this.getCenter()),$=this.project(u),te=this.getPixelBounds(),fe=re([te.min.add(_),te.max.subtract(O)]),he=fe.getSize();if(!fe.contains($)){this._enforcingBounds=!0;var xe=$.subtract(fe.getCenter()),Ae=fe.extend($).getSize().subtract(he);k.x+=xe.x<0?-Ae.x:Ae.x,k.y+=xe.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(k),d),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 d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var _=this.getSize(),O=d.divideBy(2).round(),k=_.divideBy(2).round(),$=O.subtract(k);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:d,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 d=a(this._handleGeolocationResponse,this),_=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,_,u):navigator.geolocation.getCurrentPosition(d,_,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 d=u.code,_=u.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+_+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var d=u.coords.latitude,_=u.coords.longitude,O=new ie(d,_),k=O.toBounds(u.coords.accuracy*2),$=this._locateOptions;if($.setView){var te=this.getBoundsZoom(k);this.setView(O,$.maxZoom?Math.min(te,$.maxZoom):te)}var fe={latlng:O,bounds:k,timestamp:u.timestamp};for(var he in u.coords)typeof u.coords[he]=="number"&&(fe[he]=u.coords[he]);this.fire("locationfound",fe)}},addHandler:function(u,d){if(!d)return this;var _=this[u]=new d(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(),Ht(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)Ht(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,d){var _="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),O=mt("div",_,d||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(),d=this.unproject(u.getBottomLeft()),_=this.unproject(u.getTopRight());return new U(d,_)},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,d,_){u=Z(u),_=A(_||[0,0]);var O=this.getZoom()||0,k=this.getMinZoom(),$=this.getMaxZoom(),te=u.getNorthWest(),fe=u.getSouthEast(),he=this.getSize().subtract(_),xe=re(this.project(fe,O),this.project(te,O)).getSize(),Ae=He.any3d?this.options.zoomSnap:1,We=he.x/xe.x,Xe=he.y/xe.y,sr=d?Math.max(We,Xe):Math.min(We,Xe);return O=this.getScaleZoom(sr,O),Ae&&(O=Math.round(O/(Ae/100))*(Ae/100),O=d?Math.ceil(O/Ae)*Ae:Math.floor(O/Ae)*Ae),Math.max(k,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,d){var _=this._getTopLeftPoint(u,d);return new B(_,_.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,d){var _=this.options.crs;return d=d===void 0?this._zoom:d,_.scale(u)/_.scale(d)},getScaleZoom:function(u,d){var _=this.options.crs;d=d===void 0?this._zoom:d;var O=_.zoom(u*_.scale(d));return isNaN(O)?1/0:O},project:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(ae(u),d)},unproject:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(A(u),d)},layerPointToLatLng:function(u){var d=A(u).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(u){var d=this.project(ae(u))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(Z(u))},distance:function(u,d){return this.options.crs.distance(ae(u),ae(d))},containerPointToLayerPoint:function(u){return A(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return A(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var d=this.containerPointToLayerPoint(A(u));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return bC(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 d=this._container=gC(u);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ge(d,"scroll",this._onScroll,this),this._containerId=l(d)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&He.any3d,Ze(u,"leaflet-container"+(He.touch?" leaflet-touch":"")+(He.retina?" leaflet-retina":"")+(He.ielt9?" leaflet-oldie":"")+(He.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=Su(u,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="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,d,_){fn(this._mapPane,new G(0,0));var O=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var k=this._zoom!==d;this._moveStart(k,_)._move(u,d)._moveEnd(k),this.fire("viewreset"),O&&this.fire("load")},_moveStart:function(u,d){return u&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(u,d,_,O){d===void 0&&(d=this._zoom);var k=this._zoom!==d;return this._zoom=d,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),O?_&&_.pinch&&this.fire("zoom",_):((k||_&&_.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 d=u?Tt:Ge;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),He.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,d){for(var _=[],O,k=d==="mouseout"||d==="mouseover",$=u.target||u.srcElement,te=!1;$;){if(O=this._targets[l($)],O&&(d==="click"||d==="preclick")&&this._draggableMoved(O)){te=!0;break}if(O&&O.listens(d,!0)&&(k&&!r0($,u)||(_.push(O),k))||$===this._container)break;$=$.parentNode}return!_.length&&!te&&!k&&this.listens(d,!0)&&(_=[this]),_},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var d=u.target||u.srcElement;if(!(!this._loaded||d._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(d))){var _=u.type;_==="mousedown"&&Qy(d),this._fireDOMEvent(u,_)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,d,_){if(u.type==="click"){var O=i({},u);O.type="preclick",this._fireDOMEvent(O,O.type,_)}var k=this._findEventTargets(u,d);if(_){for(var $=[],te=0;te<_.length;te++)_[te].listens(d,!0)&&$.push(_[te]);k=$.concat(k)}if(k.length){d==="contextmenu"&&Bn(u);var fe=k[0],he={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var xe=fe.getLatLng&&(!fe._radius||fe._radius<=10);he.containerPoint=xe?this.latLngToContainerPoint(fe.getLatLng()):this.mouseEventToContainerPoint(u),he.layerPoint=this.containerPointToLayerPoint(he.containerPoint),he.latlng=xe?fe.getLatLng():this.layerPointToLatLng(he.layerPoint)}for(te=0;te0?Math.round(u-d)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(d))},_limitZoom:function(u){var d=this.getMinZoom(),_=this.getMaxZoom(),O=He.any3d?this.options.zoomSnap:1;return O&&(u=Math.round(u/O)*O),Math.max(d,Math.min(_,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){nn(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,d){var _=this._getCenterOffset(u)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(_)?!1:(this.panBy(_,d),!0)},_createAnimProxy:function(){var u=this._proxy=mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(d){var _=Vy,O=this._proxy.style[_];as(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.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(){Ht(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),d=this.getZoom();as(this._proxy,this.project(u,d),this.getZoomScale(d,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,d,_){if(this._animatingZoom)return!0;if(_=_||{},!this._zoomAnimated||_.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var O=this.getZoomScale(d),k=this._getCenterOffset(u)._divideBy(1-1/O);return _.animate!==!0&&!this.getSize().contains(k)?!1:(V(function(){this._moveStart(!0,_.noMoveStart||!1)._animateZoom(u,d,!0)},this),!0)},_animateZoom:function(u,d,_,O){this._mapPane&&(_&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=d,Ze(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:d,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 e8(u,d){return new st(u,d)}var yi=q.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var d=this._map;return d&&d.removeControl(this),this.options.position=u,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var d=this._container=this.onAdd(u),_=this.getPosition(),O=u._controlCorners[_];return Ze(d,"leaflet-control"),_.indexOf("bottom")!==-1?O.insertBefore(d,O.firstChild):O.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ht(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()}}),Pu=function(u){return new yi(u)};st.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},d="leaflet-",_=this._controlContainer=mt("div",d+"control-container",this._container);function O(k,$){var te=d+k+" "+d+$;u[k+$]=mt("div",te,_)}O("top","left"),O("top","right"),O("bottom","left"),O("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Ht(this._controlCorners[u]);Ht(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var SC=yi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,d,_,O){return _1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=d&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var d=this._getLayer(l(u.target)),_=d.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;_&&this._map.fire(_,d)},_createRadioElement:function(u,d){var _='",O=document.createElement("div");return O.innerHTML=_,O.firstChild},_addItem:function(u){var d=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 k=document.createElement("span");k.innerHTML=" "+u.name;var $=document.createElement("span");d.appendChild($),$.appendChild(O),$.appendChild(k);var te=u.overlay?this._overlaysList:this._baseLayersList;return te.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,d,_,O=[],k=[];this._handlingClick=!0;for(var $=u.length-1;$>=0;$--)d=u[$],_=this._getLayer(d.layerId).layer,d.checked?O.push(_):d.checked||k.push(_);for($=0;$=0;k--)d=u[k],_=this._getLayer(d.layerId).layer,d.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",Bn),this.expand();var d=this;setTimeout(function(){Tt(u,"click",Bn),d._preventClick=!1})}}),t8=function(u,d,_){return new SC(u,d,_)},i0=yi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var d="leaflet-control-zoom",_=mt("div",d+" leaflet-bar"),O=this.options;return this._zoomInButton=this._createButton(O.zoomInText,O.zoomInTitle,d+"-in",_,this._zoomIn),this._zoomOutButton=this._createButton(O.zoomOutText,O.zoomOutTitle,d+"-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,d,_,O,k){var $=mt("a",_,O);return $.innerHTML=u,$.href="#",$.title=d,$.setAttribute("role","button"),$.setAttribute("aria-label",d),Tu($),Ge($,"click",cs),Ge($,"click",k,this),Ge($,"click",this._refocusOnMap,this),$},_updateDisabled:function(){var u=this._map,d="leaflet-disabled";nn(this._zoomInButton,d),nn(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Ze(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Ze(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});st.mergeOptions({zoomControl:!0}),st.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new i0,this.addControl(this.zoomControl))});var n8=function(u){return new i0(u)},OC=yi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var d="leaflet-control-scale",_=mt("div",d),O=this.options;return this._addScales(O,d+"-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,d,_){u.metric&&(this._mScale=mt("div",d,_)),u.imperial&&(this._iScale=mt("div",d,_))},_update:function(){var u=this._map,d=u.getSize().y/2,_=u.distance(u.containerPointToLatLng([0,d]),u.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(_)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var d=this._getRoundNum(u),_=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,_,d/u)},_updateImperial:function(u){var d=u*3.2808399,_,O,k;d>5280?(_=d/5280,O=this._getRoundNum(_),this._updateScale(this._iScale,O+" mi",O/_)):(k=this._getRoundNum(d),this._updateScale(this._iScale,k+" ft",k/d))},_updateScale:function(u,d,_){u.style.width=Math.round(this.options.maxWidth*_)+"px",u.innerHTML=d},_getRoundNum:function(u){var d=Math.pow(10,(Math.floor(u)+"").length-1),_=u/d;return _=_>=10?10:_>=5?5:_>=3?3:_>=2?2:1,d*_}}),r8=function(u){return new OC(u)},i8='',o0=yi.extend({options:{position:"bottomright",prefix:''+(He.inlineSvg?i8+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=mt("div","leaflet-control-attribution"),Tu(this._container);for(var d in u._layers)u._layers[d].getAttribution&&this.addAttribution(u._layers[d].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 d in this._attributions)this._attributions[d]&&u.push(d);var _=[];this.options.prefix&&_.push(this.options.prefix),u.length&&_.push(u.join(", ")),this._container.innerHTML=_.join(' ')}}});st.mergeOptions({attributionControl:!0}),st.addInitHook(function(){this.options.attributionControl&&new o0().addTo(this)});var o8=function(u){return new o0(u)};yi.Layers=SC,yi.Zoom=i0,yi.Scale=OC,yi.Attribution=o0,Pu.layers=t8,Pu.zoom=n8,Pu.scale=r8,Pu.attribution=o8;var Fi=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}});Fi.addTo=function(u,d){return u.addHandler(d,this),this};var a8={Events:oe},CC=He.touch?"touchstart mousedown":"mousedown",Qo=le.extend({options:{clickTolerance:3},initialize:function(u,d,_,O){y(this,O),this._element=u,this._dragStartTarget=d||u,this._preventOutline=_},enable:function(){this._enabled||(Ge(this._dragStartTarget,CC,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Qo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,CC,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!Wy(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Qo._dragging===this&&this.finishDrag();return}if(!(Qo._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Qo._dragging=this,this._preventOutline&&Qy(this._element),Gy(),Ou(),!this._moving)){this.fire("down");var d=u.touches?u.touches[0]:u,_=vC(this._element);this._startPoint=new G(d.clientX,d.clientY),this._startPos=ss(this._element),this._parentScale=Xy(_);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 d=u.touches&&u.touches.length===1?u.touches[0]:u,_=new G(d.clientX,d.clientY)._subtract(this._startPoint);!_.x&&!_.y||Math.abs(_.x)+Math.abs(_.y)$&&(te=fe,$=he);$>_&&(d[te]=1,s0(u,d,_,O,te),s0(u,d,_,te,k))}function u8(u,d){for(var _=[u[0]],O=1,k=0,$=u.length;O<$;O++)f8(u[O],u[k])>d&&(_.push(u[O]),k=O);return k<$-1&&_.push(u[$-1]),_}var MC;function DC(u,d,_,O,k){var $=O?MC:us(u,_),te=us(d,_),fe,he,xe;for(MC=te;;){if(!($|te))return[u,d];if($&te)return!1;fe=$||te,he=zh(u,d,fe,_,k),xe=us(he,_),fe===$?(u=he,$=xe):(d=he,te=xe)}}function zh(u,d,_,O,k){var $=d.x-u.x,te=d.y-u.y,fe=O.min,he=O.max,xe,Ae;return _&8?(xe=u.x+$*(he.y-u.y)/te,Ae=he.y):_&4?(xe=u.x+$*(fe.y-u.y)/te,Ae=fe.y):_&2?(xe=he.x,Ae=u.y+te*(he.x-u.x)/$):_&1&&(xe=fe.x,Ae=u.y+te*(fe.x-u.x)/$),new G(xe,Ae,k)}function us(u,d){var _=0;return u.xd.max.x&&(_|=2),u.yd.max.y&&(_|=8),_}function f8(u,d){var _=d.x-u.x,O=d.y-u.y;return _*_+O*O}function ku(u,d,_,O){var k=d.x,$=d.y,te=_.x-k,fe=_.y-$,he=te*te+fe*fe,xe;return he>0&&(xe=((u.x-k)*te+(u.y-$)*fe)/he,xe>1?(k=_.x,$=_.y):xe>0&&(k+=te*xe,$+=fe*xe)),te=u.x-k,fe=u.y-$,O?te*te+fe*fe:new G(k,$)}function Qr(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function LC(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Qr(u)}function RC(u,d){var _,O,k,$,te,fe,he,xe;if(!u||u.length===0)throw new Error("latlngs not passed");Qr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ae=ae([0,0]),We=Z(u),Xe=We.getNorthWest().distanceTo(We.getSouthWest())*We.getNorthEast().distanceTo(We.getNorthWest());Xe<1700&&(Ae=a0(u));var sr=u.length,On=[];for(_=0;_O){he=($-O)/k,xe=[fe.x-he*(fe.x-te.x),fe.y-he*(fe.y-te.y)];break}var vr=d.unproject(A(xe));return ae([vr.lat+Ae.lat,vr.lng+Ae.lng])}var d8={__proto__:null,simplify:PC,pointToSegmentDistance:kC,closestPointOnSegment:l8,clipSegment:DC,_getEdgeIntersection:zh,_getBitCode:us,_sqClosestPointOnSegment:ku,isFlat:Qr,_flat:LC,polylineCenter:RC},l0={project:function(u){return new G(u.lng,u.lat)},unproject:function(u){return new ie(u.y,u.x)},bounds:new B([-180,-90],[180,90])},c0={R:6378137,R_MINOR:6356752314245179e-9,bounds:new B([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var d=Math.PI/180,_=this.R,O=u.lat*d,k=this.R_MINOR/_,$=Math.sqrt(1-k*k),te=$*Math.sin(O),fe=Math.tan(Math.PI/4-O/2)/Math.pow((1-te)/(1+te),$/2);return O=-_*Math.log(Math.max(fe,1e-10)),new G(u.lng*d*_,O)},unproject:function(u){for(var d=180/Math.PI,_=this.R,O=this.R_MINOR/_,k=Math.sqrt(1-O*O),$=Math.exp(-u.y/_),te=Math.PI/2-2*Math.atan($),fe=0,he=.1,xe;fe<15&&Math.abs(he)>1e-7;fe++)xe=k*Math.sin(te),xe=Math.pow((1-xe)/(1+xe),k/2),he=Math.PI/2-2*Math.atan($*xe)-te,te+=he;return new ie(te*d,u.x*d/_)}},h8={__proto__:null,LonLat:l0,Mercator:c0,SphericalMercator:I},p8=i({},E,{code:"EPSG:3395",projection:c0,transformation:function(){var u=.5/(Math.PI*c0.R);return Q(u,.5,-u,.5)}()}),jC=i({},E,{code:"EPSG:4326",projection:l0,transformation:Q(1/180,1,-1/180,.5)}),m8=i({},pe,{projection:l0,transformation:Q(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,d){var _=d.lng-u.lng,O=d.lat-u.lat;return Math.sqrt(_*_+O*O)},infinite:!0});pe.Earth=E,pe.EPSG3395=p8,pe.EPSG3857=se,pe.EPSG900913=ge,pe.EPSG4326=jC,pe.Simple=m8;var _i=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 d=u.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var _=this.getEvents();d.on(_,this),this.once("remove",function(){d.off(_,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});st.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var d=l(u);return this._layers[d]?this:(this._layers[d]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var d=l(u);return this._layers[d]?(this._loaded&&u.onRemove(this),delete this._layers[d],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,d){for(var _ in this._layers)u.call(d,this._layers[_]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var d=0,_=u.length;d<_;d++)this.addLayer(u[d])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[l(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var d=l(u);this._zoomBoundLayers[d]&&(delete this._zoomBoundLayers[d],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,d=-1/0,_=this._getZoomSpan();for(var O in this._zoomBoundLayers){var k=this._zoomBoundLayers[O].options;u=k.minZoom===void 0?u:Math.min(u,k.minZoom),d=k.maxZoom===void 0?d:Math.max(d,k.maxZoom)}this._layersMaxZoom=d===-1/0?void 0:d,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&&d[0]instanceof ie&&d[0].equals(d[_-1])&&d.pop(),d},_setLatLngs:function(u){uo.prototype._setLatLngs.call(this,u),Qr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Qr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,d=this.options.weight,_=new G(d,d);if(u=new B(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,k=this._rings.length,$;Ou.y!=k.y>u.y&&u.x<(k.x-O.x)*(u.y-O.y)/(k.y-O.y)+O.x&&(d=!d);return d||uo.prototype._containsPoint.call(this,u,!0)}});function S8(u,d){return new Ol(u,d)}var fo=co.extend({initialize:function(u,d){y(this,d),this._layers={},u&&this.addData(u)},addData:function(u){var d=S(u)?u:u.features,_,O,k;if(d){for(_=0,O=d.length;_0&&k.push(k[0].slice()),k}function Cl(u,d){return u.feature?i({},u.feature,{geometry:d}):Gh(d)}function Gh(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var h0={toGeoJSON:function(u){return Cl(this,{type:"Point",coordinates:d0(this.getLatLng(),u)})}};Hh.include(h0),u0.include(h0),Vh.include(h0),uo.include({toGeoJSON:function(u){var d=!Qr(this._latlngs),_=qh(this._latlngs,d?1:0,!1,u);return Cl(this,{type:(d?"Multi":"")+"LineString",coordinates:_})}}),Ol.include({toGeoJSON:function(u){var d=!Qr(this._latlngs),_=d&&!Qr(this._latlngs[0]),O=qh(this._latlngs,_?2:d?1:0,!0,u);return d||(O=[O]),Cl(this,{type:(_?"Multi":"")+"Polygon",coordinates:O})}}),xl.include({toMultiPoint:function(u){var d=[];return this.eachLayer(function(_){d.push(_.toGeoJSON(u).geometry.coordinates)}),Cl(this,{type:"MultiPoint",coordinates:d})},toGeoJSON:function(u){var d=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(d==="MultiPoint")return this.toMultiPoint(u);var _=d==="GeometryCollection",O=[];return this.eachLayer(function(k){if(k.toGeoJSON){var $=k.toGeoJSON(u);if(_)O.push($.geometry);else{var te=Gh($);te.type==="FeatureCollection"?O.push.apply(O,te.features):O.push(te)}}}),_?Cl(this,{geometries:O,type:"GeometryCollection"}):{type:"FeatureCollection",features:O}}});function IC(u,d){return new fo(u,d)}var O8=IC,Kh=_i.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,d,_){this._url=u,this._bounds=Z(d),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(){Ht(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&&bl(this._image),this},bringToBack:function(){return this._map&&wl(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=Z(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",d=this._image=u?this._url:mt("img");if(Ze(d,"leaflet-image-layer"),this._zoomAnimated&&Ze(d,"leaflet-zoom-animated"),this.options.className&&Ze(d,this.options.className),d.onselectstart=h,d.onmousemove=h,d.onload=a(this.fire,this,"load"),d.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(d.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=d.src;return}d.src=this._url,d.alt=this.options.alt},_animateZoom:function(u){var d=this._map.getZoomScale(u.zoom),_=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;as(this._image,_,d)},_reset:function(){var u=this._image,d=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),_=d.getSize();fn(u,d.min),u.style.width=_.x+"px",u.style.height=_.y+"px"},_updateOpacity:function(){Zr(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()}}),C8=function(u,d,_){return new Kh(u,d,_)},FC=Kh.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",d=this._image=u?this._url:mt("video");if(Ze(d,"leaflet-image-layer"),this._zoomAnimated&&Ze(d,"leaflet-zoom-animated"),this.options.className&&Ze(d,this.options.className),d.onselectstart=h,d.onmousemove=h,d.onloadeddata=a(this.fire,this,"load"),u){for(var _=d.getElementsByTagName("source"),O=[],k=0;k<_.length;k++)O.push(_[k].src);this._url=_.length>0?O:[d.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var $=0;$k?(d.height=k+"px",Ze(u,$)):nn(u,$),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),_=this._getAnchor();fn(this._container,d.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,d=parseInt(Su(this._container,"marginBottom"),10)||0,_=this._container.offsetHeight+d,O=this._containerWidth,k=new G(this._containerLeft,-_-this._containerBottom);k._add(ss(this._container));var $=u.layerPointToContainerPoint(k),te=A(this.options.autoPanPadding),fe=A(this.options.autoPanPaddingTopLeft||te),he=A(this.options.autoPanPaddingBottomRight||te),xe=u.getSize(),Ae=0,We=0;$.x+O+he.x>xe.x&&(Ae=$.x+O-xe.x+he.x),$.x-Ae-fe.x<0&&(Ae=$.x-fe.x),$.y+_+he.y>xe.y&&(We=$.y+_-xe.y+he.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])}}),P8=function(u,d){return new Zh(u,d)};st.mergeOptions({closePopupOnClick:!0}),st.include({openPopup:function(u,d,_){return this._initOverlay(Zh,u,d,_).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),_i.include({bindPopup:function(u,d){return this._popup=this._initOverlay(Zh,this._popup,u,d),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 co||(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)){cs(u);var d=u.layer||u.target;if(this._popup._source===d&&!(d instanceof Xo)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=d,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Qh=$i.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){$i.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){$i.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=$i.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",d=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var d,_,O=this._map,k=this._container,$=O.latLngToContainerPoint(O.getCenter()),te=O.layerPointToContainerPoint(u),fe=this.options.direction,he=k.offsetWidth,xe=k.offsetHeight,Ae=A(this.options.offset),We=this._getAnchor();fe==="top"?(d=he/2,_=xe):fe==="bottom"?(d=he/2,_=0):fe==="center"?(d=he/2,_=xe/2):fe==="right"?(d=0,_=xe/2):fe==="left"?(d=he,_=xe/2):te.x<$.x?(fe="right",d=0,_=xe/2):(fe="left",d=he+(Ae.x+We.x)*2,_=xe/2),u=u.subtract(A(d,_,!0)).add(Ae).add(We),nn(k,"leaflet-tooltip-right"),nn(k,"leaflet-tooltip-left"),nn(k,"leaflet-tooltip-top"),nn(k,"leaflet-tooltip-bottom"),Ze(k,"leaflet-tooltip-"+fe),fn(k,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&Zr(this._container,u)},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(d)},_getAnchor:function(){return A(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),k8=function(u,d){return new Qh(u,d)};st.include({openTooltip:function(u,d,_){return this._initOverlay(Qh,u,d,_).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),_i.include({bindTooltip:function(u,d){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Qh,this._tooltip,u,d),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 d=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[d](_),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof co||(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 d=typeof u.getElement=="function"&&u.getElement();d&&(Ge(d,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Ge(d,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var d=typeof u.getElement=="function"&&u.getElement();d&&d.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 d=this;this._map.once("moveend",function(){d._openOnceFlag=!1,d._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var d=u.latlng,_,O;this._tooltip.options.sticky&&u.originalEvent&&(_=this._map.mouseEventToContainerPoint(u.originalEvent),O=this._map.containerPointToLayerPoint(_),d=this._map.layerPointToLatLng(O)),this._tooltip.setLatLng(d)}});var BC=Sl.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var d=u&&u.tagName==="DIV"?u:document.createElement("div"),_=this.options;if(_.html instanceof Element?(Ih(d),d.appendChild(_.html)):d.innerHTML=_.html!==!1?_.html:"",_.bgPos){var O=A(_.bgPos);d.style.backgroundPosition=-O.x+"px "+-O.y+"px"}return this._setIconStyles(d,"icon"),d},createShadow:function(){return null}});function M8(u){return new BC(u)}Sl.Default=Mu;var Du=_i.extend({options:{tileSize:256,opacity:1,updateWhenIdle:He.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(),Ht(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(bl(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(wl(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 d=this.getPane().children,_=-u(-1/0,1/0),O=0,k=d.length,$;Othis.options.maxZoom||_O?this._retainParent(k,$,te,O):!1)},_retainChildren:function(u,d,_,O){for(var k=2*u;k<2*u+2;k++)for(var $=2*d;$<2*d+2;$++){var te=new G(k,$);te.z=_+1;var fe=this._tileCoordsToKey(te),he=this._tiles[fe];if(he&&he.active){he.retain=!0;continue}else he&&he.loaded&&(he.retain=!0);_+1this.options.maxZoom||this.options.minZoom!==void 0&&k1){this._setView(u,_);return}for(var We=k.min.y;We<=k.max.y;We++)for(var Xe=k.min.x;Xe<=k.max.x;Xe++){var sr=new G(Xe,We);if(sr.z=this._tileZoom,!!this._isValidTile(sr)){var On=this._tiles[this._tileCoordsToKey(sr)];On?On.current=!0:te.push(sr)}}if(te.sort(function(vr,Tl){return vr.distanceTo($)-Tl.distanceTo($)}),te.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Xr=document.createDocumentFragment();for(Xe=0;Xe_.max.x)||!d.wrapLat&&(u.y<_.min.y||u.y>_.max.y))return!1}if(!this.options.bounds)return!0;var O=this._tileCoordsToBounds(u);return Z(this.options.bounds).overlaps(O)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var d=this._map,_=this.getTileSize(),O=u.scaleBy(_),k=O.add(_),$=d.unproject(O,u.z),te=d.unproject(k,u.z);return[$,te]},_tileCoordsToBounds:function(u){var d=this._tileCoordsToNwSe(u),_=new U(d[0],d[1]);return this.options.noWrap||(_=this._map.wrapLatLngBounds(_)),_},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var d=u.split(":"),_=new G(+d[0],+d[1]);return _.z=+d[2],_},_removeTile:function(u){var d=this._tiles[u];d&&(Ht(d.el),delete this._tiles[u],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Ze(u,"leaflet-tile");var d=this.getTileSize();u.style.width=d.x+"px",u.style.height=d.y+"px",u.onselectstart=h,u.onmousemove=h,He.ielt9&&this.options.opacity<1&&Zr(u,this.options.opacity)},_addTile:function(u,d){var _=this._getTilePos(u),O=this._tileCoordsToKey(u),k=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(k),this.createTile.length<2&&V(a(this._tileReady,this,u,null,k)),fn(k,_),this._tiles[O]={el:k,coords:u,current:!0},d.appendChild(k),this.fire("tileloadstart",{tile:k,coords:u})},_tileReady:function(u,d,_){d&&this.fire("tileerror",{error:d,tile:_,coords:u});var O=this._tileCoordsToKey(u);_=this._tiles[O],_&&(_.loaded=+new Date,this._map._fadeAnimated?(Zr(_.el,0),W(this._fadeFrame),this._fadeFrame=V(this._updateOpacity,this)):(_.active=!0,this._pruneTiles()),d||(Ze(_.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:_.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),He.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 d=new G(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return d.z=u.z,d},_pxBoundsToTileRange:function(u){var d=this.getTileSize();return new B(u.min.unscaleBy(d).floor(),u.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function D8(u){return new Du(u)}var El=Du.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,d){this._url=u,d=y(this,d),d.detectRetina&&He.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,d){return this._url===u&&d===void 0&&(d=!0),this._url=u,d||this.redraw(),this},createTile:function(u,d){var _=document.createElement("img");return Ge(_,"load",a(this._tileOnLoad,this,d,_)),Ge(_,"error",a(this._tileOnError,this,d,_)),(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 d={r:He.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&&(d.y=_),d["-y"]=_}return w(this._url,i(d,this.options))},_tileOnLoad:function(u,d){He.ielt9?setTimeout(a(u,this,null,d),0):u(null,d)},_tileOnError:function(u,d,_){var O=this.options.errorTileUrl;O&&d.getAttribute("src")!==O&&(d.src=O),u(_,d)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,d=this.options.maxZoom,_=this.options.zoomReverse,O=this.options.zoomOffset;return _&&(u=d-u),u+O},_getSubdomain:function(u){var d=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var u,d;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(d=this._tiles[u].el,d.onload=h,d.onerror=h,!d.complete)){d.src=T;var _=this._tiles[u].coords;Ht(d),delete this._tiles[u],this.fire("tileabort",{tile:d,coords:_})}},_removeTile:function(u){var d=this._tiles[u];if(d)return d.el.setAttribute("src",T),Du.prototype._removeTile.call(this,u)},_tileReady:function(u,d,_){if(!(!this._map||_&&_.getAttribute("src")===T))return Du.prototype._tileReady.call(this,u,d,_)}});function UC(u,d){return new El(u,d)}var zC=El.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,d){this._url=u;var _=i({},this.defaultWmsParams);for(var O in d)O in this.options||(_[O]=d[O]);d=y(this,d);var k=d.detectRetina&&He.retina?2:1,$=this.getTileSize();_.width=$.x*k,_.height=$.y*k,this.wmsParams=_},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,El.prototype.onAdd.call(this,u)},getTileUrl:function(u){var d=this._tileCoordsToNwSe(u),_=this._crs,O=re(_.project(d[0]),_.project(d[1])),k=O.min,$=O.max,te=(this._wmsVersion>=1.3&&this._crs===jC?[k.y,k.x,$.y,$.x]:[k.x,k.y,$.x,$.y]).join(","),fe=El.prototype.getTileUrl.call(this,u);return fe+x(this.wmsParams,fe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+te},setParams:function(u,d){return i(this.wmsParams,u),d||this.redraw(),this}});function L8(u,d){return new zC(u,d)}El.WMS=zC,UC.wms=L8;var ho=_i.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,d){var _=this._map.getZoomScale(d,this._zoom),O=this._map.getSize().multiplyBy(.5+this.options.padding),k=this._map.project(this._center,d),$=O.multiplyBy(-_).add(k).subtract(this._map._getNewPixelOrigin(u,d));He.any3d?as(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,d=this._map.getSize(),_=this._map.containerPointToLayerPoint(d.multiplyBy(-u)).round();this._bounds=new B(_,_.add(d.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),HC=ho.extend({options:{tolerance:0},getEvents:function(){var u=ho.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ho.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,Ht(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var d in this._layers)u=this._layers[d],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ho.prototype._update.call(this);var u=this._bounds,d=this._container,_=u.getSize(),O=He.retina?2:1;fn(d,u.min),d.width=O*_.x,d.height=O*_.y,d.style.width=_.x+"px",d.style.height=_.y+"px",He.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){ho.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var d=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var d=u._order,_=d.next,O=d.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 d=u.options.dashArray.split(/[, ]+/),_=[],O,k;for(k=0;k')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),R8={_initContainer:function(){this._container=mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ho.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var d=u._container=Lu("shape");Ze(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",u._path=Lu("path"),d.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var d=u._container;this._container.appendChild(d),u.options.interactive&&u.addInteractiveTarget(d)},_removePath:function(u){var d=u._container;Ht(d),u.removeInteractiveTarget(d),delete this._layers[l(u)]},_updateStyle:function(u){var d=u._stroke,_=u._fill,O=u.options,k=u._container;k.stroked=!!O.stroke,k.filled=!!O.fill,O.stroke?(d||(d=u._stroke=Lu("stroke")),k.appendChild(d),d.weight=O.weight+"px",d.color=O.color,d.opacity=O.opacity,O.dashArray?d.dashStyle=S(O.dashArray)?O.dashArray.join(" "):O.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=O.lineCap.replace("butt","flat"),d.joinstyle=O.lineJoin):d&&(k.removeChild(d),u._stroke=null),O.fill?(_||(_=u._fill=Lu("fill")),k.appendChild(_),_.color=O.fillColor||O.color,_.opacity=O.fillOpacity):_&&(k.removeChild(_),u._fill=null)},_updateCircle:function(u){var d=u._point.round(),_=Math.round(u._radius),O=Math.round(u._radiusY||_);this._setPath(u,u._empty()?"M0 0":"AL "+d.x+","+d.y+" "+_+","+O+" 0,"+65535*360)},_setPath:function(u,d){u._path.v=d},_bringToFront:function(u){bl(u._container)},_bringToBack:function(u){wl(u._container)}},Xh=He.vml?Lu:Le,Ru=ho.extend({_initContainer:function(){this._container=Xh("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Xh("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ht(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ho.prototype._update.call(this);var u=this._bounds,d=u.getSize(),_=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,_.setAttribute("width",d.x),_.setAttribute("height",d.y)),fn(_,u.min),_.setAttribute("viewBox",[u.min.x,u.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(u){var d=u._path=Xh("path");u.options.className&&Ze(d,u.options.className),u.options.interactive&&Ze(d,"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){Ht(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var d=u._path,_=u.options;d&&(_.stroke?(d.setAttribute("stroke",_.color),d.setAttribute("stroke-opacity",_.opacity),d.setAttribute("stroke-width",_.weight),d.setAttribute("stroke-linecap",_.lineCap),d.setAttribute("stroke-linejoin",_.lineJoin),_.dashArray?d.setAttribute("stroke-dasharray",_.dashArray):d.removeAttribute("stroke-dasharray"),_.dashOffset?d.setAttribute("stroke-dashoffset",_.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),_.fill?(d.setAttribute("fill",_.fillColor||_.color),d.setAttribute("fill-opacity",_.fillOpacity),d.setAttribute("fill-rule",_.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(u,d){this._setPath(u,ue(u._parts,d))},_updateCircle:function(u){var d=u._point,_=Math.max(Math.round(u._radius),1),O=Math.max(Math.round(u._radiusY),1)||_,k="a"+_+","+O+" 0 1,0 ",$=u._empty()?"M0 0":"M"+(d.x-_)+","+d.y+k+_*2+",0 "+k+-_*2+",0 ";this._setPath(u,$)},_setPath:function(u,d){u._path.setAttribute("d",d)},_bringToFront:function(u){bl(u._path)},_bringToBack:function(u){wl(u._path)}});He.vml&&Ru.include(R8);function WC(u){return He.svg||He.vml?new Ru(u):null}st.include({getRenderer:function(u){var d=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var d=this._paneRenderers[u];return d===void 0&&(d=this._createRenderer({pane:u}),this._paneRenderers[u]=d),d},_createRenderer:function(u){return this.options.preferCanvas&&VC(u)||WC(u)}});var YC=Ol.extend({initialize:function(u,d){Ol.prototype.initialize.call(this,this._boundsToLatLngs(u),d)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=Z(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function j8(u,d){return new YC(u,d)}Ru.create=Xh,Ru.pointsToPath=ue,fo.geometryToLayer=Wh,fo.coordsToLatLng=f0,fo.coordsToLatLngs=Yh,fo.latLngToCoords=d0,fo.latLngsToCoords=qh,fo.getFeature=Cl,fo.asFeature=Gh,st.mergeOptions({boxZoom:!0});var qC=Fi.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(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ht(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(),Ou(),Gy(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ge(document,{contextmenu:cs,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 d=new B(this._point,this._startPoint),_=d.getSize();fn(this._box,d.min),this._box.style.width=_.x+"px",this._box.style.height=_.y+"px"},_finish:function(){this._moved&&(Ht(this._box),nn(this._container,"leaflet-crosshair")),Cu(),Ky(),Tt(document,{contextmenu:cs,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 d=new U(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});st.addInitHook("addHandler","boxZoom",qC),st.mergeOptions({doubleClickZoom:!0});var GC=Fi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var d=this._map,_=d.getZoom(),O=d.options.zoomDelta,k=u.originalEvent.shiftKey?_-O:_+O;d.options.doubleClickZoom==="center"?d.setZoom(k):d.setZoomAround(u.containerPoint,k)}});st.addInitHook("addHandler","doubleClickZoom",GC),st.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var KC=Fi.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Qo(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 d=Z(this._map.options.maxBounds);this._offsetLimit=re(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.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 d=this._lastTime=+new Date,_=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(_),this._times.push(d),this._prunePositions(d)}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),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,d){return u-(u-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;u.xd.max.x&&(u.x=this._viscousLimit(u.x,d.max.x)),u.y>d.max.y&&(u.y=this._viscousLimit(u.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,d=Math.round(u/2),_=this._initialWorldOffset,O=this._draggable._newPos.x,k=(O-d+_)%u+d-_,$=(O+d+_)%u-d-_,te=Math.abs(k+_)0?$:-$))-d;this._delta=0,this._startTime=null,te&&(u.options.scrollWheelZoom==="center"?u.setZoom(d+te):u.setZoomAround(this._lastMousePos,d+te))}});st.addInitHook("addHandler","scrollWheelZoom",QC);var N8=600;st.mergeOptions({tapHold:He.touchNative&&He.safari&&He.mobile,tapTolerance:15});var XC=Fi.extend({addHooks:function(){Ge(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var d=u.touches[0];this._startPos=this._newPos=new G(d.clientX,d.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ge(document,"touchend",Bn),Ge(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),N8),Ge(document,"touchend touchcancel contextmenu",this._cancel,this),Ge(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){Tt(document,"touchend",Bn),Tt(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(u){var d=u.touches[0];this._newPos=new G(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,d){var _=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});_._simulated=!0,d.target.dispatchEvent(_)}});st.addInitHook("addHandler","tapHold",XC),st.mergeOptions({touchZoom:He.touch,bounceAtZoomLimits:!0});var JC=Fi.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"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var d=this._map;if(!(!u.touches||u.touches.length!==2||d._animatingZoom||this._zooming)){var _=d.mouseEventToContainerPoint(u.touches[0]),O=d.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(_.add(O)._divideBy(2))),this._startDist=_.distanceTo(O),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Ge(document,"touchmove",this._onTouchMove,this),Ge(document,"touchend touchcancel",this._onTouchEnd,this),Bn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var d=this._map,_=d.mouseEventToContainerPoint(u.touches[0]),O=d.mouseEventToContainerPoint(u.touches[1]),k=_.distanceTo(O)/this._startDist;if(this._zoom=d.getScaleZoom(k,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&k>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,k===1)return}else{var $=_._add(O)._divideBy(2)._subtract(this._centerPoint);if(k===1&&$.x===0&&$.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract($),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),W(this._animRequest);var te=a(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=V(te,this,!0),Bn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,W(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(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))}});st.addInitHook("addHandler","touchZoom",JC),st.BoxZoom=qC,st.DoubleClickZoom=GC,st.Drag=KC,st.Keyboard=ZC,st.ScrollWheelZoom=QC,st.TapHold=XC,st.TouchZoom=JC,n.Bounds=B,n.Browser=He,n.CRS=pe,n.Canvas=HC,n.Circle=u0,n.CircleMarker=Vh,n.Class=q,n.Control=yi,n.DivIcon=BC,n.DivOverlay=$i,n.DomEvent=J5,n.DomUtil=Q5,n.Draggable=Qo,n.Evented=le,n.FeatureGroup=co,n.GeoJSON=fo,n.GridLayer=Du,n.Handler=Fi,n.Icon=Sl,n.ImageOverlay=Kh,n.LatLng=ie,n.LatLngBounds=U,n.Layer=_i,n.LayerGroup=xl,n.LineUtil=d8,n.Map=st,n.Marker=Hh,n.Mixin=a8,n.Path=Xo,n.Point=G,n.PolyUtil=s8,n.Polygon=Ol,n.Polyline=uo,n.Popup=Zh,n.PosAnimation=xC,n.Projection=h8,n.Rectangle=YC,n.Renderer=ho,n.SVG=Ru,n.SVGOverlay=$C,n.TileLayer=El,n.Tooltip=Qh,n.Transformation=X,n.Util=ne,n.VideoOverlay=FC,n.bind=a,n.bounds=re,n.canvas=VC,n.circle=w8,n.circleMarker=b8,n.control=Pu,n.divIcon=M8,n.extend=i,n.featureGroup=v8,n.geoJSON=IC,n.geoJson=O8,n.gridLayer=D8,n.icon=y8,n.imageOverlay=C8,n.latLng=ae,n.latLngBounds=Z,n.layerGroup=g8,n.map=e8,n.marker=_8,n.point=A,n.polygon=S8,n.polyline=x8,n.popup=P8,n.rectangle=j8,n.setOptions=y,n.stamp=l,n.svg=WC,n.svgOverlay=T8,n.tileLayer=UC,n.tooltip=k8,n.transformation=Q,n.version=r,n.videoOverlay=E8;var A8=window.L;n.noConflict=function(){return window.L=A8,this},window.L=n})})(Mx,Mx.exports);var Mh=Mx.exports;const ID=pi(Mh);function nC(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function rC(e,t){return t==null?function(r,i){const o=H.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=H.useRef();o.current||(o.current=e(r,i));const a=H.useRef(r),{instance:s}=o.current;return H.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,i]),o}}function Zme(e,t){H.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 h5(e){return function(n){const r=f5(),i=e(tC(n,r),r);return l5(r.map,n.attribution),d5(i.current,n.eventHandlers),Zme(i.current,r),i}}function Qme(e,t){const n=rC(e,t),r=h5(n);return Yme(r)}function Xme(e,t){const n=rC(e),r=Kme(n,t);return qme(r)}function Jme(e,t){const n=rC(e,t),r=h5(n);return Gme(r)}function ege(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 Dx(){return Dx=Object.assign||function(e){for(var t=1;t(g==null?void 0:g.map)??null,[g]);const y=H.useCallback(b=>{if(b!==null&&g===null){const w=new Mh.Map(b,f);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(Vme(w))}},[]);H.useEffect(()=>()=>{g==null||g.map.remove()},[g]);const x=g?Y.createElement(u5,{value:g},r):a??null;return Y.createElement("div",Dx({},p,{ref:y}),x)}const nge=H.forwardRef(tge),rge=Qme(function({position:t,...n},r){const i=new Mh.Marker(t,n);return nC(i,Wme(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())}),ige=Xme(function(t,n){const r=new Mh.Popup(t,n.overlayContainer);return nC(r,n)},function(t,n,{position:r},i){H.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])}),oge=Jme(function({url:t,...n},r){const i=new Mh.TileLayer(t,tC(n,r));return nC(i,r)},function(t,n,r){ege(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const age=()=>m.jsx(oge,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),sge=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}},p5=({toggle:e,isOpen:t,title:n,locations:r=[]})=>m.jsx(Yo,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:m.jsxs(so,{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(nge,{...sge(r),children:[m.jsx(age,{}),r.map(({cityName:i,latLong:o,count:a},s)=>m.jsx(rge,{position:o,children:m.jsxs(ige,{children:[m.jsx("b",{children:a})," visit",a>1?"s":""," from ",m.jsx("b",{children:i})]})},s))]})]})});const lge=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=mn(),[a,s,l]=mn(),[c,f]=H.useState([]),h=Ey(),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:h,onClick:g,children:m.jsx(Ie,{icon:lA})}),m.jsx(Pr,{placement:"left",target:h,children:"Show in map"}),m.jsx(hh,{isOpen:a,toggle:s,inNavbar:!0,children:m.jsxs(du,{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(p5,{toggle:o,isOpen:r,title:e,locations:c})]})},cge=({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(Go,{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:!Zi(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:m.jsx("i",{children:"Clear filters"})})]})},m5=(e,t)=>!Ho(e)&&Zi(e[t]),FD=e=>typeof e=="number"?e:e?parseFloat(e):0,uge=(e,{os:t})=>{e[t]=(e[t]||0)+1},fge=(e,{browser:t})=>{e[t]=(e[t]||0)+1},dge=(e,{referer:t})=>{e[t]=(e[t]||0)+1},g5=e=>(t,n)=>{const i=m5(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},hge=g5("country"),pge=g5("city"),mge=(e,t)=>{if(!m5(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[FD(r),FD(i)]};o.count+=1,e[n]=o},gge=(e,t)=>{if(!nme(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},v5=e=>e.reduce((t,n)=>(uge(t.os,n),fge(t.browsers,n),dge(t.referrers,n),hge(t.countries,n),pge(t.cities,n),mge(t.citiesForMap,n),gge(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),y5=ah(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,a={date:n,potentialBot:o,...Sme(t),referer:Ome(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 QO(e)?{...a,type:e.type,visitedUrl:e.visitedUrl}:a}),vge=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:y5,processStatsFromVisits:v5},Symbol.toStringTag,{value:"Module"}));const _f=20,yge=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),_ge=(e,t)=>t.filter(n=>yge(n,e)),bge=(e,t)=>U4(t,e),wge=(e,t,n)=>{const r=t?_ge(t,e):[...e],i=bge(n,r),o=i.length;return{visitsGroups:Td(_f,i),total:o}},xge=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var P,R;const o="visits-table__header-cell visits-table__sticky",a=()=>r("(max-width: 767px)").matches,[s,l]=H.useState(a()),[c,f]=H.useState(void 0),[h,p]=H.useState({}),g=H.useMemo(()=>wge(e,c,h),[c,h]),v=H.useRef(!0),[y,x]=H.useState(1),b=y*_f,w=b-_f,S=8+Number(i),C=j=>()=>p({field:j,dir:Py(j,h.field,h.dir)}),T=j=>m.jsx(Zf,{currentOrder:h,field:j,className:"visits-table__header-icon"});return H.useEffect(()=>{const j=()=>l(a());return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]),H.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:hk}),T("potentialBot")]}),m.jsxs("th",{className:o,onClick:C("date"),children:["Date",T("date")]}),m.jsxs("th",{className:o,onClick:C("country"),children:["Country",T("country")]}),m.jsxs("th",{className:o,onClick:C("city"),children:["City",T("city")]}),m.jsxs("th",{className:o,onClick:C("browser"),children:["Browser",T("browser")]}),m.jsxs("th",{className:o,onClick:C("os"),children:["OS",T("os")]}),m.jsxs("th",{className:o,onClick:C("referer"),children:["Referrer",T("referer")]}),i&&m.jsxs("th",{className:o,onClick:C("visitedUrl"),children:["Visited URL",T("visitedUrl")]})]}),m.jsx("tr",{children:m.jsx("td",{colSpan:S,className:"p-0",children:m.jsx(yh,{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"})}),(R=g.visitsGroups[y-1])==null?void 0:R.map((j,z)=>{const N=t.includes(j);return m.jsxs("tr",{style:{cursor:"pointer"},className:Se({"table-active":N}),onClick:()=>n(N?t.filter(V=>V!==j):[...t,j]),children:[m.jsx("td",{className:"text-center",children:N&&m.jsx(Ie,{icon:Pd,className:"text-primary"})}),m.jsx("td",{className:"text-center",children:j.potentialBot&&m.jsxs(m.Fragment,{children:[m.jsx(Ie,{icon:hk,id:`botIcon${z}`}),m.jsx(Pr,{placement:"right",target:`botIcon${z}`,children:"Potentially a visit from a bot or crawler"})]})}),m.jsx("td",{children:m.jsx(yv,{date:j.date})}),m.jsx("td",{children:j.country}),m.jsx("td",{children:j.city}),m.jsx("td",{children:j.browser}),m.jsx("td",{children:j.os}),m.jsx("td",{children:j.referer}),i&&m.jsx("td",{children:j.visitedUrl})]},z)})]}),g.total>_f&&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(WO,{pagesCount:Math.ceil(g.total/_f),currentPage:y,setCurrentPage:x,centered:s})}),m.jsx("div",{className:Se("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(nA(b,g.total))})," of"," ",m.jsx("b",{children:wn(g.total)})]})})]})})})})]})})},Ul={byTime:{title:"By time",subPath:"by-time",icon:lG},byContext:{title:"By context",subPath:"by-context",icon:_S},byLocation:{title:"By location",subPath:"by-location",icon:lA},list:{title:"List",subPath:"list",icon:sA}};let rm;const Dh=({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:h,fallbackInterval:p}=t,[{dateRange:g,visitsFilter:v},y]=zme(),x=gl("visits"),b=Mt(({startDate:U,endDate:Z})=>({dateRange:{startDate:U??void 0,endDate:Z??void 0}}),y),w=H.useRef(g??p??(x==null?void 0:x.defaultInterval)??"last30Days"),[S,C]=H.useState([]),[T,P]=H.useState(),R=H.useRef(!0),{search:j}=gn(),z=U=>U?`${U}${j}`:j,N=H.useMemo(()=>y5(a),[a]),{os:V,browsers:W,referrers:ne,countries:q,cities:J,citiesForMap:oe,visitedUrls:le}=H.useMemo(()=>v5(N),[N]),G=H.useMemo(()=>({...v,excludeBots:v.excludeBots??(x==null?void 0:x.excludeBots)}),[v]),F=uu(oe),A=U=>{rm=void 0,C(U)},B=U=>Z=>{const ie=`${U}_${Z}`;rm===ie?(C([]),P(void 0),rm=void 0):(C(N.filter(Hq(U,Z))),P(Z),rm=ie)};H.useEffect(()=>r,[]),H.useEffect(()=>{const U=R.current?g??tue(w.current):g;n({dateRange:U,filter:G},R.current),R.current=!1},[g,v]),H.useEffect(()=>{p&&w.current===((x==null?void 0:x.defaultInterval)??"last30Days")&&(w.current=p)},[p]);const re=()=>l?m.jsxs(Po,{loading:!0,children:["This is going to take a while... :S",m.jsx(k4,{value:h,striped:h===100,className:"mt-3"})]}):s?m.jsx(Po,{loading:!0}):c?m.jsx($r,{type:"error",children:m.jsx(Fo,{errorData:f,fallbackMessage:"An error occurred while loading visits :("})}):Yn(a)?m.jsx(Po,{children:"There are no visits matching current filter"}):m.jsxs(m.Fragment,{children:[m.jsx(B4,{fill:!0,children:Object.values(Ul).map(({title:U,icon:Z,subPath:ie},ae)=>m.jsxs(zf,{to:z(ie),replace:!0,children:[m.jsx(Ie,{icon:Z}),m.jsx("span",{className:"ms-2 d-none d-sm-inline",children:U})]},ae))}),m.jsx(dr,{children:m.jsxs(dy,{children:[m.jsx(vt,{path:Ul.byTime.subPath,element:m.jsx("div",{className:"col-12 mt-3",children:m.jsx(Lme,{title:"Visits during time",visits:N,highlightedVisits:S,highlightedLabel:T,setSelectedVisits:A})})}),m.jsx(vt,{path:Ul.byContext.subPath,element:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Se("mt-3 col-lg-6",{"col-xl-4":!o}),children:m.jsx(MD,{title:"Operating systems",stats:V})}),m.jsx("div",{className:Se("mt-3 col-lg-6",{"col-xl-4":!o}),children:m.jsx(MD,{title:"Browsers",stats:W})}),m.jsx("div",{className:Se("mt-3",{"col-xl-4":!o,"col-lg-6":o}),children:m.jsx(nm,{title:"Referrers",stats:ne,withPagination:!1,highlightedStats:em(S,"referer"),highlightedLabel:T,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:B("referer")})}),o&&m.jsx("div",{className:"mt-3 col-lg-6",children:m.jsx(nm,{title:"Visited URLs",stats:le,highlightedLabel:T,highlightedStats:em(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:B("visitedUrl")})})]})}),m.jsx(vt,{path:Ul.byLocation.subPath,element:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(nm,{title:"Countries",stats:q,highlightedStats:em(S,"country"),highlightedLabel:T,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:B("country")})}),m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(nm,{title:"Cities",stats:J,highlightedStats:em(S,"city"),highlightedLabel:T,extraHeaderContent:U=>F.length>0&&m.jsx(lge,{modalTitle:"Cities",locations:F,activeCities:U}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:B("city")})})]})}),m.jsx(vt,{path:Ul.list.subPath,element:m.jsx("div",{className:"col-12",children:m.jsx(xge,{visits:N,selectedVisits:S,setSelectedVisits:A,isOrphanVisits:o})})}),m.jsx(vt,{path:"*",element:m.jsx(iS,{replace:!0,to:z(Ul.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(kI,{updatable:!0,disabled:s,initialDateRange:w.current,defaultText:"All visits",onDatesChange:b})}),m.jsx(cge,{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(dI,{className:"btn-md-block",amount:N.length,onClick:()=>i(N)}),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()})]})},Sge=({exportVisits:e})=>is(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r})=>{const i=vu(),{domain:o=""}=ul(),[a,s=a]=o.split("_"),l=(f,h)=>t({domain:s,query:Ph(f),doIntervalFallback:h}),c=f=>e(`domain_${a}_visits.csv`,f);return m.jsx(Dh,{getVisits:l,cancelGetVisits:r,visitsInfo:n,exportCsv:c,children:m.jsx(kh,{goBack:i,visits:n.visits,title:`"${a}" visits`})})},()=>[li.visits]),Oge=({exportVisits:e})=>is(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r})=>{const i=vu(),o=s=>e("non_orphan_visits.csv",s),a=(s,l)=>t({query:Ph(s),doIntervalFallback:l});return m.jsx(Dh,{getVisits:a,cancelGetVisits:r,visitsInfo:n,exportCsv:o,children:m.jsx(kh,{title:"Non-orphan visits",goBack:i,visits:n.visits})})},()=>[li.visits]),Cge=({exportVisits:e})=>is(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r})=>{const i=vu(),o=s=>e("orphan_visits.csv",s),a=(s,l)=>{var c;return t({query:Ph(s),orphanVisitsType:(c=s.filter)==null?void 0:c.orphanVisitsType,doIntervalFallback:l})};return m.jsx(Dh,{getVisits:a,cancelGetVisits:r,visitsInfo:n,exportCsv:o,isOrphanVisits:!0,children:m.jsx(kh,{title:"Orphan visits",goBack:i,visits:n.visits})})},()=>[li.orphanVisits]),_5="shlink/orphanVisits",Ege={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Tge=e=>Ch({typePrefix:`${_5}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1})=>{const{getNonOrphanVisits:r}=e(),i=async(a,s)=>r({...t,page:a,itemsPerPage:s}),o=Eh(n,r);return[i,o]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Pge=e=>Th({name:_5,initialState:Ege,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>xh(o.date,r,i))}}),b5="shlink/orphanVisits",kge={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Mge=(e,t)=>!t||t===e.type,Dge=e=>Ch({typePrefix:`${b5}/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(h=>QO(h)&&Mge(h,t));return{...c,data:f}}),a=Eh(r,i);return[o,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),Lge=e=>Th({name:b5,initialState:kge,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:a})=>!a&&xh(o.date,r,i))}}),w5="shlink/shortUrlVisits",Rge={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},jge=e=>Ch({typePrefix:`${w5}/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=Eh(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}),Nge=e=>Th({name:w5,initialState:Rge,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:a}=r;return i.filter(({shortUrl:s,visit:l})=>s&&Yf(s,t,n)&&xh(l.date,o,a))}}),x5="shlink/tagVisits",Age={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Ige=e=>Ch({typePrefix:`${x5}/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=Eh(r,async s=>i(t,s));return[o,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),Fge=e=>Th({name:x5,initialState:Age,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))&&xh(s.date,i,o))}}),S5="shlink/visitsOverview",im={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},$D=e=>e.filter(({visit:t})=>t.potentialBot).length,$ge=e=>Tr(`${S5}/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}}))),Bge=e=>ir({name:S5,initialState:im,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...im,loading:!0})),t.addCase(e.rejected,()=>({...im,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...im,...r})),t.addCase(Oh,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=rme(o.createdVisits),l=a.length,c=$D(a),f=l-c,h=s.length,p=$D(s),g=h-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+h,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+g}}})}});const Uge=({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(yv,{date:r.dateCreated,relative:!0})}),m.jsx(Pr,{placement:"bottom",target:"created",children:m.jsx(yv,{date:r.dateCreated})})]}):m.jsx("small",{children:"Loading..."}),f=m.jsxs(m.Fragment,{children:["Visits for ",m.jsx(Li,{href:a})]});return m.jsxs(kh,{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(Li,{href:s,children:l??s})]})]})},zge=({exportVisits:e})=>is(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o})=>{const{shortCode:a=""}=ul(),{search:s}=gn(),l=vu(),{domain:c}=hl(s),f=(p,g)=>r({shortCode:Rm(a),query:{...Ph(p),domain:c},doIntervalFallback:g}),h=p=>{var g;return e(`short-url_${(g=n.shortUrl)==null?void 0:g.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,p)};return H.useEffect(()=>{i({shortCode:Rm(a),domain:c})},[]),m.jsx(Dh,{getVisits:f,cancelGetVisits:o,visitsInfo:t,exportCsv:h,children:m.jsx(Uge,{shortUrlDetail:n,shortUrlVisits:t,goBack:l})})},(t,n)=>n.shortCode?[li.shortUrlVisits(Rm(n.shortCode))]:[]),Hge=({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(AO,{text:i,colorGenerator:n})]});return m.jsx(kh,{title:o,goBack:t,visits:r})},Vge=(e,{exportVisits:t})=>is(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i})=>{const o=vu(),{tag:a=""}=ul(),s=(c,f)=>n({tag:a,query:Ph(c),doIntervalFallback:f}),l=c=>t(`tag_${a}_visits.csv`,c);return m.jsx(Dh,{getVisits:s,cancelGetVisits:i,visitsInfo:r,exportCsv:l,children:m.jsx(Hge,{tagVisits:r,goBack:o,colorGenerator:e})})},()=>[li.visits]),Wge=(e,t)=>{e.serviceFactory("MapModal",()=>p5),e.serviceFactory("ShortUrlVisits",zge,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",Vge,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",Sge,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",Cge,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",Oge,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>vge),e.serviceFactory("getShortUrlVisits",jge,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",ct("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",Ige,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",ct("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",oue,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",ct("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",Dge,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",ct("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",Tge,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",ct("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Oh),e.serviceFactory("loadVisitsOverview",$ge,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",Bge,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",ct("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",aue,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",ct("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",Pge,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",ct("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",Lge,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",ct("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",Nge,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",ct("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",Fge,"getTagVisits"),e.serviceFactory("tagVisitsReducer",ct("reducer"),"tagVisitsReducerCreator")};const tf=({children:e,to:t,className:n,...r})=>m.jsx(DN,{className:({isActive:i})=>Se("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Yge=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=gn(),r=Se("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(tf,{to:i("/overview"),children:[m.jsx(Ie,{fixedWidth:!0,icon:FG}),m.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),m.jsxs(tf,{to:i("/list-short-urls/1"),className:Se({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[m.jsx(Ie,{fixedWidth:!0,icon:sA}),m.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),m.jsxs(tf,{to:i("/create-short-url"),children:[m.jsx(Ie,{fixedWidth:!0,icon:HG,flip:"horizontal"}),m.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),m.jsxs(tf,{to:i("/manage-tags"),children:[m.jsx(Ie,{fixedWidth:!0,icon:cA}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),m.jsxs(tf,{to:i("/manage-domains"),children:[m.jsx(Ie,{fixedWidth:!0,icon:yG}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})};const qge=(e,t,n,r,i,o,a,s,l,c,f)=>({createNotFound:h})=>{const p=gn(),g=pl(),v=cl(),[y,x]=H.useMemo(()=>v?[H.Fragment,{}]:[MN,{basename:g}],[v]),[b,w,S,C]=mn();H.useEffect(()=>C(),[p]);const T=wh("domainVisits"),P=Se("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":b}),R=tfe(S,C);return m.jsxs(y,{...x,children:[m.jsx(Ie,{icon:hG,className:P,onClick:w}),m.jsx("div",{...R,className:"shlink-layout__swipeable",children:m.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[m.jsx(Yge,{routePrefix:g,showOnMobile:b}),m.jsx("div",{className:"shlink-layout__container",onClick:()=>C(),children:m.jsx("div",{className:"container-xl",children:m.jsxs(dy,{children:[m.jsx(vt,{index:!0,element:m.jsx(iS,{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,{})}),T&&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,{})}),h&&m.jsx(vt,{path:"*",element:h("/list-short-urls/1")})]})})})]})})]})},Gge=!0,Kge=e=>y6({devTools:!Gge,reducer:mO({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})}),Zge=e=>{e.serviceFactory("Main",qge,"TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains"),e.factory("store",Kge)},lo=new zN,{container:Qge}=lo,Xge=(e,t)=>(...n)=>e[t](...n),Jge=(e,t)=>({...e,[t]:Xge(Qge,t)}),Lh=(e,t=[])=>bN(e?mS(e):null,t.reduce(Jge,{}));Zge(lo);zde(lo,Lh);Fhe(lo,Lh);Wge(lo,Lh);_ue(lo);gue(lo,Lh);$ue(lo,Lh);tme(lo);let BD;const eve=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=Qae(t),l=H.useRef(),[c,f]=H.useState();return H.useEffect(()=>{BD=n,e.value("apiClientFactory",()=>BD),a&&e.value("TagColorsStorage",a);const{container:h}=e,{Main:p,store:g,loadMercureInfo:v}=h;l.current=m.jsx(p,{createNotFound:o}),f(g),g.dispatch(v(r))},[n,a]),c?m.jsx(wN,{store:c,children:m.jsx(Due,{value:r,children:m.jsx(Xae,{value:s,children:m.jsx(Jae,{value:i,children:l.current})})})}):m.jsx(m.Fragment,{})},tve=eve(lo);function wv(e){return t=>{const{resetSelectedServer:n}=t;return H.useEffect(()=>{n()},[]),m.jsx(e,{...t})}}const nve=({location:e},{error:t})=>class extends H.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 rve=({id:e,name:t})=>m.jsxs(N4,{tag:Ft,to:`/server/${e}`,className:"servers-list__server-item",children:[t,m.jsx(Ie,{icon:GG,className:"servers-list__server-item-icon"})]}),O5=({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(L4,{className:Se("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>m.jsx(rve,{id:r,name:i},r))})]}),C5=({color:e=eO,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 ive=({servers:e})=>{const t=ao(),n=uu(e),r=!Yn(n);return H.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),m.jsx("div",{className:"home",children:m.jsx(Hr,{className:"home__main-card",children:m.jsxs(dr,{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(C5,{})})})}),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(O5,{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(Ft,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[m.jsx(Ie,{icon:wS})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]})}),m.jsx("p",{className:"mb-0 mt-5",children:m.jsx(Li,{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:kG})]})})})]})})]})]})})})};const ove=e=>()=>{const[t,n,,r]=mn(),i=gn(),{pathname:o}=i;H.useEffect(r,[i]);const a="/settings",s=Se("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return m.jsxs(ZA,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[m.jsxs(QA,{tag:Ft,to:"/",children:[m.jsx(C5,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),m.jsx(XA,{onClick:n,children:m.jsx(Ie,{icon:YG,className:s})}),m.jsx(Vee,{navbar:!0,isOpen:t,children:m.jsxs(IS,{navbar:!0,className:"ms-auto",children:[m.jsx(JA,{children:m.jsxs(n4,{tag:Ft,to:a,active:o.startsWith(a),children:[m.jsx(Ie,{icon:XG}),"  Settings"]})}),m.jsx(e,{})]})})]})},ave=({children:e})=>{const t=gn();return H.useEffect(()=>{scrollTo(0,0)},[t]),m.jsx(m.Fragment,{children:e})},E5=eA(gy,e=>{try{return ax(e,e,"=")}catch{return!1}}),T5=e=>E5(e)?`v${e}`:e,P5=(e="latest")=>t=>E5(t)?t:e,sve="%_VERSION_%",lve=Mt(P5(),T5),UD=({project:e,version:t})=>m.jsx(Li,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:m.jsx("b",{children:t})}),cve=({selectedServer:e,clientVersion:t=sve})=>{const n=lve(t);return m.jsxs("small",{className:"text-muted",children:[oA(e)&&m.jsxs(m.Fragment,{children:["Server: ",m.jsx(UD,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",m.jsx(UD,{project:"shlink-web-client",version:n})]})};const uve=/^\/server\/[a-zA-Z0-9-]*\/(?!edit)/,fve=({selectedServer:e})=>{const{pathname:t}=gn(),n=H.useMemo(()=>uve.test(t),[t]),r=Se("text-center",{"shlink-versions-container--with-sidebar":n});return m.jsx("div",{className:r,children:m.jsx(cve,{selectedServer:e})})};const _u=({children:e})=>m.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function k5(e,t){return n=>{const r=ul(),{selectServer:i,selectedServer:o}=n;return H.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?iG(o)?m.jsx(t,{}):m.jsx(e,{...n}):m.jsx(_u,{children:m.jsx(Po,{loading:!0})})}}const dve=(e,t,n,r)=>k5(({selectedServer:i,settings:o})=>{const a=oA(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(s6,{to:`${s}${l}`,children:"List short URLs"})}):m.jsx(r,{})},r),zD={"Content-Type":"application/json"},HD=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...zD}}:{headers:zD}:e;class hve{constructor(t){me(this,"fetchJson",(t,n)=>this.fetch(t,HD(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));me(this,"fetchEmpty",(t,n)=>this.fetch(t,HD(n)).then(async r=>{if(!r.ok)throw await r.json()}));this.fetch=t}}const pve=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",hve,"fetch"),e.serviceFactory("ScrollToTop",()=>ave),e.serviceFactory("MainHeader",ove,"ServersDropdown"),e.serviceFactory("Home",()=>ive),e.decorator("Home",wv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>tve),e.serviceFactory("ShlinkWebComponentContainer",dve,"buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>fve),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",nve,"window","console")},mve=2e3,gve=(e,t)=>(n=!1,r=mve)=>{const[i,o]=H.useState(n),a=H.useRef(void 0);return[i,()=>{o(!n),a.current&&t(a.current),a.current=e(()=>o(n),r)}]},M5=()=>{const e=ao();return()=>e(-1)},vve=()=>{const{search:e}=gn();return hl(e)},D5=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return m.jsxs(Yo,{centered:!0,isOpen:e,children:[m.jsxs(qo,{children:["Duplicated server",i&&"s"]}),m.jsxs(so,{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(H.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(fl,{children:[m.jsx(yt,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),m.jsx(yt,{color:"primary",onClick:r,children:"Save anyway"})]})]})},yve=e=>Mt(t=>t.preventDefault(),e),L5=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=H.useState(""),[a,s]=H.useState(""),[l,c]=H.useState(""),f=yve(()=>e({name:i,url:a,apiKey:l}));return H.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(Dm,{value:i,onChange:o,children:"Name"}),m.jsx(Dm,{type:"url",value:a,onChange:s,children:"URL"}),m.jsx(Dm,{value:l,onChange:c,children:"API key"})]}),m.jsx("div",{className:"text-end",children:n})]})},VD=4e3,WD=({type:e})=>m.jsx("div",{className:"mt-3",children:m.jsxs($r,{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."]})}),_ve=(e,t)=>({servers:n,createServers:r})=>{const i=ao(),o=M5(),a=!!Object.keys(n).length,[s,l]=t(!1,VD),[c,f]=t(!1,VD),[h,p]=mn(),[g,v]=H.useState(),y=()=>{if(!g)return;const x=JS();r([{...g,id:x}]),i(`/server/${x}`)};return H.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(_u,{children:[m.jsxs(L5,{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(WD,{type:"success"}),c&&m.jsx(WD,{type:"error"}),m.jsx(D5,{isOpen:h,duplicatedServers:g?[g]:[],onDiscard:o,onSave:y})]})},bve=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:vS}),m.jsx("span",{className:i,children:r??"Remove this server"})]}),m.jsx(e,{server:t,isOpen:o,toggle:s})]})},wve=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=ao(),a=H.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return m.jsxs(Yo,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[m.jsx(qo,{toggle:t,className:"text-danger",children:"Remove server"}),m.jsxs(so,{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(fl,{children:[m.jsx(yt,{color:"link",onClick:t,children:"Cancel"}),m.jsx(yt,{color:"danger",onClick:s,children:"Delete"})]})]})},xve=e=>k5(({editServer:t,selectedServer:n,selectServer:r})=>{const i=M5(),{reconnect:o}=vve();if(!Af(n))return null;const a=s=>{t(n.id,s),o==="true"&&r(n.id),i()};return m.jsx(_u,{children:m.jsxs(L5,{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 YD=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),Sve=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:a="bottom",className:s=""})=>{const l=dl(),[c,f]=H.useState(),[h,p]=H.useState([]),[g,,v,y]=mn(),x=Mt(t,i),b=Mt(()=>x(c??[]),y),w=Mt(()=>x((c??[]).filter(zY(YD(h)))),y),S=async({target:C})=>{var T;return e((T=C.files)==null?void 0:T[0]).then(f).then(()=>{C.value=null}).catch(o)};return H.useEffect(()=>{if(!c)return;const C=Object.values(n),T=c.filter(YD(C)),P=!!T.length;P?p(T):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:wG,fixedWidth:!0})," ",r??"Import from file"]}),m.jsxs(Pr,{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(D5,{isOpen:g,duplicatedServers:h,onDiscard:w,onSave:b})]})};const Ove=e=>({servers:t,selectedServer:n})=>m.jsx(_u,{children:m.jsxs("div",{className:"server-error__container flex-column",children:[m.jsxs(Po,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Af(n)&&"Could not find this Shlink server.",Af(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(O5,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",m.jsx(Ft,{to:"/server/create",children:"add a new one"}),"."]}),Af(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(Ft,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),Cve=4e3,Eve=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[a,s]=H.useState(o),l=p=>s(o.filter(({name:g,url:v})=>`${g} ${v}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[f,h]=n(!1,Cve);return H.useEffect(()=>{s(Object.values(i))},[i]),m.jsxs(_u,{children:[m.jsx(yh,{className:"mb-3",onChange:l}),m.jsxs(dr,{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:h,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:fA,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:Ft,to:"/server/create",children:[m.jsx(Ie,{icon:wS,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($r,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Tve=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:Pd,className:"text-primary",id:"autoConnectIcon"}),m.jsx(Pr,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:m.jsx(Ft,{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})})]}),Pve=e=>({server:t,setAutoConnect:n})=>{const[r,,i,o]=mn(),a=`/server/${t.id}`,{autoConnect:s}=t,l=s?_G:Aue;return m.jsxs(Ty,{minWidth:170,children:[m.jsxs(Ue,{tag:Ft,to:a,children:[m.jsx(Ie,{icon:vG,fixedWidth:!0})," Connect"]}),m.jsxs(Ue,{tag:Ft,to:`${a}/edit`,children:[m.jsx(Ie,{icon:yS,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:vS,fixedWidth:!0})," Remove server"]}),m.jsx(e,{redirectHome:!1,server:t,isOpen:r,toggle:o})]})},R5=(e,t)=>b6(e,t,{serializeError:gy}),kve={},Mve=e=>e.id?e:Ed("id",JS(),e),Dve=uS((e,t)=>Ed(t.id,t,e),{}),{actions:Lve,reducer:Rve}=ir({name:"shlink/servers",initialState:kve,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?Ed(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>_q(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?hf(Og(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):Ed(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:Mt(ah(Mve),Dve,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:jve,deleteServer:Nve,setAutoConnect:Ave,createServers:j5}=Lve,Ive=Rve,Fve=e=>Array.isArray(e)?e.filter(iA):[],$ve=e=>R5("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${_g.homepage}/servers.json`),i=Fve(r);n(j5(i))}),iC="shlink/selectedServer",Bve="1.0.0",Uve="999.999.999",zve="latest",Hve=Mt(e=>e===zve?Uve:e,P5(Bve)),Vve=eA(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Hve(n),printableVersion:T5(n)}))),qD=null,oC=Mn(`${iC}/resetSelectedServer`),Wve=e=>R5(`${iC}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(oC());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:a}=e(o),{version:s,printableVersion:l}=await Vve(o,a);return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),Yve=e=>ir({name:iC,initialState:qD,reducers:{},extraReducers:t=>{t.addCase(oC,()=>qD),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),qve=({servers:e,selectedServer:t})=>{const n=uu(e),r=()=>Yn(n)?m.jsxs(Ue,{tag:Ft,to:"/server/create",children:[m.jsx(Ie,{icon:wS})," ",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:Ft,to:`/server/${o}`,active:oG(t)===o,children:i},o)),m.jsx(Ue,{divider:!0}),m.jsxs(Ue,{tag:Ft,to:"/manage-servers",children:[m.jsx(Ie,{icon:fk})," ",m.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return m.jsxs(vh,{nav:!0,inNavbar:!0,children:[m.jsxs(ph,{nav:!0,caret:!0,children:[m.jsx(Ie,{icon:fk})," ",m.jsx("span",{className:"ms-1",children:"Servers"})]}),m.jsx(du,{end:!0,style:{right:0},children:r()})]})},Gve=({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)},Kve=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Gve(e,i,n)},Zve="shlink-servers.csv";class Qve{constructor(t,n,r){me(this,"exportServers",async()=>{const t=uu(this.storage.get("servers")??{}).map(aG);try{const n=this.jsonToCsv(t);Kve(this.window,n,Zve)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const Xve=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",Jve=e=>Array.isArray(e)&&e.every(Xve);class eye{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(!Jve(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 tye=(e,t)=>{e.serviceFactory("ManageServers",Eve,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",wv),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Tve,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",Pve,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",_ve,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",wv),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",xve,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>qve),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>wve),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",bve,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Sve,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",Ove,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",eye,"csvToJson","fileReaderFactory"),e.service("ServersExporter",Qve,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Wve,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>j5),e.serviceFactory("deleteServer",()=>Nve),e.serviceFactory("editServer",()=>jve),e.serviceFactory("setAutoConnect",()=>Ave),e.serviceFactory("fetchServers",$ve,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>oC),e.serviceFactory("selectedServerReducerCreator",Yve,"selectServer"),e.serviceFactory("selectedServerReducer",ct("reducer"),"selectedServerReducerCreator")},Oc=({children:e})=>m.jsx("small",{className:"form-text text-muted d-block",children:e}),nye=e=>e?`${e}`:"",rye=({settings:e,toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const{realTimeUpdates:r={enabled:!0}}=e,i=Ey();return m.jsxs(hn,{title:"Real-time updates",className:"h-100",children:[m.jsx(Nr,{children:m.jsxs(qc,{checked:r.enabled,onChange:t,children:["Enable or disable real-time updates.",m.jsxs(Oc,{children:["Real-time updates are currently being ",m.jsx("b",{children:r.enabled?"processed":"ignored"}),"."]})]})}),m.jsxs(pu,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Se("form-label",{"text-muted":!r.enabled}),id:i,children:[m.jsx(Yc,{type:"number",min:0,placeholder:"Immediate",disabled:!r.enabled,value:nye(r.interval),id:i,onChange:({target:o})=>n(Number(o.value))}),r.enabled&&m.jsxs(Oc,{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."]})]})]})},N5={field:"dateCreated",dir:"DESC"},iye={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:N5}},oye=(e,{payload:t})=>tA(e,t),vs=e=>({reducer:oye,prepare:e}),ys=e=>({payload:e}),{reducer:aye,actions:sye}=ir({name:"shlink/settings",initialState:iye,reducers:{toggleRealTimeUpdates:vs(e=>ys({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:vs(e=>ys({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:vs(e=>ys({shortUrlCreation:e})),setShortUrlsListSettings:vs(e=>ys({shortUrlsList:e})),setUiSettings:vs(e=>ys({ui:e})),setVisitsSettings:vs(e=>ys({visits:e})),setTagsSettings:vs(e=>ys({tags:e}))}}),{toggleRealTimeUpdates:lye,setRealTimeUpdatesInterval:cye,setShortUrlCreationSettings:uye,setShortUrlsListSettings:fye,setUiSettings:dye,setVisitsSettings:hye,setTagsSettings:pye}=sye,mye=aye,rb=({items:e})=>m.jsx(m.Fragment,{children:e.map((t,n)=>m.jsx("div",{className:"mb-3",children:t},n))}),gye=(e,t,n,r,i,o)=>()=>m.jsxs(_u,{children:[m.jsxs(B4,{className:"mb-3",children:[m.jsx(zf,{to:"general",children:"General"}),m.jsx(zf,{to:"short-urls",children:"Short URLs"}),m.jsx(zf,{to:"other-items",children:"Other items"})]}),m.jsxs(dy,{children:[m.jsx(vt,{path:"general",element:m.jsx(rb,{items:[m.jsx(r,{}),m.jsx(e,{})]})}),m.jsx(vt,{path:"short-urls",element:m.jsx(rb,{items:[m.jsx(t,{}),m.jsx(n,{})]})}),m.jsx(vt,{path:"other-items",element:m.jsx(rb,{items:[m.jsx(o,{}),m.jsx(i,{})]})}),m.jsx(vt,{path:"*",element:m.jsx(iS,{replace:!0,to:"general"})})]})]}),ib=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",vye=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."]}),yye=({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(Nr,{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(Oc,{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(Nr,{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(Oc,{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(pu,{noMargin:!0,label:"Tag suggestions search mode:",children:[m.jsxs(Go,{text:ib(n.tagFilteringMode),children:[m.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:ib("startsWith")}),m.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:ib("includes")})]}),m.jsx(Oc,{children:vye(n.tagFilteringMode)})]})]})},_ye={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},bye=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>m.jsx(hn,{title:"Short URLs list",className:"h-100",children:m.jsx(pu,{noMargin:!0,label:"Default ordering for short URLs list:",children:m.jsx(_h,{items:_ye,order:(e==null?void 0:e.defaultOrdering)??N5,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),wye={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},xye=({settings:{tags:e},setTagsSettings:t})=>m.jsx(hn,{title:"Tags",className:"h-100",children:m.jsx(pu,{noMargin:!0,label:"Default ordering for tags list:",children:m.jsx(_h,{items:wye,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const Sye=({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"?eK:zG,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}),V4(r)},children:"Use dark theme."})]}),A5={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},Oye=(e,t)=>!e||e==="all"?t:A5[e],Cye=({onChange:e,active:t,allText:n})=>m.jsxs(Go,{text:Oye(t,n),children:[m.jsx(Ue,{active:t==="all",onClick:()=>e("all"),children:n}),m.jsx(Ue,{divider:!0}),Object.entries(A5).map(([r,i])=>m.jsx(Ue,{active:t===r,onClick:()=>e(r),children:i},r))]}),GD=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},Eye=({settings:e,setVisitsSettings:t})=>{var n,r;return m.jsxs(hn,{title:"Visits",className:"h-100",children:[m.jsx(Nr,{children:m.jsxs(qc,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:GD(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",m.jsxs(Oc,{children:["The visits coming from potential bots will be ",m.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),m.jsx(pu,{noMargin:!0,label:"Default interval to load on visits sections:",children:m.jsx(Cye,{allText:"All visits",active:GD(e),onChange:i=>t({defaultInterval:i})})})]})},Tye=(e,t)=>{e.serviceFactory("Settings",gye,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",wv),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>rye),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>yye),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>Sye),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>Eye),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>xye),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>bye),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>lye),e.serviceFactory("setRealTimeUpdatesInterval",()=>cye),e.serviceFactory("setShortUrlCreationSettings",()=>uye),e.serviceFactory("setShortUrlsListSettings",()=>fye),e.serviceFactory("setUiSettings",()=>dye),e.serviceFactory("setVisitsSettings",()=>hye),e.serviceFactory("setTagsSettings",()=>pye)};var Pye=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=h;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(h,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 X=!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(X)return ie(E).length;M=(""+M).toLowerCase(),X=!0}}function x(E,M,I){var X=E[M];E[M]=E[I],E[I]=X}function b(E,M,I,X,Q){if(E.length===0)return-1;if(typeof I=="string"?(X=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,isNaN(I)&&(I=Q?0:E.length-1),I<0&&(I=E.length+I),I>=E.length){if(Q)return-1;I=E.length-1}else if(I<0){if(!Q)return-1;I=0}if(typeof M=="string"&&(M=c.from(M,X)),c.isBuffer(M))return M.length===0?-1:w(E,M,I,X,Q);if(typeof M=="number")return M&=255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(E,M,I):Uint8Array.prototype.lastIndexOf.call(E,M,I):w(E,[M],I,X,Q);throw new TypeError("val must be string, number or Buffer")}function w(E,M,I,X,Q){var se,ge=1,Le=E.length,ue=M.length;if(X!==void 0&&((X=String(X).toLowerCase())==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(E.length<2||M.length<2)return-1;ge=2,Le/=2,ue/=2,I/=2}function ve(Me,De){return ge===1?Me[De]:Me.readUInt16BE(De*ge)}if(Q){var _e=-1;for(se=I;seLe&&(I=Le-ue),se=I;se>=0;se--){for(var Ee=!0,Re=0;ReQ&&(X=Q):X=Q;var se=M.length;if(se%2!=0)throw new TypeError("Invalid hex string");X>se/2&&(X=se/2);for(var ge=0;ge>8,ue=ge%256,ve.push(ue),ve.push(Le);return ve}(M,E.length-I),E,I,X)}function z(E,M,I){return M===0&&I===E.length?i.fromByteArray(E):i.fromByteArray(E.slice(M,I))}function N(E,M,I){I=Math.min(E.length,I);for(var X=[],Q=M;Q239?4:ve>223?3:ve>191?2:1;if(Q+Ee<=I)switch(Ee){case 1:ve<128&&(_e=ve);break;case 2:(192&(se=E[Q+1]))==128&&(ue=(31&ve)<<6|63&se)>127&&(_e=ue);break;case 3:se=E[Q+1],ge=E[Q+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[Q+1],ge=E[Q+2],Le=E[Q+3],(192&se)==128&&(192&ge)==128&&(192&Le)==128&&(ue=(15&ve)<<18|(63&se)<<12|(63&ge)<<6|63&Le)>65535&&ue<1114112&&(_e=ue)}_e===null?(_e=65533,Ee=1):_e>65535&&(_e-=65536,X.push(_e>>>10&1023|55296),_e=56320|1023&_e),X.push(_e),Q+=Ee}return function(Re){var Me=Re.length;if(Me<=V)return String.fromCharCode.apply(String,Re);for(var De="",ce=0;cethis.length||((X===void 0||X>this.length)&&(X=this.length),X<=0)||(X>>>=0)<=(I>>>=0))return"";for(M||(M="utf8");;)switch(M){case"hex":return q(this,I,X);case"utf8":case"utf-8":return N(this,I,X);case"ascii":return W(this,I,X);case"latin1":case"binary":return ne(this,I,X);case"base64":return z(this,I,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,I,X);default:if(Q)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),Q=!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,X,Q){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),X===void 0&&(X=0),Q===void 0&&(Q=this.length),M<0||I>E.length||X<0||Q>this.length)throw new RangeError("out of range index");if(X>=Q&&M>=I)return 0;if(X>=Q)return-1;if(M>=I)return 1;if(M>>>=0,I>>>=0,X>>>=0,Q>>>=0,this===E)return 0;for(var se=Q-X,ge=I-M,Le=Math.min(se,ge),ue=this.slice(X,Q),ve=E.slice(M,I),_e=0;_eQ)&&(I=Q),E.length>0&&(I<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");for(var se=!1;;)switch(X){case"hex":return S(this,E,M,I);case"utf8":case"utf-8":return C(this,E,M,I);case"ascii":return T(this,E,M,I);case"latin1":case"binary":return P(this,E,M,I);case"base64":return R(this,E,M,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,E,M,I);default:if(se)throw new TypeError("Unknown encoding: "+X);X=(""+X).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 X="";I=Math.min(E.length,I);for(var Q=M;QX)&&(I=X);for(var Q="",se=M;seI)throw new RangeError("Trying to access beyond buffer length")}function le(E,M,I,X,Q,se){if(!c.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>Q||ME.length)throw new RangeError("Index out of range")}function G(E,M,I,X){M<0&&(M=65535+M+1);for(var Q=0,se=Math.min(E.length-I,2);Q>>8*(X?Q:1-Q)}function F(E,M,I,X){M<0&&(M=4294967295+M+1);for(var Q=0,se=Math.min(E.length-I,4);Q>>8*(X?Q:3-Q)&255}function A(E,M,I,X,Q,se){if(I+X>E.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function B(E,M,I,X,Q){return Q||A(E,0,I,4),o.write(E,M,I,X,23,4),I+4}function re(E,M,I,X,Q){return Q||A(E,0,I,8),o.write(E,M,I,X,52,8),I+8}c.prototype.slice=function(E,M){var I,X=this.length;if(E=~~E,M=M===void 0?X:~~M,E<0?(E+=X)<0&&(E=0):E>X&&(E=X),M<0?(M+=X)<0&&(M=0):M>X&&(M=X),M0&&(Q*=256);)X+=this[E+--M]*Q;return X},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 X=this[E],Q=1,se=0;++se=(Q*=128)&&(X-=Math.pow(2,8*M)),X},c.prototype.readIntBE=function(E,M,I){E|=0,M|=0,I||oe(E,M,this.length);for(var X=M,Q=1,se=this[E+--X];X>0&&(Q*=256);)se+=this[E+--X]*Q;return se>=(Q*=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,X){E=+E,M|=0,I|=0,X||le(this,E,M,I,Math.pow(2,8*I)-1,0);var Q=1,se=0;for(this[M]=255&E;++se=0&&(se*=256);)this[M+Q]=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,X){if(E=+E,M|=0,!X){var Q=Math.pow(2,8*I-1);le(this,E,M,I,Q-1,-Q)}var se=0,ge=1,Le=0;for(this[M]=255&E;++se>0)-Le&255;return M+I},c.prototype.writeIntBE=function(E,M,I,X){if(E=+E,M|=0,!X){var Q=Math.pow(2,8*I-1);le(this,E,M,I,Q-1,-Q)}var se=I-1,ge=1,Le=0;for(this[M+se]=255&E;--se>=0&&(ge*=256);)E<0&&Le===0&&this[M+se+1]!==0&&(Le=1),this[M+se]=(E/ge>>0)-Le&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 B(this,E,M,!0,I)},c.prototype.writeFloatBE=function(E,M,I){return B(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,X){if(I||(I=0),X||X===0||(X=this.length),M>=E.length&&(M=E.length),M||(M=0),X>0&&X=this.length)throw new RangeError("sourceStart out of bounds");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),E.length-M=0;--Q)E[Q+M]=this[Q+I];else if(se<1e3||!c.TYPED_ARRAY_SUPPORT)for(Q=0;Q>>=0,I=I===void 0?this.length:I>>>0,E||(E=0),typeof E=="number")for(se=M;se55295&&I<57344){if(!Q){if(I>56319){(M-=3)>-1&&se.push(239,191,189);continue}if(ge+1===X){(M-=3)>-1&&se.push(239,191,189);continue}Q=I;continue}if(I<56320){(M-=3)>-1&&se.push(239,191,189),Q=I;continue}I=65536+(Q-55296<<10|I-56320)}else Q&&(M-=3)>-1&&se.push(239,191,189);if(Q=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 pe(E,M,I,X){for(var Q=0;Q=M.length||Q>=E.length);++Q)M[Q+I]=E[Q];return Q}}).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,h=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):h=-1,c.length&&g())}function g(){if(!f){var x=s(p);f=!0;for(var b=c.length;b;){for(l=c,c=[];++h1)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,h,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,h=0;h0&&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,h;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(h=f;h-- >0;)if(l[h]===s||l[h].listener&&l[h].listener===s){c=h;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(N){var V=this;this.next=null,this.entry=null,this.finish=function(){(function(W,ne,q){var J=W.entry;for(W.entry=null;J;){var oe=J.callback;ne.pendingcb--,oe(void 0),J=J.next}ne.corkedRequestsFree?ne.corkedRequestsFree.next=W:ne.corkedRequestsFree=W})(V,N)}}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 h,p={deprecate:n(44)},g=n(24),v=n(7).Buffer,y=o.Uint8Array||function(){},x=n(25);function b(){}function w(N,V){l=l||n(1),N=N||{};var W=V instanceof l;this.objectMode=!!N.objectMode,W&&(this.objectMode=this.objectMode||!!N.writableObjectMode);var ne=N.highWaterMark,q=N.writableHighWaterMark,J=this.objectMode?16:16384;this.highWaterMark=ne||ne===0?ne:W&&(q||q===0)?q:J,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=N.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=N.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,B=A.sync,re=A.writecb;if(function(Z){Z.writing=!1,Z.writecb=null,Z.length-=Z.writelen,Z.writelen=0}(A),F)(function(Z,ie,ae,pe,E){--ie.pendingcb,ae?(a.nextTick(E,pe),a.nextTick(z,Z,ie),Z._writableState.errorEmitted=!0,Z.emit("error",pe)):(E(pe),Z._writableState.errorEmitted=!0,Z.emit("error",pe),z(Z,ie))})(G,A,B,F,re);else{var U=R(A);U||A.corked||A.bufferProcessing||!A.bufferedRequest||P(G,A),B?c(T,G,A,U,re):T(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(N){if(l=l||n(1),!(h.call(S,this)||this instanceof l))return new S(N);this._writableState=new w(N,this),this.writable=!0,N&&(typeof N.write=="function"&&(this._write=N.write),typeof N.writev=="function"&&(this._writev=N.writev),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.final=="function"&&(this._final=N.final)),g.call(this)}function C(N,V,W,ne,q,J,oe){V.writelen=ne,V.writecb=oe,V.writing=!0,V.sync=!0,W?N._writev(q,V.onwrite):N._write(q,J,V.onwrite),V.sync=!1}function T(N,V,W,ne){W||function(q,J){J.length===0&&J.needDrain&&(J.needDrain=!1,q.emit("drain"))}(N,V),V.pendingcb--,ne(),z(N,V)}function P(N,V){V.bufferProcessing=!0;var W=V.bufferedRequest;if(N._writev&&W&&W.next){var ne=V.bufferedRequestCount,q=new Array(ne),J=V.corkedRequestsFree;J.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(N,V,!0,V.length,q,"",J.finish),V.pendingcb++,V.lastBufferedRequest=null,J.next?(V.corkedRequestsFree=J.next,J.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(N,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 R(N){return N.ending&&N.length===0&&N.bufferedRequest===null&&!N.finished&&!N.writing}function j(N,V){N._final(function(W){V.pendingcb--,W&&N.emit("error",W),V.prefinished=!0,N.emit("prefinish"),z(N,V)})}function z(N,V){var W=R(V);return W&&(function(ne,q){q.prefinished||q.finalCalled||(typeof ne._final=="function"?(q.pendingcb++,q.finalCalled=!0,a.nextTick(j,ne,q)):(q.prefinished=!0,ne.emit("prefinish")))}(N,V),V.pendingcb===0&&(V.finished=!0,N.emit("finish"))),W}f.inherits(S,g),w.prototype.getBuffer=function(){for(var N=this.bufferedRequest,V=[];N;)V.push(N),N=N.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"?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(N){return!!h.call(this,N)||this===S&&N&&N._writableState instanceof w}})):h=function(N){return N instanceof this},S.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},S.prototype.write=function(N,V,W){var ne=this._writableState,q=!1,J=!ne.objectMode&&function(oe){return v.isBuffer(oe)||oe instanceof y}(N);return J&&!v.isBuffer(N)&&(N=function(oe){return v.from(oe)}(N)),typeof V=="function"&&(W=V,V=null),J?V="buffer":V||(V=ne.defaultEncoding),typeof W!="function"&&(W=b),ne.ended?function(oe,le){var G=new Error("write after end");oe.emit("error",G),a.nextTick(le,G)}(this,W):(J||function(oe,le,G,F){var A=!0,B=!1;return G===null?B=new TypeError("May not write null values to stream"):typeof G=="string"||G===void 0||le.objectMode||(B=new TypeError("Invalid non-string/buffer chunk")),B&&(oe.emit("error",B),a.nextTick(F,B),A=!1),A}(this,ne,N,W))&&(ne.pendingcb++,q=function(oe,le,G,F,A,B){if(!G){var re=function(ae,pe,E){return ae.objectMode||ae.decodeStrings===!1||typeof pe!="string"||(pe=v.from(pe,E)),pe}(le,F,A);F!==re&&(G=!0,A="buffer",F=re)}var U=le.objectMode?1:F.length;le.length+=U;var Z=le.length-1))throw new TypeError("Unknown encoding: "+N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(N,V,W){W(new Error("_write() is not implemented"))},S.prototype._writev=null,S.prototype.end=function(N,V,W){var ne=this._writableState;typeof N=="function"?(W=N,N=null,V=null):typeof V=="function"&&(W=V,V=null),N!=null&&this.write(N,V),ne.corked&&(ne.corked=1,this.uncork()),ne.ending||ne.finished||function(q,J,oe){J.ending=!0,z(q,J),oe&&(J.finished?a.nextTick(oe):q.once("finish",oe)),J.ended=!0,q.writable=!1}(this,ne,W)},Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),S.prototype.destroy=x.destroy,S.prototype._undestroy=x.undestroy,S.prototype._destroy=function(N,V){this.end(),V(N)}}).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(h)return h(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 h=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()}},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,h,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=h(w),C=new c(f);C._propagateFrom(this,1);var T=this._target();if(C._setBoundTo(S),S instanceof c){var P={promiseRejectionQueued:!1,promise:C,target:T,bindingPromise:S};T._then(f,y,void 0,C,P),S._then(x,b,void 0,C,P),C._setOnCancel(S)}else C._resolveCallback(T);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),h=c(null);f[" size"]=h[" size"]=0}s.exports=function(p){var g=a("./util"),v=g.canEvaluate;function y(w){return function(S,C){var T;if(S!=null&&(T=S[C]),typeof T!="function"){var P="Object "+g.classString(S)+" has no method '"+g.toString(C)+"'";throw new p.TypeError(P)}return T}(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,h,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 h[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,h.push(this._trace))},p.prototype._popContext=function(){if(this._trace!==void 0){var v=h.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 h,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+\)/,T=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,P=null,R=null,j=!1,z=b.env("BLUEBIRD_DEBUG")!=0,N=!(b.env("BLUEBIRD_WARNINGS")==0||!z&&!b.env("BLUEBIRD_WARNINGS")),V=!(b.env("BLUEBIRD_LONG_STACK_TRACES")==0||!z&&!b.env("BLUEBIRD_LONG_STACK_TRACES")),W=b.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(N||!!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",h,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();h=typeof ce=="function"?de===null?ce:b.domainBind(de,ce):void 0};var ne=function(){};c.longStackTraces=function(){if(y.haveItemsQueued()&&!De.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);if(!De.longStackTraces&&ue()){var ce=c.prototype._captureStackTrace,de=c.prototype._attachExtraTrace;De.longStackTraces=!0,ne=function(){if(y.haveItemsQueued()&&!De.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created See http://goo.gl/MqrFmX `);c.prototype._captureStackTrace=ce,c.prototype._attachExtraTrace=de,f.deactivateLongStackTraces(),y.enableTrampoline(),De.longStackTraces=!1},c.prototype._captureStackTrace=E,c.prototype._attachExtraTrace=M,f.activateLongStackTraces(),y.disableTrampolineIfNecessary()}},c.hasLongStackTraces=function(){return De.longStackTraces&&ue()};var q=function(){try{if(typeof CustomEvent=="function"){var ce=new CustomEvent("CustomEvent");return b.global.dispatchEvent(ce),function(de,be){var ye=new CustomEvent(de.toLowerCase(),{detail:be,cancelable:!0});return!b.global.dispatchEvent(ye)}}return typeof Event=="function"?(ce=new Event("CustomEvent"),b.global.dispatchEvent(ce),function(de,be){var ye=new Event(de.toLowerCase(),{cancelable:!0});return ye.detail=be,!b.global.dispatchEvent(ye)}):((ce=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),b.global.dispatchEvent(ce),function(de,be){var ye=document.createEvent("CustomEvent");return ye.initCustomEvent(de.toLowerCase(),!1,!0,be),!b.global.dispatchEvent(ye)})}catch{}return function(){return!1}}(),J=b.isNode?function(){return r.emit.apply(r,arguments)}:b.global?function(ce){var de="on"+ce.toLowerCase(),be=b.global[de];return!!be&&(be.apply(b.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function oe(ce,de){return{promise:de}}var le={promiseCreated:oe,promiseFulfilled:oe,promiseRejected:oe,promiseResolved:oe,promiseCancelled:oe,promiseChained:function(ce,de,be){return{promise:de,child:be}},warning:function(ce,de){return{warning:de}},unhandledRejection:function(ce,de,be){return{reason:de,promise:be}},rejectionHandled:oe},G=function(ce){var de=!1;try{de=J.apply(null,arguments)}catch(ye){y.throwLater(ye),de=!0}var be=!1;try{be=q(ce,le[ce].apply(null,arguments))}catch(ye){y.throwLater(ye),be=!0}return be||de};function F(){return!1}function A(ce,de,be){var ye=this;try{ce(de,be,function(Oe){if(typeof Oe!="function")throw new TypeError("onCancel must be a function, got: "+b.toString(Oe));ye._attachCancellationCallback(Oe)})}catch(Oe){return Oe}}function B(ce){if(!this._isCancellable())return this;var de=this._onCancel();de!==void 0?b.isArray(de)?de.push(ce):this._setOnCancel([de,ce]):this._setOnCancel(ce)}function re(){return this._onCancelField}function U(ce){this._onCancelField=ce}function Z(){this._cancellationParent=void 0,this._onCancelField=void 0}function ie(ce,de){if(1&de){this._cancellationParent=ce;var be=ce._branchesRemainingToCancel;be===void 0&&(be=0),ce._branchesRemainingToCancel=be+1}2&de&&ce._isBound()&&this._setBoundTo(ce._boundTo)}c.config=function(ce){if("longStackTraces"in(ce=Object(ce))&&(ce.longStackTraces?c.longStackTraces():!ce.longStackTraces&&c.hasLongStackTraces()&&ne()),"warnings"in ce){var de=ce.warnings;De.warnings=!!de,W=De.warnings,b.isObject(de)&&"wForgottenReturn"in de&&(W=!!de.wForgottenReturn)}if("cancellation"in ce&&ce.cancellation&&!De.cancellation){if(y.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");c.prototype._clearCancellationData=Z,c.prototype._propagateFrom=ie,c.prototype._onCancel=re,c.prototype._setOnCancel=U,c.prototype._attachCancellationCallback=B,c.prototype._execute=A,ae=ie,De.cancellation=!0}return"monitoring"in ce&&(ce.monitoring&&!De.monitoring?(De.monitoring=!0,c.prototype._fireEvent=G):!ce.monitoring&&De.monitoring&&(De.monitoring=!1,c.prototype._fireEvent=F)),c},c.prototype._fireEvent=F,c.prototype._execute=function(ce,de,be){try{ce(de,be)}catch(ye){return ye}},c.prototype._onCancel=function(){},c.prototype._setOnCancel=function(ce){},c.prototype._attachCancellationCallback=function(ce){},c.prototype._captureStackTrace=function(){},c.prototype._attachExtraTrace=function(){},c.prototype._clearCancellationData=function(){},c.prototype._propagateFrom=function(ce,de){};var ae=function(ce,de){2&de&&ce._isBound()&&this._setBoundTo(ce._boundTo)};function pe(){var ce=this._boundTo;return ce!==void 0&&ce instanceof c?ce.isFulfilled()?ce.value():void 0:ce}function E(){this._trace=new Re(this._peekContext())}function M(ce,de){if(w(ce)){var be=this._trace;if(be!==void 0&&de&&(be=be._parent),be!==void 0)be.attachExtraTrace(ce);else if(!ce.__stackCleaned__){var ye=Q(ce);b.notEnumerableProp(ce,"stack",ye.message+` `+ye.stack.join(` `)),b.notEnumerableProp(ce,"__stackCleaned__",!0)}}}function I(ce,de,be){if(De.warnings){var ye,Oe=new x(ce);if(de)be._attachExtraTrace(Oe);else if(De.longStackTraces&&(ye=c._peekContext()))ye.attachExtraTrace(Oe);else{var ke=Q(Oe);Oe.stack=ke.message+` `+ke.stack.join(` `)}G("warning",Oe)||se(Oe,"",!0)}}function X(ce){for(var de=[],be=0;be0?function(ye){for(var Oe=ye.stack.replace(/\s+$/g,"").split(` `),ke=0;ke0&&ye.name!="SyntaxError"&&(Oe=Oe.slice(ke)),Oe}(ce):[" (No stack trace)"],{message:be,stack:ce.name=="SyntaxError"?de:X(de)}}function se(ce,de,be){if(typeof console<"u"){var ye;if(b.isObject(ce)){var Oe=ce.stack;ye=de+R(Oe,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 Oe=!1;try{typeof de=="function"&&(Oe=!0,ce==="rejectionHandled"?de(ye):de(be,ye))}catch(ke){y.throwLater(ke)}ce==="unhandledRejection"?G(ce,be,ye)||Oe||se(be,"Unhandled rejection "):G(ce,ye)}function Le(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 Ee(ce){var de=ce.match(_e);if(de)return{fileName:de[1],line:parseInt(de[2],10)}}function Re(ce){this._parent=ce,this._promisesCreated=0;var de=this._length=1+(ce===void 0?0:ce._length);Me(this,Re),de>32&&this.uncycle()}b.inherits(Re,Error),f.CapturedTrace=Re,Re.prototype.uncycle=function(){var ce=this._length;if(!(ce<2)){for(var de=[],be={},ye=0,Oe=this;Oe!==void 0;++ye)de.push(Oe),Oe=Oe._parent;for(ye=(ce=this._length=ye)-1;ye>=0;--ye){var ke=de[ye].stack;be[ke]===void 0&&(be[ke]=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}}}},Re.prototype.attachExtraTrace=function(ce){if(!ce.__stackCleaned__){this.uncycle();for(var de=Q(ce),be=de.message,ye=[de.stack],Oe=this;Oe!==void 0;)ye.push(X(Oe.stack.split(` `))),Oe=Oe._parent;(function(ke){for(var Ne=ke[0],Qe=1;Qe=0;--Sn)if(et[Sn]===Gt){zt=Sn;break}for(Sn=zt;Sn>=0;--Sn){var or=et[Sn];if(Ne[qe]!==or)break;Ne.pop(),qe--}Ne=et}})(ye),function(ke){for(var Ne=0;Ne=0)return P=/@/,R=de,j=!0,function(ke){ke.stack=new Error().stack};try{throw new Error}catch(ke){ye="stack"in ke}return"stack"in Oe||!ye||typeof Error.stackTraceLimit!="number"?(R=function(ke,Ne){return typeof ke=="string"?ke:typeof Ne!="object"&&typeof Ne!="function"||Ne.name===void 0||Ne.message===void 0?Le(Ne):Ne.toString()},null):(P=ce,R=de,function(ke){Error.stackTraceLimit+=6;try{throw new Error}catch(Ne){ke.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 De={warnings:N,longStackTraces:!1,cancellation:!1,monitoring:!1};return V&&c.longStackTraces(),{longStackTraces:function(){return De.longStackTraces},warnings:function(){return De.warnings},cancellation:function(){return De.cancellation},monitoring:function(){return De.monitoring},propagateFromFunction:function(){return ae},boundValueFunction:function(){return pe},checkForgottenReturns:function(ce,de,be,ye,Oe){if(ce===void 0&&de!==null&&W){if(Oe!==void 0&&Oe._returnedNonUndefined()||!(65535&ye._bitField))return;be&&(be+=" ");var ke="",Ne="";if(de._trace){for(var Qe=de._trace.stack.split(` `),et=X(Qe),qe=et.length-1;qe>=0;--qe){var Gt=et[qe];if(!C.test(Gt)){var zt=Gt.match(T);zt&&(ke="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 or="a promise was created in a "+be+"handler "+ke+"but was not returned from it, see http://goo.gl/rRqMUw"+Ne;ye._warn(or,!0,de)}},setBounds:function(ce,de){if(ue()){for(var be,ye,Oe=ce.stack.split(` `),ke=de.stack.split(` `),Ne=-1,Qe=-1,et=0;et=Qe||(ve=function(Gt){if(S.test(Gt))return!0;var zt=Ee(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:Re,fireDomEvent:q,fireGlobalEvent:J}}},{"./errors":12,"./util":36}],10:[function(a,s,l){s.exports=function(c){function f(){return this.value}function h(){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(h,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,h,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 h=c.reduce,p=c.all;function g(){return p(this)}c.prototype.each=function(v){return h(this,v,f,0)._then(g,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(v){return h(this,v,f,f)},c.each=function(v,y){return h(v,y,f,0)._then(g,void 0,void 0,v,void 0)},c.mapSeries=function(v,y){return h(v,y,f,f)}}},{}],12:[function(a,s,l){var c,f,h=a("./es5"),p=h.freeze,g=a("./util"),v=g.inherits,y=g.notEnumerableProp;function x(N,V){function W(ne){if(!(this instanceof W))return new W(ne);y(this,"message",typeof ne=="string"?ne:V),y(this,"name",N),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 T="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),P=0;P1?P.cancelPromise._reject(R):P.cancelPromise._cancel(),P.cancelPromise=null,!0)}function S(){return T.call(this,this.promise._target()._settledValue())}function C(P){if(!w(this,P))return v.e=P,v}function T(P){var R=this.promise,j=this.handler;if(!this.called){this.called=!0;var z=this.isFinallyHandler()?j.call(R._boundValue()):j.call(R._boundValue(),P);if(z===h)return z;if(z!==void 0){R._setReturnedNonUndefined();var N=f(z,R);if(N instanceof c){if(this.cancelPromise!=null){if(N._isCancelled()){var V=new g("late cancellation observer");return R._attachExtraTrace(V),v.e=V,v}N.isPending()&&N._attachCancellationCallback(new b(this))}return N._then(S,C,void 0,this,void 0)}}}return R.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,R,j,z){return typeof P!="function"?this.then():this._then(j,z,void 0,new x(this,R,P),void 0)},c.prototype.lastly=c.prototype.finally=function(P){return this._passThrough(P,0,T,T)},c.prototype.tap=function(P){return this._passThrough(P,1,T)},c.prototype.tapCatch=function(P){var R=arguments.length;if(R===1)return this._passThrough(P,1,void 0,T);var j,z=new Array(R-1),N=0;for(j=0;j0&&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,h,p,g,v){var y=c._getDomain,x=a("./util"),b=x.tryCatch,w=x.errorObj,S=c._async;function C(P,R,j,z){this.constructor$(P),this._promise._captureStackTrace();var N=y();this._callback=N===null?R:x.domainBind(N,R),this._preservedValues=z===g?new Array(this.length()):null,this._limit=j,this._inFlight=0,this._queue=[],S.invoke(this._asyncInit,this,void 0)}function T(P,R,j,z){if(typeof R!="function")return h("expecting a function but got "+x.classString(R));var N=0;if(j!==void 0){if(typeof j!="object"||j===null)return c.reject(new TypeError("options argument must be an object but it is "+x.classString(j)));if(typeof j.concurrency!="number")return c.reject(new TypeError("'concurrency' must be a number but it is "+x.classString(j.concurrency)));N=j.concurrency}return new C(P,R,N=typeof N=="number"&&isFinite(N)&&N>=1?N:0,z).promise()}x.inherits(C,f),C.prototype._asyncInit=function(){this._init$(void 0,-2)},C.prototype._init=function(){},C.prototype._promiseFulfilled=function(P,R){var j=this._values,z=this.length(),N=this._preservedValues,V=this._limit;if(R<0){if(j[R=-1*R-1]=P,V>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(V>=1&&this._inFlight>=V)return j[R]=P,this._queue.push(R),!1;N!==null&&(N[R]=P);var W=this._promise,ne=this._callback,q=W._boundValue();W._pushContext();var J=b(ne).call(q,P,R,z),oe=W._popContext();if(v.checkForgottenReturns(J,oe,N!==null?"Promise.filter":"Promise.map",W),J===w)return this._reject(J.e),!0;var le=p(J,this._promise);if(le instanceof c){var G=(le=le._target())._bitField;if(!(50397184&G))return V>=1&&this._inFlight++,j[R]=le,le._proxy(this,-1*(R+1)),!1;if(!(33554432&G))return 16777216&G?(this._reject(le._reason()),!0):(this._cancel(),!0);J=le._value()}j[R]=J}return++this._totalResolved>=z&&(N!==null?this._filter(j,N):this._resolve(j),!0)},C.prototype._drainQueue=function(){for(var P=this._queue,R=this._limit,j=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 T=w._popContext();return g.checkForgottenReturns(b,T,"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,h=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 h(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(Z-1),pe=0;for(ie=0;ie0&&typeof U!="function"&&typeof Z!="function"){var ie=".then() only accepts functions but was passed: "+y.classString(U);arguments.length>1&&(ie+=", "+y.classString(Z)),this._warn(ie)}return this._then(U,Z,void 0,void 0,void 0)},F.prototype.done=function(U,Z){this._then(U,Z,void 0,void 0,void 0)._setIsFinal()},F.prototype.spread=function(U){return typeof U!="function"?h("expecting a function but got "+y.classString(U)):this.all()._then(U,void 0,void 0,R,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 N(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 Z=new F(P);Z._captureStackTrace();var ie=arguments.length>1&&!!Object(arguments[1]).multiArgs,ae=G(U)(oe(Z,ie));return ae===le&&Z._rejectCallback(ae.e,!0),Z._isFateSealed()||Z._setAsyncGuaranteed(),Z},F.all=function(U){return new N(U).promise()},F.cast=function(U){var Z=z(U);return Z instanceof F||((Z=new F(P))._captureStackTrace(),Z._setFulfilled(),Z._rejectionHandler0=U),Z},F.resolve=F.fulfilled=F.cast,F.reject=F.rejected=function(U){var Z=new F(P);return Z._captureStackTrace(),Z._rejectCallback(U,!0),Z},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,Z,ie,ae,pe){var E=pe!==void 0,M=E?pe:new F(P),I=this._target(),X=I._bitField;E||(M._propagateFrom(this,3),M._captureStackTrace(),ae===void 0&&2097152&this._bitField&&(ae=50397184&X?this._boundValue():I===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,M));var Q=g();if(50397184&X){var se,ge,Le=I._settlePromiseCtx;33554432&X?(ge=I._rejectionHandler0,se=U):16777216&X?(ge=I._fulfillmentHandler0,se=Z,I._unsetRejectionIsUnhandled()):(Le=I._settlePromiseLateCancellationObserver,ge=new T("late cancellation observer"),I._attachExtraTrace(ge),se=Z),w.invoke(Le,I,{handler:Q===null?se:typeof se=="function"&&y.domainBind(Q,se),promise:M,receiver:ae,value:ge})}else I._addCallbacks(U,Z,M,ae,Q);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 Z=U===0?this._receiver0:this[4*U-4+3];if(Z!==v)return Z===void 0&&this._isBound()?this._boundValue():Z},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 Z=U._fulfillmentHandler0,ie=U._rejectionHandler0,ae=U._promise0,pe=U._receiverAt(0);pe===void 0&&(pe=v),this._addCallbacks(Z,ie,ae,pe,null)},F.prototype._migrateCallbackAt=function(U,Z){var ie=U._fulfillmentHandlerAt(Z),ae=U._rejectionHandlerAt(Z),pe=U._promiseAt(Z),E=U._receiverAt(Z);E===void 0&&(E=v),this._addCallbacks(ie,ae,pe,E,null)},F.prototype._addCallbacks=function(U,Z,ie,ae,pe){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=pe===null?U:y.domainBind(pe,U)),typeof Z=="function"&&(this._rejectionHandler0=pe===null?Z:y.domainBind(pe,Z));else{var M=4*E-4;this[M+2]=ie,this[M+3]=ae,typeof U=="function"&&(this[M+0]=pe===null?U:y.domainBind(pe,U)),typeof Z=="function"&&(this[M+1]=pe===null?Z:y.domainBind(pe,Z))}return this._setLength(E+1),E},F.prototype._proxy=function(U,Z){this._addCallbacks(void 0,void 0,Z,U,null)},F.prototype._resolveCallback=function(U,Z){if(!(117506048&this._bitField)){if(U===this)return this._rejectCallback(c(),!1);var ie=z(U,this);if(!(ie instanceof F))return this._fulfill(U);Z&&this._propagateFrom(ie,2);var ae=ie._target();if(ae!==this){var pe=ae._bitField;if(50397184&pe)if(33554432&pe)this._fulfill(ae._value());else if(16777216&pe)this._reject(ae._reason());else{var I=new T("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&Z)>0&&(134217728&Z?this._settlePromises():w.settlePromises(this))}},F.prototype._reject=function(U){var Z=this._bitField;if(!((117506048&Z)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=U,this._isFinal())return w.fatalError(U,y.isNode);(65535&Z)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled()}},F.prototype._fulfillPromises=function(U,Z){for(var ie=1;ie0){if(16842752&U){var ie=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,ie,U),this._rejectPromises(Z,ie)}else{var ae=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,ae,U),this._fulfillPromises(Z,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 ne.deprecated("Promise.defer","new Promise"),{promise:new F(P),resolve:A,reject:B}},y.notEnumerableProp(F,"_makeSelfResolutionError",c),a("./method")(F,P,z,h,ne),a("./bind")(F,P,z,ne),a("./cancel")(F,N,h,ne),a("./direct_resolve")(F),a("./synchronous_inspection")(F),a("./join")(F,N,z,P,w,g),F.Promise=F,F.version="3.5.1",a("./map.js")(F,N,h,z,P,ne),a("./call_get.js")(F),a("./using.js")(F,h,z,W,P,ne),a("./timers.js")(F,P,ne),a("./generators.js")(F,h,P,z,p,ne),a("./nodeify.js")(F),a("./promisify.js")(F,P),a("./props.js")(F,N,z,h),a("./race.js")(F,P,z,h),a("./reduce.js")(F,N,h,z,P,ne),a("./settle.js")(F,N,ne),a("./some.js")(F,N,h),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)),ne.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,h,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=h(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 T=p("expecting an array or an iterable object but got "+v.classString(S)).reason();this._promise._rejectCallback(T,!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,T=0;T=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(N){for(var V=new g,W=N.length/2|0,ne=0;ne>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 h=="function"&&typeof h.resolve=="function"){var v=h.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,h){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 h.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,h){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 h(`expecting a positive integer See http://goo.gl/MqrFmX `);var T=new b(S),P=T.promise();return T.setHowMany(C),T.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 h=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()},g=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 g.call(this._target())},c.prototype.isResolved=function(){return x.call(this._target())},c.prototype.value=function(){return h.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 h=a("./util"),p=h.errorObj,g=h.isObject,v={}.hasOwnProperty;return function(y,x){if(g(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,T){var P=new c(f),R=P;T&&T._pushContext(),P._captureStackTrace(),T&&T._popContext();var j=!0,z=h.tryCatch(C).call(S,function(N){P&&(P._resolveCallback(N),P=null)},function(N){P&&(P._rejectCallback(N,j,!0),P=null)});return j=!1,P&&z===p&&(P._rejectCallback(z.e,!0,!0),P=null),R}(y,b,x)}return y}}},{"./util":36}],34:[function(a,s,l){s.exports=function(c,f,h){var p=a("./util"),g=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 T,P;return C!==void 0?(T=c.resolve(C)._then(y,null,null,S,void 0),h.cancellation()&&C instanceof c&&T._setOnCancel(C)):(T=new c(f),P=setTimeout(function(){T._fulfill()},+S),h.cancellation()&&T._setOnCancel(new v(P)),T._captureStackTrace()),T._setAsyncGuaranteed(),T};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 T,P;S=+S;var R=new v(setTimeout(function(){T.isPending()&&function(j,z,N){var V;V=typeof z!="string"?z instanceof Error?z:new g("operation timed out"):new g(z),p.markAsOriginatingFromRejection(V),j._attachExtraTrace(V),j._reject(V),N!=null&&N.cancel()}(T,C,P)},S));return h.cancellation()?(P=this.then(),(T=P._then(b,w,void 0,R,void 0))._setOnCancel(R)):T=this._then(b,w,void 0,R,void 0),T}}},{"./util":36}],35:[function(a,s,l){s.exports=function(c,f,h,p,g,v){var y=a("./util"),x=a("./errors").TypeError,b=a("./util").inherits,w=y.errorObj,S=y.tryCatch,C={};function T(V){setTimeout(function(){throw V},0)}function P(V,W){var ne=0,q=V.length,J=new c(g);return function oe(){if(ne>=q)return J._fulfill();var le=function(G){var F=h(G);return F!==G&&typeof G._isDisposable=="function"&&typeof G._getDisposer=="function"&&G._isDisposable()&&F._setDisposable(G._getDisposer()),F}(V[ne++]);if(le instanceof c&&le._isDisposable()){try{le=h(le._getDisposer().tryDispose(W),V.promise)}catch(G){return T(G)}if(le instanceof c)return le._then(oe,T,null,null,null)}oe()}(),J}function R(V,W,ne){this._data=V,this._promise=W,this._context=ne}function j(V,W,ne){this.constructor$(V,W,ne)}function z(V){return R.isDisposer(V)?(this.resources[this.index]._setDisposable(V),V.promise()):V}function N(V){this.length=V,this.promise=null,this[V-1]=null}R.prototype.data=function(){return this._data},R.prototype.promise=function(){return this._promise},R.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():C},R.prototype.tryDispose=function(V){var W=this.resource(),ne=this._context;ne!==void 0&&ne._pushContext();var q=W!==C?this.doDispose(W,V):null;return ne!==void 0&&ne._popContext(),this._promise._unsetDisposable(),this._data=null,q},R.isDisposer=function(V){return V!=null&&typeof V.resource=="function"&&typeof V.tryDispose=="function"},b(j,R),j.prototype.doDispose=function(V,W){return this.data().call(V,V,W)},N.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 j(V,this,p());throw new x}}},{"./errors":12,"./util":36}],36:[function(a,s,l){var c,f=a("./es5"),h=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(J){return p.e=J,p}}function y(q){return q==null||q===!0||q===!1||typeof q=="string"||typeof q=="number"}function x(q,J,oe){if(y(q))return q;var le={value:oe,configurable:!0,enumerable:!1,writable:!0};return f.defineProperty(q,J,le),q}var b=function(){var q=[Array.prototype,Object.prototype,Function.prototype],J=function(G){for(var F=0;F1,le=J.length>0&&!(J.length===1&&J[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,J,oe){if(!f.isES5)return{}.hasOwnProperty.call(q,J)?q[J]:void 0;var le=Object.getOwnPropertyDescriptor(q,J);return le!=null?le.get==null&&le.set==null?le.value:oe:void 0},thrower:function(q){throw q},isArray:f.isArray,asArray:z,notEnumerableProp:x,isPrimitive:y,isObject:function(q){return typeof q=="function"||typeof q=="object"&&q!==null},isError:T,canEvaluate:h,errorObj:p,tryCatch:function(q){return c=q,v},inherits:function(q,J){var oe={}.hasOwnProperty;function le(){for(var G in this.constructor=q,this.constructor$=J,J.prototype)oe.call(J.prototype,G)&&G.charAt(G.length-1)!=="$"&&(this[G+"$"]=J.prototype[G])}return le.prototype=J.prototype,q.prototype=new le,q.prototype},withAppended:function(q,J){var oe,le=q.length,G=new Array(le+1);for(oe=0;oe10||q[0]>0}(),ne.isNode&&ne.toFastProperties(r);try{throw new Error}catch(q){ne.lastLineError=q}s.exports=ne},{"./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 B=="string"||ae.objectMode||Object.getPrototypeOf(B)===f.prototype||(B=function(pe){return f.from(pe)}(B)),U?ae.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):P(A,ae,B,!0):ae.ended?A.emit("error",new Error("stream.push() after EOF")):(ae.reading=!1,ae.decoder&&!re?(B=ae.decoder.write(B),ae.objectMode||B.length!==0?P(A,ae,B,!1):V(A,ae)):P(A,ae,B,!1))):U||(ae.reading=!1)),function(pe){return!pe.ended&&(pe.needReadable||pe.lengthB.highWaterMark&&(B.highWaterMark=function(re){return re>=R?re=R:(re--,re|=re>>>1,re|=re>>>2,re|=re>>>4,re|=re>>>8,re|=re>>>16,re++),re}(A)),A<=B.length?A:B.ended?B.length:(B.needReadable=!0,0))}function z(A){var B=A._readableState;B.needReadable=!1,B.emittedReadable||(v("emitReadable",B.flowing),B.emittedReadable=!0,B.sync?o.nextTick(N,A):N(A))}function N(A){v("emit readable"),A.emit("readable"),J(A)}function V(A,B){B.readingMore||(B.readingMore=!0,o.nextTick(W,A,B))}function W(A,B){for(var re=B.length;!B.reading&&!B.flowing&&!B.ended&&B.length=B.length?(re=B.decoder?B.buffer.join(""):B.buffer.length===1?B.buffer.head.data:B.buffer.concat(B.length),B.buffer.clear()):re=function(U,Z,ie){var ae;return UQ.length?Q.length:pe;if(se===Q.length?X+=Q:X+=Q.slice(0,pe),(pe-=se)==0){se===Q.length?(++I,M.next?E.head=M.next:E.head=E.tail=null):(E.head=M,M.data=Q.slice(se));break}++I}return E.length-=I,X}(U,Z):function(pe,E){var M=f.allocUnsafe(pe),I=E.head,X=1;for(I.data.copy(M),pe-=I.data.length;I=I.next;){var Q=I.data,se=pe>Q.length?Q.length:pe;if(Q.copy(M,M.length-pe,0,se),(pe-=se)==0){se===Q.length?(++X,I.next?E.head=I.next:E.head=E.tail=null):(E.head=I,I.data=Q.slice(se));break}++X}return E.length-=X,M}(U,Z),ae}(A,B.buffer,B.decoder),re);var re}function le(A){var B=A._readableState;if(B.length>0)throw new Error('"endReadable()" called on non-empty stream');B.endEmitted||(B.ended=!0,o.nextTick(G,B,A))}function G(A,B){A.endEmitted||A.length!==0||(A.endEmitted=!0,B.readable=!1,B.emit("end"))}function F(A,B){for(var re=0,U=A.length;re=B.highWaterMark||B.ended))return v("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?le(this):z(this),null;if((A=j(A,B))===0&&B.ended)return B.length===0&&le(this),null;var U,Z=B.needReadable;return v("need readable",Z),(B.length===0||B.length-A0?oe(A,B):null)===null?(B.needReadable=!0,A=0):B.length-=A,B.length===0&&(B.ended||(B.needReadable=!0),re!==A&&B.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,B){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,B);var Z=B&&B.end===!1||A===i.stdout||A===i.stderr?se:ie;function ie(){v("onend"),A.end()}U.endEmitted?o.nextTick(Z):re.once("end",Z),A.on("unpipe",function ge(Le,ue){v("onunpipe"),Le===re&&ue&&ue.hasUnpiped===!1&&(ue.hasUnpiped=!0,v("cleanup"),A.removeListener("close",X),A.removeListener("finish",Q),A.removeListener("drain",ae),A.removeListener("error",I),A.removeListener("unpipe",ge),re.removeListener("end",ie),re.removeListener("end",se),re.removeListener("data",M),pe=!0,!U.awaitDrain||A._writableState&&!A._writableState.needDrain||ae())});var ae=function(ge){return function(){var Le=ge._readableState;v("pipeOnDrain",Le.awaitDrain),Le.awaitDrain&&Le.awaitDrain--,Le.awaitDrain===0&&l(ge,"data")&&(Le.flowing=!0,J(ge))}}(re);A.on("drain",ae);var pe=!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)&&!pe&&(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 X(){A.removeListener("finish",Q),se()}function Q(){v("onfinish"),A.removeListener("close",X),se()}function se(){v("unpipe"),re.unpipe(A)}return re.on("data",M),function(ge,Le,ue){if(typeof ge.prependListener=="function")return ge.prependListener(Le,ue);ge._events&&ge._events[Le]?s(ge._events[Le])?ge._events[Le].unshift(ue):ge._events[Le]=[ue,ge._events[Le]]:ge.on(Le,ue)}(A,"error",I),A.once("close",X),A.once("finish",Q),A.emit("pipe",re),U.flowing||(v("pipe resume"),re.resume()),A},C.prototype.unpipe=function(A){var B=this._readableState,re={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return A&&A!==B.pipes?this:(A||(A=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,A&&A.emit("unpipe",this,re),this);if(!A){var U=B.pipes,Z=B.pipesCount;B.pipes=null,B.pipesCount=0,B.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 h(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):--T=0?(P>0&&(w.lastNeed=P-2),P):--T=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 h=this._transformState;h.transforming=!1;var p=h.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.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),h=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 h.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,h=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)}}():h&&"onreadystatechange"in h.createElement("script")?function(){var y=h.documentElement;s=function(x){var b=h.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",h),s.on("close",p));var f=!1;function h(){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",h),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 h(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-h;else{if(s===f)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),s-=h}return(y?-1:1)*l*Math.pow(2,s-o)},t.write=function(n,r,i,o,a,s){var l,c,f,h=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,h-=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),h=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,T=this;return S===void 0&&(S=!1),C=S?w.toString():l.prepareData(w,this.converter.parseRuntime),s.default.resolve().then(function(){return T.runtime.preRawDataHook?T.runtime.preRawDataHook(C):C}).then(function(P){return P&&P.length>0?T.processCSV(P,S):s.default.resolve([])})},b.prototype.processCSV=function(w,S){var C=this,T=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),T.ignoreEmpty&&!P.started&&(w=h.trimLeft(w));var R=f.stringToLines(w,P);return S?(R.lines.push(R.partial),R.partial=""):this.prependLeftBuf(h.bufFromString(R.partial)),R.lines.length>0?(P.preFileLineHook?this.runPreLineHook(R.lines):s.default.resolve(R.lines)).then(function(j){return P.started||C.runtime.headers?C.processCSVBody(j):C.processDataWithHead(j)}):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 T=S+w.shift(),P=this.rowSplit.parse(T);if(P.closed){C=P.cells,S="";break}S=T+c.default(T,this.runtime)}if(this.prependLeftBuf(h.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=R.length)N();else if(j.preFileLineHook){var V=R[z],W=j.preFileLineHook(V,j.parsedLineNumber+z);if(z++,W&&W.then)W.then(function(ne){R[z-1]=ne,P(R,j,z,N)});else{for(R[z-1]=W;z0?r.concat([h.csvLineBuffer,f]):f}(a,s);s.csvLineBuffer=void 0;var c=function(f,h){var p=f.length-1;if(128&f[p]){for(;(192&f[p])==128;)p--;p--}return p!=f.length-1?(h.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,h=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(h)for(var v=0;vh&&(p=g,h=v)}),p},l.prototype.isQuoteOpen=function(c){var f=this.quote,h=this.escape;return c[0]===f&&(c[1]!==f||c[1]===h&&(c[2]===f||c.length===2))},l.prototype.isQuoteClose=function(c){var f=this.quote,h=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,g=c.length-1;c[g]===f||c[g]===h;)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 h=this.cachedRegExp[f];return c.replace(h,this.quote)},l.prototype.parseMultiLines=function(c){for(var f=[],h="";c.length;){var p=h+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),h=""):h=p+(i.default(p,this.conv.parseRuntime)||` `))}return{rowsCells:f,partial:h}},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,T,P){for(var R=!1,j={},z=0,N=C.length;z-1){for(var P=w.split("."),R=!0;P.length>0;)if(P.shift().length===0){R=!1;break}!R||C.parseParam.colParser[w]&&C.parseParam.colParser[w].flat?C.parseRuntime.columnValueSetter[T]=h:C.parseRuntime.columnValueSetter[T]=p}else C.parseRuntime.columnValueSetter[T]=h;C.parseParam.nullObject===!0&&S==="null"&&(S=null),C.parseRuntime.columnValueSetter[T](b,w,S)}function h(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,h){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 h=f+"";return h=="0"&&1/f==-1/0?"-0":h}},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,h=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&h===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,T=y[b],P=C(T,x.parseRuntime.parsedLineNumber+b);if(b++,P&&P.then)P.then(function(){(function(j,z,N,V,W,ne,q){W&&s(N,q),v(j,N,V,W,ne)})(y,0,x,b,w,S,T)},S);else{for(w&&s(x,T);bnew Promise(t=>{kye().fromString(e).then(t)}),Dye=new XI,Lye=e=>Dye.parse(e),Rye="shlink",KD=e=>`${Rye}.${e}`;class jye{constructor(t){me(this,"get",t=>{const n=this.localStorage.getItem(KD(t));return n?JSON.parse(n):void 0});me(this,"set",(t,n)=>this.localStorage.setItem(KD(t),JSON.stringify(n)));this.localStorage=t}}class Nye{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const Aye=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",jye,"localStorage"),e.service("TagColorsStorage",Nye,"Storage"),e.constant("csvToJson",Mye),e.constant("jsonToCsv",Lye),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",gve,"setTimeout","clearTimeout")},yl=new zN,{container:aC}=yl,Iye=(e,t)=>(...n)=>e[t](...n),Fye=(e,t)=>({...e,[t]:Iye(aC,t)}),zy=(e,t=[])=>bN(e?mS(e):null,t.reduce(Fye,{}));Bae(yl,zy);pve(yl,zy);qoe(yl);tye(yl,zy);Aye(yl);Tye(yl,zy);var sC={},Lx={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 B=0,re=Array(A);BmO({appUpdated:$ae,servers:Ive,selectedServer:e.selectedServerReducer,settings:mye}),Uye=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},zye=!0,I5={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Hye=Uye(sC.load(I5)),Vye=e=>y6({devTools:!zye,reducer:Bye(e),preloadedState:Hye,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(sC.save(I5))}),Wye=!!(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 Yye(e){if("serviceWorker"in navigator){if(new URL(_g.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${_g.homepage}/service-worker.js`;Wye?(qye(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")})):F5(n,e)})}}function F5(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 qye(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()})}):F5(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const Gye="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=",Kye="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==",Zye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Qye=()=>{delete ID.Icon.Default.prototype._getIconUrl,ID.Icon.Default.mergeOptions({iconRetinaUrl:Kye,iconUrl:Gye,shadowUrl:Zye})};Qye();const $5=Vye(aC),{App:Xye,ScrollToTop:Jye,ErrorHandler:e0e,appUpdateAvailable:t0e}=aC;aN(document.getElementById("root")).render(m.jsx(wN,{store:$5,children:m.jsx(MN,{basename:_g.homepage,children:m.jsx(e0e,{children:m.jsx(Jye,{children:m.jsx(Xye,{})})})})}));Yye({onUpdate(){$5.dispatch(t0e())}});